{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.LZDO2nUb/b1/gsoap_2.8.104-3_i386.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.LZDO2nUb/b2/gsoap_2.8.104-3_i386.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,7 +1,7 @@\n \n f44e294c5d0fa7a3b52bc97e40585ed1 5799204 debug optional gsoap-dbgsym_2.8.104-3_i386.deb\n- fa75e0e6e8d10f769475953643d582e5 12620544 doc optional gsoap-doc_2.8.104-3_all.deb\n+ 5a53dc679c1e74d689b2d994db177727 12620468 doc optional gsoap-doc_2.8.104-3_all.deb\n dc016c666471b37dff830c062a95ed9f 1513436 devel optional gsoap_2.8.104-3_i386.deb\n 1a60028545cc9922c4fd44bb7d855e06 1340592 debug optional libgsoap-2.8.104-dbgsym_2.8.104-3_i386.deb\n a03c1fc869bfdb6e4a8d22f2c8af0ddd 307452 libs optional libgsoap-2.8.104_2.8.104-3_i386.deb\n 89a7b2122e5f3ccc2a24b8c038311df6 316604 libdevel optional libgsoap-dev_2.8.104-3_i386.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 46988 2021-03-08 13:06:23.000000 control.tar.xz\n--rw-r--r-- 0 0 0 12573364 2021-03-08 13:06:23.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 12573288 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) 1834591 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) 1834632 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,57712 +56951,57715 @@\n 000de760: 6c69 7374 3c2f 7370 616e 3e20 3c73 7061 list id="1&\n 000de7b0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;.S...
...Y
.
.S.Y
.
...Y
.
<\n-000de8e0: 6e65 7874 2068 7265 663d 2671 756f 743b next href="\n-000de8f0: 3c2f 7370 616e 3e23 3126 7175 6f74 3b2f #1"/\n-000de900: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000de920: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </n\n-000de940: 6578 743c 2f73 7061 6e3e 2667 743b 203c ext> <\n-000de950: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</ns:list>
.\n-000de9a0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d In case multi-r\n-000de9d0: 6566 6572 656e 6365 6420 6461 7461 2069 eferenced data i\n-000de9e0: 7320 7265 6365 6976 6564 2074 6861 7420 s received that \n-000de9f0: 2264 6f65 7320 6e6f 7420 6669 7420 696e \"does not fit in\n-000dea00: 2061 2070 6f69 6e74 6572 2d62 6173 6564 a pointer-based\n-000dea10: 2073 7472 7563 7475 7265 222c 2074 6865 structure\", the\n-000dea20: 2064 6174 6120 6973 2063 6f70 6965 642e data is copied.\n-000dea30: 2046 6f72 2065 7861 6d70 6c65 2c20 7468 For example, th\n-000dea40: 6520 666f 6c6c 6f77 696e 6720 7477 6f20 e following two \n-000dea50: 7374 7275 6374 7320 6172 6520 7369 6d69 structs are simi\n-000dea60: 6c61 722c 2065 7863 6570 7420 7468 6174 lar, except that\n-000dea70: 2074 6865 2066 6972 7374 2075 7365 7320 the first uses \n-000dea80: 706f 696e 7465 722d 6261 7365 6420 6d65 pointer-based me\n-000dea90: 6d62 6572 7320 7768 696c 6520 7468 6520 mbers while the \n-000deaa0: 6f74 6865 7220 7573 6573 206e 6f6e 2d70 other uses non-p\n-000deab0: 6f69 6e74 6572 2d62 6173 6564 206d 656d ointer-based mem\n-000deac0: 6265 7273 3a3c 2f70 3e0a 3c64 6976 2063 bers:

.
\n-000deae0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
typedef<\n-000deb10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> long xsd\n-000deb40: 5f5f 696e 743b 203c 2f64 6976 3e0a 3c64 __int;
.\n-000deb60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000deb90: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n-000deba0: 5f5f 7265 636f 7264 203c 2f64 6976 3e0a __record
.\n-000debb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
\n-000debe0: 7873 645f 5f69 6e74 202a 613b 203c 2f64 xsd__int *a; .
xsd__i\n-000dec10: 6e74 202a 623b 203c 2f64 6976 3e0a 3c64 nt *b;
.\n-000dec30: 7d20 503b 203c 2f64 6976 3e0a 3c64 6976 } P;
. <\n-000dec50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
st\n-000dec80: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__\n-000dec90: 7265 636f 7264 3c2f 6469 763e 0a3c 6469 record
.{\n-000decb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173 .
xsd\n-000decd0: 5f5f 696e 7420 613b 203c 2f64 6976 3e0a __int a;
.\n-000dece0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
xsd__int b\n-000ded00: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
} R; \n-000ded20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000ded40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int\n-000ded70: 3c2f 7370 616e 3e20 6d61 696e 2829 3c2f main().
{
.<\n-000deda0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000dedb0: 3e20 2050 2e61 203d 2026 616d 703b 6e3b > P.a = &n;\n-000dedc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
P.b \n-000dede0: 3d20 2661 6d70 3b6e 3b20 3c2f 6469 763e = &n;
\n-000dedf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
... /\n-000dee20: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
.<\n-000dee30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000dee40: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}.<\n-000dee50: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000dee60: 3c70 3e53 696e 6365 2062 6f74 6820 3c63

Since both a and\n-000dee80: 203c 636f 6465 3e62 3c2f 636f 6465 3e20 b \n-000dee90: 6d65 6d62 6572 7320 6f66 203c 636f 6465 members of P point \n-000deeb0: 746f 2074 6865 2073 616d 6520 696e 7465 to the same inte\n-000deec0: 6765 722c 2074 6865 2073 6572 6961 6c69 ger, the seriali\n-000deed0: 7a61 7469 6f6e 206f 6620 3c63 6f64 653e zation of \n-000deee0: 503c 2f63 6f64 653e 2070 726f 6475 6365 P produce\n-000deef0: 7320 6120 6d75 6c74 692d 7265 6665 7265 s a multi-refere\n-000def00: 6e63 6520 696e 2053 4f41 5020 312e 3120 nce in SOAP 1.1 \n-000def10: 5250 4320 656e 636f 6469 6e67 3a3c 2f70 RPC encoding:.

<\n-000def60: 3c73 7061 6e20 636c 6173 733d 226b 6579 ns:rec\n-000def80: 6f72 643c 2f73 7061 6e3e 2667 743b 203c ord> <\n-000def90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<a\n-000defd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 href=&\n-000df010: 7175 6f74 3b23 3126 7175 6f74 3b3c 2f73 quot;#1"/>
\n-000df030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<b href="\n-000df0b0: 2331 2671 756f 743b 3c2f 7370 616e 3e2f #1"/\n-000df0c0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
.&l\n-000df0e0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ns:\n-000df100: 7265 636f 7264 3c2f 7370 616e 3e26 6774 record>\n-000df110: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<<\n-000df130: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000df140: 6f72 6474 7970 6522 3e69 643c 2f73 7061 ordtype\">id id=&\n-000df190: 7175 6f74 3b31 2671 756f 743b 3c2f 7370 quot;1">123</<\n-000df1b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000df1c0: 6f72 6474 7970 6522 3e69 643c 2f73 7061 ordtype\">id>
.

Th\n-000df200: 6520 6465 7365 7269 616c 697a 6174 696f e deserializatio\n-000df210: 6e20 6f66 2074 6865 2063 6f6e 7465 6e74 n of the content\n-000df220: 2069 6e20 7468 6520 3c63 6f64 653e 523c in the R<\n-000df230: 2f63 6f64 653e 2064 6174 6120 7374 7275 /code> data stru\n-000df240: 6374 7572 6520 7468 6174 2064 6f65 7320 cture that does \n-000df250: 6e6f 7420 7573 6520 706f 696e 7465 7273 not use pointers\n-000df260: 2074 6f20 696e 7465 6765 7273 2072 6573 to integers res\n-000df270: 756c 7473 2069 6e20 6120 636f 7079 206f ults in a copy o\n-000df280: 6620 6561 6368 206d 756c 7469 2d72 6566 f each multi-ref\n-000df290: 6572 656e 6365 2069 6e74 6567 6572 2e20 erence integer. \n-000df2a0: 4e6f 7465 2074 6861 7420 7468 6520 7477 Note that the tw\n-000df2b0: 6f20 7374 7275 6374 7320 7265 7365 6d62 o structs resemb\n-000df2c0: 6c65 2074 6865 2073 616d 6520 584d 4c20 le the same XML \n-000df2d0: 6461 7461 2074 7970 6520 6265 6361 7573 data type becaus\n-000df2e0: 6520 7468 6520 7472 6169 6c69 6e67 2075 e the trailing u\n-000df2f0: 6e64 6572 7363 6f72 6520 7769 6c6c 2062 nderscore will b\n-000df300: 6520 6967 6e6f 7265 6420 696e 2058 4d4c e ignored in XML\n-000df310: 2065 6e63 6f64 696e 6720 616e 6420 6465 encoding and de\n-000df320: 636f 6469 6e67 2e3c 2f70 3e0a 3c70 3ef0 coding.

.

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

.NULL poin\n-000df390: 7465 7273 2061 6e64 206e 696c 2065 6c65 ters and nil ele\n-000df3a0: 6d65 6e74 733c 2f68 333e 0a3c 703e 4120 ments

.

A \n-000df3b0: 4e55 4c4c 2070 6f69 6e74 6572 2069 7320 NULL pointer is \n-000df3c0: 6e6f 7420 7365 7269 616c 697a 6564 2c20 not serialized, \n-000df3d0: 756e 6c65 7373 2074 6865 2070 6f69 6e74 unless the point\n-000df3e0: 6572 206d 656d 6265 7220 6f66 2061 2073 er member of a s\n-000df3f0: 7472 7563 7420 6f72 2063 6c61 7373 2069 truct or class i\n-000df400: 7320 6465 636c 6172 6564 2069 6e20 7468 s declared in th\n-000df410: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head\n-000df420: 6572 2066 696c 6520 6173 206e 696c 6c61 er file as nilla\n-000df430: 626c 6520 7769 7468 203c 636f 6465 3e6e ble with n\n-000df440: 756c 6c70 7472 3c2f 636f 6465 3e20 6f72 ullptr or\n-000df450: 2069 6e20 7468 6520 756e 6c69 6b65 6c79 in the unlikely\n-000df460: 2063 6173 6520 7468 6520 706f 696e 7465 case the pointe\n-000df470: 7220 6974 7365 6c66 2069 7320 706f 696e r itself is poin\n-000df480: 7465 6420 746f 2062 7920 616e 6f74 6865 ted to by anothe\n-000df490: 7220 706f 696e 7465 7220 2862 7574 2073 r pointer (but s\n-000df4a0: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Run-time flags<\n-000df4e0: 2f61 3e20 746f 2063 6f6e 7472 6f6c 2074 /a> to control t\n-000df4f0: 6865 2073 6572 6961 6c69 7a61 7469 6f6e he serialization\n-000df500: 206f 6620 4e55 4c4c 7329 2c20 666f 7220 of NULLs), for \n-000df510: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

.
struc\n-000df560: 7420 3c2f 7370 616e 3e58 203c 2f64 6976 t X .
{
. \n-000df5a0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-000df5c0: 2f73 7061 6e3e 202a 703b 203c 2f64 6976 /span> *p; .
int **q\n-000df610: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000df630: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000df640: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int *r nul\n-000df670: 6c70 7472 3c2f 7370 616e 3e20 313b 3c2f lptr 1;.
}
.<\n-000df6a0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The typ\n-000df6c0: 6573 2073 6563 7469 6f6e 206f 6620 6120 es section of a \n-000df6d0: 5753 444c 2064 6573 6372 6970 7469 6f6e WSDL description\n-000df6e0: 2063 6f6e 7461 696e 7320 696e 666f 726d contains inform\n-000df6f0: 6174 696f 6e20 6f6e 2074 6865 2022 6e69 ation on the \"ni\n-000df700: 6c6c 6162 696c 6974 7922 206f 6620 6461 llability\" of da\n-000df710: 7461 2c20 7768 6963 6820 6973 2064 6563 ta, which is dec\n-000df720: 6c61 7265 6420 6173 203c 636f 6465 3e6e lared as n\n-000df730: 756c 6c70 7472 3c2f 636f 6465 3e20 6d65 ullptr me\n-000df740: 6d62 6572 7320 7768 6572 6520 7468 6520 mbers where the \n-000df750: 3c63 6f64 653e 313c 2f63 6f64 653e 2069 1 i\n-000df760: 6e64 6963 6174 6573 2074 6861 7420 7468 ndicates that th\n-000df770: 6520 6d65 6d62 6572 2069 7320 7265 7175 e member is requ\n-000df780: 6972 6564 2028 3c65 6d3e 3c63 6f64 653e ired (\n-000df790: 6d69 6e4f 6363 7572 733c 2f63 6f64 653e minOccurs\n-000df7a0: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and maxOccurs are 1 \n-000df7d0: 7365 7420 7769 7468 203c 636f 6465 3e31 set with 1\n-000df7e0: 3a31 3c2f 636f 6465 3e20 6f72 2073 696d :1 or sim\n-000df7f0: 706c 7920 3c63 6f64 653e 313c 2f63 6f64 ply 1).

.

Supp\n-000df810: 6f73 6520 706f 696e 7465 7220 3c63 6f64 ose pointer q point\n-000df830: 7320 746f 2070 6f69 6e74 6572 203c 636f s to pointer p and \n-000df850: 7375 7070 6f73 6520 3c63 6f64 653e 703c suppose p<\n-000df860: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and r are NU\n-000df880: 4c4c 2e20 496e 2074 6861 7420 6361 7365 LL. In that case\n-000df890: 2074 6865 203c 636f 6465 3e58 3c2f 636f the X struct is se\n-000df8b0: 7269 616c 697a 6564 2077 6974 6820 3c63 rialized with #SOAP_XML_GR\n-000df8d0: 4150 483c 2f63 6f64 653e 2061 733a 3c2f APH as:.

<\n-000df920: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;X>
.\n-000df960: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000df980: 703c 2f73 7061 6e3e 203c 7370 616e 2063 p i\n-000df9a0: 643c 2f73 7061 6e3e 3d3c 7370 616e 2063 d="1&quo\n-000df9d0: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n-000df9f0: 7873 693a 6e69 6c3c 2f73 7061 6e3e 3d3c xsi:nil=<\n-000dfa00: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000dfa10: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000dfa20: 3b74 7275 6526 7175 6f74 3b3c 2f73 7061 ;true"/>
.\n-000dfa50: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000dfa70: 713c 2f73 7061 6e3e 203c 7370 616e 2063 q r\n-000dfa90: 6566 3c2f 7370 616e 3e3d 3c73 7061 6e20 ef=.S.Y
.
<r id\n-000dfb00: 3d26 7175 6f74 3b3c 2f73 7061 6e3e 313c ="1<\n-000dfb10: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000dfb20: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000dfb30: 3b20 7873 693a 6e69 6c3d 2671 756f 743b ; xsi:nil="\n-000dfb40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 tru\n-000dfb60: 653c 2f73 7061 6e3e 2671 756f 743b 2f26 e"/&\n-000dfb70: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
<\n-000dfb90: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /X>
.

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

.

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

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

.

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

.

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

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

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

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

.

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

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

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

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

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

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

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

.

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

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

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

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

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

.

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

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

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

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

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

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

.

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

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

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

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

.

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

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

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

.

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

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

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

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

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

.

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

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

.

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

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

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

.

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

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

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

.

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

.

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

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

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

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

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

.
\n-000e43e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
Vector::Vector\n-000e4400: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
.
{.
this->\n-000e4440: 736f 6170 5f64 6566 6175 6c74 284e 554c soap_default(NUL\n-000e4450: 4c29 3b3c 2f64 6976 3e0a 3c64 6976 2063 L);
.
}.
Vector::Ve\n-000e4490: 6374 6f72 283c 7370 616e 2063 6c61 7373 ctor(struc\n-000e44b0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-000e44e0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, int \n-000e4540: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
.
{.
this->\n-000e4580: 3b73 6f61 7020 3d20 3c61 2063 6c61 7373 ;soap = soap;
\n-000e45e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
__ptr = soa\n-000e4600: 705f 6e65 775f 666c 6f61 7428 3c61 2063 p_new_float(soap, n);\n-000e4640: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
__si\n-000e4660: 7a65 203d 206e 3b20 3c2f 6469 763e 0a3c ze = n;
.<\n-000e4670: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e4680: 3e20 205f 5f6f 6666 7365 7420 3d20 313b > __offset = 1;\n+000de7d0: 6974 6572 616c 223e 304f 2f3c 2f73 7061 iteral\">0O/
.
@␒\n+000de820: 2f26 2378 3234 3033 3b3c 2f73 7061 6e3e /␃\n+000de830: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
0O/␃\n+000de870: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000de890: 3c73 7061 6e20 636c 6173 733d 2273 7472 @&#x\n+000de8b0: 3234 3132 3b2f 2623 7832 3430 333b 3c2f 2412;/␃
. &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=0O/$\n+000dfae0: 3033 3b3c 2f73 7061 6e3e 3c2f 6469 763e 03;
\n+000dfaf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
\n+000dfb20: 2026 6c74 3b72 2069 643d 2671 756f 743b <r id="\n+000dfb30: 3c2f 7370 616e 3e31 3c73 7061 6e20 636c 1" xsi:n\n+000dfb60: 696c 3d26 7175 6f74 3b3c 2f73 7061 6e3e il="\n+000dfb70: 3c73 7061 6e20 636c 6173 733d 226b 6579 true"/>.
</X>\n+000dfbe0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
<\n+000dfc00: 2f64 6976 3e3c 703e 5468 6520 6465 7365 /div>

The dese\n+000dfc10: 7269 616c 697a 6572 2072 6563 6f6e 7374 rializer reconst\n+000dfc20: 7275 6374 7320 7468 6520 7374 7275 6374 ructs the struct\n+000dfc30: 203c 636f 6465 3e58 3c2f 636f 6465 3e20 X \n+000dfc40: 6672 6f6d 2074 6869 7320 666f 726d 206f from this form o\n+000dfc50: 6620 584d 4c2c 2074 6865 7265 6279 2070 f XML, thereby p\n+000dfc60: 7265 7365 7276 696e 6720 7468 6520 696e reserving the in\n+000dfc70: 7465 6772 6974 7920 6f66 2074 6865 2064 tegrity of the d\n+000dfc80: 6174 6120 7374 7275 6374 7572 6520 7365 ata structure se\n+000dfc90: 7269 616c 697a 6564 2e3c 2f70 3e0a 3c70 rialized.

.When the deseri\n+000dfcb0: 616c 697a 6572 2065 6e63 6f75 6e74 6572 alizer encounter\n+000dfcc0: 7320 616e 2058 4d4c 2065 6c65 6d65 6e74 s an XML element\n+000dfcd0: 2074 6861 7420 6861 7320 6120 3c65 6d3e that has a \n+000dfce0: 3c63 6f64 653e 7873 693a 6e69 6c3d 2274 xsi:nil=\"t\n+000dfcf0: 7275 6522 3c2f 636f 6465 3e3c 2f65 6d3e rue\"\n+000dfd00: 2061 7474 7269 6275 7465 2062 7574 2074 attribute but t\n+000dfd10: 6865 2063 6f72 7265 7370 6f6e 6469 6e67 he corresponding\n+000dfd20: 2043 2f43 2b2b 2064 6174 6120 6973 206e C/C++ data is n\n+000dfd30: 6f74 2061 2070 6f69 6e74 6572 206f 7220 ot a pointer or \n+000dfd40: 7265 6665 7265 6e63 652c 2074 6865 2064 reference, the d\n+000dfd50: 6573 6572 6961 6c69 7a65 7220 7769 6c6c eserializer will\n+000dfd60: 2074 6572 6d69 6e61 7465 2077 6974 6820 terminate with \n+000dfd70: 6120 3c63 6f64 653e 2353 4f41 505f 4e55 a #SOAP_NU\n+000dfd80: 4c4c 3c2f 636f 6465 3e20 6661 756c 7420 LL fault \n+000dfd90: 7768 656e 2074 6865 203c 636f 6465 3e23 when the #\n+000dfda0: 534f 4150 5f58 4d4c 5f53 5452 4943 543c SOAP_XML_STRICT<\n+000dfdb0: 2f63 6f64 653e 2066 6c61 6720 6973 2073 /code> flag is s\n+000dfdc0: 6574 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 et.

.

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

..Void pointer \n+000dfe30: 7365 7269 616c 697a 6174 696f 6e3c 2f68 serialization.

Void point\n+000dfe50: 6572 7320 283c 636f 6465 3e76 6f69 642a ers (void*\n+000dfe60: 3c2f 636f 6465 3e29 2063 616e 6e6f 7420 ) cannot \n+000dfe70: 6265 2073 6572 6961 6c69 7a65 6420 696e be serialized in\n+000dfe80: 2058 4d4c 2062 6563 6175 7365 2074 6865 XML because the\n+000dfe90: 2074 7970 6520 6f66 2064 6174 6120 7265 type of data re\n+000dfea0: 6665 7272 6564 2074 6f20 6973 2075 6e74 ferred to is unt\n+000dfeb0: 7970 6564 2e20 546f 2065 6e61 626c 6520 yped. To enable \n+000dfec0: 7468 6520 7365 7269 616c 697a 6174 696f the serializatio\n+000dfed0: 6e20 6f66 2076 6f69 6420 706f 696e 7465 n of void pointe\n+000dfee0: 7273 2074 6861 7420 6172 6520 6d65 6d62 rs that are memb\n+000dfef0: 6572 7320 6f66 2073 7472 7563 7473 2061 ers of structs a\n+000dff00: 6e64 2063 6c61 7373 6573 2c20 796f 7520 nd classes, you \n+000dff10: 6361 6e20 696e 7365 7274 2061 203c 636f can insert a int __type member righ\n+000dff40: 7420 6265 666f 7265 2074 6865 2076 6f69 t before the voi\n+000dff50: 6420 706f 696e 7465 7220 6d65 6d62 6572 d pointer member\n+000dff60: 2e20 5468 6520 3c63 6f64 653e 696e 7420 . The int \n+000dff70: 5f5f 7479 7065 3c2f 636f 6465 3e20 6d65 __type me\n+000dff80: 6d62 6572 2063 6f6e 7461 696e 7320 7275 mber contains ru\n+000dff90: 6e20 7469 6d65 2069 6e66 6f72 6d61 7469 n time informati\n+000dffa0: 6f6e 206f 6e20 7468 6520 7479 7065 206f on on the type o\n+000dffb0: 6620 7468 6520 6461 7461 2070 6f69 6e74 f the data point\n+000dffc0: 6564 2074 6f20 6279 203c 636f 6465 3e76 ed to by v\n+000dffd0: 6f69 642a 3c2f 636f 6465 3e20 6d65 6d62 oid* memb\n+000dffe0: 6572 2069 6e20 6120 7374 7275 6374 2f63 er in a struct/c\n+000dfff0: 6c61 7373 2074 6f20 656e 6162 6c65 2074 lass to enable t\n+000e0000: 6865 2073 6572 6961 6c69 7a61 7469 6f6e he serialization\n+000e0010: 206f 6620 7468 6973 2064 6174 612e 2054 of this data. T\n+000e0020: 6865 203c 636f 6465 3e69 6e74 205f 5f74 he int __t\n+000e0030: 7970 653c 2f63 6f64 653e 206d 656d 6265 ype membe\n+000e0040: 7220 6973 2073 6574 2074 6f20 6120 3c63 r is set to a SOAP_TYPE_T<\n+000e0060: 2f63 6f64 653e 2076 616c 7565 2c20 7768 /code> value, wh\n+000e0070: 6572 6520 3c63 6f64 653e 543c 2f63 6f64 ere T is the name o\n+000e0090: 6620 6120 7479 7065 2e20 5468 6520 736f f a type. The so\n+000e00a0: 6170 6370 7032 2074 6f6f 6c20 6765 6e65 apcpp2 tool gene\n+000e00b0: 7261 7465 7320 7468 6520 3c63 6f64 653e rates the \n+000e00c0: 534f 4150 5f54 5950 455f 543c 2f63 6f64 SOAP_TYPE_T definitions i\n+000e00e0: 6e20 3c65 6d3e 3c63 6f64 653e 736f 6170 n soap\n+000e00f0: 482e 683c 2f63 6f64 653e 3c2f 656d 3e20 H.h \n+000e0100: 616e 6420 7573 6573 2074 6865 6d20 696e and uses them in\n+000e0110: 7465 726e 616c 6c79 2074 6f20 756e 6971 ternally to uniq\n+000e0120: 7565 6c79 2069 6465 6e74 6966 7920 7468 uely identify th\n+000e0130: 6520 7479 7065 206f 6620 6561 6368 206f e type of each o\n+000e0140: 626a 6563 742e 2054 6865 2074 7970 6520 bject. The type \n+000e0150: 6e61 6d69 6e67 2063 6f6e 7665 6e74 696f naming conventio\n+000e0160: 6e73 206f 7574 6c69 6e65 6420 696e 2053 ns outlined in S\n+000e0170: 6563 7469 6f6e 203c 6120 636c 6173 733d ection Serializing C/C\n+000e01b0: 2b2b 2064 6174 6120 746f 2058 4d4c 3c2f ++ data to XML are used to d\n+000e01d0: 6574 6572 6d69 6e65 2074 6865 2074 7970 etermine the typ\n+000e01e0: 6520 6e61 6d65 2066 6f72 203c 636f 6465 e name for T. Value\n+000e0200: 7320 7365 7269 616c 697a 6564 2069 6e20 s serialized in \n+000e0210: 584d 4c20 7769 7468 2074 6869 7320 6170 XML with this ap\n+000e0220: 7072 6f61 6368 2061 6c77 6179 7320 6361 proach always ca\n+000e0230: 7272 7920 7468 6520 3c65 6d3e 3c63 6f64 rry the xsi:type attribute\n+000e0260: 2069 6e20 584d 4c20 746f 2069 6e64 6963 in XML to indic\n+000e0270: 6174 6520 7468 6520 7479 7065 206f 6620 ate the type of \n+000e0280: 636f 6e74 656e 7420 7365 7269 616c 697a content serializ\n+000e0290: 6564 2e3c 2f70 3e0a 3c70 3e48 6572 6520 ed.

.

Here \n+000e02a0: 6973 2061 6e20 6578 616d 706c 6520 746f is an example to\n+000e02b0: 2069 6c6c 7573 7472 6174 6520 7468 6520 illustrate the \n+000e02c0: 7365 7269 616c 697a 6174 696f 6e20 6f66 serialization of\n+000e02d0: 2061 203c 636f 6465 3e76 6f69 642a 3c2f a void* member in \n+000e02f0: 6120 7374 7275 6374 2f63 6c61 7373 3a3c a struct/class:<\n+000e0300: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n+000e0350: 6e73 5f5f 7265 636f 7264 203c 2f64 6976 ns__record .
{
. \n+000e0390: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+000e03b0: 2f73 7061 6e3e 205f 5f74 7970 653b 203c /span> __type; <\n+000e03c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000e03d0: 656e 7422 3e2f 2f20 7468 6520 534f 4150 ent\">// the SOAP\n+000e03e0: 5f54 5950 455f 5420 706f 696e 7465 6420 _TYPE_T pointed \n+000e03f0: 746f 2062 7920 7661 6c3c 2f73 7061 6e3e to by val\n+000e0400: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
void *val; \n+000e0460: 2f2f 2073 6572 6961 6c69 7a65 2061 6e79 // serialize any\n+000e0470: 2074 7970 6520 696e 2065 6c65 6d65 6e74 type in element\n+000e0480: 2026 6c74 3b76 616c 2667 743b 3c2f 7370 <val>
.
};.

T\n+000e04d0: 6865 203c 636f 6465 3e5f 5f74 7970 653c he __type<\n+000e04e0: 2f63 6f64 653e 2069 6e74 6567 6572 2063 /code> integer c\n+000e04f0: 616e 2062 6520 7365 7420 746f 2030 2061 an be set to 0 a\n+000e0500: 7420 7275 6e20 7469 6d65 2074 6f20 6f6d t run time to om\n+000e0510: 6974 2074 6865 2073 6572 6961 6c69 7a61 it the serializa\n+000e0520: 7469 6f6e 206f 6620 7468 6520 766f 6964 tion of the void\n+000e0530: 2070 6f69 6e74 6572 206d 656d 6265 722e pointer member.\n+000e0540: 3c2f 703e 0a3c 703e 5468 6520 666f 6c6c

.

The foll\n+000e0550: 6f77 696e 6720 6578 616d 706c 6520 696c owing example il\n+000e0560: 6c75 7374 7261 7465 7320 7468 6520 696e lustrates the in\n+000e0570: 6974 6961 6c69 7a61 7469 6f6e 206f 6620 itialization of \n+000e0580: 3c63 6f64 653e 6d79 5374 7275 6374 3c2f myStruct with a voi\n+000e05a0: 6420 706f 696e 7465 7220 746f 2061 6e20 d pointer to an \n+000e05b0: 696e 743a 3c2f 703e 0a3c 6469 7620 636c int:

.
<\n+000e05d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e05e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__record \n+000e0610: 533b 203c 2f64 6976 3e0a 3c64 6976 2063 S;
.
int\n+000e0650: 206e 203d 2031 3233 3b20 3c2f 6469 763e n = 123;
\n+000e0660: 0a3c 6469 7620 636c 6173 733d 226c 696e .
S.val = (void*)&n; .
S.__type = S\n+000e06d0: 4f41 505f 5459 5045 5f69 6e74 3b20 3c2f OAP_TYPE_int; .

T\n+000e0700: 6865 2073 6572 6961 6c69 7a65 6420 6f75 he serialized ou\n+000e0710: 7470 7574 206f 6620 3c63 6f64 653e 533c tput of S<\n+000e0720: 2f63 6f64 653e 2063 6f6e 7461 696e 7320 /code> contains \n+000e0730: 7468 6520 696e 7465 6765 7220 696e 2069 the integer in i\n+000e0740: 7473 203c 656d 3e3c 636f 6465 3e76 616c ts val\n+000e0750: 3c2f 636f 6465 3e3c 2f65 6d3e 2065 6c65 ele\n+000e0760: 6d65 6e74 3a3c 2f70 3e0a 3c64 6976 2063 ment:

.
<ns:record>
. \n+000e07f0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <v\n+000e0810: 616c 3c2f 7370 616e 3e20 3c73 7061 6e20 al \n+000e0830: 7873 693a 7479 7065 3c2f 7370 616e 3e3d xsi:type=\n+000e0840: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000e0860: 743b 7873 643a 696e 7426 7175 6f74 3b3c t;xsd:int"<\n+000e0870: 2f73 7061 6e3e 2667 743b 3132 3326 6c74 /span>>123<\n+000e0880: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/val<\n+000e08a0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000e08b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</ns:record>
.

Th\n+000e0920: 6520 6465 7365 7269 616c 697a 6572 2066 e deserializer f\n+000e0930: 6f72 203c 636f 6465 3e6e 735f 5f72 6563 or ns__rec\n+000e0940: 6f72 643c 2f63 6f64 653e 2077 696c 6c20 ord will \n+000e0950: 6175 746f 6d61 7469 6361 6c6c 7920 7365 automatically se\n+000e0960: 7420 7468 6520 3c63 6f64 653e 5f5f 7479 t the __ty\n+000e0970: 7065 3c2f 636f 6465 3e20 6669 656c 6420 pe field \n+000e0980: 616e 6420 766f 6964 2070 6f69 6e74 6572 and void pointer\n+000e0990: 2077 6865 6e20 6465 7365 7269 616c 697a when deserializ\n+000e09a0: 696e 6720 7468 6520 6461 7461 2c20 7072 ing the data, pr\n+000e09b0: 6f76 6964 6564 2074 6861 7420 7468 6520 ovided that the \n+000e09c0: 584d 4c20 656c 656d 656e 7420 3c65 6d3e XML element \n+000e09d0: 3c63 6f64 653e 7661 6c3c 2f63 6f64 653e val\n+000e09e0: 3c2f 656d 3e20 6361 7272 6965 7320 7468 carries th\n+000e09f0: 6520 3c65 6d3e 3c63 6f64 653e 7873 693a e xsi:\n+000e0a00: 7479 7065 3c2f 636f 6465 3e3c 2f65 6d3e type\n+000e0a10: 2061 7474 7269 6275 7465 2066 726f 6d20 attribute from \n+000e0a20: 7768 6963 6820 6974 2063 616e 2064 6574 which it can det\n+000e0a30: 6572 6d69 6e65 2074 6865 2074 7970 652e ermine the type.\n+000e0a40: 3c2f 703e 0a3c 646c 2063 6c61 7373 3d22

.
Note
w\n+000e0a70: 6865 6e20 7365 7269 616c 697a 696e 6720 hen serializing \n+000e0a80: 7374 7269 6e67 7320 7669 6120 6120 3c63 strings via a void*\n+000e0aa0: 206d 656d 6265 722c 2074 6865 203c 636f member, the void* \n+000e0ac0: 706f 696e 7465 7220 6d75 7374 2064 6972 pointer must dir\n+000e0ad0: 6563 746c 7920 706f 696e 7420 746f 2074 ectly point to t\n+000e0ae0: 6865 2073 7472 696e 6720 7661 6c75 6520 he string value \n+000e0af0: 7261 7468 6572 2074 6861 6e20 696e 6469 rather than indi\n+000e0b00: 7265 6374 6c79 2061 7320 7769 7468 2061 rectly as with a\n+000e0b10: 6c6c 206f 7468 6572 2074 7970 6573 2e20 ll other types. \n+000e0b20: 466f 7220 6578 616d 706c 653a 3c2f 6464 For example:
.
<\n+000e0b60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e0b70: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__record S;\n+000e0b90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
S.val \n+000e0bb0: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (voi\n+000e0bd0: 643c 2f73 7061 6e3e 2a29 3c73 7061 6e20 d*)"Hell\n+000e0c00: 6f26 7175 6f74 3b3c 2f73 7061 6e3e 3b20 o"; \n+000e0c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
S.__typ\n+000e0c30: 6520 3d20 534f 4150 5f54 5950 455f 7374 e = SOAP_TYPE_st\n+000e0c40: 7269 6e67 3b20 3c2f 6469 763e 0a3c 2f64 ring;
.

This is t\n+000e0c70: 6865 2063 6173 6520 666f 7220 616c 6c20 he case for all \n+000e0c80: 7374 7269 6e67 2d62 6173 6564 2074 7970 string-based typ\n+000e0c90: 6573 2c20 696e 636c 7564 696e 6720 7479 es, including ty\n+000e0ca0: 7065 7320 6465 6669 6e65 6420 7769 7468 pes defined with\n+000e0cb0: 203c 636f 6465 3e74 7970 6564 6566 2063 typedef c\n+000e0cc0: 6861 722a 3c2f 636f 6465 3e2e 3c2f 703e har*.

\n+000e0cd0: 0a3c 703e 596f 7520 6d61 7920 7573 6520 .

You may use \n+000e0ce0: 616e 2061 7262 6974 7261 7279 2073 7566 an arbitrary suf\n+000e0cf0: 6669 7820 7769 7468 2074 6865 203c 636f fix with the __type\n+000e0d10: 206d 656d 6265 7273 2074 6f20 6861 6e64 members to hand\n+000e0d20: 6c65 206d 756c 7469 706c 6520 766f 6964 le multiple void\n+000e0d30: 2070 6f69 6e74 6572 7320 696e 2073 7472 pointers in str\n+000e0d40: 7563 7473 2f63 6c61 7373 6573 2e20 466f ucts/classes. Fo\n+000e0d50: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

.<\n+000e0d60: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000e0d70: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
str\n+000e0da0: 7563 7420 3c2f 7370 616e 3e6e 735f 5f72 uct ns__r\n+000e0db0: 6563 6f72 6420 3c2f 6469 763e 0a3c 6469 ecord
.{\n+000e0dd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int __typeOfp; // the SOAP_T\n+000e0e40: 5950 455f 5420 706f 696e 7465 6420 746f YPE_T pointed to\n+000e0e50: 2062 7920 7020 3c2f 7370 616e 3e3c 2f64 by p .
void \n+000e0ea0: 2a70 3b20 2020 2020 2020 3c73 7061 6e20 *p; \n+000e0ec0: 2f2f 2065 6c65 6d65 6e74 2026 6c74 3b70 // element <p\n+000e0ed0: 2667 743b 3c2f 7370 616e 3e3c 2f64 6976 >.
int __t\n+000e0f20: 7970 654f 6671 3b20 3c73 7061 6e20 636c ypeOfq; //\n+000e0f40: 2074 6865 2053 4f41 505f 5459 5045 5f54 the SOAP_TYPE_T\n+000e0f50: 2070 6f69 6e74 6564 2074 6f20 6279 2071 pointed to by q\n+000e0f60: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n+000e0f70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e0f80: 3e20 2020 203c 7370 616e 2063 6c61 7373 > v\n+000e0fa0: 6f69 643c 2f73 7061 6e3e 202a 713b 2020 oid *q; \n+000e0fb0: 2020 2020 203c 7370 616e 2063 6c61 7373 // el\n+000e0fd0: 656d 656e 7420 266c 743b 7126 6774 3b3c ement <q><\n+000e0fe0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n+000e1000: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n+000e1020: 703e 4265 6361 7573 6520 7365 7276 6963 p>Because servic\n+000e1030: 6520 6d65 7468 6f64 2070 6172 616d 6574 e method paramet\n+000e1040: 6572 7320 6172 6520 7374 6f72 6564 2077 ers are stored w\n+000e1050: 6974 6869 6e20 7374 7275 6374 732c 2079 ithin structs, y\n+000e1060: 6f75 2063 616e 2075 7365 203c 636f 6465 ou can use __type a\n+000e1080: 6e64 203c 636f 6465 3e76 6f69 642a 3c2f nd void* parameters\n+000e10a0: 2074 6f20 7061 7373 2070 6f6c 796d 6f72 to pass polymor\n+000e10b0: 7068 6963 2061 7267 756d 656e 7473 2077 phic arguments w\n+000e10c0: 6974 686f 7574 2068 6176 696e 6720 746f ithout having to\n+000e10d0: 2064 6566 696e 6520 6120 432b 2b20 636c define a C++ cl\n+000e10e0: 6173 7320 6869 6572 6172 6368 7920 2853 ass hierarchy (S\n+000e10f0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection Polymorphism, d\n+000e1130: 6572 6976 6564 2074 7970 6573 2c20 616e erived types, an\n+000e1140: 6420 6479 6e61 6d69 6320 6269 6e64 696e d dynamic bindin\n+000e1150: 6720 696e 2043 2b2b 3c2f 613e 2029 2c20 g in C++ ), \n+000e1160: 7072 6f76 6964 6564 2074 6861 7420 3c65 provided that xsi:type\n+000e1180: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 7474
att\n+000e1190: 7269 6275 7465 7320 6172 6520 7072 6573 ributes are pres\n+000e11a0: 656e 7420 696e 2074 6865 2058 4d4c 2065 ent in the XML e\n+000e11b0: 6c65 6d65 6e74 732e 2046 6f72 2065 7861 lements. For exa\n+000e11c0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

.
\n+000e11e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
typedef<\n+000e1210: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *xs\n+000e1240: 645f 5f73 7472 696e 673b 203c 2f64 6976 d__string; .
typede\n+000e1280: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f int xs\n+000e12b0: 645f 5f69 6e74 3b20 3c2f 6469 763e 0a3c d__int;
.<\n+000e12c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e12d0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >typedef \n+000e1310: 666c 6f61 743c 2f73 7061 6e3e 2078 7364 float xsd\n+000e1320: 5f5f 666c 6f61 743b 203c 2f64 6976 3e0a __float;
.\n+000e1330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
enum ns__status {\n+000e1370: 206f 6e2c 206f 6666 207d 3b20 3c2f 6469 on, off }; .
struc\n+000e13b0: 7420 3c2f 7370 616e 3e6e 735f 5f77 6964 t ns__wid\n+000e13c0: 6765 743c 2f64 6976 3e0a 3c64 6976 2063 get
.
{.
char \n+000e1420: 2a6e 616d 653b 3c2f 6469 763e 0a3c 6469 *name;
. \n+000e1440: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+000e1460: 3c2f 7370 616e 3e20 7061 7274 3b3c 2f64 part;.
};
.<\n+000e1490: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e14a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns__webmet\n+000e14d0: 686f 6428 3c73 7061 6e20 636c 6173 733d hod(in\n+000e14f0: 743c 2f73 7061 6e3e 205f 5f74 7970 652c t __type,\n+000e1500: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n+000e1520: 2f73 7061 6e3e 202a 6461 7461 2c20 3c73 /span> *data, struct ns__webmethodR\n+000e1560: 6573 706f 6e73 6520 7b20 3c73 7061 6e20 esponse { int _\n+000e1590: 5f74 7970 653b 203c 7370 616e 2063 6c61 _type; void *re\n+000e15c0: 7475 726e 5f3b 207d 202a 6f75 7429 3b3c turn_; } *out);<\n+000e15d0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n+000e15f0: 5468 6973 206d 6574 686f 6420 6861 7320 This method has \n+000e1600: 6120 706f 6c79 6d6f 7270 6869 6320 696e a polymorphic in\n+000e1610: 7075 7420 7061 7261 6d65 7465 7220 3c63 put parameter data \n+000e1630: 616e 6420 6120 706f 6c79 6d6f 7270 6869 and a polymorphi\n+000e1640: 6320 6f75 7470 7574 2070 6172 616d 6574 c output paramet\n+000e1650: 6572 203c 636f 6465 3e72 6574 7572 6e5f er return_\n+000e1660: 3c2f 636f 6465 3e2e 2054 6865 203c 636f . The __type\n+000e1680: 2070 6172 616d 6574 6572 7320 6361 6e20 parameters can \n+000e1690: 6265 206f 6e65 206f 6620 3c63 6f64 653e be one of \n+000e16a0: 534f 4150 5f54 5950 455f 7873 645f 5f73 SOAP_TYPE_xsd__s\n+000e16b0: 7472 696e 673c 2f63 6f64 653e 2c20 3c63 tring, SOAP_TYPE_xs\n+000e16d0: 645f 5f69 6e74 3c2f 636f 6465 3e2c 203c d__int, <\n+000e16e0: 636f 6465 3e53 4f41 505f 5459 5045 5f78 code>SOAP_TYPE_x\n+000e16f0: 7364 5f5f 666c 6f61 743c 2f63 6f64 653e sd__float\n+000e1700: 2c20 3c63 6f64 653e 534f 4150 5f54 5950 , SOAP_TYP\n+000e1710: 455f 6e73 5f5f 7374 6174 7573 3c2f 636f E_ns__status, or SO\n+000e1730: 4150 5f54 5950 455f 6e73 5f5f 7769 6467 AP_TYPE_ns__widg\n+000e1740: 6574 3c2f 636f 6465 3e2e 2054 6865 2057 et. The W\n+000e1750: 5344 4c20 616e 6420 5853 4420 6669 6c65 SDL and XSD file\n+000e1760: 7320 7072 6f64 7563 6564 2062 7920 7468 s produced by th\n+000e1770: 6520 736f 6170 6370 7032 2074 6f6f 6c20 e soapcpp2 tool \n+000e1780: 6465 636c 6172 6520 7468 6520 3c63 6f64 declare the void* p\n+000e17a0: 6f6c 796d 6f72 7068 6963 206d 656d 6265 olymorphic membe\n+000e17b0: 7273 2061 7320 3c65 6d3e 3c63 6f64 653e rs as \n+000e17c0: 7873 643a 616e 7954 7970 653c 2f63 6f64 xsd:anyType elements\n+000e17e0: 2e3c 2f70 3e0a 3c70 3e54 6f20 6465 636c .

.

To decl\n+000e17f0: 6172 6520 6120 7772 6170 7065 7220 7374 are a wrapper st\n+000e1800: 7275 6374 2f63 6c61 7373 2066 6f72 203c ruct/class for <\n+000e1810: 636f 6465 3e76 6f69 642a 3c2f 636f 6465 code>void* pointers allow\n+000e1830: 7320 7573 2074 6f20 7265 7573 6520 7468 s us to reuse th\n+000e1840: 6973 206d 6563 6861 6e69 736d 2077 6865 is mechanism whe\n+000e1850: 6e20 7765 2075 7365 203c 636f 6465 3e5f n we use _\n+000e1860: 5f73 656c 663c 2f63 6f64 653e 2061 7320 _self as \n+000e1870: 6120 6d65 6d62 6572 206e 616d 6520 7468 a member name th\n+000e1880: 6174 2072 6566 6572 7320 746f 2074 6865 at refers to the\n+000e1890: 2063 7572 7265 6e74 2058 4d4c 2065 6c65 current XML ele\n+000e18a0: 6d65 6e74 2074 6167 206e 616d 653a 3c2f ment tag name:.

struct _\n+000e1900: 5f61 6e79 203c 2f64 6976 3e0a 3c64 6976 _any
.{<\n+000e1920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n+000e1960: 205f 5f74 7970 653b 2020 203c 7370 616e __type; // the SOAP_TYP\n+000e1990: 455f 5420 706f 696e 7465 6420 746f 2062 E_T pointed to b\n+000e19a0: 7920 5f5f 7365 6c66 3c2f 7370 616e 3e3c y __self<\n+000e19b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
void *__self; // serialize an\n+000e1a20: 7920 7479 7065 206f 6620 636f 6e74 656e y type of conten\n+000e1a30: 7420 6f66 2074 6865 2063 7572 7265 6e74 t of the current\n+000e1a40: 2065 6c65 6d65 6e74 3c2f 7370 616e 3e3c element<\n+000e1a50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
\n+000e1a70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
struct \n+000e1aa0: 3c2f 7370 616e 3e6e 735f 5f72 6563 6f72 ns__recor\n+000e1ab0: 643c 2f64 6976 3e0a 3c64 6976 2063 6c61 d
.
{.
__any va\n+000e1af0: 6c3b 3c2f 6469 763e 0a3c 6469 7620 636c l;
.
};.

Th\n+000e1b30: 6520 666f 6c6c 6f77 696e 6720 6578 616d e following exam\n+000e1b40: 706c 6520 696c 6c75 7374 7261 7465 7320 ple illustrates \n+000e1b50: 7468 6520 696e 6974 6961 6c69 7a61 7469 the initializati\n+000e1b60: 6f6e 206f 6620 3c63 6f64 653e 5f5f 6e73 on of __ns\n+000e1b70: 5f5f 7265 636f 7264 3c2f 636f 6465 3e20 __record \n+000e1b80: 7769 7468 2061 2076 6f69 6420 706f 696e with a void poin\n+000e1b90: 7465 7220 746f 2061 6e20 696e 743a 3c2f ter to an int:.

struct n\n+000e1bf0: 735f 5f72 6563 6f72 6420 533b 203c 2f64 s__record S; .
\n+000e1c30: 696e 743c 2f73 7061 6e3e 206e 203d 2031 int n = 1\n+000e1c40: 3233 3b20 3c2f 6469 763e 0a3c 6469 7620 23;
.
S.v\n+000e1c60: 616c 2e5f 5f69 7465 6d20 3d20 283c 7370 al.__item = (void*)&n; .
S.val.__typ\n+000e1cc0: 6520 3d20 534f 4150 5f54 5950 455f 696e e = SOAP_TYPE_in\n+000e1cd0: 743b 203c 2f64 6976 3e0a 3c2f 6469 763e t;
.
\n+000e1ce0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d \n+000e1ee0: 203c 2f64 6976 3e3c 703e f09f 949d 203c

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

..Fixed-s\n+000e1f50: 697a 6520 6172 7261 7920 7365 7269 616c ize array serial\n+000e1f60: 697a 6174 696f 6e3c 2f68 323e 0a3c 703e ization.

\n+000e1f70: 4669 7865 6420 7369 7a65 2061 7272 6179 Fixed size array\n+000e1f80: 7320 6172 6520 7365 7269 616c 697a 6564 s are serialized\n+000e1f90: 2061 7320 7265 7065 7469 7469 6f6e 7320 as repetitions \n+000e1fa0: 6f66 203c 656d 3e3c 636f 6465 3e69 7465 of ite\n+000e1fb0: 6d3c 2f63 6f64 653e 3c2f 656d 3e20 656c m el\n+000e1fc0: 656d 656e 7473 2077 6974 6820 7468 6520 ements with the \n+000e1fd0: 6172 7261 7920 7661 6c75 6573 2069 6e20 array values in \n+000e1fe0: 584d 4c2e 204d 756c 7469 2d64 696d 656e XML. Multi-dimen\n+000e1ff0: 7369 6f6e 616c 2066 6978 6564 2073 697a sional fixed siz\n+000e2000: 6520 6172 7261 7973 2061 7265 2073 6572 e arrays are ser\n+000e2010: 6961 6c69 7a65 6420 6173 206e 6573 7465 ialized as neste\n+000e2020: 6420 3c65 6d3e 3c63 6f64 653e 6974 656d d item\n+000e2030: 3c2f 636f 6465 3e3c 2f65 6d3e 2065 6c65 ele\n+000e2040: 6d65 6e74 732c 2077 6865 7265 2074 6865 ments, where the\n+000e2050: 206f 7574 6572 2065 6c65 6d65 6e74 7320 outer elements \n+000e2060: 6172 6520 6172 7261 7973 2e3c 2f70 3e0a are arrays.

.\n+000e2070: 3c70 3e54 6865 2073 6572 6961 6c69 7a61

The serializa\n+000e2080: 7469 6f6e 206f 6620 6669 7865 642d 7369 tion of fixed-si\n+000e2090: 7a65 2061 7272 6179 7320 7375 7070 6f72 ze arrays suppor\n+000e20a0: 7473 2074 6865 2053 4f41 5020 5250 4320 ts the SOAP RPC \n+000e20b0: 656e 636f 6469 6e67 206d 756c 7469 2d64 encoding multi-d\n+000e20c0: 696d 656e 7369 6f6e 616c 2061 7272 6179 imensional array\n+000e20d0: 2066 6f72 6d61 7420 6173 2077 656c 6c20 format as well \n+000e20e0: 6173 2070 6172 7469 616c 6c79 2074 7261 as partially tra\n+000e20f0: 6e73 6d69 7474 6564 2061 6e64 2073 7061 nsmitted and spa\n+000e2100: 7273 6520 6172 7261 7920 666f 726d 6174 rse array format\n+000e2110: 7320 7374 616e 6461 7264 697a 6564 2069 s standardized i\n+000e2120: 6e20 534f 4150 2031 2e31 2061 6e64 2031 n SOAP 1.1 and 1\n+000e2130: 2e32 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 .2.

.

For e\n+000e2140: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

.
// Con\n+000e2190: 7465 6e74 7320 6f66 2066 696c 6520 2671 tents of file &q\n+000e21a0: 756f 743b 6669 7865 642e 6826 7175 6f74 uot;fixed.h"\n+000e21b0: 3b3a 203c 2f73 7061 6e3e 3c2f 6469 763e ;:
\n+000e21c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
struct \n+000e21f0: 3c2f 7370 616e 3e45 7861 6d70 6c65 203c Example <\n+000e2200: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n+000e2220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000e2250: 666c 6f61 743c 2f73 7061 6e3e 2061 5b33 float a[3\n+000e2260: 5d3b 203c 2f64 6976 3e0a 3c64 6976 2063 ];
.
};.

T\n+000e22a0: 6869 7320 7370 6563 6966 6965 7320 6120 his specifies a \n+000e22b0: 6669 7865 642d 7369 7a65 2061 7272 6179 fixed-size array\n+000e22c0: 2070 6172 7420 6f66 2074 6865 203c 636f part of the struct Exampl\n+000e22e0: 653c 2f63 6f64 653e 2e20 5468 6520 7365 e. The se\n+000e22f0: 7269 616c 697a 6564 206f 7574 7075 7420 rialized output \n+000e2300: 6f66 2061 7272 6179 203c 636f 6465 3e61 of array a\n+000e2310: 3c2f 636f 6465 3e20 6973 3a3c 2f70 3e0a is:

.\n+000e2320: 3c64 6976 2063 6c61 7373 3d22 616c 7422
<a\n+000e2380: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
&\n+000e23a0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ite\n+000e23c0: 6d3c 2f73 7061 6e3e 2667 743b 312e 3026 m>1.0&\n+000e23d0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/it\n+000e23f0: 656d 3c2f 7370 616e 3e26 6774 3b3c 2f64 em>.
<item>2.0</item>
. \n+000e2490: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <i\n+000e24b0: 7465 6d3c 2f73 7061 6e3e 2667 743b 332e tem>3.\n+000e24c0: 3026 6c74 3b2f 3c73 7061 6e20 636c 6173 0</\n+000e24e0: 6974 656d 3c2f 7370 616e 3e26 6774 3b3c item><\n+000e24f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</a&\n+000e2530: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
.
\n+000e2540: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

whe\n+000e37d0: 7265 2074 6865 203c 636f 6465 3e61 7272 re the arr\n+000e37e0: 6179 5f6e 616d 653c 2f63 6f64 653e 206d ay_name m\n+000e37f0: 7573 7420 6265 2061 206e 6f6e 2d71 7561 ust be a non-qua\n+000e3800: 6c69 6669 6564 206e 616d 6520 616e 6420 lified name and \n+000e3810: 3c63 6f64 653e 5479 7065 3c2f 636f 6465 Type is the type fo\n+000e3830: 7220 7468 6520 656c 656d 656e 7473 206f r the elements o\n+000e3840: 6620 7468 6520 6172 7261 792e 2054 6865 f the array. The\n+000e3850: 203c 636f 6465 3e5f 5f70 7472 3c2f 636f __ptr member point\n+000e3870: 7320 746f 2074 6865 2061 7272 6179 2076 s to the array v\n+000e3880: 616c 7565 7320 616e 6420 3c63 6f64 653e alues and \n+000e3890: 5f5f 7369 7a65 3c2f 636f 6465 3e20 6973 __size is\n+000e38a0: 2074 6865 2061 7272 6179 2073 697a 652e the array size.\n+000e38b0: 2054 6865 203c 636f 6465 3e5f 5f6f 6666 The __off\n+000e38c0: 7365 743c 2f63 6f64 653e 206d 656d 6265 set membe\n+000e38d0: 7220 7370 6563 6966 6965 7320 616e 206f r specifies an o\n+000e38e0: 7074 696f 6e61 6c20 6172 7261 7920 6f66 ptional array of\n+000e38f0: 6673 6574 2c20 7768 656e 206e 6f6e 7a65 fset, when nonze\n+000e3900: 726f 2c20 7365 6520 5365 6374 696f 6e20 ro, see Section \n+000e3910: 3c61 2063 6c61 7373 3d22 656c 2220 6872 One-d\n+000e3940: 696d 656e 7369 6f6e 616c 2064 796e 616d imensional dynam\n+000e3950: 6963 2053 4f41 502d 656e 636f 6465 6420 ic SOAP-encoded \n+000e3960: 6172 7261 7973 2077 6974 6820 6e6f 6e2d arrays with non-\n+000e3970: 7a65 726f 206f 6666 7365 7473 3c2f 613e zero offsets\n+000e3980: 2e3c 2f70 3e0a 3c70 3e49 6620 7468 6520 .

.

If the \n+000e3990: 3c63 6f64 653e 6172 7261 795f 6e61 6d65 array_name\n+000e39a0: 3c2f 636f 6465 3e20 6973 2071 7561 6c69 is quali\n+000e39b0: 6669 6564 2077 6974 6820 6120 6e61 6d65 fied with a name\n+000e39c0: 7370 6163 6520 7072 6566 6978 2074 6865 space prefix the\n+000e39d0: 6e20 7468 6520 6172 7261 7920 6973 206e n the array is n\n+000e39e0: 6f74 2061 2053 4f41 502d 656e 636f 6465 ot a SOAP-encode\n+000e39f0: 6420 6172 7261 7920 6275 7420 7261 7468 d array but rath\n+000e3a00: 6572 2072 6570 7265 7365 6e74 7320 6120 er represents a \n+000e3a10: 7365 7175 656e 6365 206f 6620 584d 4c20 sequence of XML \n+000e3a20: 656c 656d 656e 7473 2c20 7365 6520 5365 elements, see Se\n+000e3a30: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Non-S\n+000e3a60: 4f41 5020 6479 6e61 6d69 6320 6172 7261 OAP dynamic arra\n+000e3a70: 7973 3c2f 613e 2e3c 2f70 3e0a 3c70 3e54 ys.

.

T\n+000e3a80: 6865 2073 6f61 7063 7070 322d 6765 6e65 he soapcpp2-gene\n+000e3a90: 7261 7465 6420 6465 7365 7269 616c 697a rated deserializ\n+000e3aa0: 6572 206f 6620 6120 6f6e 652d 6469 6d65 er of a one-dime\n+000e3ab0: 6e73 696f 6e61 6c20 6479 6e61 6d69 6320 nsional dynamic \n+000e3ac0: 6172 7261 7920 6361 6e20 6465 7365 7269 array can deseri\n+000e3ad0: 616c 697a 6520 7061 7274 6961 6c6c 7920 alize partially \n+000e3ae0: 7472 616e 736d 6974 7465 6420 616e 642f transmitted and/\n+000e3af0: 6f72 2053 4f41 502d 656e 636f 6465 6420 or SOAP-encoded \n+000e3b00: 7370 6172 7365 2061 7272 6179 732c 2061 sparse arrays, a\n+000e3b10: 6e64 2065 7665 6e20 6d75 6c74 692d 6469 nd even multi-di\n+000e3b20: 6d65 6e73 696f 6e61 6c20 6172 7261 7973 mensional arrays\n+000e3b30: 2077 6869 6368 2077 696c 6c20 6265 2063 which will be c\n+000e3b40: 6f6c 6c61 7073 6564 2069 6e74 6f20 6120 ollapsed into a \n+000e3b50: 6f6e 652d 6469 6d65 6e73 696f 6e61 6c20 one-dimensional \n+000e3b60: 6172 7261 7920 7769 7468 2072 6f77 2d6d array with row-m\n+000e3b70: 616a 6f72 206f 7264 6572 696e 672e 3c2f ajor ordering..

<\n+000e3ba0: 6474 3e57 6172 6e69 6e67 3c2f 6474 3e3c dt>Warning<\n+000e3bb0: 6464 3e53 4f41 5020 312e 3220 646f 6573 dd>SOAP 1.2 does\n+000e3bc0: 206e 6f74 2073 7570 706f 7274 2070 6172 not support par\n+000e3bd0: 7469 616c 6c79 2074 7261 6e73 6d69 7474 tially transmitt\n+000e3be0: 6564 2061 7272 6179 7320 616e 6420 7468 ed arrays and th\n+000e3bf0: 6520 3c63 6f64 653e 5f5f 6f66 6673 6574 e __offset\n+000e3c00: 3c2f 636f 6465 3e20 6d65 6d62 6572 206f member o\n+000e3c10: 6620 6120 6479 6e61 6d69 6320 6172 7261 f a dynamic arra\n+000e3c20: 7920 6973 2069 676e 6f72 6564 2e3c 2f64 y is ignored.
.

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

..One-dim\n+000e3ca0: 656e 7369 6f6e 616c 2064 796e 616d 6963 ensional dynamic\n+000e3cb0: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar\n+000e3cc0: 7261 7973 2077 6974 6820 6e6f 6e2d 7a65 rays with non-ze\n+000e3cd0: 726f 206f 6666 7365 7473 3c2f 6833 3e0a ro offsets.\n+000e3ce0: 3c70 3e54 6865 2064 6563 6c61 7261 7469

The declarati\n+000e3cf0: 6f6e 206f 6620 6120 6479 6e61 6d69 6320 on of a dynamic \n+000e3d00: 6172 7261 7920 6173 2064 6573 6372 6962 array as describ\n+000e3d10: 6564 2069 6e20 5365 6374 696f 6e20 3c61 ed in Section One-dimension\n+000e3d50: 616c 2064 796e 616d 6963 2053 4f41 502d al dynamic SOAP-\n+000e3d60: 656e 636f 6465 6420 6172 7261 7973 3c2f encoded arrays may include a\n+000e3d80: 6e20 3c63 6f64 653e 696e 7420 5f5f 6f66 n int __of\n+000e3d90: 6673 6574 3c2f 636f 6465 3e20 6d65 6d62 fset memb\n+000e3da0: 6572 2e20 5768 656e 2073 6574 2074 6f20 er. When set to \n+000e3db0: 616e 2069 6e74 6567 6572 2076 616c 7565 an integer value\n+000e3dc0: 2c20 7468 6520 7365 7269 616c 697a 6572 , the serializer\n+000e3dd0: 206f 6620 7468 6520 6479 6e61 6d69 6320 of the dynamic \n+000e3de0: 6172 7261 7920 7769 6c6c 2075 7365 2074 array will use t\n+000e3df0: 6869 7320 6d65 6d62 6572 2061 7320 7468 his member as th\n+000e3e00: 6520 7374 6172 7420 696e 6465 7820 6f66 e start index of\n+000e3e10: 2074 6865 2061 7272 6179 2061 6e64 2074 the array and t\n+000e3e20: 6865 2053 4f41 502d 656e 636f 6465 6420 he SOAP-encoded \n+000e3e30: 6172 7261 7920 6f66 6673 6574 2061 7474 array offset att\n+000e3e40: 7269 6275 7465 203c 656d 3e3c 636f 6465 ribute SOAP-ENC:offset\n+000e3e60: 3c2f 636f 6465 3e3c 2f65 6d3e 2077 696c wil\n+000e3e70: 6c20 6170 7065 6172 2069 6e20 7468 6520 l appear in the \n+000e3e80: 584d 4c20 6d65 7373 6167 652e 204e 6f74 XML message. Not\n+000e3e90: 6520 7468 6174 2061 7272 6179 206f 6666 e that array off\n+000e3ea0: 7365 7473 2069 7320 6120 534f 4150 2031 sets is a SOAP 1\n+000e3eb0: 2e31 2073 7065 6369 6669 6320 6665 6174 .1 specific feat\n+000e3ec0: 7572 6520 7768 6963 6820 6973 206e 6f74 ure which is not\n+000e3ed0: 2073 7570 706f 7274 6564 2069 6e20 534f supported in SO\n+000e3ee0: 4150 2031 2e32 2e3c 2f70 3e0a 3c70 3e46 AP 1.2.

.

F\n+000e3ef0: 6f72 2065 7861 6d70 6c65 2c20 7468 6520 or example, the \n+000e3f00: 666f 6c6c 6f77 696e 6720 6865 6164 6572 following header\n+000e3f10: 2066 696c 6520 6465 636c 6172 6573 2061 file declares a\n+000e3f20: 206e 756d 6572 6963 203c 636f 6465 3e56 numeric V\n+000e3f30: 6563 746f 723c 2f63 6f64 653e 2063 6c61 ector cla\n+000e3f40: 7373 2c20 7768 6963 6820 6973 2061 2064 ss, which is a d\n+000e3f50: 796e 616d 6963 2061 7272 6179 206f 6620 ynamic array of \n+000e3f60: 666c 6f61 7469 6e67 2070 6f69 6e74 2076 floating point v\n+000e3f70: 616c 7565 7320 7769 7468 2061 6e20 696e alues with an in\n+000e3f80: 6465 7820 7468 6174 2073 7461 7274 7320 dex that starts \n+000e3f90: 6174 2031 3a3c 2f70 3e0a 3c64 6976 2063 at 1:

.
\n+000e3fb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
// Conte\n+000e3fe0: 6e74 7320 6f66 2066 696c 6520 2671 756f nts of file &quo\n+000e3ff0: 743b 7665 6374 6f72 2e68 2671 756f 743b t;vector.h"\n+000e4000: 3a20 3c2f 7370 616e 3e3c 2f64 6976 3e0a :
.\n+000e4010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
class Vector .
{ pub\n+000e4080: 6c69 633c 2f73 7061 6e3e 3a3c 2f64 6976 lic:.
float *\n+000e40d0: 5f5f 7074 723b 203c 2f64 6976 3e0a 3c64 __ptr;
.\n+000e40f0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+000e4110: 743c 2f73 7061 6e3e 205f 5f73 697a 653b t __size;\n+000e4120: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
int __offset; .
Vector\n+000e4190: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
.
\n+000e41b0: 5665 6374 6f72 283c 7370 616e 2063 6c61 Vector(str\n+000e41d0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *, int n);
. \n+000e4250: 2020 203c 7370 616e 2063 6c61 7373 3d22 flo\n+000e4270: 6174 3c2f 7370 616e 3e26 616d 703b 206f at& o\n+000e4280: 7065 7261 746f 725b 5d28 3c73 7061 6e20 perator[](int i\n+000e42b0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
..\n+000e4390: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
<\n+000e43a0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000e43b0: 3c70 3e54 6865 2069 6d70 6c65 6d65 6e74

The implement\n+000e43c0: 6174 696f 6e73 206f 6620 7468 6520 3c63 ations of the Vector methods are:.

Vecto\n+000e4420: 723a 3a56 6563 746f 7228 293c 2f64 6976 r::Vector().
{
. \n+000e4460: 7468 6973 2d26 6774 3b73 6f61 705f 6465 this->soap_de\n+000e4470: 6661 756c 7428 4e55 4c4c 293b 3c2f 6469 fault(NULL);.
}
.V\n+000e44b0: 6563 746f 723a 3a56 6563 746f 7228 3c73 ector::Vector(struct soap *soap, in\n+000e4560: 743c 2f73 7061 6e3e 206e 2920 3c2f 6469 t n) .
{
. \n+000e45a0: 2074 6869 732d 2667 743b 736f 6170 203d this->soap =\n+000e45b0: 203c 6120 636c 6173 733d 2263 6f64 6522
soap;
.\n+000e4670: 0a3c 6469 7620 636c 6173 733d 226c 696e .
__size = n;\n 000e4690: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
} .
f\n-000e46e0: 6c6f 6174 3c2f 7370 616e 3e26 616d 703b loat&\n-000e46f0: 2056 6563 746f 723a 3a6f 7065 7261 746f Vector::operato\n-000e4700: 725b 5d28 3c73 7061 6e20 636c 6173 733d r[](in\n-000e4720: 743c 2f73 7061 6e3e 2069 2920 3c2f 6469 t i) .
{
. \n-000e4760: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-000e4780: 6e3c 2f73 7061 6e3e 205f 5f70 7472 5b69 n __ptr[i\n-000e4790: 202d 205f 5f6f 6666 7365 745d 3b20 3c2f - __offset]; .
}
.<\n-000e47c0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

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

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

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

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

.

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

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

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

.

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

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

.

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

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

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

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

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

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

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

.
<ns:Map&g\n-000e72a0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000e72c0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;pair\n-000e72e0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<key>Joe</key&g\n-000e7380: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
\n-000e73a0: 266c 743b 3c73 7061 6e20 636c 6173 733d <va\n-000e73c0: 6c3c 2f73 7061 6e3e 2667 743b 3535 3520 l>555 \n-000e73d0: 3737 2031 3233 3426 6c74 3b2f 3c73 7061 77 1234</val\n-000e7400: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e7420: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </p\n-000e7440: 6169 723c 2f73 7061 6e3e 2667 743b 203c air> <\n-000e7450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<pair>
.<\n-000e74a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e74b0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <key>\n-000e74e0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;Susan</key>\n-000e7530: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
&l\n-000e7550: 743b 3c73 7061 6e20 636c 6173 733d 226b t;val<\n-000e7570: 2f73 7061 6e3e 2667 743b 3535 3520 3132 /span>>555 12\n-000e7580: 2036 3732 3526 6c74 3b2f 3c73 7061 6e20 6725</val&g\n-000e75b0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000e75d0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/pai\n-000e75f0: 723c 2f73 7061 6e3e 2667 743b 203c 2f64 r> .
<pair>
. \n-000e7660: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <key><\n-000e7690: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e76a0: 6f72 6422 3e50 6574 653c 2f73 7061 6e3e ord\">Pete\n-000e76b0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </k\n-000e76d0: 6579 3c2f 7370 616e 3e26 6774 3b20 3c2f ey> .
<<\n-000e7700: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e7710: 6f72 6474 7970 6522 3e76 616c 3c2f 7370 ordtype\">val>555 99 43\n-000e7730: 3231 266c 743b 2f3c 7370 616e 2063 6c61 21</val> \n-000e7760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</\n-000e7780: 3c73 7061 6e20 636c 6173 733d 226b 6579 pair>
\n-000e77b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</ns:Map&\n-000e77f0: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
.
\n-000e7800: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n-000e7d60: 703e 5468 6520 584d 4c20 7365 7269 616c p>The XML serial\n-000e7d70: 697a 6174 696f 6e20 6f66 2061 6e20 6578 ization of an ex\n-000e7d80: 616d 706c 6520 3c63 6f64 653e 6e73 5f5f ample ns__\n-000e7d90: 436f 6e74 6163 743c 2f63 6f64 653e 2069 Contact i\n-000e7da0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

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

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

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

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

.

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

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

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

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

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

\n-000e8960: 0a3c 6469 7620 636c 6173 733d 2261 6c74 .
<<\n-000e89a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e89b0: 6f72 6474 7970 6522 3e63 6f6d 706c 6578 ordtype\">complex\n-000e89c0: 5479 7065 3c2f 7370 616e 3e20 3c73 7061 Type name="\n-000e8a10: 6d79 436c 6173 7326 7175 6f74 3b3c 2f73 myClass">
.\n-000e8a30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<sequence>
. \n-000e8a90: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <element \n+000e46a0: 7373 3d22 6c69 6e65 223e 2020 5f5f 6f66 ss=\"line\"> __of\n+000e46b0: 6673 6574 203d 2031 3b20 3c2f 6469 763e fset = 1;
\n+000e46c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.float& Vector\n+000e4720: 3a3a 6f70 6572 6174 6f72 5b5d 283c 7370 ::operator[](int i)
.{<\n+000e4770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
return __ptr[i - __of\n+000e47c0: 6673 6574 5d3b 203c 2f64 6976 3e0a 3c64 fset];
.\n+000e47e0: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }

.
<\n+000e4800: 703e 416e 2065 7861 6d70 6c65 2070 726f p>An example pro\n+000e4810: 6772 616d 2066 7261 676d 656e 7420 7468 gram fragment th\n+000e4820: 6174 2073 6572 6961 6c69 7a65 7320 6120 at serializes a \n+000e4830: 7665 6374 6f72 206f 6620 3320 656c 656d vector of 3 elem\n+000e4840: 656e 7473 3a3c 2f70 3e0a 3c64 6976 2063 ents:

.
\n+000e4860: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n+000e4890: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+000e48c0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+000e48f0: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n+000e4950: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); .
Vector v(\n+000e4980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+000e49b0: 2033 293b 3c2f 6469 763e 0a3c 6469 7620 3);
.
v[1\n+000e49d0: 5d20 3d20 312e 303b 203c 2f64 6976 3e0a ] = 1.0;
.\n+000e49e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
v[2] = 2.0; .
v[3] = 3.\n+000e4a20: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
.
soap\n+000e4a40: 5f77 7269 7465 5f56 6563 746f 7228 3c61 _write_Vector(soap, &\n+000e4a80: 616d 703b 7629 3b3c 2f64 6976 3e0a 3c64 amp;v);
.\n+000e4aa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro\n+000e4b00: 793c 2f61 3e28 3c61 2063 6c61 7373 3d22 y(soa\n+000e4b30: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
.\n+000e4b50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
.
soap_free(<\n+000e4c60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000e4c70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+000e4c80: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+000e4c90: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
The output is a\n+000e4cc0: 2070 6172 7469 616c 6c79 2074 7261 6e73 partially trans\n+000e4cd0: 6d69 7474 6564 2061 7272 6179 3a3c 2f70 mitted array:.
<\n+000e4d20: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n+000e4d40: 4e43 3a41 7272 6179 3c2f 7370 616e 3e20 NC:Array \n+000e4d50: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-ENC:a\n+000e4d70: 7272 6179 5479 7065 3c2f 7370 616e 3e3d rrayType=\n+000e4d80: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000e4da0: 743b 7873 643a 666c 6f61 745b 345d 2671 t;xsd:float[4]&q\n+000e4db0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; SOAP-ENC:offse\n+000e4de0: 743c 2f73 7061 6e3e 3d3c 7370 616e 2063 t="[1]&q\n+000e4e10: 756f 743b 3c2f 7370 616e 3e26 6774 3b20 uot;> \n+000e4e20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n+000e4e40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e4e50: 6f72 6474 7970 6522 3e69 7465 6d3c 2f73 ordtype\">item>1</item>
.<\n+000e4ea0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e4eb0: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <item>\n+000e4ee0: 3226 6c74 3b2f 3c73 7061 6e20 636c 6173 2</\n+000e4f00: 6974 656d 3c2f 7370 616e 3e26 6774 3b20 item> \n+000e4f10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n+000e4f30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e4f40: 6f72 6474 7970 6522 3e69 7465 6d3c 2f73 ordtype\">item>3</item>
.<\n+000e4f90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e4fa0: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n+000e4fc0: 534f 4150 2d45 4e43 3a41 7272 6179 3c2f SOAP-ENC:Array>
.\n+000e4fe0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
Note that <\n+000e5010: 636f 6465 3e78 7364 3a66 6c6f 6174 5b34 code>xsd:float[4\n+000e5020: 5d3c 2f63 6f64 653e 3c2f 656d 3e20 6973 ] is\n+000e5030: 2074 6865 2074 7970 6520 616e 6420 7368 the type and sh\n+000e5040: 6170 6520 6f66 2074 6865 2065 6e63 6f64 ape of the encod\n+000e5050: 6564 2061 7272 6179 2c20 7768 6963 6820 ed array, which \n+000e5060: 7374 6172 7473 2061 7420 6f66 6673 6574 starts at offset\n+000e5070: 2031 2061 6e64 2074 6865 7265 666f 7265 1 and therefore\n+000e5080: 2074 6865 2065 6c65 6d65 6e74 2061 7420 the element at \n+000e5090: 3020 6973 206f 6d69 7474 6564 2e3c 2f70 0 is omitted..

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

.

.N\n+000e5100: 6573 7465 6420 6f6e 652d 6469 6d65 6e73 ested one-dimens\n+000e5110: 696f 6e61 6c20 6479 6e61 6d69 6320 534f ional dynamic SO\n+000e5120: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array\n+000e5130: 733c 2f68 333e 0a3c 703e 4f6e 652d 6469 s

.

One-di\n+000e5140: 6d65 6e73 696f 6e61 6c20 534f 4150 2d65 mensional SOAP-e\n+000e5150: 6e63 6f64 6564 2064 796e 616d 6963 2061 ncoded dynamic a\n+000e5160: 7272 6179 7320 6d61 7920 6265 206e 6573 rrays may be nes\n+000e5170: 7465 642e 2046 6f72 2065 7861 6d70 6c65 ted. For example\n+000e5180: 2c20 7573 696e 6720 3c63 6f64 653e 636c , using cl\n+000e5190: 6173 7320 5665 6374 6f72 3c2f 636f 6465 ass Vector declared in th\n+000e51b0: 6520 7072 6576 696f 7573 2073 6563 7469 e previous secti\n+000e51c0: 6f6e 2c20 3c63 6f64 653e 636c 6173 7320 on, class \n+000e51d0: 4d61 7472 6978 3c2f 636f 6465 3e20 6973 Matrix is\n+000e51e0: 2064 6563 6c61 7265 643a 3c2f 703e 0a3c declared:

.<\n+000e51f0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000e5200: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
// \n+000e5230: 436f 6e74 656e 7473 206f 6620 6669 6c65 Contents of file\n+000e5240: 2026 7175 6f74 3b6d 6174 7269 782e 6826 "matrix.h&\n+000e5250: 7175 6f74 3b3a 203c 2f73 7061 6e3e 3c2f quot;: .
cla\n+000e5290: 7373 203c 2f73 7061 6e3e 4d61 7472 6978 ss Matrix\n+000e52a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{ public:\n+000e52e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
Ve\n+000e5300: 6374 6f72 202a 5f5f 7074 723b 203c 2f64 ctor *__ptr; .
int _\n+000e5350: 5f73 697a 653b 203c 2f64 6976 3e0a 3c64 _size;
.\n+000e5370: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+000e5390: 743c 2f73 7061 6e3e 205f 5f6f 6666 7365 t __offse\n+000e53a0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
\n+000e53c0: 4d61 7472 6978 2829 3b20 3c2f 6469 763e Matrix();
\n+000e53d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .. \n+000e54e0: 2020 5665 6374 6f72 2661 6d70 3b20 6f70 Vector& op\n+000e54f0: 6572 6174 6f72 5b5d 283c 7370 616e 2063 erator[](int i)\n+000e5520: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
..}\n+000e5600: 3b20 3c2f 6469 763e 0a3c 2f64 6976 3e3c ;
.
<\n+000e5610: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000e5620: 3c70 3e54 6865 204d 6174 7269 7820 7479

The Matrix ty\n+000e5630: 7065 2069 7320 6573 7365 6e74 6961 6c6c pe is essentiall\n+000e5640: 7920 616e 2061 7272 6179 206f 6620 706f y an array of po\n+000e5650: 696e 7465 7273 2074 6f20 6172 7261 7973 inters to arrays\n+000e5660: 2077 6869 6368 206d 616b 6520 7570 2074 which make up t\n+000e5670: 6865 2072 6f77 7320 6f66 2061 206d 6174 he rows of a mat\n+000e5680: 7269 782e 2054 6865 2073 6572 6961 6c69 rix. The seriali\n+000e5690: 7a61 7469 6f6e 206f 6620 7468 6520 7477 zation of the tw\n+000e56a0: 6f2d 6469 6d65 6e73 696f 6e61 6c20 6479 o-dimensional dy\n+000e56b0: 6e61 6d69 6320 6172 7261 7920 696e 2069 namic array in i\n+000e56c0: 7320 6e65 7374 6564 2066 6f72 6d20 696e s nested form in\n+000e56d0: 2058 4d4c 2e3c 2f70 3e0a 3c70 3ef0 9f94 XML.

.

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

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

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

.

A s\n+000e5770: 7065 6369 616c 2066 6f72 6d20 6f66 203c pecial form of <\n+000e5780: 636f 6465 3e73 7472 7563 743c 2f63 6f64 code>struct or clas\n+000e57a0: 733c 2f63 6f64 653e 2069 7320 7573 6564 s is used\n+000e57b0: 2074 6f20 6465 6669 6e65 206d 756c 7469 to define multi\n+000e57c0: 2d64 696d 656e 7369 6f6e 616c 2064 796e -dimensional dyn\n+000e57d0: 616d 6963 2053 4f41 502d 656e 636f 6465 amic SOAP-encode\n+000e57e0: 6420 6172 7261 7973 2e20 4561 6368 2061 d arrays. Each a\n+000e57f0: 7272 6179 2068 6173 2061 2070 6f69 6e74 rray has a point\n+000e5800: 6572 2076 6172 6961 626c 6520 616e 6420 er variable and \n+000e5810: 6120 6d65 6d62 6572 2074 6861 7420 7265 a member that re\n+000e5820: 636f 7264 7320 7468 6520 6e75 6d62 6572 cords the number\n+000e5830: 206f 6620 656c 656d 656e 7473 2070 6572 of elements per\n+000e5840: 2064 696d 656e 7369 6f6e 2e20 4120 3c63 dimension. A K-dim\n+000e5860: 656e 7369 6f6e 616c 2061 7272 6179 2069 ensional array i\n+000e5870: 7320 6465 636c 6172 6564 2061 733a 3c2f s declared as:.

struct a\n+000e58d0: 7272 6179 5f6e 616d 6520 3c2f 6469 763e rray_name
\n+000e58e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
\n+000e5910: 2054 7970 6520 2a5f 5f70 7472 3b20 2020 Type *__ptr; \n+000e5920: 2020 3c73 7061 6e20 636c 6173 733d 2263 // point\n+000e5940: 6572 2074 6f20 6172 7261 7920 6f66 2065 er to array of e\n+000e5950: 6c65 6d65 6e74 7320 696e 206d 656d 6f72 lements in memor\n+000e5960: 793c 2f73 7061 6e3e 3c2f 6469 763e 0a3c y
.<\n+000e5970: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e5980: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+000e59a0: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size\n+000e59b0: 5b4b 5d3b 2020 203c 7370 616e 2063 6c61 [K]; // \n+000e59d0: 6e75 6d62 6572 206f 6620 656c 656d 656e number of elemen\n+000e59e0: 7473 2070 6572 2064 696d 656e 7369 6f6e ts per dimension\n+000e59f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000e5a10: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+000e5a30: 743c 2f73 7061 6e3e 205f 5f6f 6666 7365 t __offse\n+000e5a40: 745b 4b5d 3b20 3c73 7061 6e20 636c 6173 t[K]; // o\n+000e5a60: 7074 696f 6e61 6c20 534f 4150 2031 2e31 ptional SOAP 1.1\n+000e5a70: 2061 7272 6179 206f 6666 7365 743c 2f73 array offset
.
\n+000e5aa0: 202e 2e2e 2020 2020 2020 2020 2020 2020 ... \n+000e5ab0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // anyth\n+000e5ad0: 696e 6720 7468 6174 2066 6f6c 6c6f 7773 ing that follows\n+000e5ae0: 2068 6572 6520 7769 6c6c 2062 6520 6967 here will be ig\n+000e5af0: 6e6f 7265 6420 3c2f 7370 616e 3e3c 2f64 nored .
};
.<\n+000e5b20: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

where t\n+000e5b40: 6865 203c 636f 6465 3e61 7272 6179 5f6e he array_n\n+000e5b50: 616d 653c 2f63 6f64 653e 206d 7573 7420 ame must \n+000e5b60: 6265 2061 206e 6f6e 2d71 7561 6c69 6669 be a non-qualifi\n+000e5b70: 6564 206e 616d 6520 616e 6420 3c63 6f64 ed name and Type is\n+000e5b90: 2074 6865 2074 7970 6520 666f 7220 7468 the type for th\n+000e5ba0: 6520 656c 656d 656e 7473 206f 6620 7468 e elements of th\n+000e5bb0: 6520 6172 7261 792e 2054 6865 203c 636f e array. The __ptr \n+000e5bd0: 6d65 6d62 6572 2070 6f69 6e74 7320 746f member points to\n+000e5be0: 2074 6865 2061 7272 6179 2076 616c 7565 the array value\n+000e5bf0: 732e 2054 6865 203c 636f 6465 3e5f 5f73 s. The __s\n+000e5c00: 697a 653c 2f63 6f64 653e 2061 7272 6179 ize array\n+000e5c10: 2073 7065 6369 6669 6573 2074 6865 206e specifies the n\n+000e5c20: 756d 6265 7220 6f66 2061 7272 6179 2065 umber of array e\n+000e5c30: 6c65 6d65 6e74 7320 7065 7220 6469 6d65 lements per dime\n+000e5c40: 6e73 696f 6e2e 2054 6865 203c 636f 6465 nsion. The __offset\n+000e5c60: 2061 7272 6179 2073 7065 6369 6669 6573 array specifies\n+000e5c70: 2061 6e20 6f70 7469 6f6e 616c 206f 6666 an optional off\n+000e5c80: 7365 7420 7065 7220 6469 6d65 6e73 696f set per dimensio\n+000e5c90: 6e2e 3c2f 703e 0a3c 703e 466f 7220 6578 n.

.

For ex\n+000e5ca0: 616d 706c 652c 2074 6865 2066 6f6c 6c6f ample, the follo\n+000e5cb0: 7769 6e67 2064 6563 6c61 7261 7469 6f6e wing declaration\n+000e5cc0: 2073 7065 6369 6669 6573 2061 206d 6174 specifies a mat\n+000e5cd0: 7269 7820 636c 6173 733a 3c2f 703e 0a3c rix class:

.<\n+000e5ce0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000e5cf0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
cla\n+000e5d20: 7373 203c 2f73 7061 6e3e 4d61 7472 6978 ss Matrix\n+000e5d30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{ public:\n+000e5d70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
float *__ptr; .
int _\n+000e5e00: 5f73 697a 655b 325d 3b20 3c2f 6469 763e _size[2];
\n+000e5e10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __of\n+000e5e50: 6673 6574 5b32 5d3b 203c 2f64 6976 3e0a fset[2];
.\n+000e5e60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

By contras\n+000e5ea0: 7420 746f 2074 6865 206d 6174 7269 7820 t to the matrix \n+000e5eb0: 636c 6173 7320 6f66 2053 6563 7469 6f6e class of Section\n+000e5ec0: 203c 6120 636c 6173 733d 2265 6c22 2068 Nested o\n+000e5ef0: 6e65 2d64 696d 656e 7369 6f6e 616c 2064 ne-dimensional d\n+000e5f00: 796e 616d 6963 2053 4f41 502d 656e 636f ynamic SOAP-enco\n+000e5f10: 6465 6420 6172 7261 7973 3c2f 613e 2074 ded arrays t\n+000e5f20: 6861 7420 6465 6669 6e65 7320 6120 6d61 hat defines a ma\n+000e5f30: 7472 6978 2061 7320 616e 2061 7272 6179 trix as an array\n+000e5f40: 206f 6620 706f 696e 7465 7273 2074 6f20 of pointers to \n+000e5f50: 6d61 7472 6978 2072 6f77 732c 2074 6869 matrix rows, thi\n+000e5f60: 7320 636c 6173 7320 6861 7320 6f6e 6520 s class has one \n+000e5f70: 706f 696e 7465 7220 746f 2061 206d 6174 pointer to a mat\n+000e5f80: 7269 7820 7374 6f72 6564 2069 6e20 726f rix stored in ro\n+000e5f90: 772d 6d61 6a6f 7220 6f72 6465 722e 2054 w-major order. T\n+000e5fa0: 6865 2073 697a 6520 6f66 2074 6865 206d he size of the m\n+000e5fb0: 6174 7269 7820 6973 2064 6574 6572 6d69 atrix is determi\n+000e5fc0: 6e65 6420 6279 2074 6865 203c 636f 6465 ned by the __size m\n+000e5fe0: 656d 6265 723a 203c 636f 6465 3e5f 5f73 ember: __s\n+000e5ff0: 697a 655b 305d 3c2f 636f 6465 3e20 686f ize[0] ho\n+000e6000: 6c64 7320 7468 6520 6e75 6d62 6572 206f lds the number o\n+000e6010: 6620 726f 7773 2061 6e64 203c 636f 6465 f rows and __size[1] holds the numb\n+000e6040: 6572 206f 6620 636f 6c75 6d6e 7320 6f66 er of columns of\n+000e6050: 2074 6865 206d 6174 7269 782e 204c 696b the matrix. Lik\n+000e6060: 6577 6973 652c 203c 636f 6465 3e5f 5f6f ewise, __o\n+000e6070: 6666 7365 745b 305d 3c2f 636f 6465 3e20 ffset[0] \n+000e6080: 6973 2074 6865 2072 6f77 206f 6666 7365 is the row offse\n+000e6090: 7420 616e 6420 3c63 6f64 653e 5f5f 6f66 t and __of\n+000e60a0: 6673 6574 5b31 5d3c 2f63 6f64 653e 2069 fset[1] i\n+000e60b0: 7320 7468 6520 636f 6c75 6d6e 7320 6f66 s the columns of\n+000e60c0: 6673 6574 2e3c 2f70 3e0a 3c64 6c20 636c fset.

.
Warnin\n+000e60f0: 673c 2f64 743e 3c64 643e 534f 4150 2031 g
SOAP 1\n+000e6100: 2e32 2064 6f65 7320 6e6f 7420 7375 7070 .2 does not supp\n+000e6110: 6f72 7420 7061 7274 6961 6c6c 7920 7472 ort partially tr\n+000e6120: 616e 736d 6974 7465 6420 6172 7261 7973 ansmitted arrays\n+000e6130: 2061 6e64 2074 6865 203c 636f 6465 3e5f and the _\n+000e6140: 5f6f 6666 7365 743c 2f63 6f64 653e 206d _offset m\n+000e6150: 656d 6265 7220 6f66 2061 2064 796e 616d ember of a dynam\n+000e6160: 6963 2061 7272 6179 2069 7320 6967 6e6f ic array is igno\n+000e6170: 7265 642e 3c2f 6464 3e3c 2f64 6c3e 0a3c red.
.<\n+000e6180: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+000e61a0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+000e61b0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

.

.Non-SO\n+000e61e0: 4150 2064 796e 616d 6963 2061 7272 6179 AP dynamic array\n+000e61f0: 733c 2f68 333e 0a3c 703e 416e 2061 7272 s

.

An arr\n+000e6200: 6179 2069 7320 7365 7269 616c 697a 6564 ay is serialized\n+000e6210: 2061 7320 6120 7365 7175 656e 6365 206f as a sequence o\n+000e6220: 6620 584d 4c20 656c 656d 656e 7473 2e20 f XML elements. \n+000e6230: 4279 2063 6f6e 7472 6173 742c 2061 2053 By contrast, a S\n+000e6240: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra\n+000e6250: 7920 6973 2073 6572 6961 6c69 7a65 6420 y is serialized \n+000e6260: 6173 2061 6e20 656c 656d 656e 7420 7769 as an element wi\n+000e6270: 7468 2061 2073 6571 7565 6e63 6520 6f66 th a sequence of\n+000e6280: 2073 7562 2d65 6c65 6d65 6e74 732c 2077 sub-elements, w\n+000e6290: 686f 7365 2074 6167 206e 616d 6573 2061 hose tag names a\n+000e62a0: 7265 2069 7272 656c 6576 616e 7420 746f re irrelevant to\n+000e62b0: 2074 6865 2053 4f41 5020 7072 6f63 6573 the SOAP proces\n+000e62c0: 736f 722c 2073 6565 203c 6120 636c 6173 sor, see On\n+000e62f0: 652d 6469 6d65 6e73 696f 6e61 6c20 6479 e-dimensional dy\n+000e6300: 6e61 6d69 6320 534f 4150 2d65 6e63 6f64 namic SOAP-encod\n+000e6310: 6564 2061 7272 6179 733c 2f61 3e2e 3c2f ed arrays..

An array i\n+000e6330: 7320 6465 636c 6172 6564 2069 6e20 616e s declared in an\n+000e6340: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+000e6350: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+000e6360: 7070 3220 6173 2061 2073 7472 7563 7420 pp2 as a struct \n+000e6370: 6f72 2063 6c61 7373 2077 6974 6820 6120 or class with a \n+000e6380: 6e61 6d65 2074 6861 7420 6973 2071 7561 name that is qua\n+000e6390: 6c69 6669 6564 2077 6974 6820 6120 6e61 lified with a na\n+000e63a0: 6d65 7370 6163 6520 7072 6566 6978 2e20 mespace prefix. \n+000e63b0: 5468 6572 6520 6172 6520 7477 6f20 666f There are two fo\n+000e63c0: 726d 732e 2054 6865 2066 6972 7374 2066 rms. The first f\n+000e63d0: 6f72 6d20 6973 2073 696d 696c 6172 2074 orm is similar t\n+000e63e0: 6f20 7468 6520 534f 4150 2d65 6e63 6f64 o the SOAP-encod\n+000e63f0: 6564 2061 7272 6179 2064 6563 6c61 7261 ed array declara\n+000e6400: 7469 6f6e 2074 6861 7420 7772 6170 7320 tion that wraps \n+000e6410: 7468 6520 3c63 6f64 653e 5f5f 7074 723c the __ptr<\n+000e6420: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and __size m\n+000e6440: 656d 6265 7273 3a3c 2f70 3e0a 3c64 6976 embers:

.
struct\n+000e6490: 203c 2f73 7061 6e3e 7072 6566 6978 5f5f prefix__\n+000e64a0: 6172 7261 795f 6e61 6d65 203c 2f64 6976 array_name .
{
. \n+000e64e0: 2020 5479 7065 202a 5f5f 7074 723b 2020 Type *__ptr; \n+000e64f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // pointer\n+000e6510: 2074 6f20 6172 7261 7920 6f66 2065 6c65 to array of ele\n+000e6520: 6d65 6e74 7320 696e 206d 656d 6f72 793c ments in memory<\n+000e6530: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n+000e6550: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+000e6570: 3c2f 7370 616e 3e20 5f5f 7369 7a65 3b20 __size; \n+000e6580: 2020 3c73 7061 6e20 636c 6173 733d 2263 // numbe\n+000e65a0: 7220 6f66 2065 6c65 6d65 6e74 7320 706f r of elements po\n+000e65b0: 696e 7465 6420 746f 203c 2f73 7061 6e3e inted to \n+000e65c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
...\n+000e65e0: 2020 2020 2020 2020 2020 203c 7370 616e // anything tha\n+000e6610: 7420 666f 6c6c 6f77 7320 6865 7265 2077 t follows here w\n+000e6620: 696c 6c20 6265 2069 676e 6f72 6564 203c ill be ignored <\n+000e6630: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n+000e6650: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n+000e6670: 703e 5468 6520 7365 636f 6e64 2066 6f72 p>The second for\n+000e6680: 6d20 6973 206d 6f72 6520 6765 6e65 7269 m is more generi\n+000e6690: 632c 2062 6563 6175 7365 2074 6865 2061 c, because the a\n+000e66a0: 7272 6179 2063 616e 2062 6520 6465 636c rray can be decl\n+000e66b0: 6172 6564 2061 6e79 7768 6572 6520 696e ared anywhere in\n+000e66c0: 2074 6865 2073 7472 7563 7420 6f72 2063 the struct or c\n+000e66d0: 6c61 7373 2061 6e64 206d 756c 7469 706c lass and multipl\n+000e66e0: 6520 6172 7261 7973 2063 616e 2062 6520 e arrays can be \n+000e66f0: 7573 6564 2061 7320 6d65 6d62 6572 732c used as members,\n+000e6700: 2065 6163 6820 7769 7468 2061 203c 636f each with a __size\n+000e6720: 206d 656d 6265 7220 283c 636f 6465 3e5f member (_\n+000e6730: 5f73 697a 654e 616d 653c 2f63 6f64 653e _sizeName\n+000e6740: 2069 7320 616c 736f 2061 6c6c 6f77 6564 is also allowed\n+000e6750: 2920 7468 6174 2070 7265 6365 6465 7320 ) that precedes \n+000e6760: 6120 706f 696e 7465 7220 6d65 6d62 6572 a pointer member\n+000e6770: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct prefix__array_\n+000e67d0: 6e61 6d65 203c 2f64 6976 3e0a 3c64 6976 name
.{<\n+000e67f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
... \n+000e6810: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e6820: 2020 3c73 7061 6e20 636c 6173 733d 2263 // other\n+000e6840: 206d 656d 6265 7273 2074 6861 7420 6172 members that ar\n+000e6850: 6520 7365 7269 616c 697a 6564 3c2f 7370 e serialized
.
\n+000e6880: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __size_of_a\n+000e68b0: 7272 6179 313b 203c 7370 616e 2063 6c61 rray1; // \n+000e68d0: 6e75 6d62 6572 206f 6620 656c 656d 656e number of elemen\n+000e68e0: 7473 2070 6f69 6e74 6564 2074 6f20 3c2f ts pointed to
. \n+000e6910: 2020 5479 7065 3120 2a61 7272 6179 313b Type1 *array1;\n+000e6920: 2020 2020 2020 2020 3c73 7061 6e20 636c //\n+000e6940: 2070 6f69 6e74 6572 2074 6f20 6172 7261 pointer to arra\n+000e6950: 7920 6f66 2065 6c65 6d65 6e74 7320 696e y of elements in\n+000e6960: 206d 656d 6f72 793c 2f73 7061 6e3e 3c2f memory.
... \n+000e6990: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e69a0: 203c 7370 616e 2063 6c61 7373 3d22 636f // other \n+000e69c0: 6d65 6d62 6572 7320 7468 6174 2061 7265 members that are\n+000e69d0: 2073 6572 6961 6c69 7a65 643c 2f73 7061 serialized
.
<\n+000e6a00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e6a10: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __size_of_ar\n+000e6a30: 7261 7931 3b20 3c73 7061 6e20 636c 6173 ray1; // n\n+000e6a50: 756d 6265 7220 6f66 2065 6c65 6d65 6e74 umber of element\n+000e6a60: 7320 706f 696e 7465 6420 746f 203c 2f73 s pointed to
.
\n+000e6a90: 2054 7970 6532 202a 6172 7261 7932 3b20 Type2 *array2; \n+000e6aa0: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n+000e6ac0: 706f 696e 7465 7220 746f 2061 7272 6179 pointer to array\n+000e6ad0: 206f 6620 656c 656d 656e 7473 2069 6e20 of elements in \n+000e6ae0: 6d65 6d6f 7279 3c2f 7370 616e 3e3c 2f64 memory.
... \n+000e6b10: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e6b20: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // other m\n+000e6b40: 656d 6265 7273 2074 6861 7420 6172 6520 embers that are \n+000e6b50: 7365 7269 616c 697a 6564 3c2f 7370 616e serialized
.
};.

The\n+000e6ba0: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size member shou\n+000e6bc0: 6c64 2062 6520 616e 203c 636f 6465 3e69 ld be an i\n+000e6bd0: 6e74 3c2f 636f 6465 3e20 7479 7065 2061 nt type a\n+000e6be0: 6e64 2063 616e 6e6f 7420 6265 2061 203c nd cannot be a <\n+000e6bf0: 636f 6465 3e73 697a 655f 743c 2f63 6f64 code>size_t type or other\n+000e6c10: 2069 6e74 6567 6572 2074 7970 652e 3c2f integer type..

For exampl\n+000e6c30: 652c 2077 6520 6465 6669 6e65 2061 204d e, we define a M\n+000e6c40: 6170 2073 7472 7563 7475 7265 2074 6861 ap structure tha\n+000e6c50: 7420 636f 6e74 6169 6e73 2061 2073 6571 t contains a seq\n+000e6c60: 7565 6e63 6520 6f66 206b 6579 2d76 616c uence of key-val\n+000e6c70: 2070 6169 7273 3a3c 2f70 3e0a 3c64 6976 pairs:

.
struct\n+000e6cc0: 203c 2f73 7061 6e3e 6e73 5f5f 4d61 7020 ns__Map \n+000e6cd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n+000e6cf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __si\n+000e6d30: 7a65 3b20 3c73 7061 6e20 636c 6173 733d ze; // num\n+000e6d50: 6265 7220 6f66 2070 6169 7273 203c 2f73 ber of pairs
.
\n+000e6d80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct ns__Pair.
{.
char *key;
.\n+000e6e30: 2020 2020 2020 2020 3c73 7061 6e20 636c char *v\n+000e6e60: 616c 3b3c 2f64 6976 3e0a 3c64 6976 2063 al;
.
\n+000e6e80: 7d20 2a70 6169 723b 2020 2020 3c73 7061 } *pair; // array of pa\n+000e6eb0: 6972 733c 2f73 7061 6e3e 3c2f 6469 763e irs
\n+000e6ec0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

Since 2.7.\n+000e6f00: 3136 2069 7420 6973 2061 6c73 6f20 706f 16 it is also po\n+000e6f10: 7373 6962 6c65 2074 6f20 7573 6520 6120 ssible to use a \n+000e6f20: 273c 636f 6465 3e24 3c2f 636f 6465 3e27 '$'\n+000e6f30: 2061 7320 6120 7370 6563 6961 6c20 6d61 as a special ma\n+000e6f40: 726b 6572 2074 6f20 616e 6e6f 7461 7465 rker to annotate\n+000e6f50: 2061 2073 697a 6520 6d65 6d62 6572 2069 a size member i\n+000e6f60: 6e73 7465 6164 206f 6620 7265 7175 6972 nstead of requir\n+000e6f70: 696e 6720 7468 6573 6520 6d65 6d62 6572 ing these member\n+000e6f80: 7320 746f 2073 7461 7274 2077 6974 6820 s to start with \n+000e6f90: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size:

.
<\n+000e6fc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e6fd0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__Map .
{
.\n+000e7030: 2020 2420 3c73 7061 6e20 636c 6173 733d $ in\n+000e7050: 743c 2f73 7061 6e3e 2073 697a 653b 2020 t size; \n+000e7060: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // number \n+000e7080: 6f66 2070 6169 7273 203c 2f73 7061 6e3e of pairs \n+000e7090: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
struct ns__Pair
.\n+000e70e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.\n+000e7110: 2020 2020 2020 2020 3c73 7061 6e20 636c char *k\n+000e7140: 6579 3b3c 2f64 6976 3e0a 3c64 6976 2063 ey;
.
\n+000e7160: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+000e7180: 6172 3c2f 7370 616e 3e20 2a76 616c 3b3c ar *val;<\n+000e7190: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
} *p\n+000e71b0: 6169 723b 2020 2020 3c73 7061 6e20 636c air; //\n+000e71d0: 2061 7272 6179 206f 6620 7061 6972 733c array of pairs<\n+000e71e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n+000e7200: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n+000e7220: 703e 5468 6520 6172 7261 7920 7769 6c6c p>The array will\n+000e7230: 2062 6520 7365 7269 616c 697a 6564 2069 be serialized i\n+000e7240: 6e20 584d 4c20 6173 2061 2073 6571 7565 n XML as a seque\n+000e7250: 6e63 6520 6f66 2070 6169 7273 3a3c 2f70 nce of pairs:.
<\n+000e72a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 ns:Map\n+000e72c0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<pair\n+000e7310: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n+000e7330: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+000e7350: 6b65 793c 2f73 7061 6e3e 2667 743b 3c73 key>Joe&l\n+000e7380: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/key\n+000e73a0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<val>555 77 1234\n+000e7400: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </v\n+000e7420: 616c 3c2f 7370 616e 3e26 6774 3b20 3c2f al> .
</pair>
.<\n+000e7480: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e7490: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <pair>\n+000e74c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
&l\n+000e74e0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;key<\n+000e7500: 2f73 7061 6e3e 2667 743b 3c73 7061 6e20 /span>>\n+000e7520: 5375 7361 6e3c 2f73 7061 6e3e 266c 743b Susan<\n+000e7530: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /key>
\n+000e7560: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<val&\n+000e75a0: 6774 3b35 3535 2031 3220 3637 3235 266c gt;555 12 6725&l\n+000e75b0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/val\n+000e75d0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
</pair>
. \n+000e7640: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <p\n+000e7660: 6169 723c 2f73 7061 6e3e 2667 743b 203c air> <\n+000e7670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n+000e7690: 3c73 7061 6e20 636c 6173 733d 226b 6579 key>Pe\n+000e76d0: 7465 3c2f 7370 616e 3e26 6c74 3b2f 3c73 te</key>
.\n+000e7720: 2020 2020 266c 743b 3c73 7061 6e20 636c <val>\n+000e7750: 3535 3520 3939 2034 3332 3126 6c74 3b2f 555 99 4321</\n+000e7760: 3c73 7061 6e20 636c 6173 733d 226b 6579 val>
.\n+000e7790: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</pair&g\n+000e77d0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
<\n+000e77f0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /ns:Ma\n+000e7810: 703c 2f73 7061 6e3e 2667 743b 3c2f 6469 p>.

Deserializat\n+000e7850: 696f 6e20 6973 206c 6573 7320 6566 6669 ion is less effi\n+000e7860: 6369 656e 7420 636f 6d70 6172 6564 2074 cient compared t\n+000e7870: 6f20 6120 534f 4150 2d65 6e63 6f64 6564 o a SOAP-encoded\n+000e7880: 2061 7272 6179 2c20 6265 6361 7573 6520 array, because \n+000e7890: 7468 6520 7369 7a65 206f 6620 7468 6520 the size of the \n+000e78a0: 7365 7175 656e 6365 2069 7320 6e6f 7420 sequence is not \n+000e78b0: 7061 7274 206f 6620 7468 6520 534f 4150 part of the SOAP\n+000e78c0: 2065 6e63 6f64 696e 672e 2042 7566 6665 encoding. Buffe\n+000e78d0: 7269 6e67 2069 7320 7573 6564 2062 7920 ring is used by \n+000e78e0: 7468 6520 6465 7365 7269 616c 697a 6572 the deserializer\n+000e78f0: 2074 6f20 636f 6c6c 6563 7420 7468 6520 to collect the \n+000e7900: 656c 656d 656e 7473 2069 6e20 6d65 6d6f elements in memo\n+000e7910: 7279 2e20 5768 656e 2074 6865 2065 6e64 ry. When the end\n+000e7920: 206f 6620 7468 6520 6c69 7374 2069 7320 of the list is \n+000e7930: 7265 6163 6865 642c 2074 6865 2062 7566 reached, the buf\n+000e7940: 6665 7265 6420 656c 656d 656e 7473 2061 fered elements a\n+000e7950: 7265 2063 6f70 6965 6420 746f 2061 206e re copied to a n\n+000e7960: 6577 6c79 2061 6c6c 6f63 6174 6564 206d ewly allocated m\n+000e7970: 616e 6167 6564 2073 7061 6365 206f 6e20 anaged space on \n+000e7980: 7468 6520 6865 6170 2066 6f72 2074 6865 the heap for the\n+000e7990: 2064 796e 616d 6963 2061 7272 6179 2e3c dynamic array.<\n+000e79a0: 2f70 3e0a 3c70 3e4d 756c 7469 706c 6520 /p>.

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

.
\n+000e7a00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n+000e7a30: 2f73 7061 6e3e 6e73 5f5f 436f 6e74 6163 /span>ns__Contac\n+000e7a40: 7420 3c2f 6469 763e 0a3c 6469 7620 636c t
.
{.
char *\n+000e7aa0: 6669 7273 744e 616d 653b 203c 2f64 6976 firstName; .
char *l\n+000e7af0: 6173 744e 616d 653b 203c 2f64 6976 3e0a astName;
.\n+000e7b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
$ \n+000e7b30: 696e 743c 2f73 7061 6e3e 206e 5068 6f6e int nPhon\n+000e7b40: 6573 3b20 2020 2020 2020 2020 203c 7370 es; // number of \n+000e7b70: 5068 6f6e 6573 3c2f 7370 616e 3e3c 2f64 Phones.
ULON\n+000e7bf0: 4736 343c 2f61 3e20 2a70 686f 6e65 4e75 G64 *phoneNu\n+000e7c00: 6d62 6572 3b20 3c73 7061 6e20 636c 6173 mber; // a\n+000e7c20: 7272 6179 206f 6620 7068 6f6e 6520 6e75 rray of phone nu\n+000e7c30: 6d62 6572 7320 3c2f 7370 616e 3e3c 2f64 mbers .
$ int n\n+000e7c80: 456d 6169 6c73 3b20 2020 2020 2020 2020 Emails; \n+000e7c90: 203c 7370 616e 2063 6c61 7373 3d22 636f // number\n+000e7cb0: 206f 6620 656d 6169 6c73 203c 2f73 7061 of emails
.
<\n+000e7ce0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e7cf0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char **emailAddr\n+000e7d10: 6573 733b 2020 3c73 7061 6e20 636c 6173 ess; // a\n+000e7d30: 7272 6179 206f 6620 656d 6169 6c20 6164 rray of email ad\n+000e7d40: 6472 6573 7365 7320 3c2f 7370 616e 3e3c dresses <\n+000e7d50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
\n+000e7d70: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

The X\n+000e7d90: 4d4c 2073 6572 6961 6c69 7a61 7469 6f6e ML serialization\n+000e7da0: 206f 6620 616e 2065 7861 6d70 6c65 203c of an example <\n+000e7db0: 636f 6465 3e6e 735f 5f43 6f6e 7461 6374 code>ns__Contact\n+000e7dc0: 3c2f 636f 6465 3e20 6973 3a3c 2f70 3e0a is:

.\n+000e7dd0: 3c64 6976 2063 6c61 7373 3d22 616c 7422
<ns:Conta\n+000e7e30: 6374 3c2f 7370 616e 3e26 6774 3b20 3c2f ct> .
<firstName\n+000e7e80: 3c2f 7370 616e 3e26 6774 3b3c 7370 616e >Joe</\n+000e7eb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 firstN\n+000e7ed0: 616d 653c 2f73 7061 6e3e 2667 743b 203c ame> <\n+000e7ee0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<lastName\n+000e7f20: 3c2f 7370 616e 3e26 6774 3b3c 7370 616e >Smith<\n+000e7f50: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/last\n+000e7f70: 4e61 6d65 3c2f 7370 616e 3e26 6774 3b20 Name> \n+000e7f80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n+000e7fa0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e7fb0: 6f72 6474 7970 6522 3e70 686f 6e65 4e75 ordtype\">phoneNu\n+000e7fc0: 6d62 6572 3c2f 7370 616e 3e26 6774 3b35 mber>5\n+000e7fd0: 3535 3131 3132 3232 3226 6c74 3b2f 3c73 551112222</phoneNum\n+000e8000: 6265 723c 2f73 7061 6e3e 2667 743b 203c ber> <\n+000e8010: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<phoneNum\n+000e8050: 6265 723c 2f73 7061 6e3e 2667 743b 3535 ber>55\n+000e8060: 3531 3233 3435 3637 266c 743b 2f3c 7370 51234567</phoneNumb\n+000e8090: 6572 3c2f 7370 616e 3e26 6774 3b20 3c2f er> .
<phoneNumb\n+000e80e0: 6572 3c2f 7370 616e 3e26 6774 3b35 3535 er>555\n+000e80f0: 3233 3438 3930 3126 6c74 3b2f 3c73 7061 2348901</phoneNumbe\n+000e8120: 723c 2f73 7061 6e3e 2667 743b 203c 2f64 r> .
<emailAddre\n+000e8170: 7373 3c2f 7370 616e 3e26 6774 3b3c 7370 ss>Joe.Smith@mail.c\n+000e81c0: 6f6d 3c2f 7370 616e 3e26 6c74 3b2f 3c73 om</emailAdd\n+000e81f0: 7265 7373 3c2f 7370 616e 3e26 6774 3b20 ress> \n+000e8200: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n+000e8220: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e8230: 6f72 6474 7970 6522 3e65 6d61 696c 4164 ordtype\">emailAd\n+000e8240: 6472 6573 733c 2f73 7061 6e3e 2667 743b dress>\n+000e8250: 3c73 7061 6e20 636c 6173 733d 226b 6579 Joe\n+000e8270: 403c 7370 616e 2063 6c61 7373 3d22 6b65 @Smith.com\n+000e8290: 3c2f 7370 616e 3e26 6c74 3b2f 3c73 7061 </emailAddre\n+000e82c0: 7373 3c2f 7370 616e 3e26 6774 3b20 3c2f ss> .
</ns:Contact\n+000e8310: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
\n+000e8340: 3c70 3e46 6f72 2043 2b2b 2c20 6120 6265

For C++, a be\n+000e8350: 7474 6572 2061 6c74 6572 6e61 7469 7665 tter alternative\n+000e8360: 2074 6f20 6172 7261 7973 2061 7265 2063 to arrays are c\n+000e8370: 6f6e 7461 696e 6572 732c 2077 6869 6368 ontainers, which\n+000e8380: 2061 7265 2064 6573 6372 6962 6564 206e are described n\n+000e8390: 6578 742e 3c2f 703e 0a3c 703e f09f 949d ext.

.

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

.<\n+000e83d0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.STL con\n+000e8400: 7461 696e 6572 733c 2f68 333e 0a3c 703e tainers.

\n+000e8410: 5468 6520 5354 4c20 636f 6e74 6169 6e65 The STL containe\n+000e8420: 7273 203c 636f 6465 3e73 7464 3a3a 6465 rs std::de\n+000e8430: 7175 653c 2f63 6f64 653e 2c20 3c63 6f64 que, std::list, std::s\n+000e8460: 6574 3c2f 636f 6465 3e2c 2061 6e64 203c et, and <\n+000e8470: 636f 6465 3e73 7464 3a3a 7665 6374 6f72 code>std::vector\n+000e8480: 3c2f 636f 6465 3e20 6172 6520 7365 7269 are seri\n+000e8490: 616c 697a 6162 6c65 2069 6e20 584d 4c20 alizable in XML \n+000e84a0: 6279 2074 6865 2073 6f61 7063 7070 322d by the soapcpp2-\n+000e84b0: 6765 6e65 7261 7465 6420 7365 7269 616c generated serial\n+000e84c0: 697a 6572 732e 3c2f 703e 0a3c 703e 496e izers.

.

In\n+000e84d0: 206f 7264 6572 2074 6f20 7573 6520 636f order to use co\n+000e84e0: 6e74 6169 6e65 7273 2069 6e20 616e 2069 ntainers in an i\n+000e84f0: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+000e8500: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n+000e8510: 322c 2069 6d70 6f72 7420 3c65 6d3e 3c63 2, import stldeque.h, \n+000e8540: 3c63 6f64 653e 7374 6c6c 6973 742e 683c stllist.h<\n+000e8550: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, stlset.h<\n+000e8570: 2f63 6f64 653e 3c2f 656d 3e2c 206f 7220 /code>, or \n+000e8580: 3c65 6d3e 3c63 6f64 653e 7374 6c76 6563 stlvec\n+000e8590: 746f 722e 683c 2f63 6f64 653e 3c2f 656d tor.h to enable std::deque, std::\n+000e85d0: 6c69 7374 3c2f 636f 6465 3e2c 203c 636f list, std::set, and st\n+000e8600: 643a 3a76 6563 746f 723c 2f63 6f64 653e d::vector\n+000e8610: 2c20 7265 7370 6563 7469 7665 6c79 2e20 , respectively. \n+000e8620: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

\n+000e8630: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
#import &quo\n+000e8680: 743b 7374 6c76 6563 746f 722e 6826 7175 t;stlvector.h&qu\n+000e8690: 6f74 3b3c 2f73 7061 6e3e 203c 2f64 6976 ot; .
class \n+000e86d0: 3c2f 7370 616e 3e6e 735f 5f6d 7943 6c61 ns__myCla\n+000e86e0: 7373 203c 2f64 6976 3e0a 3c64 6976 2063 ss
.
{ public:
.
\n+000e8740: 7374 643a 3a76 6563 746f 7226 6c74 3b69 std::vector<i\n+000e8750: 6e74 2667 743b 2020 2020 2020 2020 2020 nt> \n+000e8760: 6e75 6d62 6572 2031 3a31 303b 203c 7370 number 1:10; // 1 to 10 nu\n+000e8790: 6d62 6572 733c 2f73 7061 6e3e 3c2f 6469 mbers.
std::ve\n+000e87c0: 6374 6f72 266c 743b 7374 643a 3a73 7472 ctor<std::str\n+000e87d0: 696e 6726 6774 3b20 2a6e 616d 6520 2020 ing> *name \n+000e87e0: 323b 2020 2020 3c73 7061 6e20 636c 6173 2; // m\n+000e8800: 6f72 6520 7468 616e 2032 206e 616d 6573 ore than 2 names\n+000e8810: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000e8830: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
<\n+000e8840: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000e8850: 3c70 3e54 6865 2075 7365 206f 6620 706f

The use of po\n+000e8860: 696e 7465 7220 6d65 6d62 6572 7320 7375 inter members su\n+000e8870: 6368 2061 7320 666f 7220 3c63 6f64 653e ch as for \n+000e8880: 6e61 6d65 3c2f 636f 6465 3e20 7368 6f77 name show\n+000e8890: 6e20 6162 6f76 6520 6973 2070 6f73 7369 n above is possi\n+000e88a0: 626c 652c 2062 7574 206e 6f74 2072 6571 ble, but not req\n+000e88b0: 7569 7265 642e 2041 6c73 6f20 3c63 6f64 uired. Also minOccurs : ma\n+000e88d0: 784f 6363 7572 733c 2f63 6f64 653e 2061 xOccurs a\n+000e88e0: 6e64 203c 636f 6465 3e6d 696e 4f63 6375 nd minOccu\n+000e88f0: 7273 3c2f 636f 6465 3e20 6c65 6e67 7468 rs length\n+000e8900: 2063 6f6e 7374 7261 696e 7473 2063 616e constraints can\n+000e8910: 2062 6520 7370 6563 6966 6965 6420 6173 be specified as\n+000e8920: 2073 686f 776e 2069 6e20 7468 6520 6578 shown in the ex\n+000e8930: 616d 706c 6520 6162 6f76 652e 2054 6865 ample above. The\n+000e8940: 2058 4d4c 2073 6368 656d 6120 7468 6174 XML schema that\n+000e8950: 2063 6f72 7265 7370 6f6e 6473 2074 6f20 corresponds to \n+000e8960: 7468 6520 3c63 6f64 653e 6e73 5f5f 6d79 the ns__my\n+000e8970: 436c 6173 733c 2f63 6f64 653e 2074 7970 Class typ\n+000e8980: 6520 6973 3a3c 2f70 3e0a 3c64 6976 2063 e is:

.
<complexType name<\n+000e8a10: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="myClass\n+000e8a40: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n+000e8a50: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000e8a70: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;seque\n+000e8a90: 6e63 653c 2f73 7061 6e3e 2667 743b 203c nce> <\n+000e8aa0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n 000e8ac0: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q\n-000e8b00: 756f 743b 6e75 6d62 6572 2671 756f 743b uot;number"\n-000e8b10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ty\n-000e8b30: 7065 3c2f 7370 616e 3e3d 3c73 7061 6e20 pe="xsd:\n-000e8b60: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int"\n-000e8b70: 203c 7370 616e 2063 6c61 7373 3d22 6b65 minOccurs\n-000e8b90: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="1"\n-000e8bc0: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; m\n-000e8be0: 6178 4f63 6375 7273 3c2f 7370 616e 3e3d axOccurs=\n-000e8bf0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000e8c10: 743b 3130 2671 756f 743b 3c2f 7370 616e t;10"/>
.\n-000e8c40: 2020 2020 266c 743b 3c73 7061 6e20 636c <element\n-000e8c70: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=&\n-000e8cb0: 7175 6f74 3b6e 616d 6526 7175 6f74 3b3c quot;name"<\n-000e8cc0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ\n-000e8ce0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:s\n-000e8d10: 7472 696e 6726 7175 6f74 3b3c 2f73 7061 tring" minOccu\n-000e8d40: 7273 3c2f 7370 616e 3e3d 3c73 7061 6e20 rs="2&qu\n-000e8d70: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; maxOccurs=&q\n-000e8dc0: 756f 743b 756e 626f 756e 6465 6426 7175 uot;unbounded&qu\n-000e8dd0: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> \n-000e8de0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</\n-000e8e00: 3c73 7061 6e20 636c 6173 733d 226b 6579 sequen\n-000e8e20: 6365 3c2f 7370 616e 3e26 6774 3b20 3c2f ce> .
</complexTyp\n-000e8e70: 653c 2f73 7061 6e3e 2667 743b 3c2f 6469 e>.

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

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

.

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

.\n-000e9340: 3c64 6976 2063 6c61 7373 3d22 6672 6167
//\n-000e9380: 2073 696d 706c 655f 7665 6374 6f72 2e68 simple_vector.h\n-000e9390: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-000e93a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e93b0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >template<\n-000e93d0: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <class T&\n-000e9400: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
class \n-000e9440: 7369 6d70 6c65 5f76 6563 746f 7220 3c2f simple_vector .
{ p\n-000e9480: 7562 6c69 633c 2f73 7061 6e3e 3a20 3c2f ublic: .
typedef \n-000e94d0: 5420 2020 2020 2020 2020 2020 2020 2020 T \n-000e94e0: 2020 2020 2020 2020 7661 6c75 655f 7479 value_ty\n-000e94f0: 7065 3b20 3c2f 6469 763e 0a3c 6469 7620 pe;
.
\n-000e9510: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typedef value_type\n-000e9540: 2020 2020 2020 2020 2020 2020 2a20 706f * po\n-000e9550: 696e 7465 723b 203c 2f64 6976 3e0a 3c64 inter;
.\n-000e9570: 2020 2020 3c73 7061 6e20 636c 6173 733d typede\n-000e9590: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f c\n-000e95b0: 6f6e 7374 3c2f 7370 616e 3e20 7661 6c75 onst valu\n-000e95c0: 655f 7479 7065 2020 2020 2020 2a20 636f e_type * co\n-000e95d0: 6e73 745f 706f 696e 7465 723b 203c 2f64 nst_pointer; .
\n-000e9610: 7479 7065 6465 663c 2f73 7061 6e3e 2076 typedef v\n-000e9620: 616c 7565 5f74 7970 6520 2020 2020 2020 alue_type \n-000e9630: 2020 2020 2026 616d 703b 2072 6566 6572 & refer\n-000e9640: 656e 6365 3b20 3c2f 6469 763e 0a3c 6469 ence;
. \n-000e9660: 2020 203c 7370 616e 2063 6c61 7373 3d22 typedef\n-000e9680: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c co\n-000e96a0: 6e73 743c 2f73 7061 6e3e 2076 616c 7565 nst value\n-000e96b0: 5f74 7970 6520 2020 2020 2026 616d 703b _type &\n-000e96c0: 2063 6f6e 7374 5f72 6566 6572 656e 6365 const_reference\n-000e96d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000e96f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e9700: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef pointer \n-000e9720: 2020 2020 2020 2020 2020 2020 6974 6572 iter\n-000e9730: 6174 6f72 3b20 3c2f 6469 763e 0a3c 6469 ator;
. \n-000e9750: 2020 203c 7370 616e 2063 6c61 7373 3d22 typedef\n-000e9770: 3c2f 7370 616e 3e20 636f 6e73 745f 706f const_po\n-000e9780: 696e 7465 7220 2020 2020 2020 2020 2020 inter \n-000e9790: 636f 6e73 745f 6974 6572 6174 6f72 3b20 const_iterator; \n-000e97a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
protected:
.
\n-000e9800: 6974 6572 6174 6f72 2020 2020 2020 2020 iterator \n-000e9810: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9820: 6865 6164 3b20 3c2f 6469 763e 0a3c 6469 head;
. \n-000e9840: 2020 2069 7465 7261 746f 7220 2020 2020 iterator \n-000e9850: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9860: 2020 2074 6169 6c3b 203c 2f64 6976 3e0a tail;
.\n-000e9870: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-000e98a0: 7369 7a65 5f74 3c2f 7370 616e 3e20 2020 size_t \n-000e98b0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e98c0: 2020 2020 2020 2063 6170 6163 6974 793b capacity;\n-000e98d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
public:\n-000e9910: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000e9930: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9940: 2020 2020 2020 2020 2020 2020 2020 7369 si\n-000e9950: 6d70 6c65 5f76 6563 746f 7228 2920 2020 mple_vector() \n-000e9960: 2020 2020 7b20 6865 6164 203d 2074 6169 { head = tai\n-000e9970: 6c20 3d20 4e55 4c4c 3b20 7d20 3c2f 6469 l = NULL; } .
\n-000e99a0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e99b0: 2020 2020 2020 2020 2073 696d 706c 655f simple_\n-000e99c0: 7665 6374 6f72 283c 7370 616e 2063 6c61 vector(con\n-000e99e0: 7374 3c2f 7370 616e 3e20 7369 6d70 6c65 st simple\n-000e99f0: 5f76 6563 746f 7226 616d 703b 2076 2920 _vector& v) \n-000e9a00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000e9a20: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9a30: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9a40: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9a50: 2020 207b 206f 7065 7261 746f 723d 2876 { operator=(v\n-000e9a60: 293b 207d 203c 2f64 6976 3e0a 3c64 6976 ); }
. \n-000e9a80: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9a90: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9aa0: 2020 7e73 696d 706c 655f 7665 6374 6f72 ~simple_vector\n-000e9ab0: 2829 2020 2020 2020 7b20 3c73 7061 6e20 () { if (h\n-000e9ae0: 6561 6429 203c 7370 616e 2063 6c61 7373 ead) delet\n-000e9b00: 653c 2f73 7061 6e3e 5b5d 2068 6561 643b e[] head;\n-000e9b10: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
.
\n-000e9b30: 3c73 7061 6e20 636c 6173 733d 226b 6579 void \n-000e9b60: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9b70: 2063 6c65 6172 2829 2020 2020 2020 2020 clear() \n-000e9b80: 2020 2020 2020 207b 2074 6169 6c20 3d20 { tail = \n-000e9b90: 6865 6164 3b20 7d20 3c2f 6469 763e 0a3c head; }
.<\n-000e9ba0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e9bb0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* the me\n-000e9bd0: 6d62 6572 2066 756e 6374 696f 6e73 2062 mber functions b\n-000e9be0: 656c 6f77 2061 7265 2072 6571 7569 7265 elow are require\n-000e9bf0: 6420 666f 7220 7365 7269 616c 697a 6174 d for serializat\n-000e9c00: 696f 6e20 6f66 2074 656d 706c 6174 6573 ion of templates\n-000e9c10: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
iterator\n-000e9c40: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9c50: 2020 2020 2020 2020 6265 6769 6e28 2920 begin() \n-000e9c60: 2020 2020 2020 2020 2020 2020 2020 7b20 { \n-000e9c70: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-000e9c90: 3c2f 7370 616e 3e20 6865 6164 3b20 7d20 head; } \n-000e9ca0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
con\n-000e9cc0: 7374 5f69 7465 7261 746f 7220 2020 2020 st_iterator \n-000e9cd0: 2020 2020 2020 2020 2020 2020 2062 6567 beg\n-000e9ce0: 696e 2829 3c73 7061 6e20 636c 6173 733d in() const\n-000e9d00: 203c 2f73 7061 6e3e 7b20 3c73 7061 6e20 { return head; }
\n-000e9d40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
iterator \n-000e9d60: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9d70: 2020 2020 2020 2065 6e64 2829 2020 2020 end() \n-000e9d80: 2020 2020 2020 2020 2020 2020 207b 203c { <\n-000e9d90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e9da0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-000e9db0: 2f73 7061 6e3e 2074 6169 6c3b 207d 203c /span> tail; } <\n-000e9dc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
cons\n-000e9de0: 745f 6974 6572 6174 6f72 2020 2020 2020 t_iterator \n-000e9df0: 2020 2020 2020 2020 2020 2020 656e 6428 end(\n-000e9e00: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const { return t\n-000e9e50: 6169 6c3b 207d 203c 2f64 6976 3e0a 3c64 ail; }
.\n-000e9e70: 2020 2020 3c73 7061 6e20 636c 6173 733d si\n-000e9e90: 7a65 5f74 3c2f 7370 616e 3e20 2020 2020 ze_t \n-000e9ea0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9eb0: 2020 2020 2073 697a 6528 293c 7370 616e size() const {\n-000e9ee0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-000e9f00: 6e3c 2f73 7061 6e3e 2074 6169 6c20 2d20 n tail - \n-000e9f10: 6865 6164 3b20 7d20 3c2f 6469 763e 0a3c head; }
.<\n-000e9f20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e9f30: 3e20 2020 2069 7465 7261 746f 7220 2020 > iterator \n-000e9f40: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9f50: 2020 2020 2069 6e73 6572 7428 6974 6572 insert(iter\n-000e9f60: 6174 6f72 2070 6f73 2c20 636f 6e73 745f ator pos, const_\n-000e9f70: 7265 6665 7265 6e63 6520 7661 6c29 203c reference val) <\n-000e9f80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{.
if \n-000e9fe0: 2821 6865 6164 2920 3c2f 6469 763e 0a3c (!head)
.<\n-000e9ff0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea000: 3e20 2020 2020 2020 2068 6561 6420 3d20 > head = \n-000ea010: 7461 696c 203d 203c 7370 616e 2063 6c61 tail = new\n-000ea030: 3c2f 7370 616e 3e20 7661 6c75 655f 7479 value_ty\n-000ea040: 7065 5b63 6170 6163 6974 7920 3d20 315d pe[capacity = 1]\n-000ea050: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
\n-000ea070: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-000ea090: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (tail\n-000ea0c0: 2026 6774 3b3d 2068 6561 6420 2b20 6361 >= head + ca\n-000ea0d0: 7061 6369 7479 2920 3c2f 6469 763e 0a3c pacity)
.<\n-000ea0e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea0f0: 3e20 2020 2020 207b 3c2f 6469 763e 0a3c > {
.<\n-000ea100: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea110: 3e20 2020 2020 2020 2069 7465 7261 746f > iterato\n-000ea120: 7220 6920 3d20 6865 6164 3b20 3c2f 6469 r i = head; .
ite\n-000ea150: 7261 746f 7220 6a20 3d20 3c73 7061 6e20 rator j = \n-000ea170: 6e65 773c 2f73 7061 6e3e 2076 616c 7565 new value\n-000ea180: 5f74 7970 655b 6361 7061 6369 7479 202a _type[capacity *\n-000ea190: 3d20 325d 3b20 3c2f 6469 763e 0a3c 6469 = 2];
. \n-000ea1b0: 2020 2020 2020 2069 7465 7261 746f 7220 iterator \n-000ea1c0: 6b20 3d20 6a3b 203c 2f64 6976 3e0a 3c64 k = j;
.\n-000ea1e0: 2020 2020 2020 2020 3c73 7061 6e20 636c while (\n-000ea210: 6920 266c 743b 2074 6169 6c29 203c 2f64 i < tail) .
\n-000ea240: 2a6b 2b2b 203d 202a 692b 2b3b 203c 2f64 *k++ = *i++; .
if (pos)
.<\n-000ea2a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea2b0: 3e20 2020 2020 2020 2020 2070 6f73 203d > pos =\n-000ea2c0: 206a 202b 2028 706f 7320 2d20 6865 6164 j + (pos - head\n-000ea2d0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
\n-000ea2f0: 2020 2020 7461 696c 203d 206a 202b 2028 tail = j + (\n-000ea300: 7461 696c 202d 2068 6561 6429 3b20 3c2f tail - head); .
<\n-000ea330: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ea340: 6f72 6422 3e64 656c 6574 653c 2f73 7061 ord\">delete[] head; .
head\n-000ea380: 203d 206a 3b20 3c2f 6469 763e 0a3c 6469 = j;
. \n-000ea3a0: 2020 2020 207d 203c 2f64 6976 3e0a 3c64 }
.\n-000ea3c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-000ea3e0: 6966 3c2f 7370 616e 3e20 2870 6f73 2026 if (pos &\n-000ea3f0: 616d 703b 2661 6d70 3b20 706f 7320 2667 amp;& pos &g\n-000ea400: 743b 3d20 6865 6164 2026 616d 703b 2661 t;= head &&a\n-000ea410: 6d70 3b20 706f 7320 266c 743b 2074 6169 mp; pos < tai\n-000ea420: 6c29 203c 2f64 6976 3e0a 3c64 6976 2063 l)
.
\n-000ea440: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
.
\n-000ea460: 2020 2020 6974 6572 6174 6f72 2069 203d iterator i =\n-000ea470: 2074 6169 6c3b 203c 2f64 6976 3e0a 3c64 tail;
.\n-000ea490: 2020 2020 2020 2020 6974 6572 6174 6f72 iterator\n-000ea4a0: 206a 203d 2069 202d 2031 3b20 3c2f 6469 j = i - 1; .
while (j != pos) <\n-000ea500: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n-000ea520: 2020 202a 692d 2d20 3d20 2a6a 2d2d 3b20 *i-- = *j--; \n-000ea530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000ea550: 202a 706f 7320 3d20 7661 6c3b 203c 2f64 *pos = val; .
} .
else
.
\n-000ea5e0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
.
\n-000ea600: 2020 2020 706f 7320 3d20 7461 696c 3b20 pos = tail; \n-000ea610: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000ea630: 202a 7461 696c 2b2b 203d 2076 616c 3b20 *tail++ = val; \n-000ea640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}\n-000ea660: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000ea680: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-000ea6a0: 3c2f 7370 616e 3e20 706f 733b 203c 2f64 pos; .
} .
simple_\n-000ea6f0: 7665 6374 6f72 2661 6d70 3b20 6f70 6572 vector& oper\n-000ea700: 6174 6f72 3d28 3c73 7061 6e20 636c 6173 ator=(cons\n-000ea720: 743c 2f73 7061 6e3e 2073 696d 706c 655f t simple_\n-000ea730: 7665 6374 6f72 2661 6d70 3b20 7629 203c vector& v) <\n-000ea740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{.
head\n-000ea780: 203d 2074 6169 6c20 3d20 4e55 4c4c 3b20 = tail = NULL; \n-000ea790: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
c\n-000ea7b0: 6170 6163 6974 7920 3d20 762e 6361 7061 apacity = v.capa\n-000ea7c0: 6369 7479 3b20 3c2f 6469 763e 0a3c 6469 city;
. \n-000ea7e0: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n-000ea800: 663c 2f73 7061 6e3e 2028 762e 6865 6164 f (v.head\n-000ea810: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
.
\n-000ea830: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
.
\n-000ea850: 2020 2068 6561 6420 3d20 7461 696c 203d head = tail =\n-000ea860: 203c 7370 616e 2063 6c61 7373 3d22 6b65 new value_type[cap\n-000ea890: 6163 6974 795d 3b20 3c2f 6469 763e 0a3c acity];
.<\n-000ea8a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea8b0: 3e20 2020 2020 2020 2069 7465 7261 746f > iterato\n-000ea8c0: 7220 6920 3d20 762e 6865 6164 3b20 3c2f r i = v.head; .
<\n-000ea8f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ea900: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (i != v.ta\n-000ea920: 696c 2920 3c2f 6469 763e 0a3c 6469 7620 il)
.
\n-000ea940: 2020 2020 2020 202a 7461 696c 2b2b 203d *tail++ =\n-000ea950: 202a 692b 2b3b 203c 2f64 6976 3e0a 3c64 *i++;
.\n-000ea970: 2020 2020 2020 7d20 3c2f 6469 763e 0a3c }
.<\n-000ea980: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ea990: 3e20 2020 2020 203c 7370 616e 2063 6c61 > return *\n+000e8ad0: 776f 7264 7479 7065 223e 656c 656d 656e wordtype\">elemen\n+000e8ae0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t n\n+000e8b00: 616d 653c 2f73 7061 6e3e 3d3c 7370 616e ame="num\n+000e8b30: 6265 7226 7175 6f74 3b3c 2f73 7061 6e3e ber"\n+000e8b40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 type=&\n+000e8b80: 7175 6f74 3b78 7364 3a69 6e74 2671 756f quot;xsd:int&quo\n+000e8b90: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n+000e8bb0: 6d69 6e4f 6363 7572 733c 2f73 7061 6e3e minOccurs\n+000e8bc0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000e8be0: 6f74 3b31 2671 756f 743b 3c2f 7370 616e ot;1" maxOccur\n+000e8c10: 733c 2f73 7061 6e3e 3d3c 7370 616e 2063 s="10&qu\n+000e8c40: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> \n+000e8c50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<\n+000e8c70: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;eleme\n+000e8c90: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt \n+000e8cb0: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="na\n+000e8ce0: 6d65 2671 756f 743b 3c2f 7370 616e 3e20 me" \n+000e8cf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 type=&q\n+000e8d30: 756f 743b 7873 643a 7374 7269 6e67 2671 uot;xsd:string&q\n+000e8d40: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; minOccurs=&\n+000e8d90: 7175 6f74 3b32 2671 756f 743b 3c2f 7370 quot;2" maxOcc\n+000e8dc0: 7572 733c 2f73 7061 6e3e 3d3c 7370 616e urs="unb\n+000e8df0: 6f75 6e64 6564 2671 756f 743b 3c2f 7370 ounded"/>
.\n+000e8e10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</sequence>
.\n+000e8e70: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </c\n+000e8e90: 6f6d 706c 6578 5479 7065 3c2f 7370 616e omplexType>
.

You\n+000e8ed0: 2063 616e 2061 6c73 6f20 696d 706c 656d can also implem\n+000e8ee0: 656e 7420 796f 7572 206f 776e 2063 6f6e ent your own con\n+000e8ef0: 7461 696e 6572 732e 2054 6865 2063 6f6e tainers. The con\n+000e8f00: 7461 696e 6572 7320 6d75 7374 2062 6520 tainers must be \n+000e8f10: 636c 6173 7320 7465 6d70 6c61 7465 7320 class templates \n+000e8f20: 616e 6420 7368 6f75 6c64 2064 6566 696e and should defin\n+000e8f30: 6520 6120 666f 7277 6172 6420 6974 6572 e a forward iter\n+000e8f40: 6174 6f72 2074 7970 652c 2061 6e64 2070 ator type, and p\n+000e8f50: 726f 7669 6465 2074 6865 2066 6f6c 6c6f rovide the follo\n+000e8f60: 7769 6e67 206d 6574 686f 6473 3a3c 2f70 wing methods:.

    .
  • void clear() empty the c\n+000e8fa0: 6f6e 7461 696e 6572 3b3c 2f6c 693e 0a3c ontainer;
  • .<\n+000e8fb0: 6c69 3e3c 636f 6465 3e69 7465 7261 746f li>iterato\n+000e8fc0: 7220 6265 6769 6e28 293c 2f63 6f64 653e r begin()\n+000e8fd0: 2072 6574 7572 6e20 6974 6572 6174 6f72 return iterator\n+000e8fe0: 2074 6f20 6265 6769 6e6e 696e 673b 3c2f to beginning;.
  • co\n+000e9000: 6e73 745f 6974 6572 6174 6f72 2062 6567 nst_iterator beg\n+000e9010: 696e 2829 2063 6f6e 7374 3c2f 636f 6465 in() const return const i\n+000e9030: 7465 7261 746f 7220 746f 2062 6567 696e terator to begin\n+000e9040: 6e69 6e67 3b3c 2f6c 693e 0a3c 6c69 3e3c ning;
  • .
  • <\n+000e9050: 636f 6465 3e69 7465 7261 746f 7220 656e code>iterator en\n+000e9060: 6428 293c 2f63 6f64 653e 2072 6574 7572 d() retur\n+000e9070: 6e20 6974 6572 6174 6f72 2074 6f20 656e n iterator to en\n+000e9080: 643b 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 d;
  • .
  • const_iterator\n+000e90a0: 2065 6e64 2829 2063 6f6e 7374 3c2f 636f end() const return const\n+000e90c0: 2069 7465 7261 746f 7220 746f 2065 6e64 iterator to end\n+000e90d0: 3b3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 ;
  • .
  • size_t size() return siz\n+000e9100: 653b 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 e;
  • .
  • iterator inser\n+000e9120: 7428 6974 6572 6174 6f72 2070 6f73 2c20 t(iterator pos, \n+000e9130: 636f 6e73 745f 7265 6665 7265 6e63 6520 const_reference \n+000e9140: 7661 6c29 3c2f 636f 6465 3e20 696e 7365 val) inse\n+000e9150: 7274 2065 6c65 6d65 6e74 2e3c 2f6c 693e rt element.
  • \n+000e9160: 0a3c 2f75 6c3e 0a3c 703e 5468 6520 3c63 .
.

The iterator should be a \n+000e9190: 666f 7277 6172 6420 6974 6572 6174 6f72 forward iterator\n+000e91a0: 2077 6974 6820 6120 6465 7265 6665 7265 with a derefere\n+000e91b0: 6e63 6520 6f70 6572 6174 6f72 2074 6f20 nce operator to \n+000e91c0: 6163 6365 7373 2074 6865 2063 6f6e 7461 access the conta\n+000e91d0: 696e 6572 2773 2065 6c65 6d65 6e74 732c iner's elements,\n+000e91e0: 2069 7420 6d75 7374 2062 6520 636f 6d70 it must be comp\n+000e91f0: 6172 6162 6c65 2028 6571 7561 6c2f 756e arable (equal/un\n+000e9200: 6571 7561 6c29 2c20 616e 6420 6265 2070 equal), and be p\n+000e9210: 7265 2d69 6e63 7265 6d65 6e74 6162 6c65 re-incrementable\n+000e9220: 2028 3c63 6f64 653e 2b2b 6974 3c2f 636f (++it). The const \n+000e9240: 6974 6572 6174 6f72 2069 7320 7573 6564 iterator is used\n+000e9250: 2062 7920 6974 7320 736f 6170 6370 7032 by its soapcpp2\n+000e9260: 2d67 656e 6572 6174 6564 2073 6572 6961 -generated seria\n+000e9270: 6c69 7a65 7220 746f 2073 656e 6420 6120 lizer to send a \n+000e9280: 7365 7175 656e 6365 206f 6620 584d 4c20 sequence of XML \n+000e9290: 656c 656d 656e 7420 7661 6c75 6573 2e20 element values. \n+000e92a0: 5468 6520 3c63 6f64 653e 696e 7365 7274 The insert\n+000e92b0: 3c2f 636f 6465 3e20 6d65 7468 6f64 2069 method i\n+000e92c0: 7320 7573 6564 2074 6f20 706f 7075 6c61 s used to popula\n+000e92d0: 7465 2061 2063 6f6e 7461 696e 6572 2077 te a container w\n+000e92e0: 6974 6820 3c63 6f64 653e 436f 6e74 6169 ith Contai\n+000e92f0: 6e65 723a 3a69 7465 7261 746f 7220 6920 ner::iterator i \n+000e9300: 3d20 636f 6e74 6169 6e65 722e 696e 7365 = container.inse\n+000e9310: 7274 2863 6f6e 7461 696e 6572 2e65 6e64 rt(container.end\n+000e9320: 2829 2c20 7661 6c29 3c2f 636f 6465 3e2e (), val).\n+000e9330: 3c2f 703e 0a3c 703e 4865 7265 2069 7320

.

Here is \n+000e9340: 696e 2065 7861 6d70 6c65 2063 6f6e 7461 in example conta\n+000e9350: 696e 6572 2074 656d 706c 6174 6520 636c iner template cl\n+000e9360: 6173 733a 3c2f 703e 0a3c 6469 7620 636c ass:

.
<\n+000e9380: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e9390: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// simple\n+000e93b0: 5f76 6563 746f 722e 6820 3c2f 7370 616e _vector.h
.
\n+000e93f0: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template \n+000e9400: 266c 743b 3c73 7061 6e20 636c 6173 733d <class<\n+000e9420: 2f73 7061 6e3e 2054 2667 743b 203c 2f64 /span> T> .
clas\n+000e9460: 7320 3c2f 7370 616e 3e73 696d 706c 655f s simple_\n+000e9470: 7665 6374 6f72 203c 2f64 6976 3e0a 3c64 vector
.\n+000e9490: 7b20 3c73 7061 6e20 636c 6173 733d 226b { public:
.\n+000e94d0: 2020 2020 3c73 7061 6e20 636c 6173 733d typede\n+000e94f0: 663c 2f73 7061 6e3e 2054 2020 2020 2020 f T \n+000e9500: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9510: 2076 616c 7565 5f74 7970 653b 203c 2f64 value_type; .
\n+000e9550: 7479 7065 6465 663c 2f73 7061 6e3e 2076 typedef v\n+000e9560: 616c 7565 5f74 7970 6520 2020 2020 2020 alue_type \n+000e9570: 2020 2020 202a 2070 6f69 6e74 6572 3b20 * pointer; \n+000e9580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
typedef const value_type \n+000e95f0: 2020 2020 202a 2063 6f6e 7374 5f70 6f69 * const_poi\n+000e9600: 6e74 6572 3b20 3c2f 6469 763e 0a3c 6469 nter;
. \n+000e9620: 2020 203c 7370 616e 2063 6c61 7373 3d22 typedef\n+000e9640: 3c2f 7370 616e 3e20 7661 6c75 655f 7479 value_ty\n+000e9650: 7065 2020 2020 2020 2020 2020 2020 2661 pe &a\n+000e9660: 6d70 3b20 7265 6665 7265 6e63 653b 203c mp; reference; <\n+000e9670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
typedef\n+000e96b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const value_type \n+000e96e0: 2020 2020 2661 6d70 3b20 636f 6e73 745f & const_\n+000e96f0: 7265 6665 7265 6e63 653b 203c 2f64 6976 reference; .
ty\n+000e9730: 7065 6465 663c 2f73 7061 6e3e 2070 6f69 pedef poi\n+000e9740: 6e74 6572 2020 2020 2020 2020 2020 2020 nter \n+000e9750: 2020 2020 2069 7465 7261 746f 723b 203c iterator; <\n+000e9760: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
typedef\n+000e97a0: 2063 6f6e 7374 5f70 6f69 6e74 6572 2020 const_pointer \n+000e97b0: 2020 2020 2020 2020 2063 6f6e 7374 5f69 const_i\n+000e97c0: 7465 7261 746f 723b 203c 2f64 6976 3e0a terator;
.\n+000e97d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
protec\n+000e9800: 7465 643c 2f73 7061 6e3e 3a20 3c2f 6469 ted: .
iterato\n+000e9830: 7220 2020 2020 2020 2020 2020 2020 2020 r \n+000e9840: 2020 2020 2020 2020 2068 6561 643b 203c head; <\n+000e9850: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
iter\n+000e9870: 6174 6f72 2020 2020 2020 2020 2020 2020 ator \n+000e9880: 2020 2020 2020 2020 2020 2020 7461 696c tail\n+000e9890: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000e98b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e98c0: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+000e98d0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> \n+000e98e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e98f0: 6361 7061 6369 7479 3b20 3c2f 6469 763e capacity;
\n+000e9900: 0a3c 6469 7620 636c 6173 733d 226c 696e .
publi\n+000e9930: 633c 2f73 7061 6e3e 3a20 3c2f 6469 763e c:
\n+000e9940: 0a3c 6469 7620 636c 6173 733d 226c 696e .
\n+000e9960: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9970: 2020 2020 2020 2073 696d 706c 655f 7665 simple_ve\n+000e9980: 6374 6f72 2829 2020 2020 2020 207b 2068 ctor() { h\n+000e9990: 6561 6420 3d20 7461 696c 203d 204e 554c ead = tail = NUL\n+000e99a0: 4c3b 207d 203c 2f64 6976 3e0a 3c64 6976 L; }
. \n+000e99c0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e99d0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e99e0: 2020 7369 6d70 6c65 5f76 6563 746f 7228 simple_vector(\n+000e99f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const simple_vector\n+000e9a20: 2661 6d70 3b20 7629 203c 2f64 6976 3e0a & v)
.\n+000e9a30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\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 7b20 6f70 { op\n+000e9a80: 6572 6174 6f72 3d28 7629 3b20 7d20 3c2f erator=(v); } .
\n+000e9ab0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9ac0: 2020 2020 2020 2020 2020 207e 7369 6d70 ~simp\n+000e9ad0: 6c65 5f76 6563 746f 7228 2920 2020 2020 le_vector() \n+000e9ae0: 207b 203c 7370 616e 2063 6c61 7373 3d22 { if<\n+000e9b00: 2f73 7061 6e3e 2028 6865 6164 2920 3c73 /span> (head) delete[] head; } .
void \n+000e9b80: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9b90: 2020 2020 2020 2020 2020 636c 6561 7228 clear(\n+000e9ba0: 2920 2020 2020 2020 2020 2020 2020 2020 ) \n+000e9bb0: 7b20 7461 696c 203d 2068 6561 643b 207d { tail = head; }\n+000e9bc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n+000e9bf0: 2f2a 2074 6865 206d 656d 6265 7220 6675 /* the member fu\n+000e9c00: 6e63 7469 6f6e 7320 6265 6c6f 7720 6172 nctions below ar\n+000e9c10: 6520 7265 7175 6972 6564 2066 6f72 2073 e required for s\n+000e9c20: 6572 6961 6c69 7a61 7469 6f6e 206f 6620 erialization of \n+000e9c30: 7465 6d70 6c61 7465 7320 2a2f 3c2f 7370 templates */
.
\n+000e9c60: 2069 7465 7261 746f 7220 2020 2020 2020 iterator \n+000e9c70: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9c80: 2062 6567 696e 2829 2020 2020 2020 2020 begin() \n+000e9c90: 2020 2020 2020 207b 203c 7370 616e 2063 { return\n+000e9cc0: 2068 6561 643b 207d 203c 2f64 6976 3e0a head; }
.\n+000e9cd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
const_iter\n+000e9cf0: 6174 6f72 2020 2020 2020 2020 2020 2020 ator \n+000e9d00: 2020 2020 2020 6265 6769 6e28 293c 7370 begin() const { ret\n+000e9d50: 7572 6e3c 2f73 7061 6e3e 2068 6561 643b urn head;\n+000e9d60: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
.
\n+000e9d80: 6974 6572 6174 6f72 2020 2020 2020 2020 iterator \n+000e9d90: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9da0: 656e 6428 2920 2020 2020 2020 2020 2020 end() \n+000e9db0: 2020 2020 2020 7b20 3c73 7061 6e20 636c { return \n+000e9de0: 7461 696c 3b20 7d20 3c2f 6469 763e 0a3c tail; }
.<\n+000e9df0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e9e00: 3e20 2020 2063 6f6e 7374 5f69 7465 7261 > const_itera\n+000e9e10: 746f 7220 2020 2020 2020 2020 2020 2020 tor \n+000e9e20: 2020 2020 2065 6e64 2829 3c73 7061 6e20 end()\n+000e9e40: 2063 6f6e 7374 203c 2f73 7061 6e3e 7b20 const { \n+000e9e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+000e9e70: 3c2f 7370 616e 3e20 7461 696c 3b20 7d20 tail; } \n+000e9e80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
size_t \n+000e9ed0: 2020 2020 2020 2020 2020 2020 2020 7369 si\n+000e9ee0: 7a65 2829 3c73 7061 6e20 636c 6173 733d ze() const\n+000e9f00: 203c 2f73 7061 6e3e 7b20 3c73 7061 6e20 { return tail - head; }\n+000e9f40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
it\n+000e9f60: 6572 6174 6f72 2020 2020 2020 2020 2020 erator \n+000e9f70: 2020 2020 2020 2020 2020 2020 2020 696e in\n+000e9f80: 7365 7274 2869 7465 7261 746f 7220 706f sert(iterator po\n+000e9f90: 732c 2063 6f6e 7374 5f72 6566 6572 656e s, const_referen\n+000e9fa0: 6365 2076 616c 2920 3c2f 6469 763e 0a3c ce val)
.<\n+000e9fb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e9fc0: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
. \n+000e9fe0: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n+000ea000: 663c 2f73 7061 6e3e 2028 2168 6561 6429 f (!head)\n+000ea010: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n+000ea030: 2020 6865 6164 203d 2074 6169 6c20 3d20 head = tail = \n+000ea040: 3c73 7061 6e20 636c 6173 733d 226b 6579 new\n+000ea060: 2076 616c 7565 5f74 7970 655b 6361 7061 value_type[capa\n+000ea070: 6369 7479 203d 2031 5d3b 203c 2f64 6976 city = 1]; .
else \n+000ea0c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (tail >= \n+000ea0f0: 6865 6164 202b 2063 6170 6163 6974 7929 head + capacity)\n+000ea100: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n+000ea120: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
\n+000ea140: 2020 6974 6572 6174 6f72 2069 203d 2068 iterator i = h\n+000ea150: 6561 643b 203c 2f64 6976 3e0a 3c64 6976 ead;
. \n+000ea170: 2020 2020 2020 6974 6572 6174 6f72 206a iterator j\n+000ea180: 203d 203c 7370 616e 2063 6c61 7373 3d22 = new value_type[c\n+000ea1b0: 6170 6163 6974 7920 2a3d 2032 5d3b 203c apacity *= 2]; <\n+000ea1c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n+000ea1e0: 6974 6572 6174 6f72 206b 203d 206a 3b20 iterator k = j; \n+000ea1f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n+000ea210: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while\n+000ea230: 3c2f 7370 616e 3e20 2869 2026 6c74 3b20 (i < \n+000ea240: 7461 696c 2920 3c2f 6469 763e 0a3c 6469 tail)
. \n+000ea260: 2020 2020 2020 2020 202a 6b2b 2b20 3d20 *k++ = \n+000ea270: 2a69 2b2b 3b20 3c2f 6469 763e 0a3c 6469 *i++;
. \n+000ea290: 2020 2020 2020 203c 7370 616e 2063 6c61 if (pos)\n+000ea2c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n+000ea2e0: 2020 2020 706f 7320 3d20 6a20 2b20 2870 pos = j + (p\n+000ea2f0: 6f73 202d 2068 6561 6429 3b20 3c2f 6469 os - head); .
tai\n+000ea320: 6c20 3d20 6a20 2b20 2874 6169 6c20 2d20 l = j + (tail - \n+000ea330: 6865 6164 293b 203c 2f64 6976 3e0a 3c64 head);
.\n+000ea350: 2020 2020 2020 2020 3c73 7061 6e20 636c de\n+000ea370: 6c65 7465 3c2f 7370 616e 3e5b 5d20 6865 lete[] he\n+000ea380: 6164 3b20 3c2f 6469 763e 0a3c 6469 7620 ad;
.
\n+000ea3a0: 2020 2020 2068 6561 6420 3d20 6a3b 203c head = j; <\n+000ea3b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
} \n+000ea3d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<\n+000ea3f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000ea400: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (pos &&am\n+000ea420: 703b 2070 6f73 2026 6774 3b3d 2068 6561 p; pos >= hea\n+000ea430: 6420 2661 6d70 3b26 616d 703b 2070 6f73 d && pos\n+000ea440: 2026 6c74 3b20 7461 696c 2920 3c2f 6469 < tail) .
{.
ite\n+000ea490: 7261 746f 7220 6920 3d20 7461 696c 3b20 rator i = tail; \n+000ea4a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n+000ea4c0: 2069 7465 7261 746f 7220 6a20 3d20 6920 iterator j = i \n+000ea4d0: 2d20 313b 203c 2f64 6976 3e0a 3c64 6976 - 1;
. \n+000ea4f0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+000ea510: 7768 696c 653c 2f73 7061 6e3e 2028 6a20 while (j \n+000ea520: 213d 2070 6f73 2920 3c2f 6469 763e 0a3c != pos)
.<\n+000ea530: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ea540: 3e20 2020 2020 2020 2020 2020 2a69 2d2d > *i--\n+000ea550: 203d 202a 6a2d 2d3b 203c 2f64 6976 3e0a = *j--;
.\n+000ea560: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
*pos =\n+000ea580: 2076 616c 3b20 3c2f 6469 763e 0a3c 6469 val;
. \n+000ea5a0: 2020 2020 207d 203c 2f64 6976 3e0a 3c64 }
.\n+000ea5c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+000ea5e0: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
{.
pos\n+000ea630: 203d 2074 6169 6c3b 203c 2f64 6976 3e0a = tail;
.\n+000ea640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
*tail+\n+000ea660: 2b20 3d20 7661 6c3b 203c 2f64 6976 3e0a + = val;
.\n+000ea670: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
\n+000ea690: 0a3c 6469 7620 636c 6173 733d 226c 696e .
return\n+000ea6d0: 2070 6f73 3b20 3c2f 6469 763e 0a3c 6469 pos;
. \n+000ea6f0: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
. \n+000ea710: 2020 7369 6d70 6c65 5f76 6563 746f 7226 simple_vector&\n+000ea720: 616d 703b 206f 7065 7261 746f 723d 283c amp; operator=(<\n+000ea730: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000ea740: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const simple_vector&\n+000ea760: 616d 703b 2076 2920 3c2f 6469 763e 0a3c amp; v)
.<\n+000ea770: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ea780: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
. \n+000ea7a0: 2020 2020 2068 6561 6420 3d20 7461 696c head = tail\n+000ea7b0: 203d 204e 554c 4c3b 203c 2f64 6976 3e0a = NULL;
.\n+000ea7c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
capacity\n+000ea7e0: 203d 2076 2e63 6170 6163 6974 793b 203c = v.capacity; <\n+000ea7f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
if (v.head) .
{.
head\n+000ea880: 203d 2074 6169 6c20 3d20 3c73 7061 6e20 = tail = \n+000ea8a0: 6e65 773c 2f73 7061 6e3e 2076 616c 7565 new value\n+000ea8b0: 5f74 7970 655b 6361 7061 6369 7479 5d3b _type[capacity];\n+000ea8c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n+000ea8e0: 2020 6974 6572 6174 6f72 2069 203d 2076 iterator i = v\n+000ea8f0: 2e68 6561 643b 203c 2f64 6976 3e0a 3c64 .head;
.\n+000ea910: 2020 2020 2020 2020 3c73 7061 6e20 636c while (\n+000ea940: 6920 213d 2076 2e74 6169 6c29 203c 2f64 i != v.tail) .
\n+000ea970: 2a74 6169 6c2b 2b20 3d20 2a69 2b2b 3b20 *tail++ = *i++; \n+000ea980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}\n+000ea9a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n 000ea9c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 this;
.
\n-000eaa00: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
.
};.

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

.
#include\n-000eaaf0: 2026 7175 6f74 3b73 696d 706c 6556 6563 "simpleVec\n-000eab00: 746f 722e 6826 7175 6f74 3b3c 2f73 7061 tor.h"
.
template <clas\n-000eab70: 733c 2f73 7061 6e3e 2054 2667 743b 203c s T> <\n+000ea9d0: 776f 7264 666c 6f77 223e 7265 7475 726e wordflow\">return\n+000ea9e0: 3c2f 7370 616e 3e20 2a3c 7370 616e 2063 *t\n+000eaa00: 6869 733c 2f73 7061 6e3e 3b20 3c2f 6469 his; .
} .
};
.

To enable\n+000eaa70: 2074 6865 2063 6f6e 7461 696e 6572 2c20 the container, \n+000eaa80: 7765 2061 6464 2074 6865 2066 6f6c 6c6f we add the follo\n+000eaa90: 7769 6e67 2074 776f 206c 696e 6573 2074 wing two lines t\n+000eaaa0: 6f20 7468 6520 696e 7465 7266 6163 6520 o the interface \n+000eaab0: 6865 6164 6572 2066 696c 6520 666f 7220 header file for \n+000eaac0: 736f 6170 6370 7032 3a3c 2f70 3e0a 3c64 soapcpp2:

.
#include "\n+000eab20: 7369 6d70 6c65 5665 6374 6f72 2e68 2671 simpleVector.h&q\n+000eab30: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; .
templ\n+000eab70: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate <<\n 000eab80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000eab90: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class simpleVector;<\n-000eabb0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

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

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

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

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

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

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

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

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

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

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

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

.

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

.

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

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

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

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

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

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

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

.

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

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

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

.

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

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

    .

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

    .

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

    .

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

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

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

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

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

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

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

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

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

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

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

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

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

    .

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

    .

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

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

    .

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

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

    .

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

    .

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

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

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

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

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

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

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

    .

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

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

    .

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

    .

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

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

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

    .

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

    .

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

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

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

    .

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

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

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

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

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

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

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

.<\n-000f17a0: 6469 7620 636c 6173 733d 2261 6c74 223e div class=\"alt\">\n-000f17b0: 203c 6469 7620 636c 6173 733d 2266 7261
<complexTy\n-000f1800: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe \n-000f1820: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="da\n-000f1850: 7465 2671 756f 743b 3c2f 7370 616e 3e26 te"&\n-000f1860: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
&\n-000f1880: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;sim\n-000f18a0: 706c 6543 6f6e 7465 6e74 3c2f 7370 616e pleContent>
. \n-000f18d0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <extension base=\n-000f1940: 2671 756f 743b 7873 643a 7374 7269 6e67 "xsd:string\n-000f1950: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g\n-000f1960: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000f1980: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/sim\n-000f19a0: 706c 6543 6f6e 7465 6e74 3c2f 7370 616e pleContent>
. \n-000f19d0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <a\n-000f19f0: 7474 7269 6275 7465 3c2f 7370 616e 3e20 ttribute \n-000f1a00: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q\n-000f1a40: 756f 743b 7a6f 6e65 2671 756f 743b 3c2f uot;zone" type\n-000f1a70: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="time:z\n-000f1aa0: 6f6e 6526 7175 6f74 3b3c 2f73 7061 6e3e one"\n-000f1ab0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 use=&q\n-000f1af0: 756f 743b 6f70 7469 6f6e 616c 2671 756f uot;optional&quo\n-000f1b00: 743b 3c2f 7370 616e 3e2f 2667 743b 203c t;/> <\n-000f1b10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</complexTy\n-000f1b50: 7065 3c2f 7370 616e 3e26 6774 3b3c 2f64 pe>.
<simpleType name\n-000f1bc0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="zone&q\n-000f1bf0: 756f 743b 3c2f 7370 616e 3e26 6774 3b20 uot;> \n-000f1c00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n-000f1c20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f1c30: 6f72 6474 7970 6522 3e72 6573 7472 6963 ordtype\">restric\n-000f1c40: 7469 6f6e 3c2f 7370 616e 3e20 3c73 7061 tion base="\n-000f1c90: 7873 643a 7374 7269 6e67 2671 756f 743b xsd:string"\n-000f1ca0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<enumerati\n-000f1cf0: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on \n-000f1d10: 7661 6c75 653c 2f73 7061 6e3e 3d3c 7370 value="E\n-000f1d40: 5354 2671 756f 743b 3c2f 7370 616e 3e2f ST"/\n-000f1d50: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000f1d70: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000f1d90: 656e 756d 6572 6174 696f 6e3c 2f73 7061 enumeration value="GMT"\n-000f1df0: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
... <\n-000f1e20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</<\n-000f1e40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f1e50: 6f72 6474 7970 6522 3e72 6573 7472 6963 ordtype\">restric\n-000f1e60: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b20 tion> \n-000f1e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</simpleTy\n-000f1eb0: 7065 3c2f 7370 616e 3e26 6774 3b3c 2f64 pe>.

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

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

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

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

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

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

.

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

.

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

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

...range \n-000f28c0: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 validat\n-000f28f0: 696f 6e20 6368 6563 6b20 2020 203c 2f74 ion check ..1
1 <= x \n-000f2990: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-000f29e0: 636f 6465 3e31 203a 3c2f 636f 6465 3e20 code>1 :
\n-000f29f0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 1 <=\n-000f2a20: 2078 2020 2020 3c2f 7464 3e3c 2f74 723e x \n-000f2a30: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..: 10 x\n-000f2ab0: 2026 6c74 3b3d 2031 3020 2020 203c 2f74 <= 10 ..1 : 10 \n-000f2b20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 1 <=\n-000f2b50: 2078 2026 6c74 3b3d 2031 3020 2020 203c x <= 10 <\n-000f2b60: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..1 < : <\n-000f2bc0: 2031 303c 2f63 6f64 653e 2020 203c 2f74 10
1 < x <\n-000f2c00: 3b20 3130 2020 2020 3c2f 7464 3e3c 2f74 ; 10 ..1 &\n-000f2c60: 6c74 3b20 3130 3c2f 636f 6465 3e20 2020 lt; 10 \n-000f2c70: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 1 < x \n-000f2ca0: 266c 743b 2031 3020 2020 203c 2f74 643e < 10 \n-000f2cb0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..1\n-000f2d00: 203a 2026 6c74 3b20 3130 3c2f 636f 6465 : < 10 1 <\n-000f2d40: 3b3d 2078 2026 6c74 3b20 3130 2020 2020 ;= x < 10 \n-000f2d50: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-000f2da0: 636f 6465 3e3a 2026 6c74 3b20 3130 3c2f code>: < 10 x\n-000f2de0: 2026 6c74 3b20 3130 2020 2020 3c2f 7464 < 10 ..\n-000f2e40: 266c 743b 2031 303c 2f63 6f64 653e 2020 < 10 \n-000f2e50: 203c 2f74 643e 3c74 6420 636c 6173 733d x < 1\n-000f2e80: 3020 2020 203c 2f74 643e 3c2f 7472 3e0a 0 .\n-000f2e90: 3c74 7220 636c 6173 733d 226d 6172 6b64 .1 <\n-000f2ee0: 203a 3c2f 636f 6465 3e20 2020 3c2f 7464 : 1 < x <\n-000f2f20: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..1 <\n-000f2f80: 2020 203c 2f74 643e 3c74 6420 636c 6173 1 <\n-000f2fb0: 2078 2020 2020 3c2f 7464 3e3c 2f74 723e x \n-000f2fc0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..1 <\n-000f3010: 3b20 3a20 3130 3c2f 636f 6465 3e20 2020 ; : 10 \n-000f3020: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 1 < x \n-000f3050: 266c 743b 3d20 3130 2020 203c 2f74 643e <= 10 \n-000f3060: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c ..<\n-000f3070: 703e 466f 7220 6578 616d 706c 653a 3c2f p>For example:.
typedef \n-000f30d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__int10 0\n-000f3100: 3a31 303b 203c 7370 616e 2063 6c61 7373 :10; // si\n-000f3120: 6d70 6c65 5479 7065 2072 6573 7472 6963 mpleType restric\n-000f3130: 7469 6f6e 206f 6620 696e 7420 302e 2e31 tion of int 0..1\n-000f3140: 3020 3c2f 7370 616e 3e3c 2f64 6976 3e0a 0
.\n-000f3150: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
typedef \n-000f3290: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n-000f32b0: 2f73 7061 6e3e 206e 735f 5f66 6c6f 6174 /span> ns__float\n-000f32c0: 202d 312e 3020 266c 743b 3a26 6c74 3b20 -1.0 <:< \n-000f32d0: 3130 2e35 3b20 3c73 7061 6e20 636c 6173 10.5; // s\n-000f32f0: 696d 706c 6554 7970 6520 7265 7374 7269 impleType restri\n-000f3300: 6374 696f 6e20 6f66 2066 6c6f 6174 2069 ction of float i\n-000f3310: 6e20 282d 312c 3130 2e35 2920 3c2f 7370 n (-1,10.5)
.
struct \n-000f3360: 6e73 5f5f 6461 7461 203c 7370 616e 2063 ns__data /\n-000f3380: 2f20 7369 6d70 6c65 436f 6e74 656e 7420 / simpleContent \n-000f3390: 7772 6170 7065 7220 3c2f 7370 616e 3e3c wrapper <\n-000f33a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n-000f33c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-000f33f0: 696e 743c 2f73 7061 6e3e 205f 5f69 7465 int __ite\n-000f3400: 6d20 303a 3130 3b20 3c73 7061 6e20 636c m 0:10; //\n-000f3420: 2073 696d 706c 6543 6f6e 7465 6e74 2072 simpleContent r\n-000f3430: 616e 6765 2030 2e2e 3130 203c 2f73 7061 ange 0..10
.
@ <\n-000f3460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f3470: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *name 1; \n-000f3490: 203c 7370 616e 2063 6c61 7373 3d22 636f // requir\n-000f34b0: 6564 206e 616d 6520 6174 7472 6962 7574 ed name attribut\n-000f34c0: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
.\n-000f34d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

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

.
&\n-000f3a60: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;sim\n-000f3a80: 706c 6554 7970 653c 2f73 7061 6e3e 203c pleType <\n-000f3a90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f3aa0: 6f72 6422 3e6e 616d 653c 2f73 7061 6e3e ord\">name\n-000f3ab0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f3ad0: 6f74 3b73 6563 6f6e 6426 7175 6f74 3b3c ot;second"<\n-000f3ae0: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
<restriction<\n-000f3b30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> bas\n-000f3b50: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:i\n-000f3b80: 6e74 2671 756f 743b 3c2f 7370 616e 3e26 nt"&\n-000f3b90: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
\n-000f3bb0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <p\n-000f3bd0: 6174 7465 726e 3c2f 7370 616e 3e20 3c73 attern class T> cl\n+000eabc0: 6173 7320 3c2f 7370 616e 3e73 696d 706c ass simpl\n+000eabd0: 6556 6563 746f 723b 3c2f 6469 763e 0a3c eVector;
.<\n+000eabe0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The con\n+000eac00: 7461 696e 6572 2063 6c61 7373 2069 7473 tainer class its\n+000eac10: 656c 6620 7368 6f75 6c64 206e 6f74 2062 elf should not b\n+000eac20: 6520 6465 6669 6e65 6420 696e 2074 6865 e defined in the\n+000eac30: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+000eac40: 7220 6669 6c65 2c20 6f6e 6c79 2074 6865 r file, only the\n+000eac50: 2074 656d 706c 6174 6520 6465 636c 6172 template declar\n+000eac60: 6174 696f 6e20 7375 6666 6963 6573 2066 ation suffices f\n+000eac70: 6f72 2073 6f61 7063 7070 3220 746f 2067 or soapcpp2 to g\n+000eac80: 656e 6572 6174 6520 7365 7269 616c 697a enerate serializ\n+000eac90: 6572 732e 2052 6563 616c 6c20 7468 6174 ers. Recall that\n+000eaca0: 2074 6865 203c 636f 6465 3e23 696e 636c the #incl\n+000eacb0: 7564 653c 2f63 6f64 653e 2064 6972 6563 ude direc\n+000eacc0: 7469 7665 7320 6172 6520 6e6f 7420 6578 tives are not ex\n+000eacd0: 6563 7574 6564 2062 7920 736f 6170 6370 ecuted by soapcp\n+000eace0: 7032 2062 7574 2073 696d 706c 7920 7061 p2 but simply pa\n+000eacf0: 7373 6564 206f 6e20 746f 2074 6865 2067 ssed on to the g\n+000ead00: 656e 6572 6174 6564 2073 6f75 7263 6520 enerated source \n+000ead10: 636f 6465 2e20 5468 6973 2069 6e63 6c75 code. This inclu\n+000ead20: 6465 2073 7065 6369 6669 6573 2069 6e20 de specifies in \n+000ead30: 7468 6520 6765 6e65 7261 7465 6420 736f the generated so\n+000ead40: 7572 6365 2063 6f64 6520 7768 6572 6520 urce code where \n+000ead50: 7468 6520 636f 6e74 6169 6e65 7220 6973 the container is\n+000ead60: 2061 6374 7561 6c6c 7920 6465 6669 6e65 actually define\n+000ead70: 642e 3c2f 703e 0a3c 703e f09f 949d 203c d.

.

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

..P\n+000eade0: 6f6c 796d 6f72 7068 6963 2064 796e 616d olymorphic dynam\n+000eadf0: 6963 2061 7272 6179 7320 616e 6420 6c69 ic arrays and li\n+000eae00: 7374 733c 2f68 333e 0a3c 703e 506f 6c79 sts.

Poly\n+000eae10: 6d6f 7270 6869 6320 6172 7261 7973 2c20 morphic arrays, \n+000eae20: 7468 6174 2069 732c 2061 7272 6179 7320 that is, arrays \n+000eae30: 6f66 2076 616c 7565 7320 6f66 2061 6e79 of values of any\n+000eae40: 2074 7970 652c 2063 616e 2062 6520 7365 type, can be se\n+000eae50: 7269 616c 697a 6564 2069 6e20 584d 4c20 rialized in XML \n+000eae60: 7768 656e 2064 6563 6c61 7265 6420 6173 when declared as\n+000eae70: 2061 6e20 6172 7261 7920 6f66 2070 6f69 an array of poi\n+000eae80: 6e74 6572 7320 746f 2061 2062 6173 6520 nters to a base \n+000eae90: 636c 6173 732e 2046 6f72 2065 7861 6d70 class. For examp\n+000eaea0: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

.
\n+000eaed0: 3c73 7061 6e20 636c 6173 733d 226b 6579 class ns__Object .
{ p\n+000eaf30: 7562 6c69 633c 2f73 7061 6e3e 3a20 3c2f ublic: .
... <\n+000eaf60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000eaf70: 656e 7422 3e2f 2f20 6d65 6d62 6572 7320 ent\">// members \n+000eaf80: 6f66 206e 735f 5f4f 626a 6563 743c 2f73 of ns__Object
.
}; \n+000eafb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
c\n+000eafe0: 6c61 7373 203c 2f73 7061 6e3e 6e73 5f5f lass ns__\n+000eaff0: 4461 7461 203a 203c 7370 616e 2063 6c61 Data : pub\n+000eb010: 6c69 633c 2f73 7061 6e3e 206e 735f 5f4f lic ns__O\n+000eb020: 626a 6563 7420 3c2f 6469 763e 0a3c 6469 bject
.{\n+000eb040: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public:
. \n+000eb080: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+000eb0a0: 6d65 6d62 6572 7320 6f66 206e 735f 5f44 members of ns__D\n+000eb0b0: 6174 613c 2f73 7061 6e3e 3c2f 6469 763e ata
\n+000eb0c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.<\n+000eb0f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000eb100: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class ArrayOfObject \n+000eb120: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ public: \n+000eb160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
ns_\n+000eb180: 5f4f 626a 6563 7420 2a2a 5f5f 7074 723b _Object **__ptr;\n+000eb190: 203c 7370 616e 2063 6c61 7373 3d22 636f // pointe\n+000eb1b0: 7220 746f 2061 7272 6179 206f 6620 706f r to array of po\n+000eb1c0: 696e 7465 7273 2074 6f20 6261 7365 206f inters to base o\n+000eb1d0: 7220 6465 7269 7665 6420 6f62 6a65 6374 r derived object\n+000eb1e0: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
.\n+000eb1f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000eb220: 696e 743c 2f73 7061 6e3e 205f 5f73 697a int __siz\n+000eb230: 653b 2020 2020 2020 2020 203c 7370 616e e; // size of the \n+000eb260: 6172 7261 793c 2f73 7061 6e3e 3c2f 6469 array.
};
.<\n+000eb290: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000eb2a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >class ns__Objects \n+000eb2d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ public: \n+000eb310: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
std\n+000eb330: 3a3a 7665 6374 6f72 266c 743b 6e73 5f5f ::vector<ns__\n+000eb340: 4f62 6a65 6374 2667 743b 206f 626a 6563 Object> objec\n+000eb350: 7473 3b20 3c73 7061 6e20 636c 6173 733d ts; // vec\n+000eb370: 746f 7220 6f66 2062 6173 6520 6f72 2064 tor of base or d\n+000eb380: 6572 6976 6564 206f 626a 6563 7473 203c erived objects <\n+000eb390: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n+000eb3b0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n+000eb3d0: 703e 5468 6520 706f 696e 7465 7273 2069 p>The pointers i\n+000eb3e0: 6e20 7468 6520 6172 7261 7920 6361 6e20 n the array can \n+000eb3f0: 706f 696e 7420 746f 2074 6865 203c 636f point to the ns__Object base instan\n+000eb420: 6365 7320 6f72 203c 636f 6465 3e6e 735f ces or ns_\n+000eb430: 5f44 6174 613c 2f63 6f64 653e 2064 6572 _Data der\n+000eb440: 6976 6564 2069 6e73 7461 6e63 6573 2c20 ived instances, \n+000eb450: 7768 6963 6820 7769 6c6c 2062 6520 7365 which will be se\n+000eb460: 7269 616c 697a 6564 2061 6363 6f72 6469 rialized accordi\n+000eb470: 6e67 6c79 2069 6e20 584d 4c2e 2044 6572 ngly in XML. Der\n+000eb480: 6976 6564 2069 6e73 7461 6e63 6573 2061 ived instances a\n+000eb490: 7265 2069 6e64 6963 6174 6564 2062 7920 re indicated by \n+000eb4a0: 3c65 6d3e 3c63 6f64 653e 7873 693a 7479 xsi:ty\n+000eb4b0: 7065 3c2f 636f 6465 3e3c 2f65 6d3e 2061 pe a\n+000eb4c0: 7474 7269 6275 7465 2069 6e20 584d 4c20 ttribute in XML \n+000eb4d0: 7769 7468 2074 6865 2071 7561 6c69 6669 with the qualifi\n+000eb4e0: 6564 206e 616d 6520 6f66 2074 6865 2063 ed name of the c\n+000eb4f0: 6c61 7373 2c20 746f 2064 6973 7469 6e67 lass, to disting\n+000eb500: 7569 7368 2064 6572 6976 6564 2069 6e73 uish derived ins\n+000eb510: 7461 6e63 6573 2066 726f 6d20 7468 6520 tances from the \n+000eb520: 6261 7365 2069 6e73 7461 6e63 6573 2e20 base instances. \n+000eb530: 5769 7468 6f75 7420 7468 6973 2061 7474 Without this att\n+000eb540: 7269 6275 7465 2074 6865 2064 6573 6572 ribute the deser\n+000eb550: 6961 6c69 7a65 7220 7769 6c6c 206e 6f74 ializer will not\n+000eb560: 2069 6e73 7461 6e74 6961 7465 2074 6865 instantiate the\n+000eb570: 2064 6572 6976 6564 2069 6e73 7461 6e63 derived instanc\n+000eb580: 6520 6275 7420 6120 6261 7365 2069 6e73 e but a base ins\n+000eb590: 7461 6e63 6520 7369 6e63 6520 7468 6572 tance since ther\n+000eb5a0: 6520 6973 206e 6f20 6964 656e 7469 6679 e is no identify\n+000eb5b0: 696e 6720 696e 666f 726d 6174 696f 6e20 ing information \n+000eb5c0: 746f 2064 6973 7469 6e67 7569 7368 2074 to distinguish t\n+000eb5d0: 6865 2058 4d4c 2066 6f72 6d73 2065 7863 he XML forms exc\n+000eb5e0: 6570 7420 666f 7220 7468 6520 3c65 6d3e ept for the \n+000eb5f0: 3c63 6f64 653e 7873 693a 7479 7065 3c2f xsi:type attri\n+000eb610: 6275 7465 2e3c 2f70 3e0a 3c70 3e53 696e bute.

.

Sin\n+000eb620: 6365 2077 6520 6361 6e6e 6f74 2075 7365 ce we cannot use\n+000eb630: 2064 796e 616d 6963 2062 696e 6469 6e67 dynamic binding\n+000eb640: 2074 6f20 7375 7070 6f72 7420 706f 6c79 to support poly\n+000eb650: 6d6f 7270 6869 736d 2069 6e20 432c 2061 morphism in C, a\n+000eb660: 6e6f 7468 6572 206d 6563 6861 6e69 736d nother mechanism\n+000eb670: 2077 6520 6361 6e20 7573 6520 6973 2076 we can use is v\n+000eb680: 6f69 6420 706f 696e 7465 7273 202e 2048 oid pointers . H\n+000eb690: 6572 6520 6973 2061 6e20 6578 616d 706c ere is an exampl\n+000eb6a0: 6520 6f66 2061 2070 6f6c 796d 6f72 7068 e of a polymorph\n+000eb6b0: 6963 2053 4f41 502d 656e 636f 6465 6420 ic SOAP-encoded \n+000eb6c0: 6172 7261 7920 3c63 6f64 653e 4172 7261 array Arra\n+000eb6d0: 794f 664f 626a 6563 743c 2f63 6f64 653e yOfObject\n+000eb6e0: 2061 6e64 2061 206e 6f6e 2d53 4f41 5020 and a non-SOAP \n+000eb6f0: 6479 6e61 6d69 6320 6172 7261 7920 3c63 dynamic array ns__Objects<\n+000eb710: 2f63 6f64 653e 2074 6861 7420 686f 6c64 /code> that hold\n+000eb720: 2076 616c 7565 7320 6f66 2061 6e79 2073 values of any s\n+000eb730: 6572 6961 6c69 7a61 626c 6520 7479 7065 erializable type\n+000eb740: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct __wrapper .
{
. \n+000eb7d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+000eb7f0: 3c2f 7370 616e 3e20 5f5f 7479 7065 3b20 __type; \n+000eb800: 2020 3c73 7061 6e20 636c 6173 733d 2263 // ident\n+000eb820: 6966 7920 7468 6520 7479 7065 2062 656c ify the type bel\n+000eb830: 6f77 2062 7920 534f 4150 5f54 5950 455f ow by SOAP_TYPE_\n+000eb840: 5420 3c2f 7370 616e 3e3c 2f64 6976 3e0a T
.\n+000eb850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000eb880: 766f 6964 3c2f 7370 616e 3e20 2a5f 5f69 void *__i\n+000eb890: 7465 6d3b 203c 7370 616e 2063 6c61 7373 tem; // po\n+000eb8b0: 696e 7465 7220 746f 2064 6174 6120 6f66 inter to data of\n+000eb8c0: 2074 7970 6520 5420 3c2f 7370 616e 3e3c type T <\n+000eb8d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}; .
struct\n+000eb920: 203c 2f73 7061 6e3e 4172 7261 794f 664f ArrayOfO\n+000eb930: 626a 6563 7420 3c2f 6469 763e 0a3c 6469 bject
.{\n+000eb950: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
struct __wrapper *__pt\n+000eb9a0: 723b 203c 7370 616e 2063 6c61 7373 3d22 r; // poin\n+000eb9c0: 7465 7220 746f 2061 7272 6179 3c2f 7370 ter to array
.
\n+000eb9f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __size; \n+000eba20: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n+000eba40: 2f2f 2073 697a 6520 6f66 2074 6865 2061 // size of the a\n+000eba50: 7272 6179 3c2f 7370 616e 3e3c 2f64 6976 rray.
};
.\n+000eba90: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__Objects \n+000ebac0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n+000ebae0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __si\n+000ebb20: 7a65 3b20 2020 2020 2020 2020 2020 2020 ze; \n+000ebb30: 2020 203c 7370 616e 2063 6c61 7373 3d22 // size\n+000ebb50: 206f 6620 7468 6520 6172 7261 793c 2f73 of the array
.
\n+000ebb80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct __wrapper *\n+000ebbb0: 6f62 6a65 6374 733b 203c 7370 616e 2063 objects; /\n+000ebbd0: 2f20 706f 696e 7465 7220 746f 2061 7272 / pointer to arr\n+000ebbe0: 6179 3c2f 7370 616e 3e3c 2f64 6976 3e0a ay
.\n+000ebbf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

\n+000ec020: 436f 6e73 6964 6572 2066 6f72 2065 7861 Consider for exa\n+000ec030: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

.
\n+000ec050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n+000ec080: 2f73 7061 6e3e 4172 7261 794f 6673 7472 /span>ArrayOfstr\n+000ec090: 696e 6720 3c2f 6469 763e 0a3c 6469 7620 ing
.
{.
char\n+000ec0f0: 2a20 2a5f 5f70 7472 7374 7269 6e67 3b3c * *__ptrstring;<\n+000ec100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n+000ec140: 205f 5f73 697a 653b 3c2f 6469 763e 0a3c __size;
.<\n+000ec150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ec160: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n+000ec170: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

SOAP 1.1/1\n+000ec440: 2e32 2064 6f65 7320 6e6f 7420 6d61 6e64 .2 does not mand\n+000ec450: 6174 6520 6120 7370 6563 6966 6963 2074 ate a specific t\n+000ec460: 6167 206e 616d 6520 666f 7220 534f 4150 ag name for SOAP\n+000ec470: 2d65 6e63 6f64 6564 2061 7272 6179 2065 -encoded array e\n+000ec480: 6c65 6d65 6e74 7320 616e 6420 7468 6520 lements and the \n+000ec490: 736f 6170 6370 7032 2d67 656e 6572 6174 soapcpp2-generat\n+000ec4a0: 6564 2073 6572 6961 6c69 7a65 7273 2077 ed serializers w\n+000ec4b0: 696c 6c20 6967 6e6f 7265 2074 6865 206e ill ignore the n\n+000ec4c0: 616d 6520 7573 6564 2074 6f20 6974 656d ame used to item\n+000ec4d0: 697a 6520 534f 4150 2d65 6e63 6f64 6564 ize SOAP-encoded\n+000ec4e0: 2061 7272 6179 2076 616c 7565 732e 3c2f array values..

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

.

.base64Bina\n+000ec560: 7279 2073 6572 6961 6c69 7a61 7469 6f6e ry serialization\n+000ec570: 3c2f 6832 3e0a 3c70 3e54 6865 203c 656d

.

The base64Bin\n+000ec590: 6172 793c 2f63 6f64 653e 3c2f 656d 3e20 ary \n+000ec5a0: 5853 4420 7479 7065 2069 7320 696e 7472 XSD type is intr\n+000ec5b0: 6f64 7563 6564 2069 6e20 616e 2069 6e74 oduced in an int\n+000ec5c0: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+000ec5d0: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 \n+000ec5e0: 7573 696e 6720 6120 7374 7275 6374 206f using a struct o\n+000ec5f0: 7220 636c 6173 7320 7468 6174 2063 6f6e r class that con\n+000ec600: 7461 696e 7320 616e 2061 7272 6179 206f tains an array o\n+000ec610: 6620 3c63 6f64 653e 756e 7369 676e 6564 f unsigned\n+000ec620: 2063 6861 723c 2f63 6f64 653e 2076 616c char val\n+000ec630: 7565 733a 3c2f 703e 0a3c 6469 7620 636c ues:

.
<\n+000ec650: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ec660: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct xsd_\n+000ec6c0: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary
.The advantage o\n+000ec8b0: 6620 7468 6973 2073 7472 7563 7420 6f72 f this struct or\n+000ec8c0: 2063 6c61 7373 2069 7320 7468 6520 6162 class is the ab\n+000ec8d0: 696c 6974 7920 746f 2073 6572 6961 6c69 ility to seriali\n+000ec8e0: 7a65 7220 7261 7720 6269 6e61 7279 2064 zer raw binary d\n+000ec8f0: 6174 6120 6672 6f6d 206d 656d 6f72 792c ata from memory,\n+000ec900: 2073 696e 6365 2074 6865 2073 6f61 7063 since the soapc\n+000ec910: 7070 322d 6765 6e65 7261 7465 6420 7365 pp2-generated se\n+000ec920: 7269 616c 697a 6572 2063 6f6e 7665 7274 rializer convert\n+000ec930: 7320 7468 6520 6269 6e61 7279 2064 6174 s the binary dat\n+000ec940: 6120 746f 2f66 726f 6d20 6261 7365 3634 a to/from base64\n+000ec950: 2069 6e20 584d 4c2e 3c2f 703e 0a3c 703e in XML.

.

\n+000ec960: 546f 2069 6e74 726f 6475 6365 2061 206e To introduce a n\n+000ec970: 6577 2058 4d4c 2073 6368 656d 6120 7479 ew XML schema ty\n+000ec980: 7065 2064 6572 6976 6564 2066 726f 6d20 pe derived from \n+000ec990: 3c65 6d3e 3c63 6f64 653e 6261 7365 3634 base64\n+000ec9a0: 4269 6e61 7279 3c2f 636f 6465 3e3c 2f65 Binary use the same \n+000ec9c0: 7374 7275 6374 206f 7220 636c 6173 7320 struct or class \n+000ec9d0: 7374 7275 6374 7572 652c 2062 7574 2077 structure, but w\n+000ec9e0: 6974 6820 616e 6f74 6865 7220 6e61 6d65 ith another name\n+000ec9f0: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

struct n\n+000eca50: 735f 5f62 696e 6172 793c 2f64 6976 3e0a s__binary
.\n+000eca60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
\n+000eca90: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n+000ecab0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char \n+000ecae0: 2a5f 5f70 7472 3b20 3c2f 6469 763e 0a3c *__ptr;
.<\n+000ecaf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ecb00: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+000ecb20: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size\n+000ecb30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
};.

Th\n+000ecb70: 6520 7265 7375 6c74 696e 6720 584d 4c20 e resulting XML \n+000ecb80: 7363 6865 6d61 2074 7970 6520 6973 3a3c schema type is:<\n+000ecb90: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

&l\n+000ecbd0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;simp\n+000ecbf0: 6c65 5479 7065 3c2f 7370 616e 3e20 3c73 leType name=\n+000ecc20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000ecc40: 743b 6269 6e61 7279 2671 756f 743b 3c2f t;binary">
.\n+000ecc60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<restriction base<\n+000eccc0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:bas\n+000eccf0: 6536 3442 696e 6172 7926 7175 6f74 3b3c e64Binary"<\n+000ecd00: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000ecd10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</restriction<\n+000ecd50: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000ecd60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</simpleType>
.

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

.hexB\n+000ece30: 696e 6172 7920 7365 7269 616c 697a 6174 inary serializat\n+000ece40: 696f 6e3c 2f68 323e 0a3c 703e 5468 6520 ion

.

The \n+000ece50: 3c65 6d3e 3c63 6f64 653e 6261 7365 3634 base64\n+000ece60: 4269 6e61 7279 3c2f 636f 6465 3e3c 2f65 Binary XSD type is i\n+000ece80: 6e74 726f 6475 6365 6420 696e 2061 6e20 ntroduced in an \n+000ece90: 696e 7465 7266 6163 6520 6865 6164 6572 interface header\n+000ecea0: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp\n+000eceb0: 7032 2075 7369 6e67 2061 2073 7472 7563 p2 using a struc\n+000ecec0: 7420 6f72 2063 6c61 7373 2074 6861 7420 t or class that \n+000eced0: 636f 6e74 6169 6e73 2061 6e20 6172 7261 contains an arra\n+000ecee0: 7920 6f66 203c 636f 6465 3e75 6e73 6967 y of unsig\n+000ecef0: 6e65 6420 6368 6172 3c2f 636f 6465 3e20 ned char \n+000ecf00: 7661 6c75 6573 3a3c 2f70 3e0a 3c64 6976 values:

.
struct\n+000ecf50: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 xsd_\n+000ecf90: 5f68 6578 4269 6e61 7279 3c2f 613e 203c _hexBinary <\n+000ecfa0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n+000ecfc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000ecff0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n+000ed000: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *__p\n+000ed080: 7472 3c2f 613e 3b20 3c2f 6469 763e 0a3c tr;
.<\n+000ed090: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ed0a0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+000ed0c0: 6e74 3c2f 7370 616e 3e20 3c61 2063 6c61 nt \n+000ed120: 5f5f 7369 7a65 3c2f 613e 3b20 3c2f 6469 __size; .
};
.

The adva\n+000ed170: 6e74 6167 6520 6f66 2074 6869 7320 7374 ntage of this st\n+000ed180: 7275 6374 206f 7220 636c 6173 7320 6973 ruct or class is\n+000ed190: 2074 6865 2061 6269 6c69 7479 2074 6f20 the ability to \n+000ed1a0: 7365 7269 616c 697a 6572 2072 6177 2062 serializer raw b\n+000ed1b0: 696e 6172 7920 6461 7461 2066 726f 6d20 inary data from \n+000ed1c0: 6d65 6d6f 7279 2c20 7369 6e63 6520 7468 memory, since th\n+000ed1d0: 6520 736f 6170 6370 7032 2d67 656e 6572 e soapcpp2-gener\n+000ed1e0: 6174 6564 2073 6572 6961 6c69 7a65 7220 ated serializer \n+000ed1f0: 636f 6e76 6572 7473 2074 6865 2062 696e converts the bin\n+000ed200: 6172 7920 6461 7461 2074 6f2f 6672 6f6d ary data to/from\n+000ed210: 2068 6578 6164 6563 696d 616c 2069 6e20 hexadecimal in \n+000ed220: 584d 4c2e 3c2f 703e 0a3c 703e 4966 2061 XML.

.

If a\n+000ed230: 2062 696e 6172 7920 7479 7065 2073 7563 binary type suc\n+000ed240: 6820 6173 203c 636f 6465 3e3c 6120 636c h as xsd__ba\n+000ed2c0: 7365 3634 4269 6e61 7279 3c2f 613e 3c2f se64Binary is already\n+000ed2e0: 2064 6566 696e 6564 2c20 7468 656e 2077 defined, then w\n+000ed2f0: 6520 6361 6e20 7369 6d70 6c79 2075 7365 e can simply use\n+000ed300: 2061 203c 636f 6465 3e74 7970 6564 6566 a typedef\n+000ed310: 3c2f 636f 6465 3e20 746f 2069 6e74 726f to intro\n+000ed320: 6475 6365 2074 6865 2068 6578 2076 6172 duce the hex var\n+000ed330: 6961 6e74 3a3c 2f70 3e0a 3c64 6976 2063 iant:

.
\n+000ed350: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
{ public:\n+000ed410: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
unsigned\n+000ed450: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *<\n+000ed480: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000ed490: 7265 663d 2273 7472 7563 7478 7364 5f5f ref=\"structxsd__\n+000ed4a0: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary.\n+000ed4b0: 6874 6d6c 2361 3662 6139 6639 6532 3931 html#a6ba9f9e291\n+000ed4c0: 6232 6232 3665 3036 3936 6264 3438 6634 b2b26e0696bd48f4\n+000ed4d0: 6539 3833 6265 223e 5f5f 7074 723c 2f61 e983be\">__ptr;
.
\n+000ed590: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.<\n+000ed5c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000ed5d0: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef xsd__\n+000ed620: 6261 7365 3634 4269 6e61 7279 3c2f 613e base64Binary\n+000ed630: 203c 6120 636c 6173 733d 2263 6f64 6522 xsd__hexBin\n+000ed670: 6172 793c 2f61 3e3b 203c 7370 616e 2063 ary; /\n+000ed690: 2f20 7365 7269 616c 697a 6573 2069 6e74 / serializes int\n+000ed6a0: 6f20 6865 7820 636f 6e74 656e 743c 2f73 o hex content
..
  • SOAP doc\n+000edd00: 756d 656e 742f 6c69 7465 7261 6c20 7573 ument/literal us\n+000edd10: 6573 2058 4d4c 2063 6f6e 7374 7261 696e es XML constrain\n+000edd20: 6564 2074 6f20 7468 6520 584d 4c20 7363 ed to the XML sc\n+000edd30: 6865 6d61 2074 6861 7420 6465 6669 6e65 hema that define\n+000edd40: 7320 7468 6520 584d 4c20 636f 6e74 656e s the XML conten\n+000edd50: 742e 2054 6865 2073 6572 6961 6c69 7a61 t. The serializa\n+000edd60: 7469 6f6e 206f 6620 7472 6565 2d62 6173 tion of tree-bas\n+000edd70: 6564 2064 6174 6120 7374 7275 6374 7572 ed data structur\n+000edd80: 6573 2069 7320 6163 6375 7261 7465 2069 es is accurate i\n+000edd90: 6e20 584d 4c2e 2054 6865 2073 6572 6961 n XML. The seria\n+000edda0: 6c69 7a61 7469 6f6e 206f 6620 6469 6772 lization of digr\n+000eddb0: 6170 682d 7368 6170 6564 2064 6174 6120 aph-shaped data \n+000eddc0: 7374 7275 6374 7572 6573 2072 6573 756c structures resul\n+000eddd0: 7473 2069 6e20 7468 6520 6475 706c 6963 ts in the duplic\n+000edde0: 6174 696f 6e20 6f66 2064 6174 6120 6e6f ation of data no\n+000eddf0: 6465 7320 7468 6174 2061 7265 2063 6f2d des that are co-\n+000ede00: 7265 6665 7265 6e63 6573 2e20 4379 636c references. Cycl\n+000ede10: 6963 2064 6174 6120 7374 7275 6374 7572 ic data structur\n+000ede20: 6573 2063 616e 6e6f 7420 6265 2061 6363 es cannot be acc\n+000ede30: 7572 6174 656c 7920 7365 7269 616c 697a urately serializ\n+000ede40: 6564 2c20 6275 7420 796f 7520 6361 6e20 ed, but you can \n+000ede50: 7573 6520 3c63 6f64 653e 2353 4f41 505f use #SOAP_\n+000ede60: 584d 4c5f 4752 4150 483c 2f63 6f64 653e XML_GRAPH\n+000ede70: 2074 6f20 666f 7263 6520 7468 6520 7573 to force the us\n+000ede80: 6520 6f66 2069 642d 7265 6620 746f 2061 e of id-ref to a\n+000ede90: 6363 7572 6174 656c 7920 7365 7269 616c ccurately serial\n+000edea0: 697a 6520 6469 6772 6170 6873 2061 6e64 ize digraphs and\n+000edeb0: 2063 7963 6c69 6320 6461 7461 2073 7472 cyclic data str\n+000edec0: 7563 7475 7265 732e 2054 6865 2053 4f41 uctures. The SOA\n+000eded0: 5020 426f 6479 206d 6179 2063 6f6e 7461 P Body may conta\n+000edee0: 696e 2061 6e79 206e 756d 6265 7220 6f66 in any number of\n+000edef0: 2058 4d4c 2065 6c65 6d65 6e74 732c 2061 XML elements, a\n+000edf00: 7320 6966 2074 6865 2053 4f41 5020 426f s if the SOAP Bo\n+000edf10: 6479 2069 7320 7468 6520 726f 6f74 206f dy is the root o\n+000edf20: 6620 616e 2058 4d4c 2064 6f63 756d 656e f an XML documen\n+000edf30: 742e 204e 6f20 3c65 6d3e 3c63 6f64 653e t. No \n+000edf40: 534f 4150 2d45 4e56 3a65 6e63 6f64 696e SOAP-ENV:encodin\n+000edf50: 6753 7479 6c65 3d22 2e2e 2e22 3c2f 636f gStyle=\"...\" attribu\n+000edf70: 7465 2073 686f 756c 6420 6170 7065 6172 te should appear\n+000edf80: 2069 6e20 6c69 7465 7261 6c20 636f 6e74 in literal cont\n+000edf90: 656e 742e 2054 6869 7320 7374 796c 6520 ent. This style \n+000edfa0: 6973 2073 7065 6369 6669 6564 2066 6f72 is specified for\n+000edfb0: 2074 6865 2065 6e74 6972 6520 7365 7276 the entire serv\n+000edfc0: 6963 6520 6465 636c 6172 6564 2075 6e64 ice declared und\n+000edfd0: 6572 206e 616d 6573 7061 6365 2070 7265 er namespace pre\n+000edfe0: 6669 7820 3c63 6f64 653e 6e73 3c2f 636f fix ns with:
    \n+000ee010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+000ee040: 6e73 2073 6572 7669 6365 2073 7479 6c65 ns service style\n+000ee050: 3a20 2020 2064 6f63 756d 656e 743c 2f73 : document
    .
    //gsoap ns se\n+000ee0a0: 7276 6963 6520 656e 636f 6469 6e67 3a20 rvice encoding: \n+000ee0b0: 6c69 7465 7261 6c3c 2f73 7061 6e3e 3c2f literal.
    .
  • SOAP RPC l\n+000ee0f0: 6974 6572 616c 2061 6c73 6f20 7573 6573 iteral also uses\n+000ee100: 2058 4d4c 2063 6f6e 7374 7261 696e 6564 XML constrained\n+000ee110: 2074 6f20 7468 6520 584d 4c20 7363 6865 to the XML sche\n+000ee120: 6d61 2074 6861 7420 6465 6669 6e65 7320 ma that defines \n+000ee130: 7468 6520 584d 4c20 636f 6e74 656e 742e the XML content.\n+000ee140: 2054 6865 2064 6966 6665 7265 6e63 6520 The difference \n+000ee150: 7769 7468 2064 6f63 756d 656e 742f 6c69 with document/li\n+000ee160: 7465 7261 6c20 6973 2074 6861 7420 7468 teral is that th\n+000ee170: 6520 534f 4150 2042 6f64 7920 636f 6e74 e SOAP Body cont\n+000ee180: 6169 6e73 2061 7420 6d6f 7374 206f 6e65 ains at most one\n+000ee190: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+000ee1a0: 6f6e 2072 6571 7565 7374 2065 6c65 6d65 on request eleme\n+000ee1b0: 6e74 206f 7220 6174 206d 6f73 7420 6f6e nt or at most on\n+000ee1c0: 6520 7365 7276 6963 6520 6f70 6572 6174 e service operat\n+000ee1d0: 696f 6e20 7265 7370 6f6e 7365 2065 6c65 ion response ele\n+000ee1e0: 6d65 6e74 2e20 4e6f 203c 656d 3e3c 636f ment. No SOAP-ENV:enco\n+000ee200: 6469 6e67 5374 796c 653d 222e 2e2e 223c dingStyle=\"...\"<\n+000ee210: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n+000ee220: 6962 7574 6520 7368 6f75 6c64 2061 7070 ibute should app\n+000ee230: 6561 7220 696e 206c 6974 6572 616c 2063 ear in literal c\n+000ee240: 6f6e 7465 6e74 2e20 5468 6973 2073 7479 ontent. This sty\n+000ee250: 6c65 2069 7320 7370 6563 6966 6965 6420 le is specified \n+000ee260: 666f 7220 7468 6520 656e 7469 7265 2073 for the entire s\n+000ee270: 6572 7669 6365 2064 6563 6c61 7265 6420 ervice declared \n+000ee280: 756e 6465 7220 6e61 6d65 7370 6163 6520 under namespace \n+000ee290: 7072 6566 6978 203c 636f 6465 3e6e 733c prefix ns<\n+000ee2a0: 2f63 6f64 653e 2077 6974 683a 203c 6469 /code> with:
    //gso\n+000ee2f0: 6170 206e 7320 7365 7276 6963 6520 7374 ap ns service st\n+000ee300: 796c 653a 2020 2020 7270 633c 2f73 7061 yle: rpc
    .
    //gsoap ns serv\n+000ee350: 6963 6520 656e 636f 6469 6e67 3a20 6c69 ice encoding: li\n+000ee360: 7465 7261 6c3c 2f73 7061 6e3e 3c2f 6469 teral.
  • .\n+000ee390: 3c2f 756c 3e0a 3c70 3e42 6573 6964 6573 .

    Besides\n+000ee3a0: 203c 636f 6465 3e2f 2f67 736f 6170 206e //gsoap n\n+000ee3b0: 7320 7365 7276 6963 6520 7374 796c 653c s service style<\n+000ee3c0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and //gsoap ns serv\n+000ee3e0: 6963 6520 656e 636f 6469 6e67 3c2f 636f ice encoding there are al\n+000ee400: 736f 2074 6865 2073 6572 7669 6365 206f so the service o\n+000ee410: 7065 7261 7469 6f6e 2073 7065 6369 6669 peration specifi\n+000ee420: 6320 7665 7273 696f 6e73 203c 636f 6465 c versions //gsoap ns serv\n+000ee440: 6963 6520 6d65 7468 6f64 2d73 7479 6c65 ice method-style\n+000ee450: 3c2f 636f 6465 3e2c 203c 636f 6465 3e2f , /\n+000ee460: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+000ee470: 6520 6d65 7468 6f64 2d72 6573 706f 6e73 e method-respons\n+000ee480: 652d 7374 796c 653c 2f63 6f64 653e 2c20 e-style, \n+000ee490: 3c63 6f64 653e 2f2f 6773 6f61 7020 6e73 //gsoap ns\n+000ee4a0: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n+000ee4b0: 656e 636f 6469 6e67 3c2f 636f 6465 3e2c encoding,\n+000ee4c0: 2061 6e64 203c 636f 6465 3e2f 2f67 736f and //gso\n+000ee4d0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+000ee4e0: 7468 6f64 2d72 6573 706f 6e73 652d 656e thod-response-en\n+000ee4f0: 636f 6469 6e67 3c2f 636f 6465 3e20 7468 coding th\n+000ee500: 6174 2065 7870 6c69 6369 746c 7920 7370 at explicitly sp\n+000ee510: 6563 6966 7920 534f 4150 2052 5043 2065 ecify SOAP RPC e\n+000ee520: 6e63 6f64 6564 2c20 646f 6375 6d65 6e74 ncoded, document\n+000ee530: 2f6c 6974 6572 616c 2c20 6f72 2052 5043 /literal, or RPC\n+000ee540: 206c 6974 6572 616c 2073 7479 6c65 206d literal style m\n+000ee550: 6573 7361 6765 7320 666f 7220 7468 6520 essages for the \n+000ee560: 696e 6469 6361 7465 6420 7365 7276 6963 indicated servic\n+000ee570: 6520 6f70 6572 6174 696f 6e20 6d65 7468 e operation meth\n+000ee580: 6f64 732e 3c2f 703e 0a3c 703e 546f 2065 ods.

    .

    To e\n+000ee590: 6e61 626c 6520 534f 4150 2052 5043 2065 nable SOAP RPC e\n+000ee5a0: 6e63 6f64 696e 6720 666f 7220 6120 7061 ncoding for a pa\n+000ee5b0: 7274 6963 756c 6172 2073 6572 7669 6365 rticular service\n+000ee5c0: 206f 7065 7261 7469 6f6e 2c20 7573 653a operation, use:\n+000ee5d0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns se\n+000ee620: 7276 6963 6520 6d65 7468 6f64 2d73 7479 rvice method-sty\n+000ee630: 6c65 3a20 2020 2077 6562 6d65 7468 6f64 le: webmethod\n+000ee640: 2072 7063 203c 2f73 7061 6e3e 3c2f 6469 rpc .
    //gso\n+000ee680: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+000ee690: 7468 6f64 2d65 6e63 6f64 696e 673a 2077 thod-encoding: w\n+000ee6a0: 6562 6d65 7468 6f64 2065 6e63 6f64 6564 ebmethod encoded\n+000ee6b0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+000ee6c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ee6d0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns__webmet\n+000ee700: 686f 6428 2e2e 2e29 3c2f 6469 763e 0a3c hod(...)
    .<\n+000ee710: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    To enab\n+000ee730: 6c65 2053 4f41 5020 5250 4320 656e 636f le SOAP RPC enco\n+000ee740: 6469 6e67 2066 6f72 2061 2070 6172 7469 ding for a parti\n+000ee750: 6375 6c61 7220 7365 7276 6963 6520 6f70 cular service op\n+000ee760: 6572 6174 696f 6e20 7265 7370 6f6e 7365 eration response\n+000ee770: 2c20 7573 653a 3c2f 703e 0a3c 6469 7620 , use:

    .
    //gsoap\n+000ee7c0: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+000ee7d0: 6f64 2d72 6573 706f 6e73 652d 7374 796c od-response-styl\n+000ee7e0: 653a 2020 2020 7765 626d 6574 686f 6420 e: webmethod \n+000ee7f0: 7270 6320 3c2f 7370 616e 3e3c 2f64 6976 rpc .
    //gsoa\n+000ee830: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n+000ee840: 686f 642d 7265 7370 6f6e 7365 2d65 6e63 hod-response-enc\n+000ee850: 6f64 696e 673a 2077 6562 6d65 7468 6f64 oding: webmethod\n+000ee860: 2065 6e63 6f64 6564 203c 2f73 7061 6e3e encoded \n+000ee870: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n+000ee8b0: 5f5f 7765 626d 6574 686f 6428 2e2e 2e29 __webmethod(...)\n+000ee8c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Likewise, you c\n+000ee8f0: 616e 2073 7065 6369 6679 2064 6f63 756d an specify docum\n+000ee900: 656e 742f 6c69 7465 7261 6c20 616e 6420 ent/literal and \n+000ee910: 5250 4320 6c69 7465 7261 6c20 6d65 7373 RPC literal mess\n+000ee920: 6167 6573 2e20 5468 6520 6465 6661 756c ages. The defaul\n+000ee930: 7420 7374 796c 6520 6973 2064 6f63 756d t style is docum\n+000ee940: 656e 742f 6c69 7465 7261 6c2c 2075 6e6c ent/literal, unl\n+000ee950: 6573 7320 3c62 3e3c 636f 6465 3e73 6f61 ess soa\n+000ee960: 7063 7070 3220 2d65 3c2f 636f 6465 3e3c pcpp2 -e<\n+000ee970: 2f62 3e20 6f70 7469 6f6e 203c 623e 3c63 /b> option -e
    is used to set\n+000ee9a0: 2053 4f41 5020 5250 4320 656e 636f 6469 SOAP RPC encodi\n+000ee9b0: 6e67 2062 7920 6465 6661 756c 742e 3c2f ng by default..

    For the style\n+000ee9e0: 2064 6972 6563 7469 7665 7320 796f 7520 directives you \n+000ee9f0: 6361 6e20 7370 6563 6966 7920 3c63 6f64 can specify rpc or \n+000eea10: 3c63 6f64 653e 646f 6375 6d65 6e74 3c2f document. For the <\n+000eea30: 636f 6465 3e65 6e63 6f64 696e 673c 2f63 code>encoding directives \n+000eea50: 796f 7520 6361 6e20 7370 6563 6966 7920 you can specify \n+000eea60: 3c63 6f64 653e 6c69 7465 7261 6c3c 2f63 literal, enco\n+000eea80: 6465 643c 2f63 6f64 653e 2c20 6f72 2065 ded, or e\n+000eea90: 7665 6e20 6120 6375 7374 6f6d 2055 5249 ven a custom URI\n+000eeaa0: 2074 6861 7420 696e 6469 6361 7465 7320 that indicates \n+000eeab0: 736f 6d65 2063 7573 746f 6d20 6f72 2070 some custom or p\n+000eeac0: 726f 7072 6965 7461 7279 2065 6e63 6f64 roprietary encod\n+000eead0: 696e 6720 666f 726d 6174 2069 6e20 584d ing format in XM\n+000eeae0: 4c20 7768 6963 6820 7769 6c6c 206e 6f74 L which will not\n+000eeaf0: 2069 6e74 6572 6f70 6572 6174 6520 7769 interoperate wi\n+000eeb00: 7468 2053 4f41 5020 7072 6f63 6573 736f th SOAP processo\n+000eeb10: 7273 2074 6861 7420 6172 6520 6e6f 7420 rs that are not \n+000eeb20: 636f 6d70 6174 6962 6c65 2077 6974 6820 compatible with \n+000eeb30: 7468 6520 7370 6563 6966 6965 6420 656e the specified en\n+000eeb40: 636f 6469 6e67 2066 6f72 6d61 742e 2053 coding format. S\n+000eeb50: 6565 2061 6c73 6f20 5365 6374 696f 6e20 ee also Section \n+000eeb60: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Direc\n+000eeb90: 7469 7665 733c 2f61 3e2e 3c2f 703e 0a3c tives.

    .<\n+000eeba0: 703e 5365 6520 616c 736f 203c 6120 6872 p>See also C and C++\n+000eebe0: 2058 4d4c 2064 6174 6120 6269 6e64 696e XML data bindin\n+000eebf0: 6773 3c2f 613e 2064 6f63 756d 656e 7461 gs documenta\n+000eec00: 7469 6f6e 2066 6f72 2064 6966 6665 7265 tion for differe\n+000eec10: 6e63 6573 2069 6e20 584d 4c20 7365 7269 nces in XML seri\n+000eec20: 616c 697a 6174 696f 6e20 7768 656e 2075 alization when u\n+000eec30: 7369 6e67 2074 6865 2053 4f41 5020 5250 sing the SOAP RP\n+000eec40: 4320 656e 636f 6465 6420 616e 6420 646f C encoded and do\n+000eec50: 6375 6d65 6e74 2f6c 6974 6572 616c 206d cument/literal m\n+000eec60: 6573 7361 6769 6e67 2073 7479 6c65 732e essaging styles.\n+000eec70: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+000eecb0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+000eecc0: 2069 643d 226c 6974 6572 616c 3222 3e3c id=\"literal2\"><\n+000eecd0: 2f61 3e0a 5365 7269 616c 697a 696e 6720 /a>.Serializing \n+000eece0: 6d69 7865 6420 636f 6e74 656e 7420 7769 mixed content wi\n+000eecf0: 7468 206c 6974 6572 616c 2058 4d4c 2073 th literal XML s\n+000eed00: 7472 696e 6773 3c2f 6833 3e0a 3c70 3e58 trings

    .

    X\n+000eed10: 4d4c 2069 7320 7374 6f72 6564 2069 6e20 ML is stored in \n+000eed20: 226c 6974 6572 616c 2220 584d 4c20 7374 \"literal\" XML st\n+000eed30: 7269 6e67 7320 7768 6963 6820 6172 6520 rings which are \n+000eed40: 7468 6520 6275 696c 742d 696e 203c 636f the built-in _XML t\n+000eed60: 7970 6520 7468 6174 2069 7320 6120 7265 ype that is a re\n+000eed70: 6775 6c61 7220 3c63 6f64 653e 6368 6172 gular char\n+000eed80: 2a3c 2f63 6f64 653e 2073 7472 696e 6720 * string \n+000eed90: 6f72 2079 6f75 2063 616e 2064 6563 6c61 or you can decla\n+000eeda0: 7265 2061 2077 6964 6520 6368 6172 6163 re a wide charac\n+000eedb0: 7465 7220 7374 7269 6e67 2069 6e20 616e ter string in an\n+000eedc0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+000eedd0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+000eede0: 7070 3220 6173 2066 6f6c 6c6f 7773 3a3c pp2 as follows:<\n+000eedf0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    typedef\n+000eee40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 wchar\n+000eee60: 5f74 3c2f 7370 616e 3e20 2a58 4d4c 3b3c _t *XML;<\n+000eee70: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+000eee90: 546f 2064 6563 6c61 7265 2061 2043 2b2b To declare a C++\n+000eeea0: 203c 636f 6465 3e73 7464 3a3a 7374 7269 std::stri\n+000eeeb0: 6e67 3c2f 636f 6465 3e20 6c69 7465 7261 ng litera\n+000eeec0: 6c20 584d 4c20 7479 7065 3a3c 2f70 3e0a l XML type:

    .\n+000eeed0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    ty\n+000eef10: 7065 6465 663c 2f73 7061 6e3e 2073 7464 pedef std\n+000eef20: 3a3a 7374 7269 6e67 2058 4d4c 3b3c 2f64 ::string XML;.

    Or\n+000eef50: 2075 7365 2061 2077 6964 6520 6368 6172 use a wide char\n+000eef60: 6163 7465 7220 7374 7269 6e67 3a3c 2f70 acter string:.

    \n+000eefb0: 7479 7065 6465 663c 2f73 7061 6e3e 2073 typedef s\n+000eefc0: 7464 3a3a 7773 7472 696e 6720 584d 4c3b td::wstring XML;\n+000eefd0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    To use both at \n+000ef000: 7468 6520 7361 6d65 2074 696d 653a 3c2f the same time:.
    typedef \n+000ef060: 7374 643a 3a73 7472 696e 6720 2058 4d4c std::string XML\n+000ef070: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n+000ef0a0: 7479 7065 6465 663c 2f73 7061 6e3e 2073 typedef s\n+000ef0b0: 7464 3a3a 7773 7472 696e 6720 584d 4c5f td::wstring XML_\n+000ef0c0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+000ef0e0: 703e 5468 6520 6469 6666 6572 656e 6365 p>The difference\n+000ef0f0: 7320 6265 7477 6565 6e20 7468 6520 7573 s between the us\n+000ef100: 6520 6f66 2072 6567 756c 6172 2038 2d62 e of regular 8-b\n+000ef110: 6974 2073 7472 696e 6773 2076 6572 7375 it strings versu\n+000ef120: 7320 7769 6465 2063 6861 7261 6374 6572 s wide character\n+000ef130: 2073 7472 696e 6773 2066 6f72 2058 4d4c strings for XML\n+000ef140: 2064 6f63 756d 656e 7473 2061 7265 3a3c documents are:<\n+000ef150: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e58 4d4c /p>.
      .
    • XML\n+000ef160: 206c 6974 6572 616c 2073 7472 696e 6773 literal strings\n+000ef170: 206d 7573 7420 686f 6c64 2055 5446 2d38 must hold UTF-8\n+000ef180: 2058 4d4c 2063 6f6e 7465 6e74 2e3c 2f6c XML content..
    • Wide char\n+000ef1a0: 6163 7465 7220 584d 4c20 6c69 7465 7261 acter XML litera\n+000ef1b0: 6c20 7374 7269 6e67 7320 6172 6520 636f l strings are co\n+000ef1c0: 6e76 6572 7465 6420 746f 2061 6e64 2066 nverted to and f\n+000ef1d0: 726f 6d20 5554 462d 382e 3c2f 6c69 3e0a rom UTF-8.
    • .\n+000ef1e0: 3c2f 756c 3e0a 3c70 3ef0 9f94 9d20 3c61
    .

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

    .

    \n+000ef220: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .XML valid\n+000ef250: 6174 696f 6e3c 2f68 313e 0a3c 703e 536f ation

    .

    So\n+000ef260: 6d65 2058 4d4c 2076 616c 6964 6174 696f me XML validatio\n+000ef270: 6e20 636f 6e73 7472 6169 6e74 7320 6172 n constraints ar\n+000ef280: 6520 6e6f 7420 6175 746f 6d61 7469 6361 e not automatica\n+000ef290: 6c6c 7920 7665 7269 6669 6564 2075 6e6c lly verified unl\n+000ef2a0: 6573 7320 6578 706c 6963 6974 6c79 2073 ess explicitly s\n+000ef2b0: 6574 2075 7369 6e67 2074 6865 203c 636f et using the #SOAP_XML_STR\n+000ef2d0: 4943 543c 2f63 6f64 653e 2066 6c61 672e ICT flag.\n+000ef2e0: 2053 4f41 5020 5250 4320 656e 636f 6469 SOAP RPC encodi\n+000ef2f0: 6e67 2069 7320 616e 2058 4d4c 2066 6f72 ng is an XML for\n+000ef300: 6d61 7420 7468 6174 2064 6f65 7320 6e6f mat that does no\n+000ef310: 7420 6166 666f 7264 2073 7472 6963 7420 t afford strict \n+000ef320: 584d 4c20 7661 6c69 6461 7469 6f6e 2c20 XML validation, \n+000ef330: 6265 6361 7573 6520 6f66 2074 6865 2061 because of the a\n+000ef340: 6464 6974 696f 6e20 6f66 2053 4f41 502d ddition of SOAP-\n+000ef350: 7370 6563 6966 6963 2061 7474 7269 6275 specific attribu\n+000ef360: 7465 7320 616e 6420 6f74 6865 7220 736d tes and other sm\n+000ef370: 616c 6c20 6465 7669 6174 696f 6e73 2074 all deviations t\n+000ef380: 6861 7420 7769 6c6c 2062 6520 6465 7465 hat will be dete\n+000ef390: 6374 6564 2062 7920 616e 2061 6767 7265 cted by an aggre\n+000ef3a0: 7373 6976 6520 584d 4c20 7661 6c69 6461 ssive XML valida\n+000ef3b0: 746f 722c 206c 6561 6469 6e67 2074 6865 tor, leading the\n+000ef3c0: 206d 6573 7361 6769 6e67 2066 6169 6c75 messaging failu\n+000ef3d0: 7265 732e 2042 7920 746f 6e69 6e67 2058 res. By toning X\n+000ef3e0: 4d4c 2076 616c 6964 6174 696f 6e20 646f ML validation do\n+000ef3f0: 776e 2c20 6974 2068 656c 7073 2074 6f20 wn, it helps to \n+000ef400: 696d 7072 6f76 6520 534f 4150 2052 5043 improve SOAP RPC\n+000ef410: 2065 6e63 6f64 696e 6720 696e 7465 726f encoding intero\n+000ef420: 7065 7261 6269 6c69 7479 2e3c 2f70 3e0a perability.

    .\n+000ef430: 3c70 3e53 7472 6963 7420 7661 6c69 6461

    Strict valida\n+000ef440: 7469 6f6e 2063 6f6e 7374 7261 696e 7473 tion constraints\n+000ef450: 2061 7265 2065 6e61 626c 6564 2077 6974 are enabled wit\n+000ef460: 6820 7468 6520 3c63 6f64 653e 2353 4f41 h the #SOA\n+000ef470: 505f 584d 4c5f 5354 5249 4354 3c2f 636f P_XML_STRICT mode flag se\n+000ef490: 742c 2065 2e67 2e20 7769 7468 203c 636f t, e.g. with soap_set_imod\n+000ef4b0: 6528 736f 6170 2c20 534f 4150 5f58 4d4c e(soap, SOAP_XML\n+000ef4c0: 5f53 5452 4943 5429 3c2f 636f 6465 3e20 _STRICT) \n+000ef4d0: 6f72 203c 636f 6465 3e73 6f61 705f 6e65 or soap_ne\n+000ef4e0: 7728 534f 4150 5f58 4d4c 5f53 5452 4943 w(SOAP_XML_STRIC\n+000ef4f0: 5429 3c2f 636f 6465 3e2c 2073 6565 2053 T), see S\n+000ef500: 6563 7469 6f6e 203c 6120 636c 6173 733d ection Run\n+000ef530: 2d74 696d 6520 666c 6167 733c 2f61 3e20 -time flags \n+000ef540: 666f 7220 7468 6520 636f 6d70 6c65 7465 for the complete\n+000ef550: 206c 6973 7420 6f66 2066 6c61 6773 2e3c list of flags.<\n+000ef560: 2f70 3e0a 3c70 3e54 6865 206e 6578 7420 /p>.

    The next \n+000ef570: 7365 6374 696f 6e73 2064 6573 6372 6962 sections describ\n+000ef580: 6520 7468 6520 7479 7065 206f 6620 636f e the type of co\n+000ef590: 6e73 7472 6169 6e74 7320 7661 6c69 6461 nstraints valida\n+000ef5a0: 7465 6420 7768 656e 203c 636f 6465 3e23 ted when #\n+000ef5b0: 534f 4150 5f58 4d4c 5f53 5452 4943 543c SOAP_XML_STRICT<\n+000ef5c0: 2f63 6f64 653e 2069 7320 656e 6162 6c65 /code> is enable\n+000ef5d0: 6420 616e 6420 7661 6c69 6461 7469 6f6e d and validation\n+000ef5e0: 2063 6f6e 7374 7261 696e 7473 2061 7265 constraints are\n+000ef5f0: 2073 7065 6369 6669 6564 2069 6e20 7468 specified in th\n+000ef600: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head\n+000ef610: 6572 2066 696c 652e 3c2f 703e 0a3c 703e er file.

    .

    \n+000ef620: 5573 6520 636f 6d70 696c 6572 2066 6c61 Use compiler fla\n+000ef630: 6720 3c63 6f64 653e 2357 4954 485f 5245 g #WITH_RE\n+000ef640: 504c 4143 455f 494c 4c45 4741 4c5f 5554 PLACE_ILLEGAL_UT\n+000ef650: 4638 3c2f 636f 6465 3e20 746f 2066 6f72 F8 to for\n+000ef660: 6365 2073 7472 6963 7420 5554 462d 3820 ce strict UTF-8 \n+000ef670: 7465 7874 2063 6f6e 7665 7273 696f 6e73 text conversions\n+000ef680: 2c20 7768 6963 6820 7265 706c 6163 6573 , which replaces\n+000ef690: 2069 6e76 616c 6964 2055 5446 2d38 2077 invalid UTF-8 w\n+000ef6a0: 6974 6820 552b 4646 4644 2e3c 2f70 3e0a ith U+FFFD.

    .\n+000ef6b0: 3c70 3e53 6565 2061 6c73 6f20 3c61 2068

    See also C and C+\n+000ef6f0: 2b20 584d 4c20 6461 7461 2062 696e 6469 + XML data bindi\n+000ef700: 6e67 733c 2f61 3e20 646f 6375 6d65 6e74 ngs document\n+000ef710: 6174 696f 6e20 666f 7220 6d6f 7265 2064 ation for more d\n+000ef720: 6574 6169 6c73 2e3c 2f70 3e0a 3c70 3ef0 etails.

    .

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

    .\n+000ef790: 4465 6661 756c 7420 7661 6c75 6573 3c2f Default values.

    Default v\n+000ef7b0: 616c 7565 7320 6361 6e20 6265 2064 6566 alues can be def\n+000ef7c0: 696e 6564 2066 6f72 206f 7074 696f 6e61 ined for optiona\n+000ef7d0: 6c20 656c 656d 656e 7473 2061 6e64 2061 l elements and a\n+000ef7e0: 7474 7269 6275 7465 732c 2077 6869 6368 ttributes, which\n+000ef7f0: 206d 6561 6e73 2074 6861 7420 7468 6520 means that the \n+000ef800: 6465 6661 756c 7420 7661 6c75 6520 7769 default value wi\n+000ef810: 6c6c 2062 6520 7573 6564 2077 6865 6e20 ll be used when \n+000ef820: 7468 6520 656c 656d 656e 7420 6f72 2061 the element or a\n+000ef830: 7474 7269 6275 7465 2076 616c 7565 2069 ttribute value i\n+000ef840: 7320 6e6f 7420 7072 6573 656e 7420 696e s not present in\n+000ef850: 2074 6865 2070 6172 7365 6420 584d 4c2e the parsed XML.\n+000ef860: 2053 6565 2061 6c73 6f20 5365 6374 696f See also Sectio\n+000ef870: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Defaul\n+000ef8a0: 7420 7661 6c75 6573 2066 6f72 206f 6d69 t values for omi\n+000ef8b0: 7474 6564 2058 4d4c 2065 6c65 6d65 6e74 tted XML element\n+000ef8c0: 7320 616e 6420 6174 7472 6962 7574 6573 s and attributes\n+000ef8d0: 3c2f 613e 2061 6e64 2065 7861 6d70 6c65 and example\n+000ef8e0: 7320 696e 2073 7562 7365 7175 656e 7420 s in subsequent \n+000ef8f0: 7375 6273 6563 7469 6f6e 7320 6265 6c6f subsections belo\n+000ef900: 772e 3c2f 703e 0a3c 703e 4465 6661 756c w.

    .

    Defaul\n+000ef910: 7420 7661 6c75 6573 206d 7573 7420 6265 t values must be\n+000ef920: 2070 7269 6d69 7469 7665 2074 7970 6573 primitive types\n+000ef930: 2c20 696e 7465 6765 722c 2066 6c6f 6174 , integer, float\n+000ef940: 2c20 7374 7269 6e67 2c20 6574 632e 206f , string, etc. o\n+000ef950: 7220 706f 696e 7465 7273 2074 6f20 7072 r pointers to pr\n+000ef960: 696d 6974 6976 6520 7479 7065 732e 2044 imitive types. D\n+000ef970: 6566 6175 6c74 2076 616c 7565 7320 6361 efault values ca\n+000ef980: 6e20 6265 2073 7065 6369 6669 6564 2066 n be specified f\n+000ef990: 6f72 2073 7472 7563 7420 616e 6420 636c or struct and cl\n+000ef9a0: 6173 7320 6d65 6d62 6572 732c 2061 7320 ass members, as \n+000ef9b0: 7368 6f77 6e20 696e 2074 6865 2065 7861 shown in the exa\n+000ef9c0: 6d70 6c65 2062 656c 6f77 3a3c 2f70 3e0a mple below:

    .\n+000ef9d0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+000efa10: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__\n+000efa20: 4d79 5265 636f 7264 203c 2f64 6976 3e0a MyRecord
    .\n+000efa30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    \n+000efa60: 3c73 7061 6e20 636c 6173 733d 226b 6579 int n = 5; \n+000efa90: 2020 2020 2020 3c73 7061 6e20 636c 6173 // o\n+000efab0: 7074 696f 6e61 6c20 656c 656d 656e 7420 ptional element \n+000efac0: 7769 7468 2064 6566 6175 6c74 2076 616c with default val\n+000efad0: 7565 2035 203c 2f73 7061 6e3e 3c2f 6469 ue 5 .
    char *\n+000efb20: 6e61 6d65 203d 203c 7370 616e 2063 6c61 name = "none&qu\n+000efb50: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // optional el\n+000efb80: 656d 656e 7420 7769 7468 2064 6566 6175 ement with defau\n+000efb90: 6c74 2076 616c 7565 2026 7175 6f74 3b6e lt value "n\n+000efba0: 6f6e 6526 7175 6f74 3b20 3c2f 7370 616e one"
    .
    @ enum \n+000efbf0: 6e73 5f5f 636f 6c6f 7220 7b20 5245 442c ns__color { RED,\n+000efc00: 2057 4849 5445 2c20 424c 5545 207d 2063 WHITE, BLUE } c\n+000efc10: 6f6c 6f72 203d 2052 4544 3b20 3c73 7061 olor = RED; // optional at\n+000efc40: 7472 6962 7574 6520 7769 7468 2064 6566 tribute with def\n+000efc50: 6175 6c74 2076 616c 7565 2052 4544 203c ault value RED <\n+000efc60: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n+000efc80: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+000efca0: 703e 5570 6f6e 2064 6573 6572 6961 6c69 p>Upon deseriali\n+000efcb0: 7a61 7469 6f6e 206f 6620 6162 7365 6e74 zation of absent\n+000efcc0: 2064 6174 612c 2074 6865 7365 206d 656d data, these mem\n+000efcd0: 6265 7273 2077 696c 6c20 6265 2073 6574 bers will be set\n+000efce0: 2061 6363 6f72 6469 6e67 6c79 2e20 5768 accordingly. Wh\n+000efcf0: 656e 2063 6c61 7373 6573 2061 7265 2069 en classes are i\n+000efd00: 6e73 7461 6e74 6961 7465 6420 7769 7468 nstantiated with\n+000efd10: 203c 636f 6465 3e73 6f61 705f 6e65 775f soap_new_\n+000efd20: 436c 6173 734e 616d 653c 2f63 6f64 653e ClassName\n+000efd30: 2074 6865 2069 6e73 7461 6e63 6520 7769 the instance wi\n+000efd40: 6c6c 2062 6520 696e 6974 6961 6c69 7a65 ll be initialize\n+000efd50: 6420 7769 7468 2064 6566 6175 6c74 2076 d with default v\n+000efd60: 616c 7565 732e 3c2f 703e 0a3c 703e 5365 alues.

    .

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

    .

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

    ..Occurren\n+000efe50: 6365 2063 6f6e 7374 7261 696e 7473 3c2f ce constraints.

    Occurrenc\n+000efe70: 6520 636f 6e73 7472 6169 6e74 7320 7370 e constraints sp\n+000efe80: 6563 6966 7920 7468 6520 6d69 6e69 6d75 ecify the minimu\n+000efe90: 6d20 616e 642f 6f72 206d 6178 696d 756d m and/or maximum\n+000efea0: 2066 7265 7175 656e 6379 206f 7220 6f70 frequency or op\n+000efeb0: 7469 6f6e 616c 6974 7920 6f66 206f 6620 tionality of of \n+000efec0: 6174 7472 6962 7574 6573 2061 6e64 2065 attributes and e\n+000efed0: 6c65 6d65 6e74 732e 3c2f 703e 0a3c 703e lements.

    .

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

    .Elemen\n+000eff40: 7473 2077 6974 6820 6d69 6e4f 6363 7572 ts with minOccur\n+000eff50: 7320 616e 6420 6d61 784f 6363 7572 7320 s and maxOccurs \n+000eff60: 7265 7374 7269 6374 696f 6e73 3c2f 6833 restrictions.

    To force th\n+000eff80: 6520 7661 6c69 6461 7469 6f6e 206f 6620 e validation of \n+000eff90: 6d69 6e4f 6363 7572 7320 616e 6420 6d61 minOccurs and ma\n+000effa0: 784f 6363 7572 7320 636f 6e73 7472 6169 xOccurs constrai\n+000effb0: 6e74 7320 7468 6520 3c63 6f64 653e 2353 nts the #S\n+000effc0: 4f41 505f 584d 4c5f 5354 5249 4354 3c2f OAP_XML_STRICT input mode\n+000effe0: 2066 6c61 6720 6d75 7374 2062 6520 7365 flag must be se\n+000efff0: 742e 2054 6865 206d 696e 4f63 6375 7273 t. The minOccurs\n+000f0000: 2061 6e64 206d 6178 4f63 6375 7273 2063 and maxOccurs c\n+000f0010: 6f6e 7374 7261 696e 7473 2061 7265 2073 onstraints are s\n+000f0020: 7065 6369 6669 6564 2066 6f72 206d 656d pecified for mem\n+000f0030: 6265 7273 206f 6620 6120 7374 7275 6374 bers of a struct\n+000f0040: 2061 6e64 206d 656d 6265 7273 206f 6620 and members of \n+000f0050: 6120 636c 6173 7320 696e 2061 2068 6561 a class in a hea\n+000f0060: 6465 7220 6669 6c65 2075 7369 6e67 2074 der file using t\n+000f0070: 6865 2066 6f6c 6c6f 7769 6e67 2073 796e he following syn\n+000f0080: 7461 783a 3c2f 703e 0a3c 6469 7620 636c tax:

    .
    <\n+000f00a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f00b0: 3e54 7970 6520 6d65 6d62 6572 6e61 6d65 >Type membername\n+000f00c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 nullptr minOccurs \n+000f00f0: 3a20 6d61 784f 6363 7572 7320 3d20 7661 : maxOccurs = va\n+000f0100: 6c75 653b 3c2f 6469 763e 0a3c 2f64 6976 lue;
    .

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

    .

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

    .

    \n+000f0b50: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Required and p\n+000f0b90: 726f 6869 6269 7465 6420 6174 7472 6962 rohibited attrib\n+000f0ba0: 7574 6573 3c2f 6833 3e0a 3c70 3e53 696d utes

    .

    Sim\n+000f0bb0: 696c 6172 2074 6f20 7468 6520 6d69 6e4f ilar to the minO\n+000f0bc0: 6363 7572 7320 616e 6420 6d61 784f 6363 ccurs and maxOcc\n+000f0bd0: 7572 7320 616e 6e6f 7461 7469 6f6e 7320 urs annotations \n+000f0be0: 6465 6669 6e65 6420 696e 2074 6865 2070 defined in the p\n+000f0bf0: 7265 7669 6f75 7320 7365 6374 696f 6e2c revious section,\n+000f0c00: 2061 7474 7269 6275 7465 7320 696e 2061 attributes in a\n+000f0c10: 2073 7472 7563 7420 6f72 2063 6c61 7373 struct or class\n+000f0c20: 2063 616e 2062 6520 616e 6e6f 7461 7465 can be annotate\n+000f0c30: 6420 7769 7468 206f 6363 7572 7265 6e63 d with occurrenc\n+000f0c40: 6520 636f 6e73 7472 6169 6e74 7320 746f e constraints to\n+000f0c50: 206d 616b 6520 7468 656d 206f 7074 696f make them optio\n+000f0c60: 6e61 6c20 2830 292c 2072 6571 7569 7265 nal (0), require\n+000f0c70: 6420 2831 292c 206f 7220 7072 6f68 6962 d (1), or prohib\n+000f0c80: 6974 6564 2028 303a 3029 2e20 4465 6661 ited (0:0). Defa\n+000f0c90: 756c 7420 7661 6c75 6573 2063 616e 2062 ult values can b\n+000f0ca0: 6520 6173 7369 676e 6564 2074 6f20 6f70 e assigned to op\n+000f0cb0: 7469 6f6e 616c 2061 7474 7269 6275 7465 tional attribute\n+000f0cc0: 732e 3c2f 703e 0a3c 703e 466f 7220 6578 s.

    .

    For ex\n+000f0cd0: 616d 706c 653c 2f70 3e0a 3c64 6976 2063 ample

    .
    \n+000f0cf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+000f0d20: 2f73 7061 6e3e 6e73 5f5f 4d79 5265 636f /span>ns__MyReco\n+000f0d30: 7264 203c 2f64 6976 3e0a 3c64 6976 2063 rd
    .
    {.
    @ int m\n+000f0d90: 2031 3b20 2020 3c73 7061 6e20 636c 6173 1; // r\n+000f0db0: 6571 7569 7265 6420 6174 7472 6962 7574 equired attribut\n+000f0dc0: 6520 286f 6363 7572 7320 6174 206c 6561 e (occurs at lea\n+000f0dd0: 7374 206f 6e63 6529 203c 2f73 7061 6e3e st once) \n+000f0de0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    @ int n = 5; /\n+000f0e40: 2f20 6f70 7469 6f6e 616c 2061 7474 7269 / optional attri\n+000f0e50: 6275 7465 2077 6974 6820 6465 6661 756c bute with defaul\n+000f0e60: 7420 7661 6c75 6520 353c 2f73 7061 6e3e t value 5\n+000f0e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    @ int o 0; /\n+000f0ed0: 2f20 6f70 7469 6f6e 616c 2061 7474 7269 / optional attri\n+000f0ee0: 6275 7465 2028 6d61 7920 6f72 206d 6179 bute (may or may\n+000f0ef0: 206e 6f74 206f 6363 7572 2920 3c2f 7370 not occur)
    .
    @ \n+000f0f20: 3c73 7061 6e20 636c 6173 733d 226b 6579 int p 0:0; // prohibited \n+000f0f70: 6174 7472 6962 7574 6520 3c2f 7370 616e attribute
    .
    };.

    Rem\n+000f0fc0: 656d 6265 7220 746f 2073 6574 2074 6865 ember to set the\n+000f0fd0: 203c 636f 6465 3e23 534f 4150 5f58 4d4c #SOAP_XML\n+000f0fe0: 5f53 5452 4943 543c 2f63 6f64 653e 2069 _STRICT i\n+000f0ff0: 6e70 7574 206d 6f64 6520 666c 6167 2074 nput mode flag t\n+000f1000: 6f20 656e 6162 6c65 2074 6865 2076 616c o enable the val\n+000f1010: 6964 6174 696f 6e20 6f66 2061 7474 7269 idation of attri\n+000f1020: 6275 7465 206f 6363 7572 7265 6e63 6520 bute occurrence \n+000f1030: 636f 6e73 7472 6169 6e74 732e 3c2f 703e constraints.

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

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

    .

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

    <\n+000f1120: 2f61 3e0a 5661 6c75 6520 636f 6e73 7472 /a>.Value constr\n+000f1130: 6169 6e74 733c 2f68 323e 0a3c 703e 5661 aints

    .

    Va\n+000f1140: 6c75 6520 636f 6e73 7472 6169 6e74 7320 lue constraints \n+000f1150: 7265 7374 7269 6374 2074 6865 206c 656e restrict the len\n+000f1160: 6774 6820 6f66 2073 7472 696e 6773 2061 gth of strings a\n+000f1170: 6e64 2074 6865 2072 616e 6765 206f 6620 nd the range of \n+000f1180: 7661 6c75 6573 206f 6620 6e75 6d65 7269 values of numeri\n+000f1190: 6320 7479 7065 732e 3c2f 703e 0a3c 703e c types.

    .

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

    \n+000f1200: 3c2f 613e 0a44 6174 6120 6c65 6e67 7468 .Data length\n+000f1210: 2072 6573 7472 6963 7469 6f6e 733c 2f68 restrictions.

    A schema s\n+000f1230: 696d 706c 6554 7970 6520 6973 2064 6566 impleType is def\n+000f1240: 696e 6564 2077 6974 6820 6120 3c63 6f64 ined with a typedef\n+000f1260: 2062 7920 7461 6b69 6e67 2061 2062 6173 by taking a bas\n+000f1270: 6520 7072 696d 6974 6976 6520 746f 2064 e primitive to d\n+000f1280: 6566 696e 6564 2061 2064 6572 6976 6564 efined a derived\n+000f1290: 2073 696d 706c 6554 7970 652e 2046 6f72 simpleType. For\n+000f12a0: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

    .
    type\n+000f12f0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def int \n+000f1320: 7469 6d65 5f5f 7365 636f 6e64 733b 3c2f time__seconds;.

    T\n+000f1350: 6869 7320 6465 6669 6e65 7320 7468 6520 his defines the \n+000f1360: 666f 6c6c 6f77 696e 6720 7363 6865 6d61 following schema\n+000f1370: 2074 7970 6520 696e 203c 656d 3e3c 636f type in time.xsd:

    . <\n+000f13b0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000f13c0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    <simpleType<\n+000f1400: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> nam\n+000f1420: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="secon\n+000f1450: 6473 2671 756f 743b 3c2f 7370 616e 3e26 ds"&\n+000f1460: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
    .
    &\n+000f1480: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;res\n+000f14a0: 7472 6963 7469 6f6e 3c2f 7370 616e 3e20 triction \n+000f14b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 base=&q\n+000f14f0: 756f 743b 7873 643a 696e 7426 7175 6f74 uot;xsd:int"\n+000f1500: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
    </simpleType\n+000f1550: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    \n+000f1580: 3c70 3e41 2063 6f6d 706c 6578 5479 7065

    A complexType\n+000f1590: 2077 6974 6820 7369 6d70 6c65 436f 6e74 with simpleCont\n+000f15a0: 656e 7420 6973 2064 6566 696e 6564 2077 ent is defined w\n+000f15b0: 6974 6820 6120 7772 6170 7065 7220 7374 ith a wrapper st\n+000f15c0: 7275 6374 2f63 6c61 7373 3a3c 2f70 3e0a ruct/class:

    .\n+000f15d0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+000f1610: 7275 6374 203c 2f73 7061 6e3e 7469 6d65 ruct time\n+000f1620: 5f5f 6461 7465 203c 2f64 6976 3e0a 3c64 __date
    .\n+000f1640: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    char *__item; // some custo\n+000f16b0: 6d20 666f 726d 6174 2064 6174 6520 2872 m format date (r\n+000f16c0: 6573 7472 6963 7469 6f6e 206f 6620 7374 estriction of st\n+000f16d0: 7269 6e67 2920 3c2f 7370 616e 3e3c 2f64 ring) .
    @ \n+000f1710: 656e 756d 3c2f 7370 616e 3e20 7469 6d65 enum time\n+000f1720: 5f5f 7a6f 6e65 207b 2045 5354 2c20 474d __zone { EST, GM\n+000f1730: 542c 202e 2e2e 207d 207a 6f6e 653b 203c T, ... } zone; <\n+000f1740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+000f1760: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

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

    .
    \n+000f17f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <\n+000f1820: 636f 6d70 6c65 7854 7970 653c 2f73 7061 complexType name="date"\n+000f1880: 3b3c 2f73 7061 6e3e 2667 743b 203c 2f64 ;> .
    <simpleCont\n+000f18d0: 656e 743c 2f73 7061 6e3e 2667 743b 203c ent> <\n+000f18e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+000f1900: 3c73 7061 6e20 636c 6173 733d 226b 6579 extens\n+000f1920: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion base="x\n+000f1970: 7364 3a73 7472 696e 6726 7175 6f74 3b3c sd:string"<\n+000f1980: 2f73 7061 6e3e 2f26 6774 3b20 3c2f 6469 /span>/> .
    </simpleCont\n+000f19d0: 656e 743c 2f73 7061 6e3e 2667 743b 203c ent> <\n+000f19e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <attribut\n+000f1a20: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e n\n+000f1a40: 616d 653c 2f73 7061 6e3e 3d3c 7370 616e ame="zon\n+000f1a70: 6526 7175 6f74 3b3c 2f73 7061 6e3e 203c e" <\n+000f1a80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f1a90: 6f72 6422 3e74 7970 653c 2f73 7061 6e3e ord\">type\n+000f1aa0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000f1ac0: 6f74 3b74 696d 653a 7a6f 6e65 2671 756f ot;time:zone&quo\n+000f1ad0: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n+000f1af0: 7573 653c 2f73 7061 6e3e 3d3c 7370 616e use="opt\n+000f1b20: 696f 6e61 6c26 7175 6f74 3b3c 2f73 7061 ional"/>
    .<\n+000f1b40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f1b50: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n+000f1b70: 636f 6d70 6c65 7854 7970 653c 2f73 7061 complexType>
    .&\n+000f1ba0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;sim\n+000f1bc0: 706c 6554 7970 653c 2f73 7061 6e3e 203c pleType <\n+000f1bd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f1be0: 6f72 6422 3e6e 616d 653c 2f73 7061 6e3e ord\">name\n+000f1bf0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000f1c10: 6f74 3b7a 6f6e 6526 7175 6f74 3b3c 2f73 ot;zone">
    .\n+000f1c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <restriction base<\n+000f1c90: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:str\n+000f1cc0: 696e 6726 7175 6f74 3b3c 2f73 7061 6e3e ing"\n+000f1cd0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    . \n+000f1cf0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+000f1d10: 656e 756d 6572 6174 696f 6e3c 2f73 7061 enumeration value="EST"\n+000f1d70: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
    <<\n+000f1da0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f1db0: 6f72 6474 7970 6522 3e65 6e75 6d65 7261 ordtype\">enumera\n+000f1dc0: 7469 6f6e 3c2f 7370 616e 3e20 3c73 7061 tion value=<\n+000f1df0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f1e00: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f1e10: 3b47 4d54 2671 756f 743b 3c2f 7370 616e ;GMT"/>
    .\n+000f1e40: 2020 2020 2e2e 2e20 3c2f 6469 763e 0a3c ...
    .<\n+000f1e50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f1e60: 3e20 2026 6c74 3b2f 3c73 7061 6e20 636c > </restriction>
    .\n+000f1ea0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </simpleType>
    .

    Da\n+000f1f10: 7461 2076 616c 7565 206c 656e 6774 6820 ta value length \n+000f1f20: 636f 6e73 7472 6169 6e74 7320 6f66 2073 constraints of s\n+000f1f30: 696d 706c 6554 7970 6573 2061 6e64 2063 impleTypes and c\n+000f1f40: 6f6d 706c 6578 5479 7065 7320 7769 7468 omplexTypes with\n+000f1f50: 2073 696d 706c 6543 6f6e 7465 6e74 2061 simpleContent a\n+000f1f60: 7265 2064 6566 696e 6564 2061 7320 666f re defined as fo\n+000f1f70: 6c6c 6f77 733a 3c2f 703e 0a3c 6469 7620 llows:

    .
    typedef\n+000f1fc0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *n\n+000f1ff0: 735f 5f73 7472 696e 6732 3536 2030 3a32 s__string256 0:2\n+000f2000: 3536 3b20 3c73 7061 6e20 636c 6173 733d 56; // sim\n+000f2020: 706c 6554 7970 6520 7265 7374 7269 6374 pleType restrict\n+000f2030: 696f 6e20 6f66 2073 7472 696e 6720 7769 ion of string wi\n+000f2040: 7468 206d 6178 206c 656e 6774 6820 3235 th max length 25\n+000f2050: 3620 6368 6172 6163 7465 7273 203c 2f73 6 characters
    .
    typedef char\n+000f20c0: 3c2f 7370 616e 3e20 2a6e 735f 5f73 7472 *ns__str\n+000f20d0: 696e 6731 3020 3130 3a31 303b 203c 7370 ing10 10:10; // simpleType\n+000f2100: 2072 6573 7472 6963 7469 6f6e 206f 6620 restriction of \n+000f2110: 7374 7269 6e67 2077 6974 6820 6c65 6e67 string with leng\n+000f2120: 7468 206f 6620 3130 2063 6861 7261 6374 th of 10 charact\n+000f2130: 6572 7320 3c2f 7370 616e 3e3c 2f64 6976 ers .
    typede\n+000f2170: 663c 2f73 7061 6e3e 2073 7464 3a3a 7374 f std::st\n+000f2180: 7269 6e67 202a 6e73 5f5f 7374 7269 6e67 ring *ns__string\n+000f2190: 3820 383b 203c 7370 616e 2063 6c61 7373 8 8; // si\n+000f21b0: 6d70 6c65 5479 7065 2072 6573 7472 6963 mpleType restric\n+000f21c0: 7469 6f6e 206f 6620 7374 7269 6e67 2077 tion of string w\n+000f21d0: 6974 6820 6174 206c 6561 7374 2038 2063 ith at least 8 c\n+000f21e0: 6861 7261 6374 6572 7320 3c2f 7370 616e haracters
    .
    \n+000f2220: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n+000f2230: 5f5f 6461 7461 203c 7370 616e 2063 6c61 __data // \n+000f2250: 7369 6d70 6c65 436f 6e74 656e 7420 7772 simpleContent wr\n+000f2260: 6170 7065 7220 3c2f 7370 616e 3e3c 2f64 apper .
    {
    .\n+000f22a0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+000f22c0: 6172 3c2f 7370 616e 3e20 2a5f 5f69 7465 ar *__ite\n+000f22d0: 6d20 3a32 3536 3b20 3c73 7061 6e20 636c m :256; //\n+000f22f0: 2073 696d 706c 6543 6f6e 7465 6e74 2077 simpleContent w\n+000f2300: 6974 6820 6174 206d 6f73 7420 3235 3620 ith at most 256 \n+000f2310: 6368 6172 6163 7465 7273 203c 2f73 7061 characters
    .
    @ <\n+000f2340: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f2350: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *name 1; \n+000f2370: 2020 203c 7370 616e 2063 6c61 7373 3d22 // requ\n+000f2390: 6972 6564 206e 616d 6520 6174 7472 6962 ired name attrib\n+000f23a0: 7574 6520 3c2f 7370 616e 3e3c 2f64 6976 ute .
    };
    .\n+000f23e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct time__date <\n+000f2410: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f2420: 656e 7422 3e2f 2f20 7369 6d70 6c65 436f ent\">// simpleCo\n+000f2430: 6e74 656e 7420 7772 6170 7065 7220 3c2f ntent wrapper
    .{<\n+000f2460: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *__item :100; \n+000f24b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    @ enum t\n+000f24f0: 696d 655f 5f7a 6f6e 6520 7b20 4553 542c ime__zone { EST,\n+000f2500: 2047 4d54 2c20 2e2e 2e20 7d20 7a6f 6e65 GMT, ... } zone\n+000f2510: 203d 2047 4d54 3b20 3c2f 6469 763e 0a3c = GMT;
    .<\n+000f2520: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f2530: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
    .
    <\n+000f2540: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000f2550: 3c70 3e53 6574 2074 6865 203c 636f 6465

    Set the #SOAP_XML_STRIC\n+000f2570: 543c 2f63 6f64 653e 206d 6f64 6520 666c T mode fl\n+000f2580: 6167 2074 6f20 656e 6162 6c65 2074 6865 ag to enable the\n+000f2590: 2076 616c 6964 6174 696f 6e20 6f66 2076 validation of v\n+000f25a0: 616c 7565 206c 656e 6774 6820 636f 6e73 alue length cons\n+000f25b0: 7472 6169 6e74 732e 3c2f 703e 0a3c 703e traints.

    .

    \n+000f25c0: 5365 6520 616c 736f 203c 6120 6872 6566 See also C and C++ X\n+000f2600: 4d4c 2064 6174 6120 6269 6e64 696e 6773 ML data bindings\n+000f2610: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n+000f2620: 6f6e 2066 6f72 206d 6f72 6520 6465 7461 on for more deta\n+000f2630: 696c 732e 3c2f 703e 0a3c 703e f09f 949d ils.

    .

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

    .<\n+000f2670: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>\n+000f26a0: 3c2f 613e 0a56 616c 7565 2072 616e 6765 .Value range\n+000f26b0: 2072 6573 7472 6963 7469 6f6e 733c 2f68 restrictions.

    Similar to\n+000f26d0: 2064 6174 6120 6c65 6e67 7468 2063 6f6e data length con\n+000f26e0: 7374 7261 696e 7473 2066 6f72 2073 7472 straints for str\n+000f26f0: 696e 672d 6261 7365 6420 6461 7461 2c20 ing-based data, \n+000f2700: 696e 7465 6765 7220 616e 6420 666c 6f61 integer and floa\n+000f2710: 7469 6e67 2070 6f69 6e74 2076 616c 7565 ting point value\n+000f2720: 2072 616e 6765 2063 6f6e 7374 7261 696e range constrain\n+000f2730: 7473 206f 6e20 6e75 6d65 7269 6320 7369 ts on numeric si\n+000f2740: 6d70 6c65 5479 7065 7320 616e 6420 636f mpleTypes and co\n+000f2750: 6d70 6c65 7854 7970 6573 2077 6974 6820 mplexTypes with \n+000f2760: 7369 6d70 6c65 436f 6e74 656e 7420 6172 simpleContent ar\n+000f2770: 6520 6465 636c 6172 6564 2077 6974 6820 e declared with \n+000f2780: 3c63 6f64 653e 6c6f 7720 3a20 6869 6768 low : high\n+000f2790: 3c2f 636f 6465 3e2c 2077 6865 7265 203c , where <\n+000f27a0: 636f 6465 3e6c 6f77 3c2f 636f 6465 3e20 code>low \n+000f27b0: 616e 6420 3c63 6f64 653e 6869 6768 3c2f and high are option\n+000f27d0: 616c 2e3c 2f70 3e0a 3c70 3e41 7320 6f66 al.

    .

    As of\n+000f27e0: 2067 534f 4150 2032 2e38 2e32 362c 2066 gSOAP 2.8.26, f\n+000f27f0: 6c6f 6174 696e 6720 706f 696e 7420 7661 loating point va\n+000f2800: 6c75 6520 7261 6e67 6573 2061 6e64 2069 lue ranges and i\n+000f2810: 6e74 6567 6572 2072 616e 6765 7320 6361 nteger ranges ca\n+000f2820: 6e20 6265 2065 7863 6c75 7369 7665 2062 n be exclusive b\n+000f2830: 7920 6164 6469 6e67 203c 636f 6465 3e26 y adding &\n+000f2840: 6c74 3b3c 2f63 6f64 653e 206f 6e20 6569 lt; on ei\n+000f2850: 7468 6572 2073 6964 6520 6f66 2074 6865 ther side of the\n+000f2860: 203c 636f 6465 3e3a 3c2f 636f 6465 3e20 : \n+000f2870: 7261 6e67 6520 6f70 6572 6174 6f72 3a3c range operator:<\n+000f2880: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>..\n+000f28c0: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b .\n+000f28f0: 3c74 6820 636c 6173 733d 226d 6172 6b64 \n+000f2930: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....\n+000f2a20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+000f2af0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+000f2b50: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....\n+000f2c80: 3c63 6f64 653e 3120 266c 743b 2031 303c 1 < 10<\n+000f2c90: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+000f2cc0: 3120 266c 743b 2078 2026 6c74 3b20 3130 1 < x < 10\n+000f2cd0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+000f2ce0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+000f2cf0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+000f2d00: 3c74 6420 636c 6173 733d 226d 6172 6b64 ...\n+000f2e20: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+000f2e40: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .<\n+000f2e80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+000f2e90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+000f2ea0: 3e78 2026 6c74 3b20 3130 2020 2020 3c2f >x < 10 ......\n+000f3070: 3120 266c 743b 2078 2026 6c74 3b3d 2031 1 < x <= 1\n+000f3080: 3020 2020 3c2f 7464 3e3c 2f74 723e 0a3c 0 .<\n+000f3090: 2f74 6162 6c65 3e0a 3c70 3e46 6f72 2065 /table>.

    For e\n+000f30a0: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

    .
    typede\n+000f30f0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f int ns\n+000f3120: 5f5f 696e 7431 3020 303a 3130 3b20 3c73 __int10 0:10; // simpleTyp\n+000f3150: 6520 7265 7374 7269 6374 696f 6e20 6f66 e restriction of\n+000f3160: 2069 6e74 2030 2e2e 3130 203c 2f73 7061 int 0..10
    .
    typedef \n+000f31b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 LONG64 ns_\n+000f3210: 5f6c 6f6e 6720 2d31 3030 3030 3030 3a31 _long -1000000:1\n+000f3220: 3030 3030 3030 3b20 3c73 7061 6e20 636c 000000; //\n+000f3240: 2073 696d 706c 6554 7970 6520 7265 7374 simpleType rest\n+000f3250: 7269 6374 696f 6e20 6f66 206c 6f6e 6736 riction of long6\n+000f3260: 3420 2d31 3030 3030 3030 2e2e 3130 3030 4 -1000000..1000\n+000f3270: 3030 3020 3c2f 7370 616e 3e3c 2f64 6976 000 .
    typede\n+000f32b0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f float \n+000f32e0: 6e73 5f5f 666c 6f61 7420 2d31 2e30 2026 ns__float -1.0 &\n+000f32f0: 6c74 3b3a 266c 743b 2031 302e 353b 203c lt;:< 10.5; <\n+000f3300: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f3310: 656e 7422 3e2f 2f20 7369 6d70 6c65 5479 ent\">// simpleTy\n+000f3320: 7065 2072 6573 7472 6963 7469 6f6e 206f pe restriction o\n+000f3330: 6620 666c 6f61 7420 696e 2028 2d31 2c31 f float in (-1,1\n+000f3340: 302e 3529 203c 2f73 7061 6e3e 3c2f 6469 0.5) .
    struc\n+000f3380: 7420 3c2f 7370 616e 3e6e 735f 5f64 6174 t ns__dat\n+000f3390: 6120 3c73 7061 6e20 636c 6173 733d 2263 a // simpl\n+000f33b0: 6543 6f6e 7465 6e74 2077 7261 7070 6572 eContent wrapper\n+000f33c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+000f33d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f33e0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n+000f3400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f3410: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __item 0:10;\n+000f3430: 203c 7370 616e 2063 6c61 7373 3d22 636f // simple\n+000f3450: 436f 6e74 656e 7420 7261 6e67 6520 302e Content range 0.\n+000f3460: 2e31 3020 3c2f 7370 616e 3e3c 2f64 6976 .10 .
    @ char *n\n+000f34b0: 616d 6520 313b 2020 2020 3c73 7061 6e20 ame 1; \n+000f34d0: 2f2f 2072 6571 7569 7265 6420 6e61 6d65 // required name\n+000f34e0: 2061 7474 7269 6275 7465 203c 2f73 7061 attribute
    .
    };.

    Se\n+000f3530: 7420 7468 6520 3c63 6f64 653e 2353 4f41 t the #SOA\n+000f3540: 505f 584d 4c5f 5354 5249 4354 3c2f 636f P_XML_STRICT mode flag to\n+000f3560: 2065 6e61 626c 6520 7468 6520 7661 6c69 enable the vali\n+000f3570: 6461 7469 6f6e 206f 6620 7661 6c75 6520 dation of value \n+000f3580: 7261 6e67 6520 636f 6e73 7472 6169 6e74 range constraint\n+000f3590: 732e 3c2f 703e 0a3c 703e 5365 6520 616c s.

    .

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

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

    .

    .Patt\n+000f3680: 6572 6e20 7265 7374 7269 6374 696f 6e73 ern restrictions\n+000f3690: 3c2f 6833 3e0a 3c70 3e50 6174 7465 726e

    .

    Pattern\n+000f36a0: 7320 6361 6e20 6265 2064 6566 696e 6564 s can be defined\n+000f36b0: 2066 6f72 2073 696d 706c 6554 7970 6520 for simpleType \n+000f36c0: 636f 6e74 656e 742e 2048 6f77 6576 6572 content. However\n+000f36d0: 2c20 7061 7474 6572 6e20 7661 6c69 6461 , pattern valida\n+000f36e0: 7469 6f6e 2069 7320 6e6f 7420 656e 666f tion is not enfo\n+000f36f0: 7263 6564 2075 6e6c 6573 7320 7468 6520 rced unless the \n+000f3700: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n+000f37a0: 3a3a 6673 7661 6c69 6461 7465 3c2f 613e ::fsvalidate\n+000f37b0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soa\n+000f3860: 703a 3a66 7776 616c 6964 6174 653c 2f61 p::fwvalidate callbac\n+000f3880: 6b73 2061 7265 2073 6574 2074 6f20 6120 ks are set to a \n+000f3890: 7265 6765 7820 6d61 7463 6865 722e 3c2f regex matcher..

    To associa\n+000f38b0: 7465 2061 2070 6174 7465 726e 2077 6974 te a pattern wit\n+000f38c0: 6820 6120 7369 6d70 6c65 5479 7065 2c20 h a simpleType, \n+000f38d0: 796f 7520 6361 6e20 6465 6669 6e65 2061 you can define a\n+000f38e0: 2073 696d 706c 6554 7970 6520 7769 7468 simpleType with\n+000f38f0: 2061 203c 636f 6465 3e74 7970 6564 6566 a typedef\n+000f3900: 3c2f 636f 6465 3e20 616e 6420 6120 7061 and a pa\n+000f3910: 7474 6572 6e20 7374 7269 6e67 3a3c 2f70 ttern string:.

    \n+000f3a00: 5468 6973 2064 6566 696e 6573 2074 6865 This defines the\n+000f3a10: 2066 6f6c 6c6f 7769 6e67 2073 6368 656d following schem\n+000f3a20: 6120 7479 7065 2069 6e20 3c65 6d3e 3c63 a type in time.xsd:

    . \n+000f3a60: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    <simpleType\n+000f3ab0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na\n+000f3ad0: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="seco\n+000f3b00: 6e64 2671 756f 743b 3c2f 7370 616e 3e26 nd"&\n+000f3b10: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
    .
    &\n+000f3b30: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;res\n+000f3b50: 7472 6963 7469 6f6e 3c2f 7370 616e 3e20 triction \n+000f3b60: 3c73 7061 6e20 636c 6173 733d 226b 6579 base=&q\n+000f3ba0: 756f 743b 7873 643a 696e 7426 7175 6f74 uot;xsd:int"\n+000f3bb0: 3b3c 2f73 7061 6e3e 2667 743b 203c 2f64 ;> .
    <value\n-000f3c00: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f3c20: 6f74 3b5b 312d 355d 3f5b 302d 395d 7c36 ot;[1-5]?[0-9]|6\n-000f3c30: 3026 7175 6f74 3b3c 2f73 7061 6e3e 2f26 0"/&\n-000f3c40: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
    .
    &\n-000f3c60: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/re\n-000f3c80: 7374 7269 6374 696f 6e3c 2f73 7061 6e3e striction\n-000f3c90: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    .&l\n-000f3cb0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/sim\n-000f3cd0: 706c 6554 7970 653c 2f73 7061 6e3e 2667 pleType&g\n-000f3ce0: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
    .
    <\n-000f3cf0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000f3d00: 3c2f 6469 763e 3c64 6976 2063 6c61 7373

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

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

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

    .
    &\n-000f59e0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;com\n-000f5a00: 706c 6578 5479 7065 3c2f 7370 616e 3e20 plexType \n-000f5a10: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q\n-000f5a50: 756f 743b 7265 636f 7264 2671 756f 743b uot;record"\n-000f5a60: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
    <sequence>
    .\n-000f5ac0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <element name="name"\n-000f5b50: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; t\n-000f5b70: 7970 653c 2f73 7061 6e3e 3d3c 7370 616e ype="xsd\n-000f5ba0: 3a73 7472 696e 6726 7175 6f74 3b3c 2f73 :string" minOc\n-000f5bd0: 6375 7273 3c2f 7370 616e 3e3d 3c73 7061 curs="0&\n-000f5c00: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; maxOccurs=\n-000f5c50: 2671 756f 743b 3126 7175 6f74 3b3c 2f73 "1" nilla\n-000f5c80: 626c 653c 2f73 7061 6e3e 3d3c 7370 616e ble="tru\n-000f5cb0: 6526 7175 6f74 3b3c 2f73 7061 6e3e 203c e" <\n-000f5cc0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f5cd0: 6f72 6422 3e66 6f72 6d3c 2f73 7061 6e3e ord\">form\n-000f5ce0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f5d00: 6f74 3b75 6e71 7561 6c69 6669 6564 2671 ot;unqualified&q\n-000f5d10: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/>\n-000f5d20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    &l\n-000f5d40: 743b 3c73 7061 6e20 636c 6173 733d 226b t;elem\n-000f5d60: 656e 743c 2f73 7061 6e3e 203c 7370 616e ent name="p\n-000f5db0: 686f 6e65 2671 756f 743b 3c2f 7370 616e hone" type=\n-000f5e00: 2671 756f 743b 7873 643a 7374 7269 6e67 "xsd:string\n-000f5e10: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " minOccurs="0" maxO\n-000f5e90: 6363 7572 733c 2f73 7061 6e3e 3d3c 7370 ccurs="1\n-000f5ec0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " nillable=\n-000f5f10: 2671 756f 743b 7472 7565 2671 756f 743b "true"\n-000f5f20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fo\n-000f5f40: 726d 3c2f 7370 616e 3e3d 3c73 7061 6e20 rm="qual\n-000f5f70: 6966 6965 6426 7175 6f74 3b3c 2f73 7061 ified"/>
    .<\n-000f5f90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f5fa0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <element ref=&\n-000f6010: 7175 6f74 3b78 3a66 6178 2671 756f 743b quot;x:fax"\n-000f6020: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c mi\n-000f6040: 6e4f 6363 7572 733c 2f73 7061 6e3e 3d3c nOccurs=<\n-000f6050: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000f6060: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000f6070: 3b30 2671 756f 743b 3c2f 7370 616e 3e20 ;0" \n-000f6080: 3c73 7061 6e20 636c 6173 733d 226b 6579 maxOccurs<\n-000f60a0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="1"\n-000f60d0: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
    <element<\n-000f6120: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ref\n-000f6140: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="y:zip&\n-000f6170: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; minOccurs=\n-000f61c0: 2671 756f 743b 3026 7175 6f74 3b3c 2f73 "0" maxOc\n-000f61f0: 6375 7273 3c2f 7370 616e 3e3d 3c73 7061 curs="1&\n-000f6220: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/>\n-000f6230: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-000f6250: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/sequ\n-000f6270: 656e 6365 3c2f 7370 616e 3e26 6774 3b20 ence> \n-000f6280: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </complexT\n-000f62c0: 7970 653c 2f73 7061 6e3e 2667 743b 203c ype> <\n-000f62d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <element name<\n-000f6330: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="fax&quo\n-000f6360: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n-000f6380: 7479 7065 3c2f 7370 616e 3e3d 3c73 7061 type="xs\n-000f63b0: 643a 7374 7269 6e67 2671 756f 743b 3c2f d:string"/>
    \n-000f63d0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
    <\n-000f63f0: 703e 616e 6420 7468 6520 3c65 6d3e 3c63 p>and the y.xsd
    \n-000f6410: 3c2f 656d 3e20 7363 6865 6d61 2064 6566 schema def\n-000f6420: 696e 6573 2063 6f6e 7461 696e 733a 3c2f ines contains:.
    <\n-000f6470: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;eleme\n-000f6490: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt \n-000f64b0: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="zi\n-000f64e0: 7026 7175 6f74 3b3c 2f73 7061 6e3e 203c p" <\n-000f64f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f6500: 6f72 6422 3e74 7970 653c 2f73 7061 6e3e ord\">type\n-000f6510: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f6530: 6f74 3b78 7364 3a73 7472 696e 6726 7175 ot;xsd:string&qu\n-000f6540: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n-000f6550: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

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

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

    .

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

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

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

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

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

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

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

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

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

    .

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

    .

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

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

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

    .
    struct\n-000f8850: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 Namespace namesp\n-000f88f0: 6163 6573 3c2f 613e 5b5d 203d 203c 2f64 aces[] = .
    {
    .\n-000f8930: 2020 3c73 7061 6e20 636c 6173 733d 2263 // { &qu\n-000f8950: 6f74 3b70 7265 6669 7826 7175 6f74 3b2c ot;prefix",\n-000f8960: 2026 7175 6f74 3b55 5249 2671 756f 743b "URI"\n-000f8970: 2c20 2671 756f 743b 5552 492d 7061 7474 , "URI-patt\n-000f8980: 6572 6e26 7175 6f74 3b20 286f 7074 696f ern" (optio\n-000f8990: 6e61 6c29 207d 203c 2f73 7061 6e3e 3c2f nal) } .
    ... // the four S\n-000f89e0: 4f41 5020 616e 6420 5853 4420 6e61 6d65 OAP and XSD name\n-000f89f0: 7370 6163 6520 6269 6e64 696e 6773 3c2f space bindings
    . \n-000f8a20: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n-000f8a40: 756f 743b 6126 7175 6f74 3b3c 2f73 7061 uot;a", \n-000f8a70: 2671 756f 743b 6874 7470 3a2f 2f74 656d "http://tem\n-000f8a80: 7075 7269 2e6f 7267 2f61 2e78 7364 2671 puri.org/a.xsd&q\n-000f8a90: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n-000f8aa0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "b&\n-000f8ae0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n-000f8b10: 6874 7470 3a2f 2f74 656d 7075 7269 2e6f http://tempuri.o\n-000f8b20: 7267 2f62 2e78 7364 2671 756f 743b 3c2f rg/b.xsd" },
    .\n-000f8b40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "c"<\n-000f8b80: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/\n-000f8bb0: 2f74 656d 7075 7269 2e6f 7267 2f63 2e78 /tempuri.org/c.x\n-000f8bc0: 7364 2671 756f 743b 3c2f 7370 616e 3e20 sd" \n-000f8bd0: 7d2c 203c 2f64 6976 3e0a 3c64 6976 2063 },
    .
    ..\n-000f8bf0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    .
    { NU\n-000f8c30: 4c4c 2c20 4e55 4c4c 207d 3c2f 6469 763e LL, NULL }
    \n+000f3bf0: 7264 7479 7065 223e 7061 7474 6572 6e3c rdtype\">pattern<\n+000f3c00: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val\n+000f3c20: 7565 3c2f 7370 616e 3e3d 3c73 7061 6e20 ue="[1-5\n+000f3c50: 5d3f 5b30 2d39 5d7c 3630 2671 756f 743b ]?[0-9]|60"\n+000f3c60: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
    </restricti\n+000f3cb0: 6f6e 3c2f 7370 616e 3e26 6774 3b20 3c2f on> .
    </simpleType\n+000f3d00: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    <\n+000f3d30: 6469 7620 636c 6173 733d 2261 6c74 223e div class=\"alt\">\n+000f3d40: 3c2f 6469 763e 3c70 3e20 5468 6520 7061

    The pa\n+000f3d50: 7474 6572 6e20 7374 7269 6e67 206d 7573 ttern string mus\n+000f3d60: 7420 636f 6e74 6169 6e20 6120 7661 6c69 t contain a vali\n+000f3d70: 6420 7265 6775 6c61 7220 6578 7072 6573 d regular expres\n+000f3d80: 7369 6f6e 2e3c 2f70 3e0a 3c70 3e41 2073 sion.

    .

    A s\n+000f3d90: 7065 6369 616c 2063 6173 6520 666f 7220 pecial case for \n+000f3da0: 4320 666f 726d 6174 2073 7472 696e 6720 C format string \n+000f3db0: 7061 7474 6572 6e73 2069 7320 696e 7472 patterns is intr\n+000f3dc0: 6f64 7563 6564 2069 6e20 6753 4f41 5020 oduced in gSOAP \n+000f3dd0: 322e 382e 3138 2e20 5768 656e 203c 656d 2.8.18. When xsd:total\n+000f3df0: 4469 6769 7473 3c2f 636f 6465 3e3c 2f65 Digits and xsd:fractionDig\n+000f3e20: 6974 733c 2f63 6f64 653e 3c2f 656d 3e20 its \n+000f3e30: 6172 6520 6769 7665 6e20 696e 2061 2058 are given in a X\n+000f3e40: 5344 2066 696c 652c 2074 6865 6e20 6120 SD file, then a \n+000f3e50: 4320 666f 726d 6174 2073 7472 696e 6720 C format string \n+000f3e60: 6973 2070 726f 6475 6365 6420 746f 206f is produced to o\n+000f3e70: 7574 7075 7420 666c 6f61 7469 6e67 2070 utput floating p\n+000f3e80: 6f69 6e74 2076 616c 7565 7320 7769 7468 oint values with\n+000f3e90: 2074 6865 2070 726f 7065 7220 7072 6563 the proper prec\n+000f3ea0: 6973 696f 6e20 616e 6420 7363 616c 652e ision and scale.\n+000f3eb0: 2046 6f72 2065 7861 6d70 6c65 3a3c 2f70 For example:.

    <\n+000f3f00: 3c73 7061 6e20 636c 6173 733d 226b 6579 simple\n+000f3f20: 5479 7065 3c2f 7370 616e 3e20 3c73 7061 Type name="\n+000f3f70: 7261 7469 6f26 7175 6f74 3b3c 2f73 7061 ratio">
    .\n+000f3fa0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+000f3fc0: 7265 7374 7269 6374 696f 6e3c 2f73 7061 restriction base="xsd:float\n+000f4020: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n+000f4030: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    &\n+000f4050: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;tot\n+000f4070: 616c 4469 6769 7473 3c2f 7370 616e 3e20 alDigits \n+000f4080: 3c73 7061 6e20 636c 6173 733d 226b 6579 value=&\n+000f40c0: 7175 6f74 3b35 2671 756f 743b 3c2f 7370 quot;5"/>
    .\n+000f40e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <fractionDigi\n+000f4120: 7473 3c2f 7370 616e 3e20 3c73 7061 6e20 ts \n+000f4140: 7661 6c75 653c 2f73 7061 6e3e 3d3c 7370 value="2\n+000f4170: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g\n+000f4180: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    &l\n+000f41a0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/res\n+000f41c0: 7472 6963 7469 6f6e 3c2f 7370 616e 3e26 triction&\n+000f41d0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
    .
    <\n+000f41f0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/simp\n+000f4210: 6c65 5479 7065 3c2f 7370 616e 3e26 6774 leType>\n+000f4220: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    \n+000f4240: 3c2f 6469 763e 3c70 3e70 726f 6475 6365

    produce\n+000f4250: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n+000f4280: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f4290: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef fl\n+000f42c0: 6f61 743c 2f73 7061 6e3e 2074 696d 655f oat time_\n+000f42d0: 5f72 6174 696f 203c 7370 616e 2063 6c61 _ratio "%5.2f&q\n+000f4300: 756f 743b 3c2f 7370 616e 3e3b 3c2f 6469 uot;;.

    The\n+000f4330: 2066 6f72 6d61 7420 7374 7269 6e67 2069 format string i\n+000f4340: 7320 7573 6564 2074 6f20 666f 726d 6174 s used to format\n+000f4350: 2074 6865 206f 7574 7075 7420 7468 6520 the output the \n+000f4360: 666c 6f61 7469 6e67 2070 6f69 6e74 2076 floating point v\n+000f4370: 616c 7565 2069 6e20 584d 4c2e 3c2f 703e alue in XML.

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

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

    .

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

    .Ele\n+000f4460: 6d65 6e74 2061 6e64 2061 7474 7269 6275 ment and attribu\n+000f4470: 7465 2071 7561 6c69 6669 6564 2f75 6e71 te qualified/unq\n+000f4480: 7561 6c69 6669 6564 2066 6f72 6d73 3c2f ualified forms.

    Struct, c\n+000f44a0: 6c61 7373 2c20 616e 6420 756e 696f 6e20 lass, and union \n+000f44b0: 6d65 6d62 6572 7320 7265 7072 6573 656e members represen\n+000f44c0: 7420 656c 656d 656e 7473 2061 6e64 2061 t elements and a\n+000f44d0: 7474 7269 6275 7465 7320 7468 6174 2061 ttributes that a\n+000f44e0: 7265 2061 7574 6f6d 6174 6963 616c 6c79 re automatically\n+000f44f0: 2071 7561 6c69 6669 6564 206f 7220 756e qualified or un\n+000f4500: 7175 616c 6966 6965 6420 6465 7065 6e64 qualified depend\n+000f4510: 696e 6720 6f6e 2074 6865 2073 6368 656d ing on the schem\n+000f4520: 6120 656c 656d 656e 7420 616e 6420 6174 a element and at\n+000f4530: 7472 6962 7574 6520 6465 6661 756c 7420 tribute default \n+000f4540: 666f 726d 7320 7370 6563 6966 6965 642e forms specified.\n+000f4550: 2054 6865 2065 6e67 696e 6520 616c 7761 The engine alwa\n+000f4560: 7973 2076 616c 6964 6174 6573 2074 6865 ys validates the\n+000f4570: 2070 7265 6669 7865 7320 6f66 2065 6c65 prefixes of ele\n+000f4580: 6d65 6e74 7320 616e 6420 6174 7472 6962 ments and attrib\n+000f4590: 7574 6573 2e20 5768 656e 2061 206e 616d utes. When a nam\n+000f45a0: 6573 7061 6365 206d 6973 6d61 7463 6820 espace mismatch \n+000f45b0: 6f63 6375 7273 2c20 7468 6520 656c 656d occurs, the elem\n+000f45c0: 656e 7420 6f72 2061 7474 7269 6275 7465 ent or attribute\n+000f45d0: 2069 7320 6e6f 7420 636f 6e73 756d 6564 is not consumed\n+000f45e0: 2077 6869 6368 2063 616e 206c 6561 6420 which can lead \n+000f45f0: 746f 2061 2076 616c 6964 6174 696f 6e20 to a validation \n+000f4600: 6572 726f 7220 2875 6e6c 6573 7320 7468 error (unless th\n+000f4610: 6520 636f 6d70 6c65 7854 7970 6520 6973 e complexType is\n+000f4620: 2065 7874 656e 7369 626c 6520 6f72 2077 extensible or w\n+000f4630: 6865 6e20 3c63 6f64 653e 2353 4f41 505f hen #SOAP_\n+000f4640: 584d 4c5f 5354 5249 4354 3c2f 636f 6465 XML_STRICT is turned off)\n+000f4660: 2e3c 2f70 3e0a 3c70 3e43 6f6e 7369 6465 .

    .

    Conside\n+000f4670: 7220 666f 7220 6578 616d 706c 653a 3c2f r for example:.

    //gsoap ns sche\n+000f46d0: 6d61 2065 6c65 6d65 6e74 466f 726d 3a20 ma elementForm: \n+000f46e0: 7175 616c 6966 6965 6420 3c2f 7370 616e qualified
    .
    \n+000f4720: 2f2f 6773 6f61 7020 6e73 2073 6368 656d //gsoap ns schem\n+000f4730: 6120 6174 7472 6962 7574 6546 6f72 6d3a a attributeForm:\n+000f4740: 2075 6e71 7561 6c69 6669 6564 203c 2f73 unqualified
    .
    struct ns__record .
    {
    . \n+000f47d0: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha\n+000f47f0: 723c 2f73 7061 6e3e 202a 2074 7970 653b r * type;\n+000f4800: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    char * name; .
    };
    .

    Here, th\n+000f4890: 6520 3c63 6f64 653e 6e73 5f5f 7265 636f e ns__reco\n+000f48a0: 7264 3c2f 636f 6465 3e20 7374 7275 6374 rd struct\n+000f48b0: 2069 7320 7365 7269 616c 697a 6564 2077 is serialized w\n+000f48c0: 6974 6820 7175 616c 6966 6965 6420 656c ith qualified el\n+000f48d0: 656d 656e 7420 3c63 6f64 653e 6e61 6d65 ement name\n+000f48e0: 3c2f 636f 6465 3e20 616e 6420 756e 7175 and unqu\n+000f48f0: 616c 6966 6965 6420 6174 7472 6962 7574 alified attribut\n+000f4900: 6520 3c63 6f64 653e 7479 7065 3c2f 636f e type:

    .
    <ns:record type=\n+000f49c0: 2671 756f 743b 2e2e 2e26 7175 6f74 3b3c "..."<\n+000f49d0: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
    <ns:name>...</ns:name<\n+000f4a50: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
    </ns:record>
    .

    T\n+000f4ad0: 6865 2022 636f 6c6f 6e20 6e6f 7461 7469 he \"colon notati\n+000f4ae0: 6f6e 2220 666f 7220 7374 7275 6374 2f63 on\" for struct/c\n+000f4af0: 6c61 7373 2f75 6e69 6f6e 206d 656d 6265 lass/union membe\n+000f4b00: 7220 6e61 6d65 7320 6973 2075 7365 6420 r names is used \n+000f4b10: 746f 206f 7665 7272 6964 6520 656c 656d to override elem\n+000f4b20: 656e 7420 616e 6420 6174 7472 6962 7574 ent and attribut\n+000f4b30: 6520 7175 616c 6966 6965 6420 6f72 2075 e qualified or u\n+000f4b40: 6e71 7561 6c69 6669 6564 2066 6f72 6d73 nqualified forms\n+000f4b50: 2e20 546f 206f 7665 7272 6964 6520 7468 . To override th\n+000f4b60: 6520 666f 726d 2066 6f72 2069 6e64 6976 e form for indiv\n+000f4b70: 6964 7561 6c20 6d65 6d62 6572 7320 7468 idual members th\n+000f4b80: 6174 2072 6570 7265 7365 6e74 2065 6c65 at represent ele\n+000f4b90: 6d65 6e74 7320 616e 6420 6174 7472 6962 ments and attrib\n+000f4ba0: 7574 6573 2c20 7573 6520 6120 6e61 6d65 utes, use a name\n+000f4bb0: 7370 6163 6520 7072 6566 6978 2061 6e64 space prefix and\n+000f4bc0: 2063 6f6c 6f6e 2077 6974 6820 7468 6520 colon with the \n+000f4bd0: 6d65 6d62 6572 206e 616d 653a 3c2f 703e member name:

    \n+000f4be0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    /\n+000f4c20: 2f67 736f 6170 206e 7320 7363 6865 6d61 /gsoap ns schema\n+000f4c30: 2065 6c65 6d65 6e74 466f 726d 3a20 7175 elementForm: qu\n+000f4c40: 616c 6966 6965 6420 3c2f 7370 616e 3e3c alified <\n+000f4c50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+000f4c80: 6773 6f61 7020 6e73 2073 6368 656d 6120 gsoap ns schema \n+000f4c90: 6174 7472 6962 7574 6546 6f72 6d3a 2075 attributeForm: u\n+000f4ca0: 6e71 7561 6c69 6669 6564 203c 2f73 7061 nqualified
    .
    struct n\n+000f4cf0: 735f 5f72 6563 6f72 6420 3c2f 6469 763e s__record
    \n+000f4d00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    @\n+000f4d30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+000f4d50: 2f73 7061 6e3e 202a 206e 733a 7479 7065 /span> * ns:type\n+000f4d60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+000f4d80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f4d90: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char * :name; .
    };
    .\n+000f4dd0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    where \n+000f4df0: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name is unqualified\n+000f4e10: 2061 6e64 203c 636f 6465 3e74 7970 653c and type<\n+000f4e20: 2f63 6f64 653e 2069 7320 7175 616c 6966 /code> is qualif\n+000f4e30: 6965 643a 3c2f 703e 0a3c 6469 7620 636c ied:

    .
    <ns:record ns:type<\n+000f4ec0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="...&quo\n+000f4ef0: 743b 3c2f 7370 616e 3e26 6774 3b20 3c2f t;> .
    <name>...</name>
    .<\n+000f4f80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f4f90: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n+000f4fb0: 6e73 3a72 6563 6f72 643c 2f73 7061 6e3e ns:record\n+000f4fc0: 2667 743b 3c2f 6469 763e 0a3c 2f64 6976 >
    .

    resu\n+000f5210: 6c74 7320 696e 2061 2072 6564 6566 696e lts in a redefin\n+000f5220: 6974 696f 6e20 6572 726f 722c 2073 696e ition error, sin\n+000f5230: 6365 2062 6f74 6820 6d65 6d62 6572 7320 ce both members \n+000f5240: 6861 7665 2074 6865 2073 616d 6520 6e61 have the same na\n+000f5250: 6d65 2e20 546f 2061 766f 6964 206e 616d me. To avoid nam\n+000f5260: 6520 636c 6173 6865 732c 2075 7365 2061 e clashes, use a\n+000f5270: 2075 6e64 6572 7363 6f72 6520 7375 6666 underscore suff\n+000f5280: 6978 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ix:

    .
    \n+000f52b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct x__record .
    {
    .<\n+000f5300: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f5310: 3e20 2040 203c 7370 616e 2063 6c61 7373 > @ c\n+000f5330: 6861 723c 2f73 7061 6e3e 202a 206e 616d har * nam\n+000f5340: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    \n+000f5360: 3c73 7061 6e20 636c 6173 733d 226b 6579 char * x:name_;\n+000f5390: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    };.

    Not\n+000f53d0: 2074 6861 7420 7468 6520 6e61 6d65 7370 that the namesp\n+000f53e0: 6163 6520 7072 6566 6978 2063 6f6e 7665 ace prefix conve\n+000f53f0: 6e74 696f 6e20 6361 6e20 6265 2075 7365 ntion can be use\n+000f5400: 6420 696e 7374 6561 643a 3c2f 703e 0a3c d instead:

    .<\n+000f5410: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000f5420: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+000f5450: 7563 7420 3c2f 7370 616e 3e78 5f5f 7265 uct x__re\n+000f5460: 636f 7264 203c 2f64 6976 3e0a 3c64 6976 cord
    .{<\n+000f5480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    @ char * name;
    \n+000f54d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    char * x\n+000f5510: 5f5f 6e61 6d65 3b20 3c2f 6469 763e 0a3c __name;
    .<\n+000f5520: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f5530: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    \n+000f5540: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    which g\n+000f5990: 656e 6572 6174 6573 2074 6865 2066 6f6c enerates the fol\n+000f59a0: 6c6f 7769 6e67 203c 656d 3e3c 636f 6465 lowing x.xsdschema:

    . \n+000f59e0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    <complexTyp\n+000f5a30: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e n\n+000f5a50: 616d 653c 2f73 7061 6e3e 3d3c 7370 616e ame="rec\n+000f5a80: 6f72 6426 7175 6f74 3b3c 2f73 7061 6e3e ord"\n+000f5a90: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    . \n+000f5ab0: 266c 743b 3c73 7061 6e20 636c 6173 733d <se\n+000f5ad0: 7175 656e 6365 3c2f 7370 616e 3e26 6774 quence>\n+000f5ae0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    &\n+000f5b00: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ele\n+000f5b20: 6d65 6e74 3c2f 7370 616e 3e20 3c73 7061 ment name="\n+000f5b70: 6e61 6d65 2671 756f 743b 3c2f 7370 616e name" type=\n+000f5bc0: 2671 756f 743b 7873 643a 7374 7269 6e67 "xsd:string\n+000f5bd0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " minOccurs="0" maxO\n+000f5c50: 6363 7572 733c 2f73 7061 6e3e 3d3c 7370 ccurs="1\n+000f5c80: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " nillable=\n+000f5cd0: 2671 756f 743b 7472 7565 2671 756f 743b "true"\n+000f5ce0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fo\n+000f5d00: 726d 3c2f 7370 616e 3e3d 3c73 7061 6e20 rm="unqu\n+000f5d30: 616c 6966 6965 6426 7175 6f74 3b3c 2f73 alified"/>
    \n+000f5d50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <element name="phone&qu\n+000f5de0: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; type="x\n+000f5e30: 7364 3a73 7472 696e 6726 7175 6f74 3b3c sd:string"<\n+000f5e40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> min\n+000f5e60: 4f63 6375 7273 3c2f 7370 616e 3e3d 3c73 Occurs="\n+000f5e90: 3026 7175 6f74 3b3c 2f73 7061 6e3e 203c 0" <\n+000f5ea0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f5eb0: 6f72 6422 3e6d 6178 4f63 6375 7273 3c2f ord\">maxOccurs="1"<\n+000f5ef0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> nil\n+000f5f10: 6c61 626c 653c 2f73 7061 6e3e 3d3c 7370 lable="t\n+000f5f40: 7275 6526 7175 6f74 3b3c 2f73 7061 6e3e rue"\n+000f5f50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 form=&\n+000f5f90: 7175 6f74 3b71 7561 6c69 6669 6564 2671 quot;qualified&q\n+000f5fa0: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/>\n+000f5fb0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    &l\n+000f5fd0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;elem\n+000f5ff0: 656e 743c 2f73 7061 6e3e 203c 7370 616e ent ref="x:\n+000f6040: 6661 7826 7175 6f74 3b3c 2f73 7061 6e3e fax"\n+000f6050: 203c 7370 616e 2063 6c61 7373 3d22 6b65 minOccurs\n+000f6070: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="0"\n+000f60a0: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; m\n+000f60c0: 6178 4f63 6375 7273 3c2f 7370 616e 3e3d axOccurs=\n+000f60d0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f60f0: 743b 3126 7175 6f74 3b3c 2f73 7061 6e3e t;1"\n+000f6100: 2f26 6774 3b20 3c2f 6469 763e 0a3c 6469 />
    . \n+000f6120: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <element \n+000f6150: 3c73 7061 6e20 636c 6173 733d 226b 6579 ref\n+000f6170: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000f6190: 6f74 3b79 3a7a 6970 2671 756f 743b 3c2f ot;y:zip" minO\n+000f61c0: 6363 7572 733c 2f73 7061 6e3e 3d3c 7370 ccurs="0\n+000f61f0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " maxOccurs="1"/> .
    </sequence>
    .\n+000f62b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </complexType>
    .<\n+000f6300: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f6310: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><e\n+000f6330: 6c65 6d65 6e74 3c2f 7370 616e 3e20 3c73 lement name
    =\n+000f6360: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f6380: 743b 6661 7826 7175 6f74 3b3c 2f73 7061 t;fax" type="xsd:strin\n+000f63e0: 6726 7175 6f74 3b3c 2f73 7061 6e3e 2f26 g"/&\n+000f63f0: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
    .
    \n+000f6400: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    \n+000f65a0: 5365 6520 616c 736f 203c 6120 6872 6566 See also C and C++ X\n+000f65e0: 4d4c 2064 6174 6120 6269 6e64 696e 6773 ML data bindings\n+000f65f0: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n+000f6600: 6f6e 2066 6f72 206d 6f72 6520 6465 7461 on for more deta\n+000f6610: 696c 732e 3c2f 703e 0a3c 703e f09f 949d ils.

    .

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

    .<\n+000f6650: 6831 3e3c 6120 636c 6173 733d 2261 6e63 h1>.XML names\n+000f6680: 7061 6365 7320 616e 6420 7468 6520 6e61 paces and the na\n+000f6690: 6d65 7370 6163 6520 6d61 7070 696e 6720 mespace mapping \n+000f66a0: 7461 626c 653c 2f68 313e 0a3c 703e 4120 table

    .

    A \n+000f66b0: 6e61 6d65 7370 6163 6520 6d61 7070 696e namespace mappin\n+000f66c0: 6720 7461 626c 6520 7368 6f75 6c64 2062 g table should b\n+000f66d0: 6520 696e 636c 7564 6564 2069 6e20 7468 e included in th\n+000f66e0: 6520 736f 7572 6365 2063 6f64 6520 6f66 e source code of\n+000f66f0: 2063 6c69 656e 7420 616e 6420 7365 7276 client and serv\n+000f6700: 6963 6520 6170 706c 6963 6174 696f 6e73 ice applications\n+000f6710: 2e20 5468 6520 6d61 7070 696e 6720 7461 . The mapping ta\n+000f6720: 626c 6520 6973 2075 7365 6420 6279 2074 ble is used by t\n+000f6730: 6865 2073 6572 6961 6c69 7a65 7273 2061 he serializers a\n+000f6740: 6e64 2064 6573 6572 6961 6c69 7a65 7273 nd deserializers\n+000f6750: 206f 6620 7468 6520 7374 7562 2061 6e64 of the stub and\n+000f6760: 2073 6b65 6c65 746f 6e20 6675 6e63 7469 skeleton functi\n+000f6770: 6f6e 7320 746f 2070 726f 6475 6365 2076 ons to produce v\n+000f6780: 616c 6964 2058 4d4c 206d 6573 7361 6765 alid XML message\n+000f6790: 7320 616e 6420 746f 2070 6172 7365 2061 s and to parse a\n+000f67a0: 6e64 2076 616c 6964 6174 6520 584d 4c20 nd validate XML \n+000f67b0: 6d65 7373 6167 6573 2e20 4120 7479 7069 messages. A typi\n+000f67c0: 6361 6c20 6d61 7070 696e 6720 7461 626c cal mapping tabl\n+000f67d0: 6520 6973 2073 686f 776e 2062 656c 6f77 e is shown below\n+000f67e0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    ..\n+000f68f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    // { "pre\n+000f6930: 6669 7826 7175 6f74 3b2c 2026 7175 6f74 fix", "\n+000f6940: 3b55 5249 2671 756f 743b 2c20 2671 756f ;URI", &quo\n+000f6950: 743b 5552 492d 7061 7474 6572 6e26 7175 t;URI-pattern&qu\n+000f6960: 6f74 3b20 286f 7074 696f 6e61 6c29 207d ot; (optional) }\n+000f6970: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+000f6980: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f6990: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "SOAP-ENV&\n+000f69c0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+000f69f0: 6874 7470 3a2f 2f73 6368 656d 6173 2e78 http://schemas.x\n+000f6a00: 6d6c 736f 6170 2e6f 7267 2f73 6f61 702f mlsoap.org/soap/\n+000f6a10: 656e 7665 6c6f 7065 2f26 7175 6f74 3b3c envelope/"<\n+000f6a20: 2f73 7061 6e3e 207d 2c20 3c73 7061 6e20 /span> }, \n+000f6a40: 2f2f 206d 7573 7420 6265 2066 6972 7374 // must be first\n+000f6a50: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+000f6a60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f6a70: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "SOAP-ENC&\n+000f6aa0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+000f6ad0: 6874 7470 3a2f 2f73 6368 656d 6173 2e78 http://schemas.x\n+000f6ae0: 6d6c 736f 6170 2e6f 7267 2f73 6f61 702f mlsoap.org/soap/\n+000f6af0: 656e 636f 6469 6e67 2f26 7175 6f74 3b3c encoding/"<\n+000f6b00: 2f73 7061 6e3e 207d 2c20 3c73 7061 6e20 /span> }, \n+000f6b20: 2f2f 206d 7573 7420 6265 2073 6563 6f6e // must be secon\n+000f6b30: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n+000f6b40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "xsi"\n+000f6b80: 3b3c 2f73 7061 6e3e 2c20 2020 2020 203c ;, <\n+000f6b90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f6ba0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f6bb0: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f ;http://www.w3.o\n+000f6bc0: 7267 2f32 3030 312f 584d 4c53 6368 656d rg/2001/XMLSchem\n+000f6bd0: 612d 696e 7374 616e 6365 2671 756f 743b a-instance"\n+000f6be0: 3c2f 7370 616e 3e20 7d2c 203c 7370 616e }, // must be thir\n+000f6c10: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n+000f6c20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "xsd"\n+000f6c60: 3b3c 2f73 7061 6e3e 2c20 2020 2020 203c ;, <\n+000f6c70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f6c80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f6c90: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f ;http://www.w3.o\n+000f6ca0: 7267 2f32 3030 312f 584d 4c53 6368 656d rg/2001/XMLSchem\n+000f6cb0: 6126 7175 6f74 3b3c 2f73 7061 6e3e 207d a" }\n+000f6cc0: 2c20 2020 2020 2020 2020 203c 7370 616e , // must be four\n+000f6cf0: 7468 3c2f 7370 616e 3e3c 2f64 6976 3e0a th
    .\n+000f6d00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "ns"\n+000f6d40: 3c2f 7370 616e 3e2c 2020 2020 2020 203c , <\n+000f6d50: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f6d60: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f6d70: 3b75 726e 3a6d 792d 7365 7276 6963 652d ;urn:my-service-\n+000f6d80: 5552 4926 7175 6f74 3b3c 2f73 7061 6e3e URI"\n+000f6d90: 207d 2c20 3c73 7061 6e20 636c 6173 733d }, // bin\n+000f6db0: 6473 2026 7175 6f74 3b6e 7326 7175 6f74 ds "ns"\n+000f6dc0: 3b20 6e61 6d65 7370 6163 6520 7072 6566 ; namespace pref\n+000f6dd0: 6978 2074 6f20 7363 6865 6d61 2055 5249 ix to schema URI\n+000f6de0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+000f6e00: 2020 7b20 4e55 4c4c 2c20 4e55 4c4c 207d { NULL, NULL }\n+000f6e10: 203c 7370 616e 2063 6c61 7373 3d22 636f // end of\n+000f6e30: 2074 6162 6c65 203c 2f73 7061 6e3e 3c2f table .
    };
    \n+000f6e60: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Each \n+000f6e80: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+000f6e90: 2075 7365 6420 6279 2061 2069 6465 6e74 used by a ident\n+000f6ea0: 6966 6965 7220 6e61 6d65 2069 6e20 7468 ifier name in th\n+000f6eb0: 6520 6865 6164 6572 2066 696c 6520 7370 e header file sp\n+000f6ec0: 6563 6966 6963 6174 696f 6e2c 2073 6565 ecification, see\n+000f6ed0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section C/C++ identifie\n+000f6f10: 7220 6e61 6d65 2074 6f20 584d 4c20 7461 r name to XML ta\n+000f6f20: 6720 6e61 6d65 2074 7261 6e73 6c61 7469 g name translati\n+000f6f30: 6f6e 3c2f 613e 2c20 6d75 7374 2068 6176 on, must hav\n+000f6f40: 6520 6120 6269 6e64 696e 6720 746f 2061 e a binding to a\n+000f6f50: 206e 616d 6573 7061 6365 2055 5249 2069 namespace URI i\n+000f6f60: 6e20 7468 6520 6d61 7070 696e 6720 7461 n the mapping ta\n+000f6f70: 626c 652e 2054 6865 2065 6e64 206f 6620 ble. The end of \n+000f6f80: 7468 6520 6e61 6d65 7370 6163 6520 6d61 the namespace ma\n+000f6f90: 7070 696e 6720 7461 626c 6520 6d75 7374 pping table must\n+000f6fa0: 2062 6520 696e 6469 6361 7465 6420 6279 be indicated by\n+000f6fb0: 2074 6865 204e 554c 4c20 7061 6972 2e20 the NULL pair. \n+000f6fc0: 5468 6520 6e61 6d65 7370 6163 6520 5552 The namespace UR\n+000f6fd0: 4920 6d61 7463 6869 6e67 2069 7320 6361 I matching is ca\n+000f6fe0: 7365 2069 6e73 656e 7369 7469 7665 2e20 se insensitive. \n+000f6ff0: 4120 6e61 6d65 7370 6163 6520 7072 6566 A namespace pref\n+000f7000: 6978 2069 7320 6469 7374 696e 6775 6973 ix is distinguis\n+000f7010: 6865 6420 6279 2074 6865 206f 6363 7572 hed by the occur\n+000f7020: 7265 6e63 6520 6f66 2061 2070 6169 7220 rence of a pair \n+000f7030: 6f66 2075 6e64 6572 7363 6f72 6573 2028 of underscores (\n+000f7040: 3c63 6f64 653e 5f5f 3c2f 636f 6465 3e29 __)\n+000f7050: 2069 6e20 616e 2069 6465 6e74 6966 6965 in an identifie\n+000f7060: 7220 6f72 2062 7920 7573 696e 6720 636f r or by using co\n+000f7070: 6c6f 6e20 6e6f 7461 7469 6f6e 2c20 7365 lon notation, se\n+000f7080: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section C/C++ identifi\n+000f70c0: 6572 206e 616d 6520 746f 2058 4d4c 2074 er name to XML t\n+000f70d0: 6167 206e 616d 6520 7472 616e 736c 6174 ag name translat\n+000f70e0: 696f 6e3c 2f61 3e2e 3c2f 703e 0a3c 703e ion.

    .

    \n+000f70f0: 416e 206f 7074 696f 6e61 6c20 7468 6972 An optional thir\n+000f7100: 6420 636f 6c75 6d6e 2069 6e20 7468 6520 d column in the \n+000f7110: 6e61 6d65 7370 6163 6520 6d61 7070 696e namespace mappin\n+000f7120: 6720 7461 626c 6520 6d61 7920 6265 2073 g table may be s\n+000f7130: 7065 6369 6669 6564 2074 6861 7420 636f pecified that co\n+000f7140: 6e74 6169 6e73 2061 206e 616d 6573 7061 ntains a namespa\n+000f7150: 6365 2055 5249 2070 6174 7465 726e 2e20 ce URI pattern. \n+000f7160: 5468 6520 7061 7474 6572 6e73 2070 726f The patterns pro\n+000f7170: 7669 6465 2061 6e20 616c 7465 726e 6174 vide an alternat\n+000f7180: 6976 6520 6e61 6d65 7370 6163 6520 666f ive namespace fo\n+000f7190: 7220 7468 6520 7661 6c69 6461 7469 6f6e r the validation\n+000f71a0: 206f 6620 7061 7273 6564 2058 4d4c 206d of parsed XML m\n+000f71b0: 6573 7361 6765 732e 2049 6e20 7468 6973 essages. In this\n+000f71c0: 2070 6174 7465 726e 2c20 6461 7368 6573 pattern, dashes\n+000f71d0: 2028 3c63 6f64 653e 2d3c 2f63 6f64 653e (-\n+000f71e0: 2920 6172 6520 7369 6e67 6c65 2d63 6861 ) are single-cha\n+000f71f0: 7261 6374 6572 2077 696c 6463 6172 6473 racter wildcards\n+000f7200: 2061 6e64 2061 7374 6572 6973 6b73 2028 and asterisks (\n+000f7210: 3c63 6f64 653e 2a3c 2f63 6f64 653e 2920 *) \n+000f7220: 6172 6520 6d75 6c74 692d 6368 6172 6163 are multi-charac\n+000f7230: 7465 7220 7769 6c64 6361 7264 732e 2046 ter wildcards. F\n+000f7240: 6f72 2065 7861 6d70 6c65 2c20 746f 2061 or example, to a\n+000f7250: 6363 6570 7420 616c 7465 726e 6174 6976 ccept alternativ\n+000f7260: 6520 7665 7273 696f 6e73 206f 6620 584d e versions of XM\n+000f7270: 4c20 7363 6865 6d61 7320 7769 7468 2064 L schemas with d\n+000f7280: 6966 6665 7265 6e74 2061 7574 686f 7269 ifferent authori\n+000f7290: 6e67 2064 6174 6573 2c20 666f 7572 2064 ng dates, four d\n+000f72a0: 6173 6865 7320 6361 6e20 6265 2075 7365 ashes can be use\n+000f72b0: 6420 696e 2070 6c61 6365 206f 6620 7468 d in place of th\n+000f72c0: 6520 7370 6563 6966 6963 2064 6174 6573 e specific dates\n+000f72d0: 2069 6e20 7468 6520 6e61 6d65 7370 6163 in the namespac\n+000f72e0: 6520 6d61 7070 696e 6720 7461 626c 6520 e mapping table \n+000f72f0: 7061 7474 6572 6e3a 3c2f 703e 0a3c 6469 pattern:

    .
    struc\n+000f7340: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t Namespace<\n+000f7380: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> names\n+000f73e0: 7061 6365 733c 2f61 3e5b 5d20 3d20 3c2f paces[] = .
    {
    .<\n+000f7410: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f7420: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // { &q\n+000f7440: 756f 743b 7072 6566 6978 2671 756f 743b uot;prefix"\n+000f7450: 2c20 2671 756f 743b 5552 4926 7175 6f74 , "URI"\n+000f7460: 3b2c 2026 7175 6f74 3b55 5249 2d70 6174 ;, "URI-pat\n+000f7470: 7465 726e 2671 756f 743b 2028 6f70 7469 tern" (opti\n+000f7480: 6f6e 616c 2920 7d20 3c2f 7370 616e 3e3c onal) } <\n+000f7490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "SO\n+000f74d0: 4150 2d45 4e56 2671 756f 743b 3c2f 7370 AP-ENV", "http://sc\n+000f7510: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or\n+000f7520: 672f 736f 6170 2f65 6e76 656c 6f70 652f g/soap/envelope/\n+000f7530: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n+000f7540: 203c 7370 616e 2063 6c61 7373 3d22 636f // must b\n+000f7560: 6520 6669 7273 7420 3c2f 7370 616e 3e3c e first <\n+000f7570: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "SO\n+000f75b0: 4150 2d45 4e43 2671 756f 743b 3c2f 7370 AP-ENC", "http://sc\n+000f75f0: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or\n+000f7600: 672f 736f 6170 2f65 6e63 6f64 696e 672f g/soap/encoding/\n+000f7610: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n+000f7620: 203c 7370 616e 2063 6c61 7373 3d22 636f // must b\n+000f7640: 6520 7365 636f 6e64 203c 2f73 7061 6e3e e second \n+000f7650: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "x\n+000f7690: 7369 2671 756f 743b 3c2f 7370 616e 3e2c si",\n+000f76a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w\n+000f76d0: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X\n+000f76e0: 4d4c 5363 6865 6d61 2d69 6e73 7461 6e63 MLSchema-instanc\n+000f76f0: 6526 7175 6f74 3b3c 2f73 7061 6e3e 2c20 e", \n+000f7700: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f7720: 743b 6874 7470 3a2f 2f77 7777 2e77 332e t;http://www.w3.\n+000f7730: 6f72 672f 2d2d 2d2d 2f58 4d4c 5363 6865 org/----/XMLSche\n+000f7740: 6d61 2d69 6e73 7461 6e63 6526 7175 6f74 ma-instance"\n+000f7750: 3b3c 2f73 7061 6e3e 207d 2c20 3c2f 6469 ; }, .
    { "xsd&q\n+000f77a0: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n+000f77b0: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q\n+000f77d0: 756f 743b 6874 7470 3a2f 2f77 7777 2e77 uot;http://www.w\n+000f77e0: 332e 6f72 672f 3230 3031 2f58 4d4c 5363 3.org/2001/XMLSc\n+000f77f0: 6865 6d61 2671 756f 743b 3c2f 7370 616e hema", &\n+000f7820: 7175 6f74 3b68 7474 703a 2f2f 7777 772e quot;http://www.\n+000f7830: 7733 2e6f 7267 2f2d 2d2d 2d2f 584d 4c53 w3.org/----/XMLS\n+000f7840: 6368 656d 6126 7175 6f74 3b3c 2f73 7061 chema" },
    . \n+000f7870: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... //
    .
    {\n+000f78b0: 204e 554c 4c2c 204e 554c 4c20 7d20 3c73 NULL, NULL } // end of ta\n+000f78e0: 626c 6520 3c2f 7370 616e 3e3c 2f64 6976 ble .
    };
    .

    Or altern\n+000f7930: 6174 6976 656c 792c 2061 7374 6572 6973 atively, asteris\n+000f7940: 6b73 2063 616e 2062 6520 7573 6564 2061 ks can be used a\n+000f7950: 7320 7769 6c64 6361 7264 7320 666f 7220 s wildcards for \n+000f7960: 6d75 6c74 6970 6c65 2063 6861 7261 6374 multiple charact\n+000f7970: 6572 733a 3c2f 703e 0a3c 6469 7620 636c ers:

    .
    <\n+000f7990: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f79a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct Namespace \n+000f7a00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 namespace\n+000f7a60: 733c 2f61 3e5b 5d20 3d20 3c2f 6469 763e s[] =
    \n+000f7a70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+000f7aa0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f7ab0: 656e 7422 3e2f 2f20 7b20 2671 756f 743b ent\">// { "\n+000f7ac0: 7072 6566 6978 2671 756f 743b 2c20 2671 prefix", &q\n+000f7ad0: 756f 743b 5552 4926 7175 6f74 3b2c 2026 uot;URI", &\n+000f7ae0: 7175 6f74 3b55 5249 2d70 6174 7465 726e quot;URI-pattern\n+000f7af0: 2671 756f 743b 2028 6f70 7469 6f6e 616c " (optional\n+000f7b00: 2920 7d20 3c2f 7370 616e 3e3c 2f64 6976 ) } .
    { "SOAP-E\n+000f7b50: 4e56 2671 756f 743b 3c2f 7370 616e 3e2c NV",\n+000f7b60: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+000f7b80: 6f74 3b68 7474 703a 2f2f 7363 6865 6d61 ot;http://schema\n+000f7b90: 732e 786d 6c73 6f61 702e 6f72 672f 736f s.xmlsoap.org/so\n+000f7ba0: 6170 2f65 6e76 656c 6f70 652f 2671 756f ap/envelope/&quo\n+000f7bb0: 743b 3c2f 7370 616e 3e20 7d2c 203c 7370 t; }, // must be fi\n+000f7be0: 7273 7420 3c2f 7370 616e 3e3c 2f64 6976 rst .
    { "SOAP-E\n+000f7c30: 4e43 2671 756f 743b 3c2f 7370 616e 3e2c NC",\n+000f7c40: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+000f7c60: 6f74 3b68 7474 703a 2f2f 7363 6865 6d61 ot;http://schema\n+000f7c70: 732e 786d 6c73 6f61 702e 6f72 672f 736f s.xmlsoap.org/so\n+000f7c80: 6170 2f65 6e63 6f64 696e 672f 2671 756f ap/encoding/&quo\n+000f7c90: 743b 3c2f 7370 616e 3e20 7d2c 203c 7370 t; }, // must be se\n+000f7cc0: 636f 6e64 203c 2f73 7061 6e3e 3c2f 6469 cond .
    { "xsi&q\n+000f7d10: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n+000f7d20: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q\n+000f7d40: 756f 743b 6874 7470 3a2f 2f77 7777 2e77 uot;http://www.w\n+000f7d50: 332e 6f72 672f 3230 3031 2f58 4d4c 5363 3.org/2001/XMLSc\n+000f7d60: 6865 6d61 2d69 6e73 7461 6e63 6526 7175 hema-instance&qu\n+000f7d70: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "ht\n+000f7da0: 7470 3a2f 2f77 7777 2e77 332e 6f72 672f tp://www.w3.org/\n+000f7db0: 2a2f 584d 4c53 6368 656d 612d 696e 7374 */XMLSchema-inst\n+000f7dc0: 616e 6365 2671 756f 743b 3c2f 7370 616e ance" },
    . \n+000f7df0: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n+000f7e10: 756f 743b 7873 6426 7175 6f74 3b3c 2f73 uot;xsd", "htt\n+000f7e50: 703a 2f2f 7777 772e 7733 2e6f 7267 2f32 p://www.w3.org/2\n+000f7e60: 3030 312f 584d 4c53 6368 656d 6126 7175 001/XMLSchema&qu\n+000f7e70: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n+000f7e80: 2020 2020 203c 7370 616e 2063 6c61 7373 "http://ww\n+000f7eb0: 772e 7733 2e6f 7267 2f2a 2f58 4d4c 5363 w.w3.org/*/XMLSc\n+000f7ec0: 6865 6d61 2671 756f 743b 3c2f 7370 616e hema" },
    . \n+000f7ef0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    { \n+000f7f30: 4e55 4c4c 2c20 4e55 4c4c 7d20 3c73 7061 NULL, NULL} // end of tabl\n+000f7f60: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
    .\n+000f7f70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

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

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

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

    \n-000f91c0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n-000f9200: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct Namesp\n-000f9240: 6163 653c 2f61 3e20 6e61 6d65 7370 6163 ace namespac\n-000f9250: 6573 5461 626c 6531 5b5d 203d 207b 202e esTable1[] = { .\n-000f9260: 2e2e 207d 3b20 3c2f 6469 763e 0a3c 6469 .. };
    .<\n-000f9280: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f9290: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct \n-000f92d0: 4e61 6d65 7370 6163 653c 2f61 3e20 6e61 Namespace na\n-000f92e0: 6d65 7370 6163 6573 5461 626c 6532 5b5d mespacesTable2[]\n-000f92f0: 203d 207b 202e 2e2e 207d 3b20 3c2f 6469 = { ... }; ...
    ... <\n-000f9490: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f94a0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    str\n-000f94e0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n-000f95b0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_set_name\n-000f9630: 7370 6163 6573 3c2f 613e 283c 6120 636c spaces(soap, name\n-000f9670: 7370 6163 6554 6162 6c65 3129 3b20 3c73 spaceTable1); // use the f\n-000f96a0: 6972 7374 206e 616d 6573 7061 6365 2074 irst namespace t\n-000f96b0: 6162 6c65 3c2f 7370 616e 3e3c 2f64 6976 able.
    if\n-000f96f0: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n-000f9700: 6c6c 5f72 656d 6f74 655f 6d65 7468 6f64 ll_remote_method\n-000f9710: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-000f9740: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , endpo\n-000f9790: 696e 743c 2f61 3e2c 2041 6374 696f 6e2c int, Action,\n-000f97a0: 202e 2e2e 2929 3c2f 6469 763e 0a3c 6469 ...))
    . \n-000f97c0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n-000f97e0: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
    \n-000f97f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

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

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

    .

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

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

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

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

    .

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

    .

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

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

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

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

    &l\n-000fa700: 743b 3c73 7061 6e20 636c 6173 733d 226b t;bind\n-000fa720: 696e 673c 2f73 7061 6e3e 203c 7370 616e ing name="S\n-000fa770: 6572 7669 6365 2671 756f 743b 3c2f 7370 ervice" type="tns:Serv\n-000fa7d0: 6963 6550 6f72 7454 7970 6526 7175 6f74 icePortType"\n-000fa7e0: 3b3c 2f73 7061 6e3e 2667 743b 3c2f 6469 ;>.
    <SOAP:bindin\n-000fa830: 673c 2f73 7061 6e3e 203c 7370 616e 2063 g s\n-000fa850: 7479 6c65 3c2f 7370 616e 3e3d 3c73 7061 tyle="do\n-000fa880: 6375 6d65 6e74 2671 756f 743b 3c2f 7370 cument" transp\n-000fa8b0: 6f72 743c 2f73 7061 6e3e 3d3c 7370 616e ort="htt\n-000fa8e0: 703a 2f2f 7363 6865 6d61 732e 786d 6c73 p://schemas.xmls\n-000fa8f0: 6f61 702e 6f72 672f 736f 6170 2f68 7474 oap.org/soap/htt\n-000fa900: 7026 7175 6f74 3b3c 2f73 7061 6e3e 2f26 p"/&\n-000fa910: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    &l\n-000fa930: 743b 3c73 7061 6e20 636c 6173 733d 226b t;oper\n-000fa950: 6174 696f 6e3c 2f73 7061 6e3e 203c 7370 ation name=<\n-000fa980: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000fa990: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000fa9a0: 3b77 6562 6d65 7468 6f64 2671 756f 743b ;webmethod"\n-000fa9b0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    <SOAP:opera\n-000faa00: 7469 6f6e 3c2f 7370 616e 3e20 3c73 7061 tion soapAction=\n-000faa50: 2671 756f 743b 2671 756f 743b 3c2f 7370 ""/>
    .<\n-000faa70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000faa80: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <input&\n-000faab0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n-000faad0: 2020 2020 2020 266c 743b 3c73 7061 6e20 <SOAP:body use="literal&\n-000fab50: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; parts=\n-000fab80: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000faba0: 743b 426f 6479 2671 756f 743b 3c2f 7370 t;Body"/>
    .<\n-000fabc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fabd0: 3e20 2020 2020 2020 2020 2026 6c74 3b3c > <<\n-000fabe0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000fabf0: 6f72 6474 7970 6522 3e53 4f41 503a 6865 ordtype\">SOAP:he\n-000fac00: 6164 6572 3c2f 7370 616e 3e20 3c73 7061 ader
    use="l\n-000fac50: 6974 6572 616c 2671 756f 743b 3c2f 7370 iteral" messag\n-000fac80: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="tns:S\n-000facb0: 6572 7669 6365 4865 6164 6572 2671 756f erviceHeader&quo\n-000facc0: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n-000face0: 7061 7274 3c2f 7370 616e 3e3d 3c73 7061 part="tr\n-000fad10: 616e 7361 6374 696f 6e26 7175 6f74 3b3c ansaction"<\n-000fad20: 2f73 7061 6e3e 2f26 6774 3b3c 2f64 6976 /span>/>.
    </input>
    .\n-000fad90: 2020 2020 266c 743b 3c73 7061 6e20 636c <output&\n-000fadc0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n-000fade0: 2020 2020 2020 266c 743b 3c73 7061 6e20 <SOAP:body use="literal&\n-000fae60: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; parts=\n-000fae90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000faeb0: 743b 426f 6479 2671 756f 743b 3c2f 7370 t;Body"/>
    .<\n-000faed0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000faee0: 3e20 2020 2026 6c74 3b2f 3c73 7061 6e20 > </output>
    . \n-000faf30: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </o\n-000faf50: 7065 7261 7469 6f6e 3c2f 7370 616e 3e26 peration&\n-000faf60: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    <\n-000faf80: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /bindi\n-000fafa0: 6e67 3c2f 7370 616e 3e26 6774 3b3c 2f64 ng>.

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

    .

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .

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

    .

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

    ..
    {.
    _Q\n-000fd740: 4e61 6d65 3c2f 613e 203c 6120 636c 6173 Name faultcod\n-000fd7b0: 653c 2f61 3e3b 203c 7370 616e 2063 6c61 e; // \n-000fd7d0: 5f51 4e61 6d65 2069 7320 6275 696c 742d _QName is built-\n-000fd7e0: 696e 203c 2f73 7061 6e3e 3c2f 6469 763e in
    \n-000fd7f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    char *fau\n-000fd890: 6c74 7374 7269 6e67 3c2f 613e 3b20 3c2f ltstring; .
    char\n-000fd8e0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *faultactor;\n-000fd950: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ...
    \n-000fdbc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *SOAP_ENV__\n-000fdc50: 5265 6173 6f6e 3c2f 613e 3b20 3c2f 6469 Reason; .
    char *\n-000fdca0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 S\n-000fdd00: 4f41 505f 454e 565f 5f4e 6f64 653c 2f61 OAP_ENV__Node;
    .\n-000fddd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    str\n-000fde00: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct SOAP_EN\n-000fde50: 565f 5f44 6574 6169 6c3c 2f61 3e20 2a3c V__Detail *<\n-000fde60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000fde70: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n-000fde80: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n-000fde90: 6661 756c 742e 6874 6d6c 2361 3536 3065 fault.html#a560e\n-000fdea0: 3666 6430 3761 3662 3266 3531 6365 6639 6fd07a6b2f51cef9\n-000fdeb0: 3761 6131 3232 3832 6338 3730 223e 534f 7aa12282c870\">SO\n-000fdec0: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail; // SOA\n-000fdef0: 5020 312e 3220 6465 7461 696c 206d 656d P 1.2 detail mem\n-000fdf00: 6265 7220 3c2f 7370 616e 3e3c 2f64 6976 ber .
    };
    .\n-000fdf40: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct \n-000fdfa0: 534f 4150 5f45 4e56 5f5f 436f 6465 3c2f SOAP_ENV__Code
    .
    {.
    _QN\n-000fe040: 616d 653c 2f61 3e20 3c61 2063 6c61 7373 ame SOAP_ENV__\n-000fe0b0: 5661 6c75 653c 2f61 3e3b 203c 2f64 6976 Value; .
    st\n-000fe0f0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct SOAP_ENV\n-000fe140: 5f5f 436f 6465 3c2f 613e 202a 3c61 2063 __Code *SOAP_E\n-000fe1b0: 4e56 5f5f 5375 6263 6f64 653c 2f61 3e3b NV__Subcode;\n-000fe1c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }; .
    stru\n-000fe210: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct SOAP_ENV\n-000fe260: 5f5f 4465 7461 696c 3c2f 613e 203c 2f64 __Detail .
    {
    .\n-000fe2a0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-000fe2c0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t __type<\n-000fe330: 2f61 3e3b 2020 3c73 7061 6e20 636c 6173 /a>; // T\n-000fe350: 6865 2053 4f41 505f 5459 5045 5f20 6f66 he SOAP_TYPE_ of\n-000fe360: 2074 6865 206f 626a 6563 7420 7365 7269 the object seri\n-000fe370: 616c 697a 6564 2061 7320 4661 756c 7420 alized as Fault \n-000fe380: 6465 7461 696c 203c 2f73 7061 6e3e 3c2f detail .
    void\n-000fe3d0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *fault; // pointer to\n-000fe460: 2074 6865 2066 6175 6c74 206f 626a 6563 the fault objec\n-000fe470: 742c 206f 7220 4e55 4c4c 203c 2f73 7061 t, or NULL
    .
    <\n-000fe4a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000fe4b0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-000fe4c0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-000fe4d0: 3563 3632 6432 3662 3438 3233 6237 3663 5c62d26b4823b76c\n-000fe4e0: 3562 3465 6632 3965 3738 3635 6433 6630 5b4ef29e7865d3f0\n-000fe4f0: 223e 5f58 4d4c 3c2f 613e 203c 6120 636c \">_XML __any\n-000fe560: 3c2f 613e 3b20 203c 7370 616e 2063 6c61 ; // \n-000fe580: 616e 7920 6f74 6865 7220 6465 7461 696c any other detail\n-000fe590: 2065 6c65 6d65 6e74 2063 6f6e 7465 6e74 element content\n-000fe5a0: 2028 7374 6f72 6564 2069 6e20 584d 4c20 (stored in XML \n-000fe5b0: 666f 726d 6174 2920 3c2f 7370 616e 3e3c format) <\n-000fe5c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    \n-000fe5e0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    .
    s\n-000fe7f0: 7472 7563 7420 534f 4150 5f45 4e56 5f5f truct SOAP_ENV__\n-000fe800: 436f 6465 202a 2053 4f41 505f 454e 565f Code * SOAP_ENV_\n-000fe810: 5f53 7562 636f 6465 3c2f 6469 763e 3c64 _Subcode
    Optional elemen\n-000fe840: 7420 534f 4150 2d45 4e56 3a53 7562 636f t SOAP-ENV:Subco\n-000fe850: 6465 206f 6620 5853 4420 7479 7065 2053 de of XSD type S\n-000fe860: 4f41 502d 454e 563a 436f 6465 3c2f 6469 OAP-ENV:Code
    Definiti\n-000fe890: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-000fe8a0: 2e68 3a39 3437 353c 2f64 6976 3e3c 2f64 .h:9475
    .
    \n-000fe9a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    _QName SOAP_\n-000fe9c0: 454e 565f 5f56 616c 7565 3c2f 6469 763e ENV__Value
    \n-000fe9d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Optional elem\n-000fe9f0: 656e 7420 534f 4150 2d45 4e56 3a56 616c ent SOAP-ENV:Val\n-000fea00: 7565 206f 6620 5853 4420 7479 7065 2078 ue of XSD type x\n-000fea10: 7364 3a51 4e61 6d65 3c2f 6469 763e 3c64 sd:QName
    Definition:<\n-000fea40: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n-000fea50: 3437 333c 2f64 6976 3e3c 2f64 6976 3e0a 473
    .\n-000fea60: 3c64 6976 2063 6c61 7373 3d22 7474 6322 \n-000feb10: 534f 4150 2046 6175 6c74 2044 6574 6169 SOAP Fault Detai\n-000feb20: 6c20 7374 7275 6374 7572 652e 3c2f 6469 l structure.
    Definiti\n-000feb50: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-000feb60: 2e68 3a39 3438 323c 2f64 6976 3e3c 2f64 .h:9482
    .
    \n-000fec70: 766f 6964 202a 2066 6175 6c74 3c2f 6469 void * fault
    Any data of\n-000feca0: 2073 6f6d 6520 7479 7065 2054 2073 6572 some type T ser\n-000fecb0: 6961 6c69 7a65 6420 6173 2066 6175 6c74 ialized as fault\n-000fecc0: 2065 6c65 6d65 6e74 2077 6865 6e20 6974 element when it\n-000fecd0: 7320 534f 4150 5f54 5950 455f 5420 6973 s SOAP_TYPE_T is\n-000fece0: 2061 7373 6967 6e65 6420 746f 205f 5f74 assigned to __t\n-000fecf0: 7970 653c 2f64 6976 3e3c 6469 7620 636c ype
    D\n-000fed10: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-000fed20: 7464 736f 6170 322e 683a 3934 3836 3c2f tdsoap2.h:9486
    .
    <\n-000fedb0: 6120 6872 6566 3d22 7374 7275 6374 5f73 a href=\"struct_s\n-000fedc0: 5f6f 5f61 5f70 5f5f 5f65 5f6e 5f76 5f5f _o_a_p___e_n_v__\n-000fedd0: 5f5f 5f64 6574 6169 6c2e 6874 6d6c 2361 ___detail.html#a\n-000fede0: 3236 3165 3432 3932 3136 3733 6132 3862 261e42921673a28b\n-000fedf0: 6430 3835 6134 3764 3465 6436 3563 6536 d085a47d4ed65ce6\n-000fee00: 223e 534f 4150 5f45 4e56 5f5f 4465 7461 \">SOAP_ENV__Deta\n-000fee10: 696c 3a3a 5f5f 616e 793c 2f61 3e3c 2f64 il::__any
    _XML __an\n-000fee40: 793c 2f64 6976 3e3c 6469 7620 636c 6173 y
    Any XM\n-000fee60: 4c20 636f 6e74 656e 742e 3c2f 6469 763e L content.
    \n-000fee70: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-000fee90: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-000feea0: 3a39 3438 383c 2f64 6976 3e3c 2f64 6976 :9488
    .
    i\n-000fefb0: 6e74 205f 5f74 7970 653c 2f64 6976 3e3c nt __type
    <\n-000fefc0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-000fefd0: 223e 416e 7920 6461 7461 206f 6620 736f \">Any data of so\n-000fefe0: 6d65 2074 7970 6520 5420 7365 7269 616c me type T serial\n-000feff0: 697a 6564 2061 7320 6661 756c 7420 656c ized as fault el\n-000ff000: 656d 656e 7420 7768 656e 2069 7473 2053 ement when its S\n-000ff010: 4f41 505f 5459 5045 5f54 2069 7320 6173 OAP_TYPE_T is as\n-000ff020: 7369 676e 6564 2074 6f20 5f5f 7479 7065 signed to __type\n-000ff030: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-000ff050: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-000ff060: 6f61 7032 2e68 3a39 3438 343c 2f64 6976 oap2.h:9484
    .
    char *\n-000ff180: 2053 4f41 505f 454e 565f 5f4e 6f64 653c SOAP_ENV__Node<\n-000ff190: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Optional\n-000ff1b0: 2065 6c65 6d65 6e74 2053 4f41 502d 454e element SOAP-EN\n-000ff1c0: 563a 4e6f 6465 206f 6620 5853 4420 7479 V:Node of XSD ty\n-000ff1d0: 7065 2078 7364 3a73 7472 696e 673c 2f64 pe xsd:string
    Definit\n-000ff200: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-000ff210: 322e 683a 3934 3630 3c2f 6469 763e 3c2f 2.h:9460
    .
    SOAP_E\n-000ff2f0: 4e56 5f5f 4661 756c 743a 3a53 4f41 505f NV__Fault::SOAP_\n-000ff300: 454e 565f 5f44 6574 6169 6c3c 2f61 3e3c ENV__Detail<\n-000ff310: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    struct \n-000ff330: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail\n-000ff340: 202a 2053 4f41 505f 454e 565f 5f44 6574 * SOAP_ENV__Det\n-000ff350: 6169 6c3c 2f64 6976 3e3c 6469 7620 636c ail
    Opti\n-000ff370: 6f6e 616c 2065 6c65 6d65 6e74 2053 4f41 onal element SOA\n-000ff380: 502d 454e 563a 4465 7461 696c 206f 6620 P-ENV:Detail of \n-000ff390: 5853 4420 7479 7065 2053 4f41 502d 454e XSD type SOAP-EN\n-000ff3a0: 563a 4465 7461 696c 3c2f 6469 763e 3c64 V:Detail
    Definition:<\n-000ff3d0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n-000ff3e0: 3436 343c 2f64 6976 3e3c 2f64 6976 3e0a 464
    .\n-000ff3f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    <\n-000ff450: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-000ff460: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">SOAP_ENV__F\n-000ff4c0: 6175 6c74 3a3a 534f 4150 5f45 4e56 5f5f ault::SOAP_ENV__\n-000ff4d0: 526f 6c65 3c2f 613e 3c2f 6469 763e 3c64 Role
    char * SOAP_EN\n-000ff500: 565f 5f52 6f6c 653c 2f64 6976 3e3c 6469 V__Role
    \n-000ff520: 4f70 7469 6f6e 616c 2065 6c65 6d65 6e74 Optional element\n-000ff530: 2053 4f41 502d 454e 563a 526f 6c65 206f SOAP-ENV:Role o\n-000ff540: 6620 5853 4420 7479 7065 2078 7364 3a73 f XSD type xsd:s\n-000ff550: 7472 696e 673c 2f64 6976 3e3c 6469 7620 tring
    Definition:\n-000ff580: 2073 7464 736f 6170 322e 683a 3934 3632 stdsoap2.h:9462\n-000ff590: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .\n-000ff610: 3c61 2068 7265 663d 2273 7472 7563 745f SOAP_ENV__Faul\n-000ff670: 743a 3a53 4f41 505f 454e 565f 5f52 6561 t::SOAP_ENV__Rea\n-000ff680: 736f 6e3c 2f61 3e3c 2f64 6976 3e3c 6469 son
    struct SOAP_ENV\n-000ff6b0: 5f5f 5265 6173 6f6e 202a 2053 4f41 505f __Reason * SOAP_\n-000ff6c0: 454e 565f 5f52 6561 736f 6e3c 2f64 6976 ENV__Reason
    Optional ele\n-000ff6f0: 6d65 6e74 2053 4f41 502d 454e 563a 5265 ment SOAP-ENV:Re\n-000ff700: 6173 6f6e 206f 6620 5853 4420 7479 7065 ason of XSD type\n-000ff710: 2053 4f41 502d 454e 563a 5265 6173 6f6e SOAP-ENV:Reason\n-000ff720: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-000ff740: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-000ff750: 6f61 7032 2e68 3a39 3435 383c 2f64 6976 oap2.h:9458
    .
    SOA\n-000ff830: 505f 454e 565f 5f46 6175 6c74 3a3a 6661 P_ENV__Fault::fa\n-000ff840: 756c 7473 7472 696e 673c 2f61 3e3c 2f64 ultstring
    char * fa\n-000ff870: 756c 7473 7472 696e 673c 2f64 6976 3e3c ultstring
    <\n-000ff880: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-000ff890: 223e 4f70 7469 6f6e 616c 2065 6c65 6d65 \">Optional eleme\n-000ff8a0: 6e74 2066 6175 6c74 7374 7269 6e67 206f nt faultstring o\n-000ff8b0: 6620 5853 4420 7479 7065 2078 7364 3a73 f XSD type xsd:s\n-000ff8c0: 7472 696e 673c 2f64 6976 3e3c 6469 7620 tring
    Definition:\n-000ff8f0: 2073 7464 736f 6170 322e 683a 3934 3530 stdsoap2.h:9450\n-000ff900: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .\n-000ff980: 3c61 2068 7265 663d 2273 7472 7563 745f SOAP_ENV__Faul\n-000ff9e0: 743a 3a53 4f41 505f 454e 565f 5f43 6f64 t::SOAP_ENV__Cod\n-000ff9f0: 653c 2f61 3e3c 2f64 6976 3e3c 6469 7620 e
    s\n-000ffa10: 7472 7563 7420 534f 4150 5f45 4e56 5f5f truct SOAP_ENV__\n-000ffa20: 436f 6465 202a 2053 4f41 505f 454e 565f Code * SOAP_ENV_\n-000ffa30: 5f43 6f64 653c 2f64 6976 3e3c 6469 7620 _Code
    Op\n-000ffa50: 7469 6f6e 616c 2065 6c65 6d65 6e74 2053 tional element S\n-000ffa60: 4f41 502d 454e 563a 436f 6465 206f 6620 OAP-ENV:Code of \n-000ffa70: 5853 4420 7479 7065 2053 4f41 502d 454e XSD type SOAP-EN\n-000ffa80: 563a 436f 6465 3c2f 6469 763e 3c64 6976 V:Code
    <\n-000ffaa0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:945\n-000ffac0: 363c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6
    .SOAP_ENV__Fau\n-000ffba0: 6c74 3a3a 6661 756c 7463 6f64 653c 2f61 lt::faultcode
    _QNam\n-000ffbd0: 6520 6661 756c 7463 6f64 653c 2f64 6976 e faultcode
    Optional ele\n-000ffc00: 6d65 6e74 2066 6175 6c74 636f 6465 206f ment faultcode o\n-000ffc10: 6620 5853 4420 7479 7065 2078 7364 3a51 f XSD type xsd:Q\n-000ffc20: 4e61 6d65 3c2f 6469 763e 3c64 6976 2063 Name
    \n-000ffc40: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-000ffc50: 7374 6473 6f61 7032 2e68 3a39 3434 383c stdsoap2.h:9448<\n-000ffc60: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    char *\n-000ffd70: 2066 6175 6c74 6163 746f 723c 2f64 6976 faultactor
    Optional ele\n-000ffda0: 6d65 6e74 2066 6175 6c74 6163 746f 7220 ment faultactor \n-000ffdb0: 6f66 2058 5344 2074 7970 6520 7873 643a of XSD type xsd:\n-000ffdc0: 7374 7269 6e67 3c2f 6469 763e 3c64 6976 string
    <\n-000ffde0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:945\n-000ffe00: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
    .SOAP_ENV__Fau\n-000ffee0: 6c74 3a3a 6465 7461 696c 3c2f 613e 3c2f lt::detail
    struct S\n-000fff10: 4f41 505f 454e 565f 5f44 6574 6169 6c20 OAP_ENV__Detail \n-000fff20: 2a20 6465 7461 696c 3c2f 6469 763e 3c64 * detail
    Optional elemen\n-000fff50: 7420 6465 7461 696c 206f 6620 5853 4420 t detail of XSD \n-000fff60: 7479 7065 2053 4f41 502d 454e 563a 4465 type SOAP-ENV:De\n-000fff70: 7461 696c 3c2f 6469 763e 3c64 6976 2063 tail
    \n-000fff90: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-000fffa0: 7374 6473 6f61 7032 2e68 3a39 3435 343c stdsoap2.h:9454<\n-000fffb0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

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

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

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

    .

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

    .

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

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

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

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

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

    .
    soap_rec\n-001014f0: 6569 7665 725f 6661 756c 743c 2f61 3e28 eiver_fault(\n-00101500: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00101530: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00101550: 6f74 3b45 7272 6f72 206d 6573 7361 6765 ot;Error message\n-00101560: 2671 756f 743b 3c2f 7370 616e 3e2c 204e ", N\n-00101570: 554c 4c29 3b20 3c2f 6469 763e 0a3c 6469 ULL);
    .<\n-00101590: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001015a0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n-001015e0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->version == \n-00101640: 3229 203c 7370 616e 2063 6c61 7373 3d22 2) // SOAP\n-00101660: 2031 2e32 2069 7320 7573 6564 203c 2f73 1.2 is used
    .
    {.
    \n-001016d0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->fault-\n-00101730: 2667 743b 3c61 2063 6c61 7373 3d22 636f >SOAP_ENV__Det\n-001017a0: 6169 6c3c 2f61 3e20 3d20 736f 6170 5f6e ail = soap_n\n-001017b0: 6577 5f53 4f41 505f 454e 565f 5f44 6574 ew_SOAP_ENV__Det\n-001017c0: 6169 6c28 3c61 2063 6c61 7373 3d22 636f ail(soap<\n-001017f0: 2f61 3e2c 202d 3129 3b3c 2f64 6976 3e0a /a>, -1);
    .\n-00101800: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n-00101840: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->fault-><\n-001018a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001018b0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n-001018c0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n-001018d0: 6661 756c 742e 6874 6d6c 2361 3536 3065 fault.html#a560e\n-001018e0: 3666 6430 3761 3662 3266 3531 6365 6639 6fd07a6b2f51cef9\n-001018f0: 3761 6131 3232 3832 6338 3730 223e 534f 7aa12282c870\">SO\n-00101900: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail->__type = SOAP_TYPE_ns\n-00101990: 315f 5f6d 7953 7461 636b 4461 7461 5479 1__myStackDataTy\n-001019a0: 7065 3b20 3c73 7061 6e20 636c 6173 733d pe; // sta\n-001019c0: 636b 2074 7970 6520 3c2f 7370 616e 3e3c ck type <\n-001019d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->fault\n-00101a70: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->SOAP_ENV__De\n-00101ae0: 7461 696c 3c2f 613e 2d26 6774 3b3c 6120 tail->fau\n-00101b50: 6c74 3c2f 613e 203d 2073 703b 2020 2020 lt = sp; \n-00101b60: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00101b70: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-00101b90: 2f2f 2070 6f69 6e74 2074 6f20 7374 6163 // point to stac\n-00101ba0: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
    .\n-00101bb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n-00101bf0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->fault-><\n-00101c50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00101c60: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n-00101c70: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n-00101c80: 6661 756c 742e 6874 6d6c 2361 3536 3065 fault.html#a560e\n-00101c90: 3666 6430 3761 3662 3266 3531 6365 6639 6fd07a6b2f51cef9\n-00101ca0: 3761 6131 3232 3832 6338 3730 223e 534f 7aa12282c870\">SO\n-00101cb0: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail->__any\n-00101d30: 203d 204e 554c 4c3b 2020 2020 2020 2020 = NULL; \n-00101d40: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00101d50: 2020 2020 3c73 7061 6e20 636c 6173 733d // no \n-00101d70: 6f74 6865 7220 584d 4c20 6461 7461 203c other XML data <\n-00101d80: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-00101da0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    else \n-00101de0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00101e00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n-00101e40: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->fault->\n-00101ea0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 d\n-00101f00: 6574 6169 6c3c 2f61 3e20 3d20 736f 6170 etail = soap\n-00101f10: 5f6e 6577 5f53 4f41 505f 454e 565f 5f44 _new_SOAP_ENV__D\n-00101f20: 6574 6169 6c28 3c61 2063 6c61 7373 3d22 etail(soa\n-00101f50: 703c 2f61 3e2c 202d 3129 3b20 3c2f 6469 p, -1); .
    so\n-00101fa0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fault-&g\n-00102000: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;detail->\n-00102070: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-001020d0: 5f5f 7479 7065 3c2f 613e 203d 2053 4f41 __type = SOA\n-001020e0: 505f 5459 5045 5f6e 7331 5f5f 6d79 5374 P_TYPE_ns1__mySt\n-001020f0: 6163 6b44 6174 6154 7970 653b 203c 7370 ackDataType; // stack type\n-00102120: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00102130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00102140: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap->\n-001021c0: 6661 756c 743c 2f61 3e2d 2667 743b 3c61 fault->det\n-00102230: 6169 6c3c 2f61 3e2d 2667 743b 3c61 2063 ail->faul\n-001022a0: 743c 2f61 3e20 3d20 7370 3b20 2020 2020 t = sp; \n-001022b0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-001022c0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-001022e0: 2f20 706f 696e 7420 746f 2073 7461 636b / point to stack\n-001022f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00102300: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00102310: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap->\n-00102390: 6661 756c 743c 2f61 3e2d 2667 743b 3c61 fault->det\n-00102400: 6169 6c3c 2f61 3e2d 2667 743b 3c61 2063 ail->__an\n-00102470: 793c 2f61 3e20 3d20 4e55 4c4c 3b20 2020 y = NULL; \n-00102480: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00102490: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-001024b0: 2f20 6e6f 206f 7468 6572 2058 4d4c 2064 / no other XML d\n-001024c0: 6174 6120 3c2f 7370 616e 3e3c 2f64 6976 ata .
    }
    .<\n-00102500: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00102510: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-00102520: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n-00102580: 4641 554c 543c 2f61 3e3b 203c 7370 616e FAULT; // return from \n-001025b0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-001025c0: 6e20 6361 6c6c 2077 6974 6820 7468 6520 n call with the \n-001025d0: 6661 756c 743c 2f73 7061 6e3e 3c2f 6469 fault.
    \n-00102640: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n-00102680: 3a3a 7665 7273 696f 6e3c 2f61 3e3c 2f64 ::version
    short ver\n-001026b0: 7369 6f6e 3c2f 6469 763e 3c64 6976 2063 sion
    SOA\n-001026d0: 5020 7665 7273 696f 6e20 2830 203d 206e P version (0 = n\n-001026e0: 6f20 534f 4150 2c20 3120 3d20 534f 4150 o SOAP, 1 = SOAP\n-001026f0: 2031 2e31 2c20 3220 3d20 534f 4150 2031 1.1, 2 = SOAP 1\n-00102700: 2e32 293c 2f64 6976 3e3c 6469 7620 636c .2)
    D\n-00102720: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-00102730: 7464 736f 6170 322e 683a 3238 3531 3c2f tdsoap2.h:2851
    .

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

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

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

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

    .

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

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

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

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

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

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

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

    .

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

    .

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

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

    .

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

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

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

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

    .

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

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

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

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

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

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

    .

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

    .

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

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

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

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

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

    .

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

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

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

    .

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

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

    .

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

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

    .

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

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

    .

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

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

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

    .

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

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

    .

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

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

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

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

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

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

    .

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

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

    .

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

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

    .

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

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

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

    .

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

    .

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

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

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

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

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

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

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

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

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

    .

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

    .

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

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

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

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

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

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

    .
    .

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

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

    \n-00113240: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ma\n-00113290: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .{<\n-001132b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001132e0: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n-00113350: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00113380: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct xsd__base64\n-001133d0: 4269 6e61 7279 3c2f 613e 2069 6d61 6765 Binary image\n-001133e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    FIL\n-00113400: 4520 2a66 643b 203c 2f64 6976 3e0a 3c64 E *fd;
    .\n-00113420: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-00113440: 2f73 7061 6e3e 7374 6174 2073 623b 203c /span>stat sb; <\n-00113450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-001134c0: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n-001134d0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    <\n-00113520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00113530: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!fstat(filen\n-00113550: 6f28 6664 292c 2026 616d 703b 7362 2920 o(fd), &sb) \n-00113560: 2661 6d70 3b26 616d 703b 2073 622e 7374 && sb.st\n-00113570: 5f73 697a 6520 2667 743b 2030 2920 3c2f _size > 0) .
    {
    \n-001135a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // \n-001135d0: 6265 6361 7573 6520 7765 2063 616e 2067 because we can g\n-001135e0: 6574 2074 6865 206c 656e 6774 6820 6f66 et the length of\n-001135f0: 2074 6865 2066 696c 652c 2077 6520 6361 the file, we ca\n-00113600: 6e20 7374 7265 616d 2069 7420 3c2f 7370 n stream it
    .
    .
    \n-00113880: 2069 6d61 6765 2e5f 5f70 7472 203d 2028 image.__ptr = (\n-00113890: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n-001138b0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char*\n-001138e0: 2966 643b 203c 7370 616e 2063 6c61 7373 )fd; // mu\n-00113900: 7374 2073 6574 2074 6f20 6e6f 6e2d 4e55 st set to non-NU\n-00113910: 4c4c 2028 7468 6973 2069 7320 6f75 7220 LL (this is our \n-00113920: 6664 2068 616e 646c 6520 7768 6963 6820 fd handle which \n-00113930: 7765 206e 6565 6420 696e 2074 6865 2063 we need in the c\n-00113940: 616c 6c62 6163 6b73 2920 3c2f 7370 616e allbacks)
    .
    im\n-00113970: 6167 652e 5f5f 7369 7a65 203d 2073 622e age.__size = sb.\n-00113980: 7374 5f73 697a 653b 203c 7370 616e 2063 st_size; /\n-001139a0: 2f20 6d75 7374 2073 6574 2073 697a 6520 / must set size \n-001139b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001139d0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n-001139f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00113a00: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n-00113a30: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    // don't\n-00113a70: 206b 6e6f 7720 7468 6520 7369 7a65 2c20 know the size, \n-00113a80: 736f 2062 7566 6665 7220 6974 203c 2f73 so buffer it
    .
    \n-00113ab0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n-00113ad0: 743c 2f73 7061 6e3e 2069 3b20 3c2f 6469 t i; .
    int c;\n-00113b20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    im\n-00113b40: 6167 652e 5f5f 7074 7220 3d20 283c 7370 age.__ptr = (unsigned<\n-00113b70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char*)soap_malloc(&s\n-00113c30: 6f61 703c 2f61 3e2c 204d 4158 5f46 494c oap, MAX_FIL\n-00113c40: 455f 5349 5a45 293b 203c 2f64 6976 3e0a E_SIZE);
    .\n-00113c50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00113c80: 666f 723c 2f73 7061 6e3e 2028 6920 3d20 for (i = \n-00113c90: 303b 2069 2026 6c74 3b20 4d41 585f 4649 0; i < MAX_FI\n-00113ca0: 4c45 5f53 495a 453b 2069 2b2b 2920 3c2f LE_SIZE; i++) .
    {.
    if (\n-00113d10: 2863 203d 2066 6765 7463 2866 6429 2920 (c = fgetc(fd)) \n-00113d20: 3d3d 2045 4f46 2920 3c2f 6469 763e 0a3c == EOF)
    .<\n-00113d30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00113d40: 3e20 2020 2020 2020 203c 7370 616e 2063 > break;\n-00113d70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-00113d90: 696d 6167 652e 5f5f 7074 725b 695d 203d image.__ptr[i] =\n-00113da0: 2063 3b20 3c2f 6469 763e 0a3c 6469 7620 c;
    .
    \n-00113dc0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    \n-00113de0: 6663 6c6f 7365 2866 6429 3b20 3c2f 6469 fclose(fd); { NULL, NUL\n+000f8c60: 4c20 7d3c 2f64 6976 3e0a 3c64 6976 2063 L }
    .
    };.

    T\n+000f8ca0: 6865 6e2c 2074 6865 2066 6f6c 6c6f 7769 hen, the followi\n+000f8cb0: 6e67 2058 4d4c 2065 6c65 6d65 6e74 7320 ng XML elements \n+000f8cc0: 7769 6c6c 206d 6174 6368 2074 6865 7365 will match these\n+000f8cd0: 2073 7472 7563 7473 3a3c 2f70 3e0a 3c64 structs:

    . \n+000f8cf0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    <x:elt xmlns:x\n+000f8d60: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="http:/\n+000f8d90: 2f74 656d 7075 7269 2e6f 7267 2f61 2e78 /tempuri.org/a.x\n+000f8da0: 7364 2671 756f 743b 3c2f 7370 616e 3e26 sd"&\n+000f8db0: 6774 3b2e 2e2e 266c 743b 2f3c 7370 616e gt;...</x:elt>
    .&l\n+000f8e00: 743b 3c73 7061 6e20 636c 6173 733d 226b t;elt<\n+000f8e20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> xml\n+000f8e40: 6e73 3c2f 7370 616e 3e3d 3c73 7061 6e20 ns="http\n+000f8e70: 3a2f 2f74 656d 7075 7269 2e6f 7267 2f62 ://tempuri.org/b\n+000f8e80: 2e78 7364 2671 756f 743b 3c2f 7370 616e .xsd">...</elt>
    .&l\n+000f8ee0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;zzz:\n+000f8f00: 656c 743c 2f73 7061 6e3e 203c 7370 616e elt xmlns:zzz=http://temp\n+000f8f70: 7572 692e 6f72 673c 2f73 7061 6e3e 2f3c uri.org/<\n+000f8f80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f8f90: 6f72 6422 3e63 2e78 7364 3c2f 7370 616e ord\">c.xsd">...&l\n+000f8fb0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/zzz\n+000f8fd0: 3a65 6c74 3c2f 7370 616e 3e26 6774 3b3c :elt><\n+000f8fe0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    Instead o\n+000f9010: 6620 6f6e 6520 6269 6720 6e61 6d65 7370 f one big namesp\n+000f9020: 6163 6520 7461 626c 6520 7468 6174 2063 ace table that c\n+000f9030: 6f6e 7461 696e 7320 616c 6c20 584d 4c20 ontains all XML \n+000f9040: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+000f9050: 6573 2077 6974 6820 7468 6569 7220 5552 es with their UR\n+000f9060: 4973 2c20 7468 6572 6520 6172 6520 6361 Is, there are ca\n+000f9070: 7365 7320 7768 656e 2069 7420 6973 2064 ses when it is d\n+000f9080: 6573 6972 6162 6c65 2074 6f20 7573 6520 esirable to use \n+000f9090: 6d75 6c74 6970 6c65 206e 616d 6573 7061 multiple namespa\n+000f90a0: 6365 2074 6162 6c65 732c 206f 6e65 2066 ce tables, one f\n+000f90b0: 6f72 2065 6163 6820 7365 7276 6963 652e or each service.\n+000f90c0: 2054 6869 7320 6176 6f69 6473 206c 6561 This avoids lea\n+000f90d0: 6b69 6e67 206e 616d 6573 7061 6365 2070 king namespace p\n+000f90e0: 7265 6669 7865 7320 696e 2058 4d4c 206d refixes in XML m\n+000f90f0: 6573 7361 6765 7320 7468 6174 2068 6176 essages that hav\n+000f9100: 6520 6e6f 7468 696e 6720 746f 2064 6f20 e nothing to do \n+000f9110: 7769 7468 2074 6865 2073 6572 7669 6365 with the service\n+000f9120: 2069 6e76 6f6b 6564 2e20 496e 2070 7269 invoked. In pri\n+000f9130: 6e63 6970 6c65 2074 6865 7265 2069 7320 nciple there is \n+000f9140: 6e6f 2068 6172 6d20 746f 206c 6561 6b20 no harm to leak \n+000f9150: 7468 6573 6520 6e61 6d65 7370 6163 6520 these namespace \n+000f9160: 7072 6566 6978 6573 2c20 6275 7420 7468 prefixes, but th\n+000f9170: 6520 6d65 7373 6167 6573 2061 7265 206c e messages are l\n+000f9180: 6573 7320 636f 6d70 6163 7420 616e 6420 ess compact and \n+000f9190: 6e6f 7420 6173 2063 6c65 616e 2e20 546f not as clean. To\n+000f91a0: 2075 7365 206d 756c 7469 706c 6520 6e61 use multiple na\n+000f91b0: 6d65 7370 6163 6520 7461 626c 6573 2061 mespace tables a\n+000f91c0: 7420 7468 6520 636c 6965 6e74 2073 6964 t the client sid\n+000f91d0: 6520 6973 2064 6f6e 6520 6173 2066 6f6c e is done as fol\n+000f91e0: 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 2063 lows:

    .
    \n+000f9200: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+000f9230: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>Namespace\n+000f9270: 206e 616d 6573 7061 6365 7354 6162 6c65 namespacesTable\n+000f9280: 315b 5d20 3d20 7b20 2e2e 2e20 7d3b 203c 1[] = { ... }; <\n+000f9290: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n+000f92c0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct Namespa\n+000f9300: 6365 3c2f 613e 206e 616d 6573 7061 6365 ce namespace\n+000f9310: 7354 6162 6c65 325b 5d20 3d20 7b20 2e2e sTable2[] = { ..\n+000f9320: 2e20 7d3b 203c 2f64 6976 3e0a 3c64 6976 . };
    .struct N\n+000f9390: 616d 6573 7061 6365 3c2f 613e 206e 616d amespace nam\n+000f93a0: 6573 7061 6365 7354 6162 6c65 335b 5d20 espacesTable3[] \n+000f93b0: 3d20 7b20 2e2e 2e20 7d3b 203c 2f64 6976 = { ... }; .
    struct\n+000f93f0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 Namespace *names\n+000f9490: 7061 6365 733c 2f61 3e3b 203c 2f64 6976 paces; .
    ... //\n+000f94d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+000f94f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+000f9540: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+000f9570: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n+000f95d0: 5f6e 6577 3c2f 613e 2829 3b20 3c2f 6469 _new(); ..
    if\n+000f9720: 2028 736f 6170 5f63 616c 6c5f 7265 6d6f (soap_call_remo\n+000f9730: 7465 5f6d 6574 686f 6428 3c61 2063 6c61 te_method(soap, endpoint\n+000f97c0: 2c20 4163 7469 6f6e 2c20 2e2e 2e29 293c , Action, ...))<\n+000f97d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // error
    .
    \n+000f9820: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The <\n+000fa4c0: 636f 6465 3e6d 7573 7455 6e64 6572 7374 code>mustUnderst\n+000fa4d0: 616e 643c 2f63 6f64 653e 2071 7561 6c69 and quali\n+000fa4e0: 6669 6572 2073 7065 6369 6669 6573 2074 fier specifies t\n+000fa4f0: 6861 7420 7468 6520 656c 656d 656e 7420 hat the element \n+000fa500: 6d75 7374 2062 6520 7072 6f63 6573 7365 must be processe\n+000fa510: 6420 6279 2074 6865 2053 4f41 5020 7072 d by the SOAP pr\n+000fa520: 6f63 6573 736f 7220 616e 6420 6361 6e6e ocessor and cann\n+000fa530: 6f74 2062 6520 6967 6e6f 7265 6420 6966 ot be ignored if\n+000fa540: 2074 6865 2070 726f 6365 7373 6f72 2068 the processor h\n+000fa550: 6173 206e 6f20 6c6f 6769 6320 696e 2070 as no logic in p\n+000fa560: 6c61 6365 2066 6f72 2074 6869 7320 534f lace for this SO\n+000fa570: 4150 2068 6561 6465 722c 2077 6869 6368 AP header, which\n+000fa580: 2069 7320 646f 6e65 2062 7920 6164 6469 is done by addi\n+000fa590: 6e67 2061 203c 656d 3e3c 636f 6465 3e53 ng a S\n+000fa5a0: 4f41 502d 454e 563a 6d75 7374 556e 6465 OAP-ENV:mustUnde\n+000fa5b0: 7273 7461 6e64 3d22 7472 7565 223c 2f63 rstand=\"true\" attrib\n+000fa5d0: 7574 6520 746f 2074 6865 203c 656d 3e3c ute to the <\n+000fa5e0: 636f 6465 3e74 3a74 7261 6e73 6163 7469 code>t:transacti\n+000fa5f0: 6f6e 3c2f 636f 6465 3e3c 2f65 6d3e 2065 on e\n+000fa600: 6c65 6d65 6e74 2e20 5468 6520 736f 6170 lement. The soap\n+000fa610: 6370 7032 2d67 656e 6572 6174 6564 2073 cpp2-generated s\n+000fa620: 6572 6961 6c69 7a65 7273 206f 6265 7920 erializers obey \n+000fa630: 7468 6973 2073 6166 6574 7920 7072 696e this safety prin\n+000fa640: 6369 706c 652e 3c2f 703e 0a3c 703e 5468 ciple.

    .

    Th\n+000fa650: 6973 2064 6563 6c61 7265 7320 6120 7365 is declares a se\n+000fa660: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n+000fa670: 7468 6174 2073 656e 6473 206d 6573 7361 that sends messa\n+000fa680: 6765 7320 7769 7468 2061 6e20 696e 7075 ges with an inpu\n+000fa690: 7420 534f 4150 2068 6561 6465 7220 3c63 t SOAP header t__transacti\n+000fa6b0: 6f6e 3c2f 636f 6465 3e2c 2061 7320 6361 on, as ca\n+000fa6c0: 6e20 6265 2073 6565 6e20 696e 2074 6865 n be seen in the\n+000fa6d0: 2067 656e 6572 6174 6564 2057 5344 4c20 generated WSDL \n+000fa6e0: 6269 6e64 696e 673a 3c2f 703e 0a3c 6469 binding:

    . <\n+000fa700: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000fa710: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    <binding name="Service&\n+000fa7a0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; type=<\n+000fa7d0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000fa7e0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000fa7f0: 3b74 6e73 3a53 6572 7669 6365 506f 7274 ;tns:ServicePort\n+000fa800: 5479 7065 2671 756f 743b 3c2f 7370 616e Type">
    . \n+000fa830: 266c 743b 3c73 7061 6e20 636c 6173 733d <SO\n+000fa850: 4150 3a62 696e 6469 6e67 3c2f 7370 616e AP:binding style="document&\n+000fa8b0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; transport=\n+000fa900: 2671 756f 743b 6874 7470 3a2f 2f73 6368 "http://sch\n+000fa910: 656d 6173 2e78 6d6c 736f 6170 2e6f 7267 emas.xmlsoap.org\n+000fa920: 2f73 6f61 702f 6874 7470 2671 756f 743b /soap/http"\n+000fa930: 3c2f 7370 616e 3e2f 2667 743b 3c2f 6469 />.
    <operation name\n+000fa9a0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="webmet\n+000fa9d0: 686f 6426 7175 6f74 3b3c 2f73 7061 6e3e hod"\n+000fa9e0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    \n+000faa00: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <S\n+000faa20: 4f41 503a 6f70 6572 6174 696f 6e3c 2f73 OAP:operation soapA\n+000faa50: 6374 696f 6e3c 2f73 7061 6e3e 3d3c 7370 ction="&\n+000faa80: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/>\n+000faa90: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    &l\n+000faab0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;inpu\n+000faad0: 743c 2f73 7061 6e3e 2667 743b 3c2f 6469 t>.
    &\n+000fab00: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA\n+000fab20: 503a 626f 6479 3c2f 7370 616e 3e20 3c73 P:body use=<\n+000fab50: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000fab60: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000fab70: 3b6c 6974 6572 616c 2671 756f 743b 3c2f ;literal" part\n+000faba0: 733c 2f73 7061 6e3e 3d3c 7370 616e 2063 s="Body&\n+000fabd0: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/>\n+000fabe0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n+000fac00: 2020 2020 266c 743b 3c73 7061 6e20 636c <SOAP:header use="literal&\n+000fac80: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; message=&q\n+000facd0: 756f 743b 746e 733a 5365 7276 6963 6548 uot;tns:ServiceH\n+000face0: 6561 6465 7226 7175 6f74 3b3c 2f73 7061 eader" part="transacti\n+000fad40: 6f6e 2671 756f 743b 3c2f 7370 616e 3e2f on"/\n+000fad50: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    \n+000fad70: 2026 6c74 3b2f 3c73 7061 6e20 636c 6173 </\n+000fad90: 696e 7075 743c 2f73 7061 6e3e 2667 743b input>\n+000fada0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+000fadc0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;outpu\n+000fade0: 743c 2f73 7061 6e3e 2667 743b 3c2f 6469 t>.
    &\n+000fae10: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA\n+000fae30: 503a 626f 6479 3c2f 7370 616e 3e20 3c73 P:body use=<\n+000fae60: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000fae70: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000fae80: 3b6c 6974 6572 616c 2671 756f 743b 3c2f ;literal" part\n+000faeb0: 733c 2f73 7061 6e3e 3d3c 7370 616e 2063 s="Body&\n+000faee0: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/>\n+000faef0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    &l\n+000faf10: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/out\n+000faf30: 7075 743c 2f73 7061 6e3e 2667 743b 3c2f put>.
    </operatio\n+000faf80: 6e3c 2f73 7061 6e3e 2667 743b 3c2f 6469 n>.
    </binding>
    .

    Li\n+000fb000: 6b65 7769 7365 2c20 796f 7520 6361 6e20 kewise, you can \n+000fb010: 7370 6563 6966 7920 7468 6174 2062 6f74 specify that bot\n+000fb020: 6820 696e 7075 7420 616e 6420 6f75 7470 h input and outp\n+000fb030: 7574 206d 6573 7361 6765 7320 6861 7665 ut messages have\n+000fb040: 2074 6865 2073 616d 6520 6865 6164 6572 the same header\n+000fb050: 2077 6974 6820 3c63 6f64 653e 2f2f 6773 with //gs\n+000fb060: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n+000fb070: 6574 686f 642d 6865 6164 6572 2d70 6172 ethod-header-par\n+000fb080: 743a 3c2f 636f 6465 3e20 6f72 2074 6865 t: or the\n+000fb090: 206f 7574 7075 7420 6d65 7373 6167 6520 output message \n+000fb0a0: 6861 7320 6120 6865 6164 6572 2077 6974 has a header wit\n+000fb0b0: 6820 3c63 6f64 653e 2f2f 6773 6f61 7020 h //gsoap \n+000fb0c0: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n+000fb0d0: 642d 6f75 7470 7574 2d68 6561 6465 722d d-output-header-\n+000fb0e0: 7061 7274 3a3c 2f63 6f64 653e 2e20 4d75 part:. Mu\n+000fb0f0: 6c74 6970 6c65 2068 6561 6465 7273 2063 ltiple headers c\n+000fb100: 616e 2062 6520 7370 6563 6966 6965 6420 an be specified \n+000fb110: 7468 6973 2077 6179 2e3c 2f70 3e0a 3c70 this way.

    .To set up a SOA\n+000fb130: 5020 4865 6164 6572 2061 7420 7468 6520 P Header at the \n+000fb140: 636c 6965 6e74 2073 6964 6520 7468 6174 client side that\n+000fb150: 2063 6f6e 7461 696e 7320 7468 6520 3c63 contains the t__transacti\n+000fb170: 6f6e 3c2f 636f 6465 3e20 6d65 6d62 6572 on member\n+000fb180: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .\n+000fb2a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... //<\n+000fb2d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+000fb2f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000fb300: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+000fb310: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+000fb320: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000fb330: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+000fb340: 6874 6d6c 2361 6330 3931 6466 6534 6530 html#ac091dfe4e0\n+000fb350: 3162 3661 3038 3264 3931 3663 3338 3165 1b6a082d916c381e\n+000fb360: 3730 3036 6261 223e 6865 6164 6572 3c2f 7006ba\">header = NULL; // erase any SO\n+000fb3a0: 4150 2048 6561 6465 7220 7765 2068 6176 AP Header we hav\n+000fb3b0: 6520 736f 2066 6172 3c2f 7370 616e 3e3c e so far<\n+000fb3c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap\n+000fb430: 5f68 6561 6465 723c 2f61 3e28 3c61 2063 _header(soap); <\n+000fb470: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000fb480: 656e 7422 3e2f 2f20 616c 6c6f 6361 7465 ent\">// allocate\n+000fb490: 2061 6e64 2069 6e69 7469 616c 697a 6520 and initialize \n+000fb4a0: 6120 6e65 7720 534f 4150 2048 6561 6465 a new SOAP Heade\n+000fb4b0: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .<\n+000fb4c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fb4d0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+000fb500: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->he\n+000fb550: 6164 6572 3c2f 613e 2d26 6774 3b74 5f5f ader->t__\n+000fb560: 7472 616e 7361 6374 696f 6e20 3d20 736f transaction = so\n+000fb570: 6170 5f6e 6577 5f74 5f5f 7472 616e 7361 ap_new_t__transa\n+000fb580: 6374 696f 6e28 3c61 2063 6c61 7373 3d22 ction(soa\n+000fb5b0: 703c 2f61 3e2c 202d 3129 3b3c 2f64 6976 p, -1);.
    soap<\n+000fb600: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->header->\n+000fb660: 745f 5f74 7261 6e73 6163 7469 6f6e 2d26 t__transaction-&\n+000fb670: 6774 3b6e 756d 6265 7220 3d20 6e75 6d3b gt;number = num;\n+000fb680: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+000fb6c0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->header\n+000fb720: 2d26 6774 3b74 5f5f 7472 616e 7361 6374 ->t__transact\n+000fb730: 696f 6e2d 2667 743b 6465 7363 7269 7074 ion->descript\n+000fb740: 696f 6e20 3d20 3c73 7061 6e20 636c 6173 ion = "Transact\n+000fb770: 696f 6e61 6c20 6461 7461 2671 756f 743b ional data"\n+000fb780: 3c2f 7370 616e 3e3b 3c2f 6469 763e 0a3c ;
    .<\n+000fb790: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fb7a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n+000fb7d0: 7765 626d 6574 686f 6428 3c61 2063 6c61 webmethod(soap, endpoint\n+000fb860: 2c20 4e55 4c4c 2c20 2e2e 2e29 293c 2f64 , NULL, ...)).
    ... // error
    .
    struc\n+000fb980: 7420 534f 4150 5f45 4e56 5f5f 4865 6164 t SOAP_ENV__Head\n+000fb990: 6572 202a 2068 6561 6465 723c 2f64 6976 er * header
    The soap::he\n+000fb9c0: 6164 6572 2070 6f69 6e74 7320 746f 2061 ader points to a\n+000fb9d0: 2053 4f41 505f 454e 565f 5f48 6561 6465 SOAP_ENV__Heade\n+000fb9e0: 7220 7374 7275 6374 7572 6520 7769 7468 r structure with\n+000fb9f0: 2074 6865 2053 4f41 5020 4865 6164 6572 the SOAP Header\n+000fba00: 2074 6861 7420 7761 7320 7265 6365 6976 that was receiv\n+000fba10: 6564 206f 7220 7468 612e 2e2e 3c2f 6469 ed or tha...
    Definiti\n+000fba40: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+000fba50: 2e68 3a32 3935 353c 2f64 6976 3e3c 2f64 .h:2955
    .

    Th\n+000fba80: 6520 534f 4150 2057 6562 2073 6572 7669 e SOAP Web servi\n+000fba90: 6365 2072 6571 7565 7374 2069 6e63 6c75 ce request inclu\n+000fbaa0: 6465 7320 7468 6520 534f 4150 2048 6561 des the SOAP Hea\n+000fbab0: 6465 7220 7769 7468 2074 6865 2074 7261 der with the tra\n+000fbac0: 6e73 6163 7469 6f6e 2064 6174 613a 3c2f nsaction data:.

    <\n+000fbb10: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;SOAP-\n+000fbb30: 454e 563a 456e 7665 6c6f 7065 3c2f 7370 ENV:Envelope ...> .
    <SOAP-ENV:He\n+000fbb90: 6164 6572 3c2f 7370 616e 3e26 6774 3b20 ader> \n+000fbba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+000fbbc0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;t:tra\n+000fbbe0: 6e73 6163 7469 6f6e 3c2f 7370 616e 3e20 nsaction \n+000fbbf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-ENV:m\n+000fbc10: 7573 7455 6e64 6572 7374 616e 643c 2f73 ustUnderstand="true"\n+000fbc50: 3b3c 2f73 7061 6e3e 2667 743b 3c2f 6469 ;>.
    <<\n+000fbc80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fbc90: 6f72 6474 7970 6522 3e6e 756d 6265 723c ordtype\">number<\n+000fbca0: 2f73 7061 6e3e 2667 743b 3132 3334 3526 /span>>12345&\n+000fbcb0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/nu\n+000fbcd0: 6d62 6572 3c2f 7370 616e 3e26 6774 3b3c mber><\n+000fbce0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    &l\n+000fbd00: 743b 3c73 7061 6e20 636c 6173 733d 226b t;desc\n+000fbd20: 7269 7074 696f 6e3c 2f73 7061 6e3e 2667 ription&g\n+000fbd30: 743b 3c73 7061 6e20 636c 6173 733d 226b t;Transact\n+000fbd50: 696f 6e61 6c3c 2f73 7061 6e3e 203c 7370 ional data&l\n+000fbd80: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/des\n+000fbda0: 6372 6970 7469 6f6e 3c2f 7370 616e 3e26 cription&\n+000fbdb0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    \n+000fbdd0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </t\n+000fbdf0: 3a74 7261 6e73 6163 7469 6f6e 3c2f 7370 :transaction>
    .<\n+000fbe10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fbe20: 3e20 2026 6c74 3b2f 3c73 7061 6e20 636c > </SOAP-ENV:Heade\n+000fbe50: 723c 2f73 7061 6e3e 2667 743b 203c 2f64 r> .
    <SOAP-ENV:B\n+000fbea0: 6f64 793c 2f73 7061 6e3e 2667 743b 203c ody> <\n+000fbeb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+000fbed0: 3c73 7061 6e20 636c 6173 733d 226b 6579 ns:web\n+000fbef0: 6d65 7468 6f64 3c2f 7370 616e 3e26 6774 method>\n+000fbf00: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n+000fbf20: 2e2e 2e3c 2f64 6976 3e0a 3c64 6976 2063 ...
    .
    \n+000fbf40: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </n\n+000fbf60: 733a 7765 626d 6574 686f 643c 2f73 7061 s:webmethod>
    . \n+000fbf90: 2026 6c74 3b2f 3c73 7061 6e20 636c 6173 </\n+000fbfb0: 534f 4150 2d45 4e56 3a42 6f64 793c 2f73 SOAP-ENV:Body>
    .\n+000fbfd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </SOAP-ENV:Envelo\n+000fc010: 7065 3c2f 7370 616e 3e26 6774 3b3c 2f64 pe>.

    At the rece\n+000fc050: 6976 696e 6720 7369 6465 2c20 6120 534f iving side, a SO\n+000fc060: 4150 2048 6561 6465 7220 6361 6e20 6265 AP Header can be\n+000fc070: 2069 6e73 7065 6374 6564 2062 7920 6368 inspected by ch\n+000fc080: 6563 6b69 6e67 2066 6f72 2061 206e 6f6e ecking for a non\n+000fc090: 2d4e 554c 4c20 3c63 6f64 653e 3c61 2063 -NULL soap::header\n+000fc160: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 703e .

    \n+000fc170: 0a3c 646c 2063 6c61 7373 3d22 7365 6374 .
    WarningWhen SOAP Heade\n+000fc1b0: 7273 2061 7265 2075 7365 642c 2079 6f75 rs are used, you\n+000fc1c0: 206d 7573 7420 6d61 6b65 2073 7572 6520 must make sure \n+000fc1d0: 746f 2073 6574 203c 636f 6465 3e3c 6120 to set soap::heade\n+000fc2a0: 723c 2f61 3e3c 2f63 6f64 653e 2074 6f20 r to \n+000fc2b0: 4e55 4c4c 2077 6865 6e20 6e6f 2053 4f41 NULL when no SOA\n+000fc2c0: 5020 4865 6164 6572 2073 686f 756c 6420 P Header should \n+000fc2d0: 6265 2073 656e 742c 206f 7468 6572 7769 be sent, otherwi\n+000fc2e0: 7365 2061 6e79 2053 4f41 5020 4865 6164 se any SOAP Head\n+000fc2f0: 6572 7320 6375 7272 656e 746c 7920 7072 ers currently pr\n+000fc300: 6573 656e 7420 696e 2074 6865 203c 636f esent in the SO\n+000fc370: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header struct\n+000fc390: 2070 6f69 6e74 6564 2074 6f20 6279 203c pointed to by <\n+000fc3a0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+000fc460: 703a 3a68 6561 6465 723c 2f61 3e3c 2f63 p::header will be inc\n+000fc480: 6c75 6465 6420 696e 2074 6865 206d 6573 luded in the mes\n+000fc490: 7361 6765 2e3c 2f64 643e 3c2f 646c 3e0a sage.
    .\n+000fc4a0: 3c70 3e41 7420 7468 6520 636c 6965 6e74

    At the client\n+000fc4b0: 2073 6964 652c 2074 6865 203c 636f 6465 side, the soap::a\n+000fc580: 6374 6f72 3c2f 613e 3c2f 636f 6465 3e20 ctor \n+000fc590: 7374 7269 6e67 2076 6172 6961 626c 6520 string variable \n+000fc5a0: 6361 6e20 6265 2073 6574 2074 6f20 7365 can be set to se\n+000fc5b0: 7420 7468 6520 534f 4150 203c 656d 3e3c t the SOAP <\n+000fc5c0: 636f 6465 3e53 4f41 502d 454e 563a 6163 code>SOAP-ENV:ac\n+000fc5d0: 746f 723c 2f63 6f64 653e 3c2f 656d 3e20 tor \n+000fc5e0: 6174 7472 6962 7574 652e 2054 6865 203c attribute. The <\n+000fc5f0: 656d 3e3c 636f 6465 3e53 4f41 502d 454e em>SOAP-EN\n+000fc600: 563a 6d75 7374 556e 6465 7273 7461 6e64 V:mustUnderstand\n+000fc610: 3d22 7472 7565 223c 2f63 6f64 653e 3c2f =\"true\" attribute th\n+000fc630: 656e 2069 6e64 6963 6174 6573 2074 6865 en indicates the\n+000fc640: 2072 6571 7569 7265 6d65 6e74 2074 6861 requirement tha\n+000fc650: 7420 7468 6520 7265 6369 7069 656e 7420 t the recipient \n+000fc660: 636f 7272 6573 706f 6e64 696e 6720 746f corresponding to\n+000fc670: 2074 6865 203c 656d 3e3c 636f 6465 3e53 the S\n+000fc680: 4f41 502d 454e 563a 6163 746f 723c 2f63 OAP-ENV:actor attrib\n+000fc6a0: 7574 6520 7661 6c75 6520 6973 2072 6573 ute value is res\n+000fc6b0: 706f 6e73 6962 6c65 2074 6f20 7072 6f63 ponsible to proc\n+000fc6c0: 6573 7320 7468 6520 534f 4150 2048 6561 ess the SOAP Hea\n+000fc6d0: 6465 7220 656c 656d 656e 742e 2054 6865 der element. The\n+000fc6e0: 2064 6574 6169 6c73 206f 6620 7768 6963 details of whic\n+000fc6f0: 6820 6361 6e20 6265 2066 6f75 6e64 2069 h can be found i\n+000fc700: 6e20 7468 6520 534f 4150 2031 2e31 2f31 n the SOAP 1.1/1\n+000fc710: 2e32 2073 7065 6369 6669 6361 7469 6f6e .2 specification\n+000fc720: 7320 7468 6174 2074 6865 2067 534f 4150 s that the gSOAP\n+000fc730: 2074 6f6f 6c73 2063 6f6e 666f 726d 2074 tools conform t\n+000fc740: 6f2e 3c2f 703e 0a3c 703e 5468 6520 534f o.

    .

    The SO\n+000fc750: 4150 2048 6561 6465 7220 7374 7275 6374 AP Header struct\n+000fc760: 7572 6520 3c63 6f64 653e 3c61 2063 6c61 ure SOAP_ENV__H\n+000fc7d0: 6561 6465 723c 2f61 3e3c 2f63 6f64 653e eader\n+000fc7e0: 2069 7320 6465 636c 6172 6564 203c 636f is declared mutable, which means t\n+000fc810: 6861 7420 7265 2d64 6563 6c61 7261 7469 hat re-declarati\n+000fc820: 6f6e 7320 6f66 2074 6865 2073 7472 7563 ons of the struc\n+000fc830: 7475 7265 7320 6172 6520 7065 726d 6974 tures are permit\n+000fc840: 7465 6420 616e 6420 6164 6469 7469 6f6e ted and addition\n+000fc850: 616c 206d 656d 6265 7273 2061 7265 2063 al members are c\n+000fc860: 6f6c 6c65 6374 6564 2069 6e74 6f20 6f6e ollected into on\n+000fc870: 6520 6669 6e61 6c20 7374 7275 6374 7572 e final structur\n+000fc880: 6520 6279 2074 6865 2073 6f61 7063 7070 e by the soapcpp\n+000fc890: 3220 746f 6f6c 2e3c 2f70 3e0a 3c70 3e46 2 tool.

    .

    F\n+000fc8a0: 6f72 2061 6e6f 7468 6572 2065 7861 6d70 or another examp\n+000fc8b0: 6c65 2c20 636f 6e73 6964 6572 3a3c 2f70 le, consider:.

    \n+000fc900: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct SOAP\n+000fc950: 5f45 4e56 5f5f 4865 6164 6572 3c2f 613e _ENV__Header\n+000fc960: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    char *h\n+000fc9c0: 5f5f 7472 616e 7361 6374 696f 6e3b 203c __transaction; <\n+000fc9d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    struct \n+000fca10: 5573 6572 4175 7468 202a 685f 5f61 7574 UserAuth *h__aut\n+000fca20: 6865 6e74 6963 6174 696f 6e3b 203c 2f64 hentication; .
    };
    .<\n+000fca50: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Suppose\n+000fca70: 206d 6574 686f 6420 3c63 6f64 653e 6e73 method ns\n+000fca80: 5f5f 6c6f 6769 6e3c 2f63 6f64 653e 2075 __login u\n+000fca90: 7365 7320 626f 7468 2068 6561 6465 7220 ses both header \n+000fcaa0: 7061 7274 7320 2861 7420 6d6f 7374 292c parts (at most),\n+000fcab0: 2074 6865 6e20 7468 6973 2069 7320 6465 then this is de\n+000fcac0: 636c 6172 6564 2061 733a 3c2f 703e 0a3c clared as:

    .<\n+000fcad0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000fcae0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    //g\n+000fcb10: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+000fcb20: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa\n+000fcb30: 7274 3a20 6c6f 6769 6e20 685f 5f74 7261 rt: login h__tra\n+000fcb40: 6e73 6163 7469 6f6e 203c 2f73 7061 6e3e nsaction \n+000fcb50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+000fcb80: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+000fcb90: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n+000fcba0: 7061 7274 3a20 6c6f 6769 6e20 685f 5f61 part: login h__a\n+000fcbb0: 7574 6865 6e74 6963 6174 696f 6e20 3c2f uthentication
    .int ns__login(...\n+000fcc10: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .
    <\n+000fcc20: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000fcc30: 3c70 3e53 7570 706f 7365 206d 6574 686f

    Suppose metho\n+000fcc40: 6420 3c63 6f64 653e 6e73 5f5f 7365 6172 d ns__sear\n+000fcc50: 6368 3c2f 636f 6465 3e20 7573 6573 206f ch uses o\n+000fcc60: 6e6c 7920 7468 6520 6669 7273 7420 6865 nly the first he\n+000fcc70: 6164 6572 2070 6172 742c 2074 6865 6e20 ader part, then \n+000fcc80: 7468 6973 2069 7320 6465 636c 6172 6564 this is declared\n+000fcc90: 2061 733a 3c2f 703e 0a3c 6469 7620 636c as:

    .
    <\n+000fccb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fccc0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+000fcce0: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n+000fccf0: 2d68 6561 6465 722d 7061 7274 3a20 7365 -header-part: se\n+000fcd00: 6172 6368 2068 5f5f 7472 616e 7361 6374 arch h__transact\n+000fcd10: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion .
    in\n+000fcd50: 743c 2f73 7061 6e3e 206e 735f 5f73 6561 t ns__sea\n+000fcd60: 7263 6828 2e2e 2e29 3b3c 2f64 6976 3e0a rch(...);
    .\n+000fcd70: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Note t\n+000fcd90: 6861 7420 7468 6520 6d65 7468 6f64 206e hat the method n\n+000fcda0: 616d 6520 616e 6420 6865 6164 6572 2070 ame and header p\n+000fcdb0: 6172 7420 6e61 6d65 7320 6d75 7374 2062 art names must b\n+000fcdc0: 6520 6e61 6d65 7370 6163 6520 7175 616c e namespace qual\n+000fcdd0: 6966 6965 642e 2054 6865 2068 6561 6465 ified. The heade\n+000fcde0: 7273 206d 7573 7420 6265 2070 7265 7365 rs must be prese\n+000fcdf0: 6e74 2069 6e20 616c 6c20 6f70 6572 6174 nt in all operat\n+000fce00: 696f 6e73 2074 6861 7420 6465 636c 6172 ions that declar\n+000fce10: 6564 2074 6865 2068 6561 6465 7220 7061 ed the header pa\n+000fce20: 7274 732e 3c2f 703e 0a3c 703e 546f 2073 rts.

    .

    To s\n+000fce30: 7065 6369 6679 2074 6865 2068 6561 6465 pecify the heade\n+000fce40: 7220 7061 7274 7320 666f 7220 7468 6520 r parts for the \n+000fce50: 6d65 7468 6f64 2069 6e70 7574 2028 6d65 method input (me\n+000fce60: 7468 6f64 2072 6571 7565 7374 206d 6573 thod request mes\n+000fce70: 7361 6765 292c 2075 7365 3a3c 2f70 3e0a sage), use:

    .\n+000fce80: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n+000fcec0: 6773 6f61 7020 6e61 6d65 7370 6163 652d gsoap namespace-\n+000fced0: 7072 6566 6978 2073 6572 7669 6365 206d prefix service m\n+000fcee0: 6574 686f 642d 696e 7075 742d 6865 6164 ethod-input-head\n+000fcef0: 6572 2d70 6172 743a 206d 6574 686f 642d er-part: method-\n+000fcf00: 6e61 6d65 2068 6561 6465 722d 7061 7274 name header-part\n+000fcf10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    .

    Similarl\n+000fcf40: 792c 2074 6f20 7370 6563 6966 7920 7468 y, to specify th\n+000fcf50: 6520 6865 6164 6572 2070 6172 7473 2066 e header parts f\n+000fcf60: 6f72 2074 6865 206d 6574 686f 6420 6f75 or the method ou\n+000fcf70: 7470 7574 2028 6d65 7468 6f64 2072 6573 tput (method res\n+000fcf80: 706f 6e73 6520 6d65 7373 6167 6529 2c20 ponse message), \n+000fcf90: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    <\n+000fcfb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fcfc0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+000fcfe0: 616d 6573 7061 6365 2d70 7265 6669 7820 amespace-prefix \n+000fcff0: 7365 7276 6963 6520 6d65 7468 6f64 2d6f service method-o\n+000fd000: 7574 7075 742d 6865 6164 6572 2d70 6172 utput-header-par\n+000fd010: 743a 206d 6574 686f 642d 6e61 6d65 2068 t: method-name h\n+000fd020: 6561 6465 722d 7061 7274 3c2f 7370 616e eader-part
    .
    <\n+000fd050: 703e 5468 6520 6465 636c 6172 6174 696f p>The declaratio\n+000fd060: 6e73 206f 6e6c 7920 6166 6665 6374 2074 ns only affect t\n+000fd070: 6865 2057 5344 4c2e 2046 6f72 2065 7861 he WSDL. For exa\n+000fd080: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    \n+000fd0a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+000fd0d0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>SOAP_ENV__He\n+000fd120: 6164 6572 3c2f 613e 203c 2f64 6976 3e0a ader
    .\n+000fd130: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    \n+000fd160: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *h__transa\n+000fd190: 6374 696f 6e3b 203c 2f64 6976 3e0a 3c64 ction;
    .\n+000fd1b0: 2020 2020 3c73 7061 6e20 636c 6173 733d struct\n+000fd1d0: 203c 2f73 7061 6e3e 5573 6572 4175 7468 UserAuth\n+000fd1e0: 202a 685f 5f61 7574 6865 6e74 6963 6174 *h__authenticat\n+000fd1f0: 696f 6e3b 203c 2f64 6976 3e0a 3c64 6976 ion;
    .};\n+000fd210: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+000fd240: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+000fd250: 6365 206d 6574 686f 642d 696e 7075 742d ce method-input-\n+000fd260: 6865 6164 6572 2d70 6172 743a 206c 6f67 header-part: log\n+000fd270: 696e 2068 5f5f 6175 7468 656e 7469 6361 in h__authentica\n+000fd280: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
    //gso\n+000fd2c0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+000fd2d0: 7468 6f64 2d69 6e70 7574 2d68 6561 6465 thod-input-heade\n+000fd2e0: 722d 7061 7274 3a20 6c6f 6769 6e20 685f r-part: login h_\n+000fd2f0: 5f74 7261 6e73 6163 7469 6f6e 203c 2f73 _transaction
    .
    //gsoap ns se\n+000fd340: 7276 6963 6520 6d65 7468 6f64 2d6f 7574 rvice method-out\n+000fd350: 7075 742d 6865 6164 6572 2d70 6172 743a put-header-part:\n+000fd360: 206c 6f67 696e 2068 5f5f 7472 616e 7361 login h__transa\n+000fd370: 6374 696f 6e20 3c2f 7370 616e 3e3c 2f64 ction .
    \n+000fd3b0: 696e 743c 2f73 7061 6e3e 206e 735f 5f6c int ns__l\n+000fd3c0: 6f67 696e 282e 2e2e 293b 3c2f 6469 763e ogin(...);
    \n+000fd3d0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The h\n+000fd3f0: 6561 6465 7273 206d 7573 7420 6265 2070 eaders must be p\n+000fd400: 7265 7365 6e74 2069 6e20 616c 6c20 6f70 resent in all op\n+000fd410: 6572 6174 696f 6e73 2074 6861 7420 6465 erations that de\n+000fd420: 636c 6172 6564 2074 6865 2068 6561 6465 clared the heade\n+000fd430: 7220 7061 7274 732e 3c2f 703e 0a3c 703e r parts.

    .

    \n+000fd440: 5365 6520 616c 736f 2041 5049 2064 6f63 See also API doc\n+000fd450: 756d 656e 7461 7469 6f6e 204d 6f64 756c umentation Modul\n+000fd460: 6520 3c61 2063 6c61 7373 3d22 656c 2220 e Header structur\n+000fd4a0: 6520 616e 6420 6675 6e63 7469 6f6e 733c e and functions<\n+000fd4b0: 2f61 3e2e 3c2f 703e 0a3c 703e f09f 949d /a>.

    .

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

    .<\n+000fd4f0: 6831 3e3c 6120 636c 6173 733d 2261 6e63 h1>\n+000fd510: 3c2f 613e 0a53 4f41 5020 4661 756c 7420 .SOAP Fault \n+000fd520: 7072 6f63 6573 7369 6e67 3c2f 6831 3e0a processing.\n+000fd530: 3c70 3e41 2062 7569 6c74 2d69 6e20 534f

    A built-in SO\n+000fd540: 4150 2046 6175 6c74 2064 6174 6120 7374 AP Fault data st\n+000fd550: 7275 6374 7572 6520 3c63 6f64 653e 3c61 ructure SOAP_ENV_\n+000fd5c0: 5f46 6175 6c74 3c2f 613e 3c2f 636f 6465 _Fault is generated b\n+000fd5e0: 7920 7468 6520 736f 6170 6370 7032 2074 y the soapcpp2 t\n+000fd5f0: 6f6f 6c20 666f 7220 6578 6368 616e 6769 ool for exchangi\n+000fd600: 6e67 2065 7863 6570 7469 6f6e 206d 6573 ng exception mes\n+000fd610: 7361 6765 732e 2054 6869 7320 7374 7275 sages. This stru\n+000fd620: 6374 7572 6520 6861 7320 7468 6520 6765 cture has the ge\n+000fd630: 6e65 7261 6c20 666f 726d 3a3c 2f70 3e0a neral form:

    .\n+000fd640: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+000fd680: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct SOAP_EN\n+000fd6d0: 565f 5f46 6175 6c74 3c2f 613e 203c 2f64 V__Fault .
    {
    .\n+000fd710: 2020 2020 3c61 2063 6c61 7373 3d22 636f _QName faultcode; \n+000fd7e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // _QName \n+000fd800: 6973 2062 7569 6c74 2d69 6e20 3c2f 7370 is built-in
    .
    \n+000fd830: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *faultstrin\n+000fd8c0: 673c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 g;
    .\n+000fd8e0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+000fd900: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *faulta\n+000fd970: 6374 6f72 3c2f 613e 3b20 3c2f 6469 763e ctor;
    \n+000fd980: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    str\n+000fd9b0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct SOAP_EN\n+000fda00: 565f 5f44 6574 6169 6c3c 2f61 3e20 2a3c V__Detail *<\n+000fda10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000fda20: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n+000fda30: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+000fda40: 6661 756c 742e 6874 6d6c 2361 6634 3963 fault.html#af49c\n+000fda50: 3261 3139 3236 6562 6634 6338 3635 6464 2a1926ebf4c865dd\n+000fda60: 6434 3434 3936 3062 3961 6462 223e 6465 d444960b9adb\">de\n+000fda70: 7461 696c 3c2f 613e 3b20 3c2f 6469 763e tail;
    \n+000fda80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    str\n+000fdab0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct SOAP_ENV_\n+000fdb00: 5f43 6f64 653c 2f61 3e20 2a3c 6120 636c _Code *SOAP_E\n+000fdb70: 4e56 5f5f 436f 6465 3c2f 613e 3b20 3c73 NV__Code; // must be a\n+000fdba0: 2053 4f41 505f 454e 565f 5f43 6f64 6520 SOAP_ENV__Code \n+000fdbb0: 7374 7275 6374 2064 6566 696e 6564 2062 struct defined b\n+000fdbc0: 656c 6f77 203c 2f73 7061 6e3e 3c2f 6469 elow .. \n+000fdca0: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+000fdcc0: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *SOAP_ENV\n+000fdd30: 5f5f 4e6f 6465 3c2f 613e 3b20 3c2f 6469 __Node; .
    char *\n+000fdd80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 S\n+000fdde0: 4f41 505f 454e 565f 5f52 6f6c 653c 2f61 OAP_ENV__Role;
    ..
    }; \n+000fdf50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n+000fdf80: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct SOAP_EN\n+000fdfd0: 565f 5f43 6f64 653c 2f61 3e20 3c2f 6469 V__Code .
    {
    . \n+000fe010: 2020 203c 6120 636c 6173 733d 2263 6f64 _QName\n+000fe070: 203c 6120 636c 6173 733d 2263 6f64 6522 S\n+000fe0d0: 4f41 505f 454e 565f 5f56 616c 7565 3c2f OAP_ENV__Value;
    .\n+000fe1f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .<\n+000fe220: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fe230: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct SOAP_ENV__Detai\n+000fe290: 6c3c 2f61 3e20 3c2f 6469 763e 0a3c 6469 l
    .{\n+000fe2b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int __type; <\n+000fe360: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000fe370: 656e 7422 3e2f 2f20 5468 6520 534f 4150 ent\">// The SOAP\n+000fe380: 5f54 5950 455f 206f 6620 7468 6520 6f62 _TYPE_ of the ob\n+000fe390: 6a65 6374 2073 6572 6961 6c69 7a65 6420 ject serialized \n+000fe3a0: 6173 2046 6175 6c74 2064 6574 6169 6c20 as Fault detail \n+000fe3b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+000fe3d0: 2020 2020 3c73 7061 6e20 636c 6173 733d vo\n+000fe3f0: 6964 3c2f 7370 616e 3e20 2a3c 6120 636c id *fault\n+000fe460: 3c2f 613e 3b20 3c73 7061 6e20 636c 6173 ; // p\n+000fe480: 6f69 6e74 6572 2074 6f20 7468 6520 6661 ointer to the fa\n+000fe490: 756c 7420 6f62 6a65 6374 2c20 6f72 204e ult object, or N\n+000fe4a0: 554c 4c20 3c2f 7370 616e 3e3c 2f64 6976 ULL .
    _XML<\n+000fe520: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> __any; \n+000fe590: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // any oth\n+000fe5b0: 6572 2064 6574 6169 6c20 656c 656d 656e er detail elemen\n+000fe5c0: 7420 636f 6e74 656e 7420 2873 746f 7265 t content (store\n+000fe5d0: 6420 696e 2058 4d4c 2066 6f72 6d61 7429 d in XML format)\n+000fe5e0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+000fe5f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fe600: 3e7d 3b3c 2f64 6976 3e0a 3c64 6976 2063 >};
    .
    SOAP_EN\n+000fe690: 565f 5f43 6f64 653c 2f61 3e3c 2f64 6976 V__Code
    SOAP Fault C\n+000fe6c0: 6f64 6520 7374 7275 6374 7572 652e 3c2f ode structure.
    Defini\n+000fe6f0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+000fe700: 7032 2e68 3a39 3437 313c 2f64 6976 3e3c p2.h:9471
    <\n+000fe710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP_EN\n+000fe7e0: 565f 5f43 6f64 653a 3a53 4f41 505f 454e V__Code::SOAP_EN\n+000fe7f0: 565f 5f53 7562 636f 6465 3c2f 613e 3c2f V__Subcode
    struct S\n+000fe820: 4f41 505f 454e 565f 5f43 6f64 6520 2a20 OAP_ENV__Code * \n+000fe830: 534f 4150 5f45 4e56 5f5f 5375 6263 6f64 SOAP_ENV__Subcod\n+000fe840: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    Option\n+000fe860: 616c 2065 6c65 6d65 6e74 2053 4f41 502d al element SOAP-\n+000fe870: 454e 563a 5375 6263 6f64 6520 6f66 2058 ENV:Subcode of X\n+000fe880: 5344 2074 7970 6520 534f 4150 2d45 4e56 SD type SOAP-ENV\n+000fe890: 3a43 6f64 653c 2f64 6976 3e3c 6469 7620 :Code
    Definition:\n+000fe8c0: 2073 7464 736f 6170 322e 683a 3934 3735 stdsoap2.h:9475\n+000fe8d0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    <\n+000fe950: 6120 6872 6566 3d22 7374 7275 6374 5f73 a href=\"struct_s\n+000fe960: 5f6f 5f61 5f70 5f5f 5f65 5f6e 5f76 5f5f _o_a_p___e_n_v__\n+000fe970: 5f5f 5f63 6f64 652e 6874 6d6c 2361 3632 ___code.html#a62\n+000fe980: 3835 6231 6564 3862 3263 6164 6333 3138 85b1ed8b2cadc318\n+000fe990: 6437 3330 6639 3731 3562 3239 3538 223e d730f9715b2958\">\n+000fe9a0: 534f 4150 5f45 4e56 5f5f 436f 6465 3a3a SOAP_ENV__Code::\n+000fe9b0: 534f 4150 5f45 4e56 5f5f 5661 6c75 653c SOAP_ENV__Value<\n+000fe9c0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    _QN\n+000fe9e0: 616d 6520 534f 4150 5f45 4e56 5f5f 5661 ame SOAP_ENV__Va\n+000fe9f0: 6c75 653c 2f64 6976 3e3c 6469 7620 636c lue
    Opti\n+000fea10: 6f6e 616c 2065 6c65 6d65 6e74 2053 4f41 onal element SOA\n+000fea20: 502d 454e 563a 5661 6c75 6520 6f66 2058 P-ENV:Value of X\n+000fea30: 5344 2074 7970 6520 7873 643a 514e 616d SD type xsd:QNam\n+000fea40: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    Def\n+000fea60: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+000fea70: 736f 6170 322e 683a 3934 3733 3c2f 6469 soap2.h:9473
    .
    SOAP\n+000feb10: 5f45 4e56 5f5f 4465 7461 696c 3c2f 613e _ENV__Detail\n+000feb20: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    SOAP Fa\n+000feb40: 756c 7420 4465 7461 696c 2073 7472 7563 ult Detail struc\n+000feb50: 7475 7265 2e3c 2f64 6976 3e3c 6469 7620 ture.
    Definition:\n+000feb80: 2073 7464 736f 6170 322e 683a 3934 3832 stdsoap2.h:9482\n+000feb90: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .SOAP_ENV__De\n+000fec70: 7461 696c 3a3a 6661 756c 743c 2f61 3e3c tail::fault<\n+000fec80: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void * \n+000feca0: 6661 756c 743c 2f64 6976 3e3c 6469 7620 fault
    An\n+000fecc0: 7920 6461 7461 206f 6620 736f 6d65 2074 y data of some t\n+000fecd0: 7970 6520 5420 7365 7269 616c 697a 6564 ype T serialized\n+000fece0: 2061 7320 6661 756c 7420 656c 656d 656e as fault elemen\n+000fecf0: 7420 7768 656e 2069 7473 2053 4f41 505f t when its SOAP_\n+000fed00: 5459 5045 5f54 2069 7320 6173 7369 676e TYPE_T is assign\n+000fed10: 6564 2074 6f20 5f5f 7479 7065 3c2f 6469 ed to __type
    Definiti\n+000fed40: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+000fed50: 2e68 3a39 3438 363c 2f64 6976 3e3c 2f64 .h:9486
    .\n+000fee70: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Any XML conte\n+000fee90: 6e74 2e3c 2f64 6976 3e3c 6469 7620 636c nt.
    D\n+000feeb0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+000feec0: 7464 736f 6170 322e 683a 3934 3838 3c2f tdsoap2.h:9488
    .
    <\n+000fef50: 6120 6872 6566 3d22 7374 7275 6374 5f73 a href=\"struct_s\n+000fef60: 5f6f 5f61 5f70 5f5f 5f65 5f6e 5f76 5f5f _o_a_p___e_n_v__\n+000fef70: 5f5f 5f64 6574 6169 6c2e 6874 6d6c 2361 ___detail.html#a\n+000fef80: 6532 3162 6535 6166 3066 3366 3664 6334 e21be5af0f3f6dc4\n+000fef90: 3766 3264 6266 3465 3335 6532 3233 3030 7f2dbf4e35e22300\n+000fefa0: 223e 534f 4150 5f45 4e56 5f5f 4465 7461 \">SOAP_ENV__Deta\n+000fefb0: 696c 3a3a 5f5f 7479 7065 3c2f 613e 3c2f il::__type
    int __ty\n+000fefe0: 7065 3c2f 6469 763e 3c64 6976 2063 6c61 pe
    Any d\n+000ff000: 6174 6120 6f66 2073 6f6d 6520 7479 7065 ata of some type\n+000ff010: 2054 2073 6572 6961 6c69 7a65 6420 6173 T serialized as\n+000ff020: 2066 6175 6c74 2065 6c65 6d65 6e74 2077 fault element w\n+000ff030: 6865 6e20 6974 7320 534f 4150 5f54 5950 hen its SOAP_TYP\n+000ff040: 455f 5420 6973 2061 7373 6967 6e65 6420 E_T is assigned \n+000ff050: 746f 205f 5f74 7970 653c 2f64 6976 3e3c to __type
    <\n+000ff060: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+000ff070: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+000ff080: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+000ff090: 3934 3834 3c2f 6469 763e 3c2f 6469 763e 9484
    \n+000ff0a0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    \n+000ff100: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 <\n+000ff190: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+000ff1a0: 6922 3e63 6861 7220 2a20 534f 4150 5f45 i\">char * SOAP_E\n+000ff1b0: 4e56 5f5f 4e6f 6465 3c2f 6469 763e 3c64 NV__Node
    Optional elemen\n+000ff1e0: 7420 534f 4150 2d45 4e56 3a4e 6f64 6520 t SOAP-ENV:Node \n+000ff1f0: 6f66 2058 5344 2074 7970 6520 7873 643a of XSD type xsd:\n+000ff200: 7374 7269 6e67 3c2f 6469 763e 3c64 6976 string
    <\n+000ff220: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:946\n+000ff240: 303c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 0
    .SOAP_ENV__Fau\n+000ff320: 6c74 3a3a 534f 4150 5f45 4e56 5f5f 4465 lt::SOAP_ENV__De\n+000ff330: 7461 696c 3c2f 613e 3c2f 6469 763e 3c64 tail
    struct SOAP_EN\n+000ff360: 565f 5f44 6574 6169 6c20 2a20 534f 4150 V__Detail * SOAP\n+000ff370: 5f45 4e56 5f5f 4465 7461 696c 3c2f 6469 _ENV__Detail
    Optional el\n+000ff3a0: 656d 656e 7420 534f 4150 2d45 4e56 3a44 ement SOAP-ENV:D\n+000ff3b0: 6574 6169 6c20 6f66 2058 5344 2074 7970 etail of XSD typ\n+000ff3c0: 6520 534f 4150 2d45 4e56 3a44 6574 6169 e SOAP-ENV:Detai\n+000ff3d0: 6c3c 2f64 6976 3e3c 6469 7620 636c 6173 l
    Def\n+000ff3f0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+000ff400: 736f 6170 322e 683a 3934 3634 3c2f 6469 soap2.h:9464
    .
    Optiona\n+000ff550: 6c20 656c 656d 656e 7420 534f 4150 2d45 l element SOAP-E\n+000ff560: 4e56 3a52 6f6c 6520 6f66 2058 5344 2074 NV:Role of XSD t\n+000ff570: 7970 6520 7873 643a 7374 7269 6e67 3c2f ype xsd:string
    Defini\n+000ff5a0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+000ff5b0: 7032 2e68 3a39 3436 323c 2f64 6976 3e3c p2.h:9462
    <\n+000ff5c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    struct\n+000ff6d0: 2053 4f41 505f 454e 565f 5f52 6561 736f SOAP_ENV__Reaso\n+000ff6e0: 6e20 2a20 534f 4150 5f45 4e56 5f5f 5265 n * SOAP_ENV__Re\n+000ff6f0: 6173 6f6e 3c2f 6469 763e 3c64 6976 2063 ason
    Opt\n+000ff710: 696f 6e61 6c20 656c 656d 656e 7420 534f ional element SO\n+000ff720: 4150 2d45 4e56 3a52 6561 736f 6e20 6f66 AP-ENV:Reason of\n+000ff730: 2058 5344 2074 7970 6520 534f 4150 2d45 XSD type SOAP-E\n+000ff740: 4e56 3a52 6561 736f 6e3c 2f64 6976 3e3c NV:Reason
    <\n+000ff750: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+000ff760: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+000ff770: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+000ff780: 3934 3538 3c2f 6469 763e 3c2f 6469 763e 9458
    \n+000ff790: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    \n+000ff7f0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+000ff890: 6368 6172 202a 2066 6175 6c74 7374 7269 char * faultstri\n+000ff8a0: 6e67 3c2f 6469 763e 3c64 6976 2063 6c61 ng
    Optio\n+000ff8c0: 6e61 6c20 656c 656d 656e 7420 6661 756c nal element faul\n+000ff8d0: 7473 7472 696e 6720 6f66 2058 5344 2074 tstring of XSD t\n+000ff8e0: 7970 6520 7873 643a 7374 7269 6e67 3c2f ype xsd:string
    Defini\n+000ff910: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+000ff920: 7032 2e68 3a39 3435 303c 2f64 6976 3e3c p2.h:9450
    <\n+000ff930: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP_\n+000ffa00: 454e 565f 5f46 6175 6c74 3a3a 534f 4150 ENV__Fault::SOAP\n+000ffa10: 5f45 4e56 5f5f 436f 6465 3c2f 613e 3c2f _ENV__Code
    struct S\n+000ffa40: 4f41 505f 454e 565f 5f43 6f64 6520 2a20 OAP_ENV__Code * \n+000ffa50: 534f 4150 5f45 4e56 5f5f 436f 6465 3c2f SOAP_ENV__Code
    Optional \n+000ffa80: 656c 656d 656e 7420 534f 4150 2d45 4e56 element SOAP-ENV\n+000ffa90: 3a43 6f64 6520 6f66 2058 5344 2074 7970 :Code of XSD typ\n+000ffaa0: 6520 534f 4150 2d45 4e56 3a43 6f64 653c e SOAP-ENV:Code<\n+000ffab0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+000ffad0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+000ffae0: 6170 322e 683a 3934 3536 3c2f 6469 763e ap2.h:9456
    \n+000ffaf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+000ffbe0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    _QName fault\n+000ffc00: 636f 6465 3c2f 6469 763e 3c64 6976 2063 code
    Opt\n+000ffc20: 696f 6e61 6c20 656c 656d 656e 7420 6661 ional element fa\n+000ffc30: 756c 7463 6f64 6520 6f66 2058 5344 2074 ultcode of XSD t\n+000ffc40: 7970 6520 7873 643a 514e 616d 653c 2f64 ype xsd:QName
    Definit\n+000ffc70: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+000ffc80: 322e 683a 3934 3438 3c2f 6469 763e 3c2f 2.h:9448
    .
    <\n+000ffd80: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+000ffd90: 6922 3e63 6861 7220 2a20 6661 756c 7461 i\">char * faulta\n+000ffda0: 6374 6f72 3c2f 6469 763e 3c64 6976 2063 ctor
    Opt\n+000ffdc0: 696f 6e61 6c20 656c 656d 656e 7420 6661 ional element fa\n+000ffdd0: 756c 7461 6374 6f72 206f 6620 5853 4420 ultactor of XSD \n+000ffde0: 7479 7065 2078 7364 3a73 7472 696e 673c type xsd:string<\n+000ffdf0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+000ffe10: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+000ffe20: 6170 322e 683a 3934 3532 3c2f 6469 763e ap2.h:9452
    \n+000ffe30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct SOAP_ENV\n+000fff40: 5f5f 4465 7461 696c 202a 2064 6574 6169 __Detail * detai\n+000fff50: 6c3c 2f64 6976 3e3c 6469 7620 636c 6173 l
    Option\n+000fff70: 616c 2065 6c65 6d65 6e74 2064 6574 6169 al element detai\n+000fff80: 6c20 6f66 2058 5344 2074 7970 6520 534f l of XSD type SO\n+000fff90: 4150 2d45 4e56 3a44 6574 6169 6c3c 2f64 AP-ENV:Detail
    Definit\n+000fffc0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+000fffd0: 322e 683a 3934 3534 3c2f 6469 763e 3c2f 2.h:9454
    .

    T\n+00100000: 6865 2066 6972 7374 2066 6f75 7220 6d65 he first four me\n+00100010: 6d62 6572 7320 696e 203c 636f 6465 3e3c mbers in <\n+00100020: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00100030: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n+00100040: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6661 p___e_n_v_____fa\n+00100050: 756c 742e 6874 6d6c 2220 7469 746c 653d ult.html\" title=\n+00100060: 2253 4f41 5020 4661 756c 7420 7374 7275 \"SOAP Fault stru\n+00100070: 6374 7572 652e 223e 534f 4150 5f45 4e56 cture.\">SOAP_ENV\n+00100080: 5f5f 4661 756c 743c 2f61 3e3c 2f63 6f64 __Fault are SOAP 1.1 \n+001000a0: 7370 6563 6966 6963 2e20 5468 6520 6c61 specific. The la\n+001000b0: 7374 2066 6976 6520 6d65 6d62 6572 7320 st five members \n+001000c0: 6172 6520 534f 4150 2031 2e32 2073 7065 are SOAP 1.2 spe\n+001000d0: 6369 6669 632e 2059 6f75 2063 616e 2072 cific. You can r\n+001000e0: 6564 6566 696e 6520 7468 6573 6520 7374 edefine these st\n+001000f0: 7275 6374 7572 6573 2069 6e20 7468 6520 ructures in the \n+00100100: 696e 7465 7266 6163 6520 6865 6164 6572 interface header\n+00100110: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp\n+00100120: 7032 2e20 466f 7220 6578 616d 706c 652c p2. For example,\n+00100130: 2079 6f75 2063 616e 2075 7365 2061 203c you can use a <\n+00100140: 636f 6465 3e63 6c61 7373 3c2f 636f 6465 code>class for the \n+00100160: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_EN\n+001001c0: 565f 5f46 6175 6c74 3c2f 613e 3c2f 636f V__Fault and add meth\n+001001e0: 6f64 7320 666f 7220 636f 6e76 656e 6965 ods for convenie\n+001001f0: 6e63 652e 3c2f 703e 0a3c 703e 5468 6520 nce.

    .

    The \n+00100200: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 SOAP_ENV_\n+00100270: 5f44 6574 6169 6c3c 2f61 3e3c 2f63 6f64 _Detail structure can\n+00100290: 2062 6520 6368 616e 6765 6420 746f 2074 be changed to t\n+001002a0: 6865 206e 6565 6473 206f 6620 5765 6220 he needs of Web \n+001002b0: 7365 7276 6963 6520 6170 706c 6963 6174 service applicat\n+001002c0: 696f 6e20 746f 2063 6f6d 6d75 6e69 6361 ion to communica\n+001002d0: 7465 2073 7065 6369 6669 6320 6661 756c te specific faul\n+001002e0: 7420 6461 7461 2073 7472 7563 7475 7265 t data structure\n+001002f0: 732c 2062 7574 2074 6869 7320 6973 2067 s, but this is g\n+00100300: 656e 6572 616c 6c79 206e 6f74 206e 6563 enerally not nec\n+00100310: 6573 7361 7279 2062 6563 6175 7365 2074 essary because t\n+00100320: 6865 2061 7070 6c69 6361 7469 6f6e 2d73 he application-s\n+00100330: 7065 6369 6669 6320 534f 4150 2046 6175 pecific SOAP Fau\n+00100340: 6c74 2064 6574 6169 6c73 2063 616e 2062 lt details can b\n+00100350: 6520 7365 7269 616c 697a 6564 2076 6961 e serialized via\n+00100360: 2074 6865 203c 636f 6465 3e5f 5f74 7970 the __typ\n+00100370: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and fault \n+00100390: 6d65 6d62 6572 7320 696e 2074 6865 203c members in the <\n+001003a0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>SOAP_ENV__\n+00100410: 4465 7461 696c 3c2f 613e 3c2f 636f 6465 Detail member, see Se\n+00100430: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Void \n+00100460: 706f 696e 7465 7220 7365 7269 616c 697a pointer serializ\n+00100470: 6174 696f 6e3c 2f61 3e20 6f6e 2074 6865 ation on the\n+00100480: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n+00100490: 6620 6461 7461 2072 6566 6572 7265 6420 f data referred \n+001004a0: 746f 2062 7920 3c63 6f64 653e 5f5f 7479 to by __ty\n+001004b0: 7065 3c2f 636f 6465 3e20 616e 6420 3c63 pe and fault\n+001004d0: 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 6120 .

    .

    When a \n+001004e0: 7573 6572 2d64 6566 696e 6520 7365 7276 user-define serv\n+001004f0: 6963 6520 6f70 6572 6174 696f 6e20 6675 ice operation fu\n+00100500: 6e63 7469 6f6e 2072 6574 7572 6e73 2061 nction returns a\n+00100510: 6e20 6572 726f 7220 7769 7468 203c 636f n error with soap_sender_fau\n+001005d0: 6c74 3c2f 613e 3c2f 636f 6465 3e20 6f72 lt or\n+001005e0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_rece\n+00100690: 6976 6572 5f66 6175 6c74 3c2f 613e 3c2f iver_fault, then the \n+001006b0: 534f 4150 2046 6175 6c74 2073 7472 7563 SOAP Fault struc\n+001006c0: 7475 7265 2069 7320 706f 7075 6c61 7465 ture is populate\n+001006d0: 6420 616e 6420 3c63 6f64 653e 3c61 2063 d and soap::fault<\n+001007a0: 2f61 3e3c 2f63 6f64 653e 2070 6f69 6e74 /a> point\n+001007b0: 7320 746f 2074 6869 7320 534f 4150 2046 s to this SOAP F\n+001007c0: 6175 6c74 2e20 5468 6520 534f 4150 2046 ault. The SOAP F\n+001007d0: 6175 6c74 2069 7320 7365 6e74 2074 6f20 ault is sent to \n+001007e0: 7468 6520 636c 6965 6e74 2e20 5468 6520 the client. The \n+001007f0: 636c 6965 6e74 2070 6f70 756c 6174 6573 client populates\n+00100800: 2061 2053 4f41 5020 4661 756c 7420 7374 a SOAP Fault st\n+00100810: 7275 6374 7572 6520 7468 6174 2063 6f6e ructure that con\n+00100820: 7461 696e 7320 7468 6520 534f 4150 2046 tains the SOAP F\n+00100830: 6175 6c74 206d 6573 7361 6765 2077 6974 ault message wit\n+00100840: 6820 6465 7461 696c 732e 3c2f 703e 0a3c h details.

    .<\n+00100850: 703e 5365 7276 6572 2d73 6964 6520 6661 p>Server-side fa\n+00100860: 756c 7473 2061 7265 2072 6169 7365 6420 ults are raised \n+00100870: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap_se\n+00100920: 6e64 6572 5f66 6175 6c74 3c2f 613e 3c2f nder_fault or <\n+00100940: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00100950: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00100960: 5f66 6175 6c74 2e68 746d 6c23 6761 3931 _fault.html#ga91\n+00100970: 6463 3662 6363 3363 3566 3335 6530 3233 dc6bcc3c5f35e023\n+00100980: 6237 3861 3666 3436 6137 3965 6436 2220 b78a6f46a79ed6\" \n+00100990: 7469 746c 653d 2253 6574 2053 4f41 5020 title=\"Set SOAP \n+001009a0: 312e 3120 7365 7276 6572 2066 6175 6c74 1.1 server fault\n+001009b0: 202f 2053 4f41 5020 312e 3220 7265 6365 / SOAP 1.2 rece\n+001009c0: 6976 6572 2066 6175 6c74 2073 7472 696e iver fault strin\n+001009d0: 6720 616e 6420 6465 7461 696c 2e22 3e73 g and detail.\">s\n+001009e0: 6f61 705f 7265 6365 6976 6572 5f66 6175 oap_receiver_fau\n+001009f0: 6c74 3c2f 613e 3c2f 636f 6465 3e2e 2054 lt. T\n+00100a00: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap_send\n+00100ab0: 6572 5f66 6175 6c74 3c2f 613e 3c2f 636f er_fault call should \n+00100ad0: 6265 2075 7365 6420 746f 2069 6e66 6f72 be used to infor\n+00100ae0: 6d20 7468 6174 2074 6865 2073 656e 6465 m that the sende\n+00100af0: 7220 6973 2061 7420 6661 756c 7420 616e r is at fault an\n+00100b00: 6420 7468 6520 7365 6e64 6572 2028 636c d the sender (cl\n+00100b10: 6965 6e74 2920 7368 6f75 6c64 206e 6f74 ient) should not\n+00100b20: 2072 652d 7365 6e64 2074 6865 2072 6571 re-send the req\n+00100b30: 7565 7374 2e20 5468 6520 3c63 6f64 653e uest. The \n+00100b40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+00100be0: 736f 6170 5f72 6563 6569 7665 725f 6661 soap_receiver_fa\n+00100bf0: 756c 743c 2f61 3e3c 2f63 6f64 653e 2063 ult c\n+00100c00: 616c 6c20 7368 6f75 6c64 2062 6520 7573 all should be us\n+00100c10: 6564 2074 6f20 696e 6469 6361 7465 2061 ed to indicate a\n+00100c20: 2074 656d 706f 7261 7279 2073 6572 7665 temporary serve\n+00100c30: 722d 7369 6465 2070 726f 626c 656d 2c20 r-side problem, \n+00100c40: 736f 2061 2073 656e 6465 7220 2863 6c69 so a sender (cli\n+00100c50: 656e 7429 2063 616e 2072 652d 7365 6e64 ent) can re-send\n+00100c60: 2074 6865 2072 6571 7565 7374 206c 6174 the request lat\n+00100c70: 6572 2e20 466f 7220 6578 616d 706c 653a er. For example:\n+00100c80: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int ns1__myMethod(\n+00100ce0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00100d30: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+00100d60: 3c2f 613e 2c20 2e2e 2e29 203c 2f64 6976 , ...) .
    {
    . \n+00100da0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    return soap_re\n+00100e60: 6365 6976 6572 5f66 6175 6c74 3c2f 613e ceiver_fault\n+00100e70: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00100ea0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+00100ec0: 756f 743b 5265 736f 7572 6365 2074 656d uot;Resource tem\n+00100ed0: 706f 7261 7269 6c79 2075 6e61 7661 696c porarily unavail\n+00100ee0: 6162 6c65 2671 756f 743b 3c2f 7370 616e able", NULL); \n+00100f10: 2f2f 2072 6574 7572 6e20 6661 756c 7420 // return fault \n+00100f20: 746f 2073 656e 6465 7220 3c2f 7370 616e to sender
    .
    }.

    In t\n+00100f70: 6865 2065 7861 6d70 6c65 2c20 7468 6520 he example, the \n+00100f80: 534f 4150 2046 6175 6c74 2064 6574 6169 SOAP Fault detai\n+00100f90: 6c73 2077 6572 6520 656d 7074 7920 284e ls were empty (N\n+00100fa0: 554c 4c29 2e20 596f 7520 6d61 7920 7061 ULL). You may pa\n+00100fb0: 7373 2061 6e20 584d 4c20 6672 6167 6d65 ss an XML fragme\n+00100fc0: 6e74 2c20 7768 6963 6820 7769 6c6c 2062 nt, which will b\n+00100fd0: 6520 6c69 7465 7261 6c6c 7920 696e 636c e literally incl\n+00100fe0: 7564 6564 2069 6e20 7468 6520 534f 4150 uded in the SOAP\n+00100ff0: 2046 6175 6c74 206d 6573 7361 6765 2e20 Fault message. \n+00101000: 466f 7220 5753 2d49 2042 6173 6963 2050 For WS-I Basic P\n+00101010: 726f 6669 6c65 2063 6f6d 706c 6961 6e63 rofile complianc\n+00101020: 652c 2079 6f75 206d 7573 7420 7061 7373 e, you must pass\n+00101030: 2061 6e20 584d 4c20 7374 7269 6e67 2077 an XML string w\n+00101040: 6974 6820 6f6e 6520 6f72 206d 6f72 6520 ith one or more \n+00101050: 6e61 6d65 7370 6163 6520 7175 616c 6966 namespace qualif\n+00101060: 6965 6420 656c 656d 656e 7473 2c20 7375 ied elements, su\n+00101070: 6368 2061 733a 3c2f 703e 0a3c 6469 7620 ch as:

    .
    ret\n+001010c0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn so\n+00101120: 6170 5f72 6563 6569 7665 725f 6661 756c ap_receiver_faul\n+00101130: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n+00101160: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, "Resourc\n+00101190: 6520 7465 6d70 6f72 6172 696c 7920 756e e temporarily un\n+001011a0: 6176 6169 6c61 626c 6526 7175 6f74 3b3c available"<\n+001011b0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "<er\n+001011e0: 726f 7263 6f64 6520 786d 6c6e 733d 2623 rorcode xmlns=&#\n+001011f0: 3339 3b68 7474 703a 2f2f 7465 6d70 7572 39;http://tempur\n+00101200: 692e 6f72 6726 2333 393b 2667 743b 3132 i.org'>12\n+00101210: 3326 6c74 3b2f 6572 726f 7263 6f64 6526 3</errorcode&\n+00101220: 6774 3b26 6c74 3b65 7272 6f72 696e 666f gt;<errorinfo\n+00101230: 2078 6d6c 6e73 3d26 2333 393b 6874 7470 xmlns='http\n+00101240: 3a2f 2f74 656d 7075 7269 2e6f 7267 2623 ://tempuri.org&#\n+00101250: 3339 3b26 6774 3b61 6263 266c 743b 2f65 39;>abc</e\n+00101260: 7272 6f72 696e 666f 2667 743b 2671 756f rrorinfo>&quo\n+00101270: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);.

    When\n+001012a0: 2061 2073 6572 7669 6365 206f 7065 7261 a service opera\n+001012b0: 7469 6f6e 206e 6565 6473 2074 6f20 706f tion needs to po\n+001012c0: 7075 6c61 7465 2053 4f41 5020 4661 756c pulate SOAP Faul\n+001012d0: 7420 6465 7461 696c 7320 7769 7468 2061 t details with a\n+001012e0: 2061 7070 6c69 6361 7469 6f6e 2d73 7065 application-spe\n+001012f0: 6369 6669 6320 6461 7461 2c20 6974 2064 cific data, it d\n+00101300: 6f65 7320 736f 2062 7920 6173 7369 676e oes so by assign\n+00101310: 696e 6720 7468 6520 3c63 6f64 653e 3c61 ing the soap::faul\n+001013e0: 743c 2f61 3e3c 2f63 6f64 653e 206d 656d t mem\n+001013f0: 6265 7220 6f66 2074 6865 2063 7572 7265 ber of the curre\n+00101400: 6e74 2072 6566 6572 656e 6365 2074 6f20 nt reference to \n+00101410: 7468 6520 636f 6e74 6578 7420 7769 7468 the context with\n+00101420: 2061 7070 726f 7072 6961 7465 2064 6174 appropriate dat\n+00101430: 6120 6173 736f 6369 6174 6564 2077 6974 a associated wit\n+00101440: 6820 7468 6520 6578 6365 7074 696f 6e20 h the exception \n+00101450: 616e 6420 6279 2072 6574 7572 6e69 6e67 and by returning\n+00101460: 2074 6865 2065 7272 6f72 203c 636f 6465 the error #SOAP_FAULT. For example\n+00101490: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    soap_receiver_f\n+00101520: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n+00101550: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "Erro\n+00101580: 7220 6d65 7373 6167 6526 7175 6f74 3b3c r message"<\n+00101590: 2f73 7061 6e3e 2c20 4e55 4c4c 293b 203c /span>, NULL); <\n+001015a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soap->\n+00101610: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;versio\n+00101660: 6e3c 2f61 3e20 3d3d 2032 2920 3c73 7061 n == 2) // SOAP 1.2 is\n+00101690: 2075 7365 6420 3c2f 7370 616e 3e3c 2f64 used .
    {
    .\n+001016d0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->f\n+00101750: 6175 6c74 3c2f 613e 2d26 6774 3b3c 6120 ault->SOAP\n+001017c0: 5f45 4e56 5f5f 4465 7461 696c 3c2f 613e _ENV__Detail\n+001017d0: 203d 2073 6f61 705f 6e65 775f 534f 4150 = soap_new_SOAP\n+001017e0: 5f45 4e56 5f5f 4465 7461 696c 283c 6120 _ENV__Detail(soap, -1\n+00101820: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    soap->\n+00101870: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;fault<\n+001018c0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->SOAP_ENV_\n+00101930: 5f44 6574 6169 6c3c 2f61 3e2d 2667 743b _Detail->\n+00101940: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+001019a0: 5f5f 7479 7065 3c2f 613e 203d 2053 4f41 __type = SOA\n+001019b0: 505f 5459 5045 5f6e 7331 5f5f 6d79 5374 P_TYPE_ns1__mySt\n+001019c0: 6163 6b44 6174 6154 7970 653b 203c 7370 ackDataType; // stack type\n+001019f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00101a00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00101a10: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap->\n+00101a90: 6661 756c 743c 2f61 3e2d 2667 743b 3c61 fault->SOA\n+00101b00: 505f 454e 565f 5f44 6574 6169 6c3c 2f61 P_ENV__Detail->fault \n+00101b80: 3d20 7370 3b20 2020 2020 2020 2020 2020 = sp; \n+00101b90: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00101ba0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // poin\n+00101bc0: 7420 746f 2073 7461 636b 203c 2f73 7061 t to stack
    .
    soap->\n+00101c20: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;fault<\n+00101c70: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->SOAP_ENV_\n+00101ce0: 5f44 6574 6169 6c3c 2f61 3e2d 2667 743b _Detail->\n+00101cf0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+00101d50: 5f5f 616e 793c 2f61 3e20 3d20 4e55 4c4c __any = NULL\n+00101d60: 3b20 2020 2020 2020 2020 2020 2020 2020 ; \n+00101d70: 2020 2020 2020 2020 2020 2020 203c 7370 // no other X\n+00101da0: 4d4c 2064 6174 6120 3c2f 7370 616e 3e3c ML data <\n+00101db0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+00101dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    els\n+00101e00: 653c 2f73 7061 6e3e 203c 2f64 6976 3e0a e
    .\n+00101e10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .. \n+00101fa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00101fd0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >fau\n+00102020: 6c74 3c2f 613e 2d26 6774 3b3c 6120 636c lt->detail\n+00102090: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->__type<\n+00102100: 2f61 3e20 3d20 534f 4150 5f54 5950 455f /a> = SOAP_TYPE_\n+00102110: 6e73 315f 5f6d 7953 7461 636b 4461 7461 ns1__myStackData\n+00102120: 5479 7065 3b20 3c73 7061 6e20 636c 6173 Type; // s\n+00102140: 7461 636b 2074 7970 6520 3c2f 7370 616e tack type
    .
    soap->\n+001021a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fault->detail\n+00102260: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fault =\n+001022d0: 2073 703b 2020 2020 2020 2020 2020 2020 sp; \n+001022e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001022f0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // point\n+00102310: 2074 6f20 7374 6163 6b20 3c2f 7370 616e to stack
    .
    soap->\n+00102370: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fault->detail\n+00102430: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->__any =\n+001024a0: 204e 554c 4c3b 2020 2020 2020 2020 2020 NULL; \n+001024b0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001024c0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // no ot\n+001024e0: 6865 7220 584d 4c20 6461 7461 203c 2f73 her XML data
    .
    } <\n+00102510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n+001026d0: 7368 6f72 7420 7665 7273 696f 6e3c 2f64 short version
    SOAP versi\n+00102700: 6f6e 2028 3020 3d20 6e6f 2053 4f41 502c on (0 = no SOAP,\n+00102710: 2031 203d 2053 4f41 5020 312e 312c 2032 1 = SOAP 1.1, 2\n+00102720: 203d 2053 4f41 5020 312e 3229 3c2f 6469 = SOAP 1.2)
    Definiti\n+00102750: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+00102760: 2e68 3a32 3835 313c 2f64 6976 3e3c 2f64 .h:2851
    .

    He\n+00102790: 7265 2c20 3c63 6f64 653e 3c61 2063 6c61 re, soap_r\n+00102840: 6563 6569 7665 725f 6661 756c 743c 2f61 eceiver_fault allocat\n+00102860: 6573 2061 2066 6175 6c74 2073 7472 7563 es a fault struc\n+00102870: 7420 7468 656e 2077 6520 7365 7420 7468 t then we set th\n+00102880: 6520 534f 4150 2046 6175 6c74 2064 6574 e SOAP Fault det\n+00102890: 6169 6c73 2061 7320 7368 6f77 6e2e 3c2f ails as shown..

    Note that \n+001028b0: 534f 4150 2031 2e32 2073 7570 706f 7274 SOAP 1.2 support\n+001028c0: 7320 6e65 7374 6564 2066 6175 6c74 2073 s nested fault s\n+001028d0: 7562 2d63 6f64 6573 2e20 5468 6573 6520 ub-codes. These \n+001028e0: 6361 6e20 6265 2073 6574 2061 7320 666f can be set as fo\n+001028f0: 6c6c 6f77 733a 3c2f 703e 0a3c 6469 7620 llows:

    .
    struct \n+00102940: 3c2f 7370 616e 3e3c 6120 636c 6173 733d SOAP_ENV__Cod\n+00102990: 653c 2f61 3e20 2a73 7562 636f 6465 3120 e *subcode1 \n+001029a0: 3d20 736f 6170 5f6e 6577 5f53 4f41 505f = soap_new_SOAP_\n+001029b0: 454e 565f 5f43 6f64 6528 3c61 2063 6c61 ENV__Code(soap);.
    struct\n+00102a20: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 SOAP_ENV__Co\n+00102a70: 6465 3c2f 613e 202a 7375 6263 6f64 6532 de *subcode2\n+00102a80: 203d 2073 6f61 705f 6e65 775f 534f 4150 = soap_new_SOAP\n+00102a90: 5f45 4e56 5f5f 436f 6465 283c 6120 636c _ENV__Code(soap);.
    soap_sen\n+00102b40: 6465 725f 6661 756c 743c 2f61 3e28 3c61 der_fault(soap, <\n+00102b80: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00102b90: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00102ba0: 3b54 6865 2072 6571 7565 7374 6564 2070 ;The requested p\n+00102bb0: 726f 6669 6c65 2074 6f6b 656e 2050 726f rofile token Pro\n+00102bc0: 6669 6c65 546f 6b65 6e20 646f 6573 206e fileToken does n\n+00102bd0: 6f74 2065 7869 7374 2e26 7175 6f74 3b3c ot exist."<\n+00102be0: 2f73 7061 6e3e 2c20 4e55 4c4c 293b 203c /span>, NULL); <\n+00102bf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    subcode1\n+00102c10: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->SOAP_ENV__Val\n+00102c80: 7565 3c2f 613e 203d 2028 3c73 7061 6e20 ue = (char*\n+00102cb0: 293c 7370 616e 2063 6c61 7373 3d22 7374 )&qu\n+00102cd0: 6f74 3b74 6572 3a49 6e76 616c 6964 4172 ot;ter:InvalidAr\n+00102ce0: 6773 2671 756f 743b 3c2f 7370 616e 3e3b gs";\n+00102cf0: 203c 7370 616e 2063 6c61 7373 3d22 636f // a QNam\n+00102d10: 6520 7661 6c75 653c 2f73 7061 6e3e 3c2f e value.
    subcode1-\n+00102d40: 2667 743b 3c61 2063 6c61 7373 3d22 636f >SOAP_ENV__Subc\n+00102db0: 6f64 653c 2f61 3e20 3d20 7375 6263 6f64 ode = subcod\n+00102dc0: 6532 3b3c 2f64 6976 3e0a 3c64 6976 2063 e2;
    .
    subc\n+00102de0: 6f64 6532 2d26 6774 3b3c 6120 636c 6173 ode2->SOAP_ENV_\n+00102e50: 5f56 616c 7565 3c2f 613e 203d 2028 3c73 _Value = (char*)"ter:NoPro\n+00102eb0: 6669 6c65 2671 756f 743b 3c2f 7370 616e file"; // a QN\n+00102ee0: 616d 6520 7661 6c75 653c 2f73 7061 6e3e ame value\n+00102ef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    subcode\n+00102f10: 322d 2667 743b 3c61 2063 6c61 7373 3d22 2->SOAP_ENV__Su\n+00102f80: 6263 6f64 653c 2f61 3e20 3d20 4e55 4c4c bcode = NULL\n+00102f90: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap->fault\n+00103030: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->SOAP_ENV__Co\n+001030a0: 6465 3c2f 613e 2d26 6774 3b3c 6120 636c de->SOAP_EN\n+00103110: 565f 5f53 7562 636f 6465 3c2f 613e 203d V__Subcode =\n+00103120: 2073 7562 636f 6465 313b 3c2f 6469 763e subcode1;
    \n+00103130: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ret\n+00103160: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n+001031c0: 4f41 505f 4641 554c 543c 2f61 3e3b 3c2f OAP_FAULT;.

    T\n+001031f0: 6869 7320 7072 6f64 7563 6573 3a3c 2f70 his produces:.

    <\n+00103240: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n+00103260: 4e56 3a46 6175 6c74 3c2f 7370 616e 3e26 NV:Fault&\n+00103270: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    &l\n+00103290: 743b 3c73 7061 6e20 636c 6173 733d 226b t;SOAP\n+001032b0: 2d45 4e56 3a43 6f64 653c 2f73 7061 6e3e -ENV:Code\n+001032c0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    \n+001032e0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <S\n+00103300: 4f41 502d 454e 563a 5661 6c75 653c 2f73 OAP-ENV:Value>SO\n+00103330: 4150 2d45 4e56 3a53 656e 6465 723c 2f73 AP-ENV:Sender</SOAP-ENV:Valu\n+00103370: 653c 2f73 7061 6e3e 2667 743b 3c2f 6469 e>.
    <SOAP-ENV:\n+001033c0: 5375 6263 6f64 653c 2f73 7061 6e3e 2667 Subcode&g\n+001033d0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    \n+001033f0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <S\n+00103410: 4f41 502d 454e 563a 5661 6c75 653c 2f73 OAP-ENV:Value>te\n+00103440: 723a 496e 7661 6c69 6441 7267 733c 2f73 r:InvalidArgs</SOAP-ENV:Valu\n+00103480: 653c 2f73 7061 6e3e 2667 743b 3c2f 6469 e>.
    <<\n+001034b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001034c0: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype\">SOAP-EN\n+001034d0: 563a 5375 6263 6f64 653c 2f73 7061 6e3e V:Subcode\n+001034e0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    \n+00103500: 2020 2020 2026 6c74 3b3c 7370 616e 2063 <SOAP-ENV:Valu\n+00103530: 653c 2f73 7061 6e3e 2667 743b 3c73 7061 e>ter:NoProfile<\n+00103560: 2f73 7061 6e3e 2026 6c74 3b2f 3c73 7061 /span> </SOAP-ENV:V\n+00103590: 616c 7565 3c2f 7370 616e 3e26 6774 3b3c alue><\n+001035a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    &l\n+001035c0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/SOA\n+001035e0: 502d 454e 563a 5375 6263 6f64 653c 2f73 P-ENV:Subcode>
    .<\n+00103600: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00103610: 3e20 2020 2026 6c74 3b2f 3c73 7061 6e20 > </SOAP-ENV:Sub\n+00103640: 636f 6465 3c2f 7370 616e 3e26 6774 3b3c code><\n+00103650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    </<\n+00103670: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00103680: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype\">SOAP-EN\n+00103690: 563a 436f 6465 3c2f 7370 616e 3e26 6774 V:Code>\n+001036a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    <\n+001036c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n+001036e0: 4e56 3a52 6561 736f 6e3c 2f73 7061 6e3e NV:Reason\n+001036f0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    \n+00103710: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <S\n+00103730: 4f41 502d 454e 563a 5465 7874 3c2f 7370 OAP-ENV:Text xml:la\n+00103760: 6e67 3c2f 7370 616e 3e3d 3c73 7061 6e20 ng="en&q\n+00103790: 756f 743b 3c2f 7370 616e 3e26 6774 3b3c uot;><\n+001037a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001037b0: 6f72 6422 3e54 6865 3c2f 7370 616e 3e20 ord\">The \n+001037c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 requested<\n+001037e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> pro\n+00103800: 6669 6c65 3c2f 7370 616e 3e20 3c73 7061 file token <\n+00103830: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00103840: 6f72 6422 3e50 726f 6669 6c65 546f 6b65 ord\">ProfileToke\n+00103850: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n d\n+00103870: 6f65 733c 2f73 7061 6e3e 203c 7370 616e oes not exist.&\n+001038c0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/SO\n+001038e0: 4150 2d45 4e56 3a54 6578 743c 2f73 7061 AP-ENV:Text>
    . \n+00103910: 2026 6c74 3b2f 3c73 7061 6e20 636c 6173 </\n+00103930: 534f 4150 2d45 4e56 3a52 6561 736f 6e3c SOAP-ENV:Reason<\n+00103940: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n+00103950: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    </SOAP-ENV:Fault\n+00103990: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    \n+001039c0: 3c70 3e53 6572 7669 6365 206f 7065 7261

    Service opera\n+001039d0: 7469 6f6e 7320 696d 706c 656d 656e 7461 tions implementa\n+001039e0: 7469 6f6e 2069 6e20 6120 5765 6220 7365 tion in a Web se\n+001039f0: 7276 6963 6520 6170 706c 6963 6174 696f rvice applicatio\n+00103a00: 6e20 6361 6e20 7265 7475 726e 2076 6172 n can return var\n+00103a10: 696f 7573 2053 4f41 5020 4661 756c 7473 ious SOAP Faults\n+00103a20: 2063 7573 746f 6d69 7a65 6420 696e 2074 customized in t\n+00103a30: 6869 7320 7761 792e 3c2f 703e 0a3c 703e his way.

    .

    \n+00103a40: 534f 4150 2046 6175 6c74 2073 7472 7563 SOAP Fault struc\n+00103a50: 7475 7265 7320 6172 6520 6465 636c 6172 tures are declar\n+00103a60: 6564 203c 636f 6465 3e6d 7574 6162 6c65 ed mutable\n+00103a70: 3c2f 636f 6465 3e2c 2077 6869 6368 206d , which m\n+00103a80: 6561 6e73 2074 6861 7420 7265 2d64 6563 eans that re-dec\n+00103a90: 6c61 7261 7469 6f6e 7320 6f66 2074 6865 larations of the\n+00103aa0: 2073 7472 7563 7475 7265 7320 6172 6520 structures are \n+00103ab0: 7065 726d 6974 7465 6420 616e 6420 6164 permitted and ad\n+00103ac0: 6469 7469 6f6e 616c 206d 656d 6265 7273 ditional members\n+00103ad0: 2061 7265 2063 6f6c 6c65 6374 6564 2069 are collected i\n+00103ae0: 6e74 6f20 6f6e 6520 6669 6e61 6c20 7374 nto one final st\n+00103af0: 7275 6374 7572 6520 6279 2074 6865 2073 ructure by the s\n+00103b00: 6f61 7063 7070 3220 746f 6f6c 2e3c 2f70 oapcpp2 tool..

    For an exam\n+00103b20: 706c 6520 7468 6174 2075 7365 6420 7468 ple that used th\n+00103b30: 6520 534f 4150 2046 6175 6c74 2064 6574 e SOAP Fault det\n+00103b40: 6169 6c20 7374 7275 6374 7572 653a 3c2f ail structure:.

    struct <\n+00103ba0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00103bb0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n+00103bc0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+00103bd0: 6465 7461 696c 2e68 746d 6c22 3e53 4f41 detail.html\">SOA\n+00103be0: 505f 454e 565f 5f44 6574 6169 6c3c 2f61 P_ENV__Detail
    .
    {.
    c\n+00103c40: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *f__invalid;.
    const char *f__unavaila\n+00103cf0: 626c 653b 3c2f 6469 763e 0a3c 6469 7620 ble;
    .
    \n+00103d10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __type\n+00103da0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    void *fault;<\n+00103e50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    }; .
    //g\n+00103f80: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+00103f90: 6d65 7468 6f64 2d66 6175 6c74 3a20 6c6f method-fault: lo\n+00103fa0: 6769 6e20 665f 5f69 6e76 616c 6964 203c gin f__invalid <\n+00103fb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+00103fd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00103fe0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+00103ff0: 7365 7276 6963 6520 6d65 7468 6f64 2d66 service method-f\n+00104000: 6175 6c74 3a20 6c6f 6769 6e20 665f 5f75 ault: login f__u\n+00104010: 6e61 7661 696c 6162 6c65 203c 2f73 7061 navailable
    .
    int \n+00104060: 6e73 5f5f 6c6f 6769 6e28 2e2e 2e29 3b3c ns__login(...);<\n+00104070: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+00104090: 5365 6520 616c 736f 2041 5049 2064 6f63 See also API doc\n+001040a0: 756d 656e 7461 7469 6f6e 204d 6f64 756c umentation Modul\n+001040b0: 6520 3c61 2063 6c61 7373 3d22 656c 2220 e \n+001040e0: 4661 756c 7420 7374 7275 6374 7572 6520 Fault structure \n+001040f0: 616e 6420 6675 6e63 7469 6f6e 733c 2f61 and functions.

    .

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

    ..MIME attachmen\n+00104170: 7473 3c2f 6831 3e0a 3c70 3e54 6865 2067 ts.

    The g\n+00104180: 534f 4150 2074 6f6f 6c6b 6974 2073 7570 SOAP toolkit sup\n+00104190: 706f 7274 7320 4d49 4d45 2061 7474 6163 ports MIME attac\n+001041a0: 686d 656e 7473 2061 7320 7065 7220 534f hments as per SO\n+001041b0: 4150 2077 6974 6820 4174 7461 6368 6d65 AP with Attachme\n+001041c0: 6e74 7320 2853 7741 2920 7370 6563 6966 nts (SwA) specif\n+001041d0: 6963 6174 696f 6e20 3c61 2068 7265 663d ication http://w\n+00104210: 7777 2e77 332e 6f72 672f 5452 2f53 4f41 ww.w3.org/TR/SOA\n+00104220: 502d 6174 7461 6368 6d65 6e74 733c 2f61 P-attachments.

    .

    MTOM a\n+00104240: 7474 6163 686d 656e 7473 2074 6861 7420 ttachments that \n+00104250: 6172 6520 6573 7365 6e74 6961 6c6c 7920 are essentially \n+00104260: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments\n+00104270: 2074 6861 7420 636f 6e66 6f72 6d20 746f that conform to\n+00104280: 2074 6865 204d 544f 4d20 7370 6563 6966 the MTOM specif\n+00104290: 6963 6174 696f 6e20 3c61 2068 7265 663d ication http://www.w3\n+001042d0: 2e6f 7267 2f54 522f 736f 6170 3132 2d6d .org/TR/soap12-m\n+001042e0: 746f 6d3c 2f61 3e20 6172 6520 616c 736f tom are also\n+001042f0: 2073 7570 706f 7274 6564 2077 6869 6368 supported which\n+00104300: 2061 7265 2074 6865 2070 7265 6665 7272 are the preferr\n+00104310: 6564 2077 6179 2074 6f20 696e 636c 7564 ed way to includ\n+00104320: 6520 4d49 4d45 2061 7474 6163 686d 656e e MIME attachmen\n+00104330: 7473 2077 6974 6820 534f 4150 206d 6573 ts with SOAP mes\n+00104340: 7361 6765 732c 2073 6565 2053 6563 7469 sages, see Secti\n+00104350: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on MTOM att\n+00104380: 6163 686d 656e 7473 3c2f 613e 2e3c 2f70 achments..

    In the foll\n+001043a0: 6f77 696e 6720 6469 7363 7573 7369 6f6e owing discussion\n+001043b0: 2c20 4d49 4d45 2061 7474 6163 686d 656e , MIME attachmen\n+001043c0: 7420 6461 7461 2069 7320 6173 7375 6d65 t data is assume\n+001043d0: 6420 746f 2062 6520 7265 7369 6465 6e74 d to be resident\n+001043e0: 2069 6e20 6d65 6d6f 7279 2066 6f72 2073 in memory for s\n+001043f0: 656e 6469 6e67 206f 7065 7261 7469 6f6e ending operation\n+00104400: 7320 616e 6420 4d49 4d45 2061 7474 6163 s and MIME attac\n+00104410: 686d 656e 7473 2072 6563 6569 7665 6420 hments received \n+00104420: 7769 6c6c 2062 6520 7374 6f72 6564 2069 will be stored i\n+00104430: 6e20 6d65 6d6f 7279 206d 616e 6167 6564 n memory managed\n+00104440: 2062 7920 7468 6520 636f 6e74 6578 742e by the context.\n+00104450: 204d 544f 4d20 616e 6420 4449 4d45 2061 MTOM and DIME a\n+00104460: 7474 6163 686d 656e 7473 206f 6e20 7468 ttachments on th\n+00104470: 6520 6f74 6865 7220 6861 6e64 2063 616e e other hand can\n+00104480: 2062 6520 7374 7265 616d 6564 2061 6e64 be streamed and\n+00104490: 2074 6865 7265 666f 7265 204d 544f 4d2f therefore MTOM/\n+001044a0: 4449 4d45 2061 7474 6163 686d 656e 7420 DIME attachment \n+001044b0: 6461 7461 2064 6f65 7320 6e6f 7420 6e65 data does not ne\n+001044c0: 6564 2074 6f20 6265 2073 746f 7265 6420 ed to be stored \n+001044d0: 696e 206d 656d 6f72 792c 2073 6565 2053 in memory, see S\n+001044e0: 6563 7469 6f6e 7320 3c61 2063 6c61 7373 ections DIM\n+00104510: 4520 6174 7461 6368 6d65 6e74 733c 2f61 E attachments and MTOM \n+00104550: 6174 7461 6368 6d65 6e74 733c 2f61 3e20 attachments \n+00104560: 2e3c 2f70 3e0a 3c70 3e54 7261 6e73 6d69 .

    .

    Transmi\n+00104570: 7474 696e 6720 6d75 6c74 6970 6172 742f tting multipart/\n+00104580: 7265 6c61 7465 6420 4d49 4d45 2061 7474 related MIME att\n+00104590: 6163 686d 656e 7473 2077 6974 6820 6120 achments with a \n+001045a0: 534f 4150 2f58 4d4c 206d 6573 7361 6765 SOAP/XML message\n+001045b0: 2069 7320 6163 636f 6d70 6c69 7368 6564 is accomplished\n+001045c0: 2077 6974 6820 7477 6f20 6675 6e63 7469 with two functi\n+001045d0: 6f6e 732c 203c 636f 6465 3e3c 6120 636c ons, soap\n+00104650: 5f73 6574 5f6d 696d 653c 2f61 3e3c 2f63 _set_mime and <\n+00104670: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00104680: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00104690: 5f6d 696d 652e 6874 6d6c 2367 6133 3965 _mime.html#ga39e\n+001046a0: 3564 6134 6633 3735 6538 3033 3062 3863 5da4f375e8030b8c\n+001046b0: 6264 6461 6630 6132 6138 6536 6522 2074 bddaf0a2a8e6e\" t\n+001046c0: 6974 6c65 3d22 4164 6420 6120 4d49 4d45 itle=\"Add a MIME\n+001046d0: 2061 7474 6163 686d 656e 7420 746f 2074 attachment to t\n+001046e0: 6865 2053 4f41 502f 584d 4c20 6d65 7373 he SOAP/XML mess\n+001046f0: 6167 652e 223e 736f 6170 5f73 6574 5f6d age.\">soap_set_m\n+00104700: 696d 655f 6174 7461 6368 6d65 6e74 3c2f ime_attachment. The f\n+00104720: 6972 7374 2066 756e 6374 696f 6e20 6973 irst function is\n+00104730: 2066 6f72 2069 6e69 7469 616c 697a 6174 for initializat\n+00104740: 696f 6e20 7075 7270 6f73 6573 2061 6e64 ion purposes and\n+00104750: 2074 6865 206c 6174 7465 7220 6675 6e63 the latter func\n+00104760: 7469 6f6e 2069 7320 7573 6564 2074 6f20 tion is used to \n+00104770: 7370 6563 6966 7920 6d65 7461 2064 6174 specify meta dat\n+00104780: 6120 616e 6420 636f 6e74 656e 7420 6461 a and content da\n+00104790: 7461 2066 6f72 2065 6163 6820 6174 7461 ta for each atta\n+001047a0: 6368 6d65 6e74 2e3c 2f70 3e0a 3c70 3e53 chment.

    .

    S\n+001047b0: 6565 2061 6c73 6f20 4150 4920 646f 6375 ee also API docu\n+001047c0: 6d65 6e74 6174 696f 6e20 4d6f 6475 6c65 mentation Module\n+001047d0: 203c 6120 636c 6173 733d 2265 6c22 2068 MI\n+00104800: 4d45 2061 7474 6163 686d 656e 7420 6675 ME attachment fu\n+00104810: 6e63 7469 6f6e 733c 2f61 3e2e 3c2f 703e nctions.

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

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

    .

    .Sending a coll\n+00104890: 6563 7469 6f6e 206f 6620 4d49 4d45 2061 ection of MIME a\n+001048a0: 7474 6163 686d 656e 7473 2028 5377 4129 ttachments (SwA)\n+001048b0: 3c2f 6832 3e0a 3c70 3e54 6865 2066 6f6c

    .

    The fol\n+001048c0: 6c6f 7769 6e67 2066 756e 6374 696f 6e73 lowing functions\n+001048d0: 2061 7265 2075 7365 6420 746f 2073 6574 are used to set\n+001048e0: 2075 7020 6120 636f 6c6c 6563 7469 6f6e up a collection\n+001048f0: 206f 6620 6d75 6c74 6970 6172 742f 7265 of multipart/re\n+00104900: 6c61 7465 6420 4d49 4d45 2061 7474 6163 lated MIME attac\n+00104910: 686d 656e 7473 2066 6f72 2074 7261 6e73 hments for trans\n+00104920: 6d69 7373 696f 6e20 7769 7468 2061 2053 mission with a S\n+00104930: 4f41 5020 6f72 2058 4d4c 206d 6573 7361 OAP or XML messa\n+00104940: 6765 2e3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 ge.

    .
    .

    When \n+00105740: 7072 6f76 6964 696e 6720 6120 4d49 4d45 providing a MIME\n+00105750: 2062 6f75 6e64 6172 7920 7769 7468 203c boundary with <\n+00105760: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_set_m\n+001057e0: 696d 653c 2f61 3e3c 2f63 6f64 653e 2c20 ime, \n+001057f0: 796f 7520 6861 7665 2074 6f20 6d61 6b65 you have to make\n+00105800: 2073 7572 6520 7468 6520 626f 756e 6461 sure the bounda\n+00105810: 7279 2063 616e 6e6f 7420 6d61 7463 6820 ry cannot match \n+00105820: 616e 7920 7061 7274 7320 6f66 2074 6865 any parts of the\n+00105830: 206d 6573 7361 6765 2061 6e64 2061 7474 message and att\n+00105840: 6163 686d 656e 7473 2074 6861 7420 796f achments that yo\n+00105850: 7520 6172 6520 7365 6e64 696e 672c 2062 u are sending, b\n+00105860: 6563 6175 7365 2074 6865 2062 6f75 6e64 ecause the bound\n+00105870: 6172 7920 6465 6c69 6e65 6174 6573 2074 ary delineates t\n+00105880: 6865 2061 7474 6163 686d 656e 7473 2e3c he attachments.<\n+00105890: 2f70 3e0a 3c70 3e54 6865 2069 6e74 6572 /p>.

    The inter\n+001058a0: 6e61 6c20 6c69 7374 206f 6620 6174 7461 nal list of atta\n+001058b0: 6368 6d65 6e74 7320 7370 6563 6966 6965 chments specifie\n+001058c0: 6420 7769 7468 203c 636f 6465 3e3c 6120 d with soap_set_mim\n+00105960: 655f 6174 7461 6368 6d65 6e74 3c2f 613e e_attachment\n+00105970: 3c2f 636f 6465 3e20 6973 2064 6573 7472 is destr\n+00105980: 6f79 6564 2077 6974 6820 3c63 6f64 653e oyed with \n+00105990: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_end\n+00105a60: 3c2f 636f 6465 3e20 6f72 2077 6865 6e20 or when \n+00105a70: 6120 6d65 7373 6167 6520 6973 2072 6563 a message is rec\n+00105a80: 6569 7665 642e 2054 6865 7265 666f 7265 eived. Therefore\n+00105a90: 2c20 6361 6c6c 203c 636f 6465 3e3c 6120 , call soap_set_mim\n+00105b30: 655f 6174 7461 6368 6d65 6e74 3c2f 613e e_attachment\n+00105b40: 3c2f 636f 6465 3e20 746f 2073 6574 2061 to set a\n+00105b50: 7474 6163 686d 656e 7473 2062 6566 6f72 ttachments befor\n+00105b60: 6520 7365 6e64 696e 6720 6120 6d65 7373 e sending a mess\n+00105b70: 6167 652e 3c2f 703e 0a3c 703e 5468 6520 age.

    .

    The \n+00105b80: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl\n+00105b90: 6520 7368 6f77 7320 686f 7720 6120 6d75 e shows how a mu\n+00105ba0: 6c74 6970 6172 742f 7265 6c61 7465 6420 ltipart/related \n+00105bb0: 4854 5450 206d 6573 7361 6765 2077 6974 HTTP message wit\n+00105bc0: 6820 7468 7265 6520 4d49 4d45 2061 7474 h three MIME att\n+00105bd0: 6163 686d 656e 7473 2069 7320 7365 7420 achments is set \n+00105be0: 7570 2061 6e64 2074 7261 6e73 6d69 7474 up and transmitt\n+00105bf0: 6564 2074 6f20 6120 7365 7276 6572 2e20 ed to a server. \n+00105c00: 496e 2074 6869 7320 6578 616d 706c 6520 In this example \n+00105c10: 7765 206c 6574 2074 6865 206d 6573 7361 we let the messa\n+00105c20: 6765 2062 6f64 7920 7265 6665 7220 746f ge body refer to\n+00105c30: 2074 6865 2061 7474 6163 686d 656e 7473 the attachments\n+00105c40: 2075 7369 6e67 2058 4d4c 203c 656d 3e3c using XML <\n+00105c50: 636f 6465 3e68 7265 663c 2f63 6f64 653e code>href\n+00105c60: 3c2f 656d 3e20 6174 7472 6962 7574 6573 attributes\n+00105c70: 2e20 5468 6520 3c63 6f64 653e 7374 7275 . The stru\n+00105c80: 6374 2063 6c61 696d 5f5f 666f 726d 3c2f ct claim__form data type \n+00105ca0: 696e 636c 7564 6573 2061 2064 6566 696e includes a defin\n+00105cb0: 6974 696f 6e20 6f66 2061 203c 636f 6465 ition of a href att\n+00105cd0: 7269 6275 7465 2066 6f72 2074 6869 7320 ribute for this \n+00105ce0: 7075 7270 6f73 652e 3c2f 703e 0a3c 6469 purpose.

    .
    struc\n+00105d30: 7420 3c2f 7370 616e 3e63 6c61 696d 5f5f t claim__\n+00105d40: 666f 726d 2066 6f72 6d31 2c20 666f 726d form form1, form\n+00105d50: 323b 203c 2f64 6976 3e0a 3c64 6976 2063 2;
    .
    form\n+00105d70: 312e 6872 6566 203d 203c 7370 616e 2063 1.href = "cid:c\n+00105da0: 6c61 696d 3036 3134 3030 612e 7469 6666 laim061400a.tiff\n+00105db0: 4063 6c61 696d 696e 672d 6974 2e63 6f6d @claiming-it.com\n+00105dc0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+00105dd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    form2.hr\n+00105df0: 6566 203d 203c 7370 616e 2063 6c61 7373 ef = "cid:claim\n+00105e20: 3036 3134 3030 612e 6a70 6567 4063 6c61 061400a.jpeg@cla\n+00105e30: 696d 696e 672d 6974 2e63 6f6d 2671 756f iming-it.com&quo\n+00105e40: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    /* ini\n+00105e80: 7469 616c 697a 6520 616e 6420 656e 6162 tialize and enab\n+00105e90: 6c65 204d 494d 4520 2a2f 3c2f 7370 616e le MIME */
    .
    soa\n+00105f10: 705f 7365 745f 6d69 6d65 3c2f 613e 283c p_set_mime(<\n+00105f20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00105f30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00105f40: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00105f50: 4e55 4c4c 2c20 3c73 7061 6e20 636c 6173 NULL, "<clai\n+00105f80: 6d30 3631 3430 3061 2e78 6d6c 4063 6c61 m061400a.xml@cla\n+00105f90: 696d 696e 672d 6974 2e63 6f6d 2667 743b iming-it.com>\n+00105fa0: 2671 756f 743b 3c2f 7370 616e 3e29 3b20 "); \n+00105fb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+00105fe0: 2a20 6164 6420 6120 6261 7365 3634 2065 * add a base64 e\n+00105ff0: 6e63 6f64 6564 2074 6966 6620 696d 6167 ncoded tiff imag\n+00106000: 6520 2874 6966 6649 6d61 6765 2070 6f69 e (tiffImage poi\n+00106010: 6e74 7320 746f 2062 6173 6536 3420 6461 nts to base64 da\n+00106020: 7461 2920 2a2f 3c2f 7370 616e 3e20 3c2f ta) */ ..\n+00106240: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* add a r\n+00106260: 6177 2062 696e 6172 7920 6a70 6567 2069 aw binary jpeg i\n+00106270: 6d61 6765 2028 6a70 6567 496d 6167 6520 mage (jpegImage \n+00106280: 706f 696e 7473 2074 6f20 7261 7720 6461 points to raw da\n+00106290: 7461 2920 2a2f 3c2f 7370 616e 3e20 3c2f ta) */ ..\n+001064b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* send th\n+001064d0: 6520 666f 726d 7320 6173 204d 494d 4520 e forms as MIME \n+001064e0: 6174 7461 6368 6d65 6e74 7320 7769 7468 attachments with\n+001064f0: 2074 6869 7320 696e 766f 6361 7469 6f6e this invocation\n+00106500: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ ..
    .\n+001065d0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // an e\n+001065f0: 7272 6f72 206f 6363 7572 7265 6420 3c2f rror occurred
    .else
    .
    .\n+00106660: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // proc\n+00106680: 6573 7320 7468 6520 7265 7370 6f6e 7365 ess the response\n+00106690: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001066b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_clr_mime<\n+00106710: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00106740: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .soap_set_\n+00106800: 6d69 6d65 5f61 7474 6163 686d 656e 743c mime_attachment<\n+00106810: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    int\n+00106830: 2073 6f61 705f 7365 745f 6d69 6d65 5f61 soap_set_mime_a\n+00106840: 7474 6163 686d 656e 7428 7374 7275 6374 ttachment(struct\n+00106850: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n+00106860: 7374 2063 6861 7220 2a70 7472 2c20 7369 st char *ptr, si\n+00106870: 7a65 5f74 2073 697a 652c 2065 6e75 6d20 ze_t size, enum \n+00106880: 736f 6170 5f6d 696d 655f 656e 636f 6469 soap_mime_encodi\n+00106890: 6e67 2065 6e63 6f64 696e 672c 2063 6f6e ng encoding, con\n+001068a0: 7374 2063 6861 7220 2a74 7970 652c 2063 st char *type, c\n+001068b0: 6f6e 7374 2063 6861 7220 2a69 642c 2063 onst char *id, c\n+001068c0: 6f6e 7374 2063 6861 7220 2a6c 6f63 6174 onst char *locat\n+001068d0: 696f 6e2c 2063 6f6e 7374 2063 6861 7220 ion, const char \n+001068e0: 2a64 6573 6372 6970 7469 6f6e 293c 2f64 *description)
    Add a MIME\n+00106910: 2061 7474 6163 686d 656e 7420 746f 2074 attachment to t\n+00106920: 6865 2053 4f41 502f 584d 4c20 6d65 7373 he SOAP/XML mess\n+00106930: 6167 652e 3c2f 6469 763e 3c2f 6469 763e age.
    \n+00106940: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap\n+001069f0: 5f63 6c72 5f6d 696d 653c 2f61 3e3c 2f64 _clr_mime
    void soap\n+00106a20: 5f63 6c72 5f6d 696d 6528 7374 7275 6374 _clr_mime(struct\n+00106a30: 2073 6f61 7020 2a73 6f61 7029 3c2f 6469 soap *soap)
    Disable MIM\n+00106a60: 4520 6174 7461 6368 6d65 6e74 732e 3c2f E attachments.
    .int soap_set_mi\n+00106b60: 6d65 2873 7472 7563 7420 736f 6170 202a me(struct soap *\n+00106b70: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+00106b80: 202a 626f 756e 6461 7279 2c20 636f 6e73 *boundary, cons\n+00106b90: 7420 6368 6172 202a 7374 6172 7429 3c2f t char *start)
    Enable MI\n+00106bc0: 4d45 2061 7474 6163 686d 656e 7473 2e3c ME attachments.<\n+00106bd0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+00106c50: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    SOAP_\n+00106cd0: 4d49 4d45 5f42 4153 4536 343c 2f61 3e3c MIME_BASE64<\n+00106ce0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    @ SOAP_\n+00106d00: 4d49 4d45 5f42 4153 4536 343c 2f64 6976 MIME_BASE64
    data is form\n+00106d30: 6174 7465 6420 696e 2062 6173 6536 343c atted in base64<\n+00106d40: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00106d60: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00106d70: 6170 322e 683a 3130 3232 393c 2f64 6976 ap2.h:10229
    .
    \n+00106e10: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_MIME\n+00106e80: 5f42 494e 4152 593c 2f61 3e3c 2f64 6976 _BINARY
    @ SOAP_MIME\n+00106eb0: 5f42 494e 4152 593c 2f64 6976 3e3c 6469 _BINARY
    \n+00106ed0: 6269 6e61 7279 2072 6177 2064 6174 6120 binary raw data \n+00106ee0: 636f 6e74 656e 743c 2f64 6976 3e3c 6469 content
    \n+00106f00: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:10\n+00106f20: 3232 373c 2f64 6976 3e3c 2f64 6976 3e0a 227
    .\n+00106f30: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The claim__form<\n+00106f60: 2f63 6f64 653e 2073 7472 7563 7420 6973 /code> struct is\n+00106f70: 2064 6563 6c61 7265 6420 696e 2074 6865 declared in the\n+00106f80: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+00106f90: 7220 6669 6c65 2061 733a 3c2f 703e 0a3c r file as:

    .<\n+00106fa0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00106fb0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+00106fe0: 7563 7420 3c2f 7370 616e 3e63 6c61 696d uct claim\n+00106ff0: 5f5f 666f 726d 203c 2f64 6976 3e0a 3c64 __form
    .\n+00107010: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    @ char *href; .
    };
    .

    The claim\n+001070a0: 2066 6f72 6d73 2069 6e20 7468 6520 6d65 forms in the me\n+001070b0: 7373 6167 6520 636f 6e73 6973 7420 6f66 ssage consist of\n+001070c0: 203c 656d 3e3c 636f 6465 3e68 7265 663c href<\n+001070d0: 2f63 6f64 653e 3c2f 656d 3e73 2074 6f20 /code>s to \n+001070e0: 7468 6520 636c 6169 6d20 666f 726d 7320 the claim forms \n+001070f0: 6174 7461 6368 6564 2e20 5468 6520 7573 attached. The us\n+00107100: 6520 6f66 203c 656d 3e3c 636f 6465 3e68 e of h\n+00107110: 7265 663c 2f63 6f64 653e 3c2f 656d 3e20 ref \n+00107120: 6f72 206f 7468 6572 2061 7474 7269 6275 or other attribu\n+00107130: 7465 7320 666f 7220 7265 6665 7272 696e tes for referrin\n+00107140: 6720 746f 2074 6865 204d 494d 4520 6174 g to the MIME at\n+00107150: 7461 6368 6d65 6e74 7320 6973 206f 7074 tachments is opt\n+00107160: 696f 6e61 6c20 6163 636f 7264 696e 6720 ional according \n+00107170: 746f 2074 6865 2053 7741 2073 7461 6e64 to the SwA stand\n+00107180: 6172 642e 204d 544f 4d20 6f6e 2074 6865 ard. MTOM on the\n+00107190: 206f 7468 6572 2068 616e 6420 6d61 6e64 other hand mand\n+001071a0: 6174 6573 2074 6865 2075 7365 206f 6620 ates the use of \n+001071b0: 3c65 6d3e 3c63 6f64 653e 6872 6566 3c2f href with \n+001071d0: 584f 5020 656c 656d 656e 7473 2e3c 2f70 XOP elements..

    To associat\n+001071f0: 6520 4d49 4d45 2061 7474 6163 686d 656e e MIME attachmen\n+00107200: 7473 2077 6974 6820 7468 6520 7265 7175 ts with the requ\n+00107210: 6573 7420 616e 6420 7265 7370 6f6e 7365 est and response\n+00107220: 206f 6620 6120 7365 7276 6963 6520 6f70 of a service op\n+00107230: 6572 6174 696f 6e20 696e 2074 6865 2067 eration in the g\n+00107240: 656e 6572 6174 6564 2057 5344 4c2c 2070 enerated WSDL, p\n+00107250: 6c65 6173 6520 7365 6520 5365 6374 696f lease see Sectio\n+00107260: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Gener\n+00107290: 6174 696e 6720 4d75 6c74 6970 6172 7452 ating MultipartR\n+001072a0: 656c 6174 6564 204d 494d 4520 6174 7461 elated MIME atta\n+001072b0: 6368 6d65 6e74 2062 696e 6469 6e67 7320 chment bindings \n+001072c0: 696e 2057 5344 4c3c 2f61 3e20 2e3c 2f70 in WSDL ..

    The server-\n+001072e0: 7369 6465 2063 6f64 6520 746f 2074 7261 side code to tra\n+001072f0: 6e73 6d69 7420 4d49 4d45 2061 7474 6163 nsmit MIME attac\n+00107300: 686d 656e 7473 2062 6163 6b20 746f 2061 hments back to a\n+00107310: 2063 6c69 656e 743a 3c2f 703e 0a3c 6469 client:

    .
    i\n+00107360: 6e74 3c2f 7370 616e 3e20 636c 6169 6d5f nt claim_\n+00107370: 5f69 6e73 7572 616e 6365 5f63 6c61 696d _insurance_claim\n+00107380: 5f61 7574 6f28 3c73 7061 6e20 636c 6173 _auto(stru\n+001073a0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, ...)\n+00107410: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    cons\n+00107460: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+00107490: 6874 6d6c 446f 6320 3d20 2e2e 2e3b 203c htmlDoc = ...; <\n+001074a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001074b0: 656e 7422 3e2f 2f20 616e 2048 544d 4c20 ent\">// an HTML \n+001074c0: 6d65 7373 6167 6520 746f 2073 656e 6420 message to send \n+001074d0: 6173 2061 6e20 6174 7461 6368 6d65 6e74 as an attachment\n+001074e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00107500: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_set_mim\n+00107560: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n+00107590: 703c 2f61 3e2c 204e 554c 4c2c 204e 554c p, NULL, NUL\n+001075a0: 4c29 3b20 3c73 7061 6e20 636c 6173 733d L); // ena\n+001075c0: 626c 6520 4d49 4d45 3c2f 7370 616e 3e3c ble MIME<\n+001075d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+00107600: 2f2f 2061 6464 2061 2048 544d 4c20 646f // add a HTML do\n+00107610: 6375 6d65 6e74 2028 6874 6d6c 446f 6320 cument (htmlDoc \n+00107620: 706f 696e 7473 2074 6f20 6461 7461 2c20 points to data, \n+00107630: 7768 6572 6520 7468 6520 4854 4d4c 2064 where the HTML d\n+00107640: 6f63 2069 7320 7374 6f72 6564 2069 6e20 oc is stored in \n+00107650: 636f 6d70 6c69 616e 6365 2077 6974 6820 compliance with \n+00107660: 3762 6974 2065 6e63 6f64 696e 6720 5246 7bit encoding RF\n+00107670: 4332 3034 3529 203c 2f73 7061 6e3e 3c2f C2045) .
    if (\n+00107710: 736f 6170 5f73 6574 5f6d 696d 655f 6174 soap_set_mime_at\n+00107720: 7461 6368 6d65 6e74 3c2f 613e 283c 6120 tachment(soap, ht\n+00107760: 6d6c 446f 632c 2073 7472 6c65 6e28 6874 mlDoc, strlen(ht\n+00107770: 6d6c 446f 6329 2c20 3c61 2063 6c61 7373 mlDoc), SOAP\n+001077f0: 5f4d 494d 455f 3742 4954 3c2f 613e 2c20 _MIME_7BIT, \n+00107800: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00107820: 743b 7465 7874 2f68 746d 6c26 7175 6f74 t;text/html"\n+00107830: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "<\n+00107860: 636c 6169 6d30 3631 3430 3061 2e68 746d claim061400a.htm\n+00107870: 6c40 636c 6169 6d69 6e67 2d69 742e 636f l@claiming-it.co\n+00107880: 6d26 6774 3b26 7175 6f74 3b3c 2f73 7061 m>", NULL, NULL))\n+001078a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soap\n+00107930: 5f63 6c72 5f6d 696d 653c 2f61 3e28 3c61 _clr_mime(soap); \n+00107970: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // don'\n+00107990: 3b74 2077 616e 7420 6661 756c 7420 7769 ;t want fault wi\n+001079a0: 7468 2061 7474 6163 686d 656e 7473 203c th attachments <\n+001079b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001079d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n+001079f0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn soap-><\n+00107a30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00107a40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00107a50: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n+00107a60: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n+00107a70: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error;
    .
    } \n+00107aa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_OK;
    .
    }.
    \n+00107c80: 4020 534f 4150 5f4d 494d 455f 3742 4954 @ SOAP_MIME_7BIT\n+00107c90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    7 bit d\n+00107cb0: 6174 6120 636f 6e74 656e 743c 2f64 6976 ata content
    Definitio\n+00107ce0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00107cf0: 683a 3130 3232 353c 2f64 6976 3e3c 2f64 h:10225
    .

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

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

    .Re\n+00107d80: 7472 6965 7669 6e67 2061 2063 6f6c 6c65 trieving a colle\n+00107d90: 6374 696f 6e20 6f66 204d 494d 452f 4d54 ction of MIME/MT\n+00107da0: 4f4d 2061 7474 6163 686d 656e 7473 2028 OM attachments (\n+00107db0: 5377 4129 3c2f 6832 3e0a 3c70 3e4d 494d SwA)

    .

    MIM\n+00107dc0: 4520 6174 7461 6368 6d65 6e74 7320 6172 E attachments ar\n+00107dd0: 6520 6175 746f 6d61 7469 6361 6c6c 7920 e automatically \n+00107de0: 7061 7273 6564 2061 6e64 2073 746f 7265 parsed and store\n+00107df0: 6420 696e 206d 656d 6f72 7920 6d61 6e61 d in memory mana\n+00107e00: 6765 6420 6279 2074 6865 203c 636f 6465 ged by the soa\n+00107e60: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n+00107e70: 7465 7874 2e20 4166 7465 7220 7265 6365 text. After rece\n+00107e80: 6976 696e 6720 6120 7365 7420 6f66 204d iving a set of M\n+00107e90: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm\n+00107ea0: 656e 7473 2c20 6569 7468 6572 2061 7420 ents, either at \n+00107eb0: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n+00107ec0: 6f72 2074 6865 2073 6572 7665 722d 7369 or the server-si\n+00107ed0: 6465 2c20 7468 6520 6c69 7374 206f 6620 de, the list of \n+00107ee0: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n+00107ef0: 6d65 6e74 7320 6361 6e20 6265 2074 7261 ments can be tra\n+00107f00: 7665 7273 6564 2074 6f20 6578 7472 6163 versed to extrac\n+00107f10: 7420 6d65 7461 2064 6174 6120 616e 6420 t meta data and \n+00107f20: 7468 6520 6174 7461 6368 6d65 6e74 2063 the attachment c\n+00107f30: 6f6e 7465 6e74 2e20 5468 6520 6669 7273 ontent. The firs\n+00107f40: 7420 6174 7461 6368 6d65 6e74 2069 6e20 t attachment in \n+00107f50: 7468 6520 636f 6c6c 6563 7469 6f6e 206f the collection o\n+00107f60: 6620 4d49 4d45 2f4d 544f 4d20 6174 7461 f MIME/MTOM atta\n+00107f70: 6368 6d65 6e74 7320 616c 7761 7973 2063 chments always c\n+00107f80: 6f6e 7461 696e 7320 6d65 7461 2064 6174 ontains meta dat\n+00107f90: 6120 6162 6f75 7420 7468 6520 534f 4150 a about the SOAP\n+00107fa0: 206d 6573 7361 6765 2069 7473 656c 6620 message itself \n+00107fb0: 2862 6563 6175 7365 2074 6865 2053 4f41 (because the SOA\n+00107fc0: 5020 6d65 7373 6167 6520 7761 7320 7072 P message was pr\n+00107fd0: 6f63 6573 7365 6420 7468 6520 6174 7461 ocessed the atta\n+00107fe0: 6368 6d65 6e74 2064 6f65 7320 6e6f 7420 chment does not \n+00107ff0: 636f 6e74 6169 6e20 616e 7920 7573 6566 contain any usef\n+00108000: 756c 2064 6174 6129 2e3c 2f70 3e0a 3c70 ul data).

    .To traverse the\n+00108020: 206c 6973 7420 6f66 204d 494d 4520 6174 list of MIME at\n+00108030: 7461 6368 6d65 6e74 7320 696e 2043 2c20 tachments in C, \n+00108040: 796f 7520 7573 6520 6120 6c6f 6f70 2073 you use a loop s\n+00108050: 696d 696c 6172 2074 6f3a 3c2f 703e 0a3c imilar to:

    .<\n+00108060: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00108070: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int n = \n+001080b0: 303b 3c2f 6469 763e 0a3c 6469 7620 636c 0;
    .
    struct <\n+001080f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00108100: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n+00108110: 5f6d 756c 7469 7061 7274 2e68 746d 6c22 _multipart.html\"\n+00108120: 3e73 6f61 705f 6d75 6c74 6970 6172 743c >soap_multipart<\n+00108130: 2f61 3e20 2a61 7474 6163 686d 656e 743b /a> *attachment;\n+00108140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    for (a\n+00108180: 7474 6163 686d 656e 7420 3d20 3c61 2063 ttachment = soap->\n+001081c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 mime.list; attac\n+00108270: 686d 656e 743b 2061 7474 6163 686d 656e hment; attachmen\n+00108280: 7420 3d20 6174 7461 6368 6d65 6e74 2d26 t = attachment-&\n+00108290: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;next)\n+001082f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00108310: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ++n;
    .\n+00108330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("Par\n+00108370: 7420 2564 3a5c 6e26 7175 6f74 3b3c 2f73 t %d:\\n", n);
    .\n+00108390: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("ptr\n+001083d0: 2020 2020 2020 2020 3d25 705c 6e26 7175 =%p\\n&qu\n+001083e0: 6f74 3b3c 2f73 7061 6e3e 2c20 6174 7461 ot;, atta\n+001083f0: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->p\n+00108450: 7472 3c2f 613e 293b 3c2f 6469 763e 0a3c tr);
    .<\n+00108460: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00108470: 3e20 2070 7269 6e74 6628 3c73 7061 6e20 > printf("size\n+001084a0: 2020 2020 2020 203d 2575 6c5c 6e26 7175 =%ul\\n&qu\n+001084b0: 6f74 3b3c 2f73 7061 6e3e 2c20 6174 7461 ot;, atta\n+001084c0: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->s\n+00108520: 697a 653c 2f61 3e29 3b3c 2f64 6976 3e0a ize);
    .\n+00108530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("id \n+00108570: 2020 2020 2020 2020 3d25 735c 6e26 7175 =%s\\n&qu\n+00108580: 6f74 3b3c 2f73 7061 6e3e 2c20 6174 7461 ot;, atta\n+00108590: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->i\n+001085f0: 643c 2f61 3e20 3f20 6174 7461 6368 6d65 d ? attachme\n+00108600: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->id : \n+00108680: 2671 756f 743b 2671 756f 743b 3c2f 7370 "");
    . \n+001086b0: 7072 696e 7466 283c 7370 616e 2063 6c61 printf("type \n+001086e0: 2020 2020 3d25 735c 6e26 7175 6f74 3b3c =%s\\n"<\n+001086f0: 2f73 7061 6e3e 2c20 6174 7461 6368 6d65 /span>, attachme\n+00108700: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->type<\n+00108760: 2f61 3e20 3f20 6174 7461 6368 6d65 6e74 /a> ? attachment\n+00108770: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->type : \n+001087f0: 2671 756f 743b 2671 756f 743b 3c2f 7370 "");
    . \n+00108820: 7072 696e 7466 283c 7370 616e 2063 6c61 printf("locatio\n+00108850: 6e20 2020 3d25 735c 6e26 7175 6f74 3b3c n =%s\\n"<\n+00108860: 2f73 7061 6e3e 2c20 6174 7461 6368 6d65 /span>, attachme\n+00108870: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->locat\n+001088d0: 696f 6e3c 2f61 3e20 3f20 6174 7461 6368 ion ? attach\n+001088e0: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->loc\n+00108940: 6174 696f 6e3c 2f61 3e20 3a20 3c73 7061 ation : "&q\n+00108970: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    printf(<\n+001089a0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001089b0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001089c0: 3b64 6573 6372 6970 7469 6f6e 3d25 735c ;description=%s\\\n+001089d0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n+001089e0: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment-><\n+001089f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00108a00: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n+00108a10: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n+00108a20: 6162 3532 3763 3665 3663 6365 3738 3463 ab527c6e6cce784c\n+00108a30: 3638 6135 6264 3962 6238 3038 3435 6361 68a5bd9bb80845ca\n+00108a40: 3422 3e64 6573 6372 6970 7469 6f6e 3c2f 4\">description ? attachment-\n+00108a60: 2667 743b 3c61 2063 6c61 7373 3d22 636f >descript\n+00108ac0: 696f 6e3c 2f61 3e20 3a20 3c73 7061 6e20 ion : "&quo\n+00108af0: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);.
    }
    .
    <\n+00108b80: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+00108b90: 6170 5f5f 6d69 6d65 2e68 746d 6c23 6165 ap__mime.html#ae\n+00108ba0: 6566 3732 3530 3335 6464 6564 6632 3462 ef725035ddedf24b\n+00108bb0: 3239 6431 3037 3065 3066 3962 6233 3322 29d1070e0f9bb33\"\n+00108bc0: 3e73 6f61 705f 6d69 6d65 3a3a 6c69 7374 >soap_mime::list\n+00108bd0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    st\n+00108bf0: 7275 6374 2073 6f61 705f 6d75 6c74 6970 ruct soap_multip\n+00108c00: 6172 7420 2a20 6c69 7374 3c2f 6469 763e art * list
    \n+00108c10: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    list of MIME \n+00108c30: 6174 7461 6368 6d65 6e74 7320 7265 6365 attachments rece\n+00108c40: 6976 6564 3c2f 6469 763e 3c64 6976 2063 ived
    \n+00108c60: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00108c70: 7374 6473 6f61 7032 2e68 3a31 3034 3230 stdsoap2.h:10420\n+00108c80: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .<\n+00108cc0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00108cd0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">soap_mul\n+00108d00: 7469 7061 7274 3c2f 613e 3c2f 6469 763e tipart
    \n+00108d10: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    DIME/MIME/MTO\n+00108d30: 4d20 6174 7461 6368 6d65 6e74 2064 6174 M attachment dat\n+00108d40: 6120 7265 6365 6976 6564 2062 7920 7468 a received by th\n+00108d50: 6520 656e 6769 6e65 2e3c 2f64 6976 3e3c e engine.
    <\n+00108d60: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00108d70: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00108d80: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00108d90: 3130 3433 303c 2f64 6976 3e3c 2f64 6976 10430
    .
    <\n+00108e70: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00108e80: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i\">const char * \n+00108e90: 7479 7065 3c2f 6469 763e 3c64 6976 2063 type
    DIM\n+00108eb0: 452f 4d49 4d45 2f4d 544f 4d20 7479 7065 E/MIME/MTOM type\n+00108ec0: 2028 4d49 4d45 2074 7970 6520 666f 726d (MIME type form\n+00108ed0: 6174 293c 2f64 6976 3e3c 6469 7620 636c at)
    D\n+00108ef0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+00108f00: 7464 736f 6170 322e 683a 3130 3433 353c tdsoap2.h:10435<\n+00108f10: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+00108f70: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 <\n+00109020: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00109030: 223e 6e65 7874 2061 7474 6163 686d 656e \">next attachmen\n+00109040: 7420 696e 2074 6865 206c 696e 6b65 6420 t in the linked \n+00109050: 6c69 7374 3c2f 6469 763e 3c64 6976 2063 list
    .<\n+00109310: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00109320: 223e 4d49 4d45 2043 6f6e 7465 6e74 2d44 \">MIME Content-D\n+00109330: 6573 6372 6970 7469 6f6e 2028 6f70 7469 escription (opti\n+00109340: 6f6e 616c 293c 2f64 6976 3e3c 6469 7620 onal)
    Definition:\n+00109370: 2073 7464 736f 6170 322e 683a 3130 3433 stdsoap2.h:1043\n+00109380: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .
    con\n+00109470: 7374 2063 6861 7220 2a20 6964 3c2f 6469 st char * id
    DIME/MIME/M\n+001094a0: 544f 4d20 636f 6e74 656e 7420 4944 206f TOM content ID o\n+001094b0: 7220 666f 726d 2064 6174 6120 6e61 6d65 r form data name\n+001094c0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+001094e0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+001094f0: 736f 6170 322e 683a 3130 3433 343c 2f64 soap2.h:10434
    .
    c\n+001095f0: 6f6e 7374 2063 6861 7220 2a20 6c6f 6361 onst char * loca\n+00109600: 7469 6f6e 3c2f 6469 763e 3c64 6976 2063 tion
    MIM\n+00109620: 4520 436f 6e74 656e 742d 4c6f 6361 7469 E Content-Locati\n+00109630: 6f6e 2028 6f70 7469 6f6e 616c 293c 2f64 on (optional)
    Definit\n+00109660: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00109670: 322e 683a 3130 3433 383c 2f64 6976 3e3c 2.h:10438
    <\n+00109680: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_multip\n+00109740: 6172 743a 3a73 697a 653c 2f61 3e3c 2f64 art::size
    size_t si\n+00109770: 7a65 3c2f 6469 763e 3c64 6976 2063 6c61 ze
    size \n+00109790: 6f66 2064 6174 6120 636f 6e74 656e 743c of data content<\n+001097a0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+001097c0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+001097d0: 6170 322e 683a 3130 3433 333c 2f64 6976 ap2.h:10433
    .
    soap::mime<\n+00109890: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    struct \n+001098b0: 736f 6170 5f6d 696d 6520 6d69 6d65 3c2f soap_mime mime
    MIME atta\n+001098e0: 6368 6d65 6e74 7320 7265 6365 6976 6564 chments received\n+001098f0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+00109910: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00109920: 736f 6170 322e 683a 3431 3839 3c2f 6469 soap2.h:4189
    .
    <\n+00109940: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00109950: 3c70 3e43 2b2b 2070 726f 6772 616d 6d65

    C++ programme\n+00109960: 7273 2063 616e 2075 7365 2061 6e20 6974 rs can use an it\n+00109970: 6572 6174 6f72 2069 6e73 7465 6164 3a3c erator instead:<\n+00109980: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n+001099d0: 206e 203d 2030 3b3c 2f64 6976 3e0a 3c64 n = 0;
    .\n+001099f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 for (soap_m\n+00109a70: 756c 7469 7061 7274 3a3a 6974 6572 6174 ultipart::iterat\n+00109a80: 6f72 3c2f 613e 2069 203d 203c 6120 636c or i = soap-><\n+00109ac0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00109ad0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00109ae0: 6874 6d6c 2361 6632 6634 6462 6436 6637 html#af2f4dbd6f7\n+00109af0: 3366 3139 6631 6265 6561 6133 6137 6539 3f19f1beeaa3a7e9\n+00109b00: 6439 6363 3263 223e 6d69 6d65 3c2f 613e d9cc2c\">mime\n+00109b10: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .\n+00109b60: 6265 6769 6e3c 2f61 3e28 293b 2069 2021 begin(); i !\n+00109b70: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap->m\n+00109bf0: 696d 653c 2f61 3e2e 3c61 2063 6c61 7373 ime.end()\n+00109c50: 3b20 2b2b 6929 3c2f 6469 763e 0a3c 6469 ; ++i)
    .{\n+00109c70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ++n;<\n+00109c90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    printf\n+00109cb0: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n+00109cd0: 6f74 3b50 6172 7420 2564 3a5c 6e26 7175 ot;Part %d:\\n&qu\n+00109ce0: 6f74 3b3c 2f73 7061 6e3e 2c20 6e29 3b3c ot;, n);<\n+00109cf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    printf\n+00109d10: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n+00109d30: 6f74 3b70 7472 2020 2020 2020 2020 3d25 ot;ptr =%\n+00109d40: 705c 6e26 7175 6f74 3b3c 2f73 7061 6e3e p\\n"\n+00109d50: 2c20 692d 2667 743b 7074 7229 3b3c 2f64 , i->ptr);.
    ... // etc<\n+00109da0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+00109dc0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    <\n+00109e10: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00109e20: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">soap_mime::\n+00109e70: 6265 6769 6e3c 2f61 3e3c 2f64 6976 3e3c begin
    <\n+00109e80: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00109e90: 6922 3e73 6f61 705f 6d75 6c74 6970 6172 i\">soap_multipar\n+00109ea0: 743a 3a69 7465 7261 746f 7220 6265 6769 t::iterator begi\n+00109eb0: 6e28 293c 2f64 6976 3e3c 6469 7620 636c n()
    C++ \n+00109ed0: 6f6e 6c79 3a20 616e 2069 7465 7261 746f only: an iterato\n+00109ee0: 7220 6f76 6572 2073 6f61 705f 6d75 6c74 r over soap_mult\n+00109ef0: 6970 6172 7420 6174 7461 6368 6d65 6e74 ipart attachment\n+00109f00: 732e 3c2f 6469 763e 3c2f 6469 763e 0a3c s.
    .<\n+00109f10: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00109f20: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+00109f30: 5f6d 696d 655f 6874 6d6c 5f61 6638 3130 _mime_html_af810\n+00109f40: 6539 3237 6364 6265 3631 3234 3266 3937 e927cdbe61242f97\n+00109f50: 3839 3138 6663 3264 6537 3438 223e 3c64 8918fc2de748\">soap_mime::e\n+00109fc0: 6e64 3c2f 613e 3c2f 6469 763e 3c64 6976 nd
    \n+00109fe0: 736f 6170 5f6d 756c 7469 7061 7274 3a3a soap_multipart::\n+00109ff0: 6974 6572 6174 6f72 2065 6e64 2829 3c2f iterator end()
    C++ only:\n+0010a020: 2061 6e20 6974 6572 6174 6f72 206f 7665 an iterator ove\n+0010a030: 7220 736f 6170 5f6d 756c 7469 7061 7274 r soap_multipart\n+0010a040: 2061 7474 6163 686d 656e 7473 2e3c 2f64 attachments.
    .
    s\n+0010a140: 6f61 705f 6d75 6c74 6970 6172 745f 6974 oap_multipart_it\n+0010a150: 6572 6174 6f72 2069 7465 7261 746f 723c erator iterator<\n+0010a160: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    C++ only\n+0010a180: 3a20 616e 2069 7465 7261 746f 7220 6f76 : an iterator ov\n+0010a190: 6572 2073 6f61 705f 6d75 6c74 6970 6172 er soap_multipar\n+0010a1a0: 7420 6174 7461 6368 6d65 6e74 732e 3c2f t attachments.
    Defini\n+0010a1d0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+0010a1e0: 7032 2e68 3a31 3034 3431 3c2f 6469 763e p2.h:10441
    \n+0010a1f0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Note: keep in m\n+0010a220: 696e 6420 7468 6174 2074 6865 2066 6972 ind that the fir\n+0010a230: 7374 2061 7474 6163 686d 656e 7420 6973 st attachment is\n+0010a240: 2061 7373 6f63 6961 7465 6420 7769 7468 associated with\n+0010a250: 2074 6865 2053 4f41 5020 6d65 7373 6167 the SOAP messag\n+0010a260: 6520 616e 6420 796f 7520 6d61 7920 7761 e and you may wa\n+0010a270: 6e74 2074 6f20 6967 6e6f 7265 2069 742e nt to ignore it.\n+0010a280: 3c2f 703e 0a3c 703e 4120 6361 6c6c 2074

    .

    A call t\n+0010a290: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap\n+0010a360: 5f65 6e64 3c2f 613e 3c2f 636f 6465 3e20 _end \n+0010a370: 7265 6d6f 7665 7320 616c 6c20 6f66 2074 removes all of t\n+0010a380: 6865 2072 6563 6569 7665 6420 4d49 4d45 he received MIME\n+0010a390: 2064 6174 612e 2054 6f20 7072 6573 6572 data. To preser\n+0010a3a0: 7665 2061 6e20 6174 7461 6368 6d65 6e74 ve an attachment\n+0010a3b0: 2069 6e20 6d65 6d6f 7279 2c20 7573 6520 in memory, use \n+0010a3c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_u\n+0010a490: 6e6c 696e 6b3c 2f61 3e3c 2f63 6f64 653e nlink\n+0010a4a0: 206f 6e20 7468 6520 3c63 6f64 653e 7074 on the pt\n+0010a4b0: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member \n+0010a4c0: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the soap\n+0010a540: 5f6d 756c 7469 7061 7274 3c2f 613e 3c2f _multipart struct. Th\n+0010a560: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap\n+0010a630: 5f75 6e6c 696e 6b3c 2f61 3e3c 2f63 6f64 _unlink function can \n+0010a650: 6265 2075 7365 6420 746f 2070 7265 7665 be used to preve\n+0010a660: 6e74 2064 6561 6c6c 6f63 6174 696f 6e20 nt deallocation \n+0010a670: 6f66 2064 6573 6572 6961 6c69 7a65 6420 of deserialized \n+0010a680: 6461 7461 2e3c 2f70 3e0a 3c70 3ef0 9f94 data.

    .

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

    .\n+0010a6c0: 3c68 313e 3c61 2063 6c61 7373 3d22 616e

    \n+0010a6e0: 3c2f 613e 0a44 494d 4520 6174 7461 6368 .DIME attach\n+0010a6f0: 6d65 6e74 733c 2f68 313e 0a3c 703e 4170 ments

    .

    Ap\n+0010a700: 706c 6963 6174 696f 6e73 2064 6576 656c plications devel\n+0010a710: 6f70 6564 2077 6974 6820 7468 6520 6753 oped with the gS\n+0010a720: 4f41 5020 746f 6f6c 7320 6361 6e20 7472 OAP tools can tr\n+0010a730: 616e 736d 6974 2062 696e 6172 7920 4449 ansmit binary DI\n+0010a740: 4d45 2061 7474 6163 686d 656e 7473 2073 ME attachments s\n+0010a750: 746f 7265 6420 696e 206d 656d 6f72 7920 tored in memory \n+0010a760: 6f72 2069 6e20 7374 7265 616d 696e 6720 or in streaming \n+0010a770: 6d6f 6465 2062 7920 6665 7463 6869 6e67 mode by fetching\n+0010a780: 2064 6174 6120 6672 6f6d 2061 2072 6573 data from a res\n+0010a790: 6f75 7263 6520 6f72 2073 656e 6469 6e67 ource or sending\n+0010a7a0: 2064 6174 6120 746f 2061 2072 6573 6f75 data to a resou\n+0010a7b0: 7263 6520 7573 696e 6720 6361 6c6c 6261 rce using callba\n+0010a7c0: 636b 2066 756e 6374 696f 6e73 2e20 5468 ck functions. Th\n+0010a7d0: 6520 6d61 7869 6d75 6d20 4449 4d45 2061 e maximum DIME a\n+0010a7e0: 7474 6163 686d 656e 7420 7369 7a65 2069 ttachment size i\n+0010a7f0: 7320 6c69 6d69 7465 6420 746f 2038 204d s limited to 8 M\n+0010a800: 4220 6279 2064 6566 6175 6c74 2061 7320 B by default as \n+0010a810: 7365 7420 7769 7468 203c 636f 6465 3e23 set with #\n+0010a820: 534f 4150 5f4d 4158 4449 4d45 5349 5a45 SOAP_MAXDIMESIZE\n+0010a830: 3c2f 636f 6465 3e2e 2054 6869 7320 6c69 . This li\n+0010a840: 6d69 7420 6361 6e20 6265 2063 6861 6e67 mit can be chang\n+0010a850: 6564 2061 7320 6e65 6564 6564 2e20 5769 ed as needed. Wi\n+0010a860: 7468 2073 7472 6561 6d69 6e67 2044 494d th streaming DIM\n+0010a870: 4520 7573 696e 6720 6361 6c6c 6261 636b E using callback\n+0010a880: 2066 756e 6374 696f 6e73 2c20 6461 7461 functions, data\n+0010a890: 2068 616e 646c 6572 7320 6172 6520 7573 handlers are us\n+0010a8a0: 6564 2074 6f20 7061 7373 2074 6865 2064 ed to pass the d\n+0010a8b0: 6174 6120 746f 2061 6e64 2066 726f 6d20 ata to and from \n+0010a8c0: 6120 7265 736f 7572 6365 2066 726f 6d20 a resource from \n+0010a8d0: 7768 6963 6820 746f 2066 6574 6368 2074 which to fetch t\n+0010a8e0: 6865 2064 6174 6120 746f 2073 656e 6420 he data to send \n+0010a8f0: 6f72 2064 6174 6120 746f 2073 746f 7265 or data to store\n+0010a900: 2c20 7375 6368 2061 7320 6120 6669 6c65 , such as a file\n+0010a910: 206f 7220 6465 7669 6365 2e20 5365 6520 or device. See \n+0010a920: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section Streaming \n+0010a960: 4449 4d45 3c2f 613e 202e 3c2f 703e 0a3c DIME .

    .<\n+0010a970: 703e 466f 7220 6465 7461 696c 7320 6f6e p>For details on\n+0010a980: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+0010a990: 732c 2073 6565 203c 6120 6872 6566 3d22 s, see http://msdn.m\n+0010aa00: 6963 726f 736f 6674 2e63 6f6d 2f6c 6962 icrosoft.com/lib\n+0010aa10: 7261 7279 2f65 6e2d 7573 2f64 6e67 6c6f rary/en-us/dnglo\n+0010aa20: 6273 7065 632f 6874 6d6c 2f64 7261 6674 bspec/html/draft\n+0010aa30: 2d6e 6965 6c73 656e 2d64 696d 652d 3032 -nielsen-dime-02\n+0010aa40: 2e74 7874 3c2f 613e 3c2f 703e 0a3c 703e .txt

    .

    \n+0010aa50: 5365 6520 616c 736f 2041 5049 2064 6f63 See also API doc\n+0010aa60: 756d 656e 7461 7469 6f6e 204d 6f64 756c umentation Modul\n+0010aa70: 6520 3c61 2063 6c61 7373 3d22 656c 2220 e D\n+0010aaa0: 494d 4520 6174 7461 6368 6d65 6e74 2066 IME attachment f\n+0010aab0: 756e 6374 696f 6e73 3c2f 613e 2e3c 2f70 unctions..

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

    .

    <\n+0010ab20: 2f61 3e0a 5365 6e64 696e 6720 6120 636f /a>.Sending a co\n+0010ab30: 6c6c 6563 7469 6f6e 206f 6620 4449 4d45 llection of DIME\n+0010ab40: 2061 7474 6163 686d 656e 7473 3c2f 6832 attachments.

    The followi\n+0010ab60: 6e67 2066 756e 6374 696f 6e73 2063 616e ng functions can\n+0010ab70: 2062 6520 7573 6564 2074 6f20 6578 706c be used to expl\n+0010ab80: 6963 6974 6c79 2073 6574 2075 7020 6120 icitly set up a \n+0010ab90: 636f 6c6c 6563 7469 6f6e 206f 6620 4449 collection of DI\n+0010aba0: 4d45 2061 7474 6163 686d 656e 7473 2066 ME attachments f\n+0010abb0: 6f72 2074 7261 6e73 6d69 7373 696f 6e20 or transmission \n+0010abc0: 7769 7468 2061 206d 6573 7361 6765 2e20 with a message. \n+0010abd0: 5468 6573 6520 6174 7461 6368 6d65 6e74 These attachment\n+0010abe0: 7320 6361 6e20 6265 2073 7472 6561 6d65 s can be streame\n+0010abf0: 642c 2061 7320 6465 7363 7269 6265 6420 d, as described \n+0010ac00: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Streami\n+0010ac40: 6e67 2044 494d 453c 2f61 3e20 2e20 5769 ng DIME . Wi\n+0010ac50: 7468 6f75 7420 7374 7265 616d 696e 672c thout streaming,\n+0010ac60: 2065 6163 6820 6174 7461 6368 6d65 6e74 each attachment\n+0010ac70: 206d 7573 7420 7265 6665 7220 746f 2061 must refer to a\n+0010ac80: 2062 6c6f 636b 206f 6620 6461 7461 2069 block of data i\n+0010ac90: 6e20 6d65 6d6f 7279 2e3c 2f70 3e0a 3c75 n memory.

    ..
  • voi\n+0010acb0: 6420 3c61 2063 6c61 7373 3d22 656c 2220 d soap_set_dime\n+0010ad30: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0010ad40: 6170 293c 2f61 3e3c 2f63 6f64 653e 2054 ap) T\n+0010ad50: 6869 7320 6675 6e63 7469 6f6e 2065 6e61 his function ena\n+0010ad60: 626c 6573 2073 656e 6469 6e67 2044 494d bles sending DIM\n+0010ad70: 4520 6174 7461 6368 6d65 6e74 732e 2054 E attachments. T\n+0010ad80: 6869 7320 6675 6e63 7469 6f6e 2069 7320 his function is \n+0010ad90: 6765 6e65 7261 6c6c 7920 6e6f 7420 7265 generally not re\n+0010ada0: 7175 6972 6564 2062 6563 6175 7365 2044 quired because D\n+0010adb0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+0010adc0: 6172 6520 6175 746f 6d61 7469 6361 6c6c are automaticall\n+0010add0: 7920 6465 7465 6374 6564 2061 7320 3c63 y detected as xsd__base64Bin\n+0010ae60: 6172 793c 2f61 3e3c 2f63 6f64 653e 2061 ary a\n+0010ae70: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd _\n+0010aee0: 786f 705f 5f49 6e63 6c75 6465 3c2f 613e xop__Include\n+0010aef0: 3c2f 636f 6465 3e20 7374 7275 6374 7572 structur\n+0010af00: 6573 2069 6e20 7468 6520 6461 7461 2074 es in the data t\n+0010af10: 6f20 7365 7269 616c 697a 6520 6173 2061 o serialize as a\n+0010af20: 6e20 584d 4c20 6d65 7373 6167 6520 7769 n XML message wi\n+0010af30: 7468 2074 6865 2061 7474 6163 686d 656e th the attachmen\n+0010af40: 7473 2061 7574 6f6d 6174 6963 616c 6c79 ts automatically\n+0010af50: 2061 6464 6564 206f 7220 4449 4d45 2061 added or DIME a\n+0010af60: 7474 6163 686d 656e 7473 2063 616e 2062 ttachments can b\n+0010af70: 6520 6578 706c 6963 6974 6c79 2061 6464 e explicitly add\n+0010af80: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with soap_set_di\n+0010b020: 6d65 5f61 7474 6163 686d 656e 743c 2f61 me_attachment.
  • .<\n+0010b040: 6c69 3e3c 636f 6465 3e69 6e74 2073 6f61 li>int soa\n+0010b050: 705f 7365 745f 6469 6d65 5f61 7474 6163 p_set_dime_attac\n+0010b060: 686d 656e 7428 7374 7275 6374 2073 6f61 hment(struct soa\n+0010b070: 7020 2a73 6f61 702c 2063 6861 7220 2a70 p *soap, char *p\n+0010b080: 7472 2c20 7369 7a65 5f74 2073 697a 652c tr, size_t size,\n+0010b090: 2063 6f6e 7374 2063 6861 7220 2a74 7970 const char *typ\n+0010b0a0: 652c 2063 6f6e 7374 2063 6861 7220 2a69 e, const char *i\n+0010b0b0: 642c 2075 6e73 6967 6e65 6420 7368 6f72 d, unsigned shor\n+0010b0c0: 7420 6f70 7479 7065 2c20 636f 6e73 7420 t optype, const \n+0010b0d0: 6368 6172 202a 6f70 7469 6f6e 293c 2f63 char *option) This functi\n+0010b0f0: 6f6e 2061 6464 7320 6120 4449 4d45 2061 on adds a DIME a\n+0010b100: 7474 6163 686d 656e 7420 746f 2074 6865 ttachment to the\n+0010b110: 2058 4d4c 206d 6573 7361 6765 2074 6f20 XML message to \n+0010b120: 7365 6e64 2e20 5468 6520 7370 6563 6966 send. The specif\n+0010b130: 6965 6420 3c63 6f64 653e 7074 723c 2f63 ied ptr points to t\n+0010b150: 6865 2064 6174 6120 746f 2073 656e 6420 he data to send \n+0010b160: 6f66 206c 656e 6774 6820 7370 6563 6966 of length specif\n+0010b170: 6965 6420 6279 203c 636f 6465 3e73 697a ied by siz\n+0010b180: 653c 2f63 6f64 653e 2e20 5468 6520 3c63 e. The type \n+0010b1a0: 7061 7261 6d65 7465 7220 696e 6469 6361 parameter indica\n+0010b1b0: 7465 7320 7468 6520 4d49 4d45 2074 7970 tes the MIME typ\n+0010b1c0: 6520 6f66 2074 6865 2064 6174 6120 6f72 e of the data or\n+0010b1d0: 2063 616e 2062 6520 4e55 4c4c 2e20 5468 can be NULL. Th\n+0010b1e0: 6520 3c63 6f64 653e 6964 3c2f 636f 6465 e id parameter uniq\n+0010b200: 7565 6c79 2069 6465 6e74 6966 6965 7320 uely identifies \n+0010b210: 7468 6520 6174 7461 6368 6d65 6e74 2069 the attachment i\n+0010b220: 6e20 7468 6520 6d65 7373 6167 652c 2077 n the message, w\n+0010b230: 6869 6368 2063 616e 2062 6520 6f6d 6974 hich can be omit\n+0010b240: 7465 6420 6279 2073 7065 6369 6679 696e ted by specifyin\n+0010b250: 6720 4e55 4c4c 2e20 5468 6520 3c63 6f64 g NULL. The option \n+0010b270: 7061 7261 6d65 7465 7220 6973 2061 6e20 parameter is an \n+0010b280: 6f70 7469 6f6e 2073 7563 6820 6173 2061 option such as a\n+0010b290: 2064 6573 6372 6970 7469 6f6e 206f 6620 description of \n+0010b2a0: 7468 6520 6461 7461 2061 6e64 203c 636f the data and optype\n+0010b2c0: 2069 7320 6120 7573 6572 2d64 6566 696e is a user-defin\n+0010b2d0: 6564 206f 7074 696f 6e20 7479 7065 2028 ed option type (\n+0010b2e0: 6173 2070 6572 2044 494d 4520 6f70 7469 as per DIME opti\n+0010b2f0: 6f6e 2073 7065 6369 6669 6361 7469 6f6e on specification\n+0010b300: 2066 6f72 6d61 7429 2e20 5468 6520 3c63 format). The ptr p\n+0010b320: 6172 616d 6574 6572 206d 7573 7420 6265 arameter must be\n+0010b330: 2070 6572 7369 7374 656e 742e 2054 6865 persistent. The\n+0010b340: 203c 636f 6465 3e70 7472 3c2f 636f 6465 ptr parameter pass\n+0010b360: 6564 2074 6f20 7468 6973 2066 756e 6374 ed to this funct\n+0010b370: 696f 6e20 6d75 7374 2062 6520 7065 7273 ion must be pers\n+0010b380: 6973 7465 6e74 2069 6e20 6d65 6d6f 7279 istent in memory\n+0010b390: 2075 6e74 696c 2074 6865 2061 7474 6163 until the attac\n+0010b3a0: 686d 656e 7420 7761 7320 7365 6e74 2e20 hment was sent. \n+0010b3b0: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n+0010b3c0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n+0010b3d0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+0010b490: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+0010b4a0: 2065 7272 6f72 2063 6f64 652e 3c2f 6c69 error code..
  • void\n+0010b4c0: 203c 6120 636c 6173 733d 2265 6c22 2068 soap_clr_dime\n+0010b540: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0010b550: 6170 293c 2f61 3e3c 2f63 6f64 653e 2054 ap) T\n+0010b560: 6869 7320 6675 6e63 7469 6f6e 2064 6973 his function dis\n+0010b570: 6162 6c65 7320 4449 4d45 2061 7474 6163 ables DIME attac\n+0010b580: 686d 656e 7473 2c20 756e 6c65 7373 2074 hments, unless t\n+0010b590: 6865 2064 6174 6120 746f 2073 6572 6961 he data to seria\n+0010b5a0: 6c69 7a65 2061 7320 616e 2058 4d4c 206d lize as an XML m\n+0010b5b0: 6573 7361 6765 2063 6f6e 7461 696e 7320 essage contains \n+0010b5c0: 6174 7461 6368 6d65 6e74 7320 6465 6669 attachments defi\n+0010b5d0: 6e65 6420 6279 203c 636f 6465 3e3c 6120 ned by xsd__\n+0010b650: 6261 7365 3634 4269 6e61 7279 3c2f 613e base64Binary\n+0010b660: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and _xop__In\n+0010b6e0: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude\n+0010b6f0: 2073 7472 7563 7475 7265 732e 3c2f 6c69 structures...

    These\n+0010b710: 2066 756e 6374 696f 6e73 2061 6c6c 6f77 functions allow\n+0010b720: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+0010b730: 7320 746f 2062 6520 6164 6465 6420 746f s to be added to\n+0010b740: 2053 4f41 5020 6d65 7373 6167 6573 2077 SOAP messages w\n+0010b750: 6974 686f 7574 2072 6571 7569 7269 6e67 ithout requiring\n+0010b760: 206d 6573 7361 6765 2062 6f64 7920 7265 message body re\n+0010b770: 6665 7265 6e63 6573 2e20 5468 6973 2069 ferences. This i\n+0010b780: 7320 616c 736f 2072 6566 6572 7265 6420 s also referred \n+0010b790: 746f 2061 7320 7468 6520 6f70 656e 2044 to as the open D\n+0010b7a0: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n+0010b7b0: 7479 6c65 2e20 5468 6520 636c 6f73 6564 tyle. The closed\n+0010b7c0: 2061 7474 6163 686d 656e 7420 7374 796c attachment styl\n+0010b7d0: 6520 7265 7175 6972 6573 2061 6c6c 2044 e requires all D\n+0010b7e0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+0010b7f0: 746f 2062 6520 7265 6665 7265 6e63 6564 to be referenced\n+0010b800: 2066 726f 6d20 7468 6520 534f 4150 206d from the SOAP m\n+0010b810: 6573 7361 6765 2062 6f64 7920 7769 7468 essage body with\n+0010b820: 203c 656d 3e3c 636f 6465 3e68 7265 663c href<\n+0010b830: 2f63 6f64 653e 3c2f 656d 3e20 286f 7220 /code> (or \n+0010b840: 7369 6d69 6c61 7229 2072 6566 6572 656e similar) referen\n+0010b850: 6365 732e 2046 6f72 2074 6865 2063 6c6f ces. For the clo\n+0010b860: 7365 6420 7374 796c 652c 2067 534f 4150 sed style, gSOAP\n+0010b870: 2073 7570 706f 7274 7320 616e 2061 7574 supports an aut\n+0010b880: 6f6d 6174 6963 2062 696e 6172 7920 6461 omatic binary da\n+0010b890: 7461 2073 6572 6961 6c69 7a61 7469 6f6e ta serialization\n+0010b8a0: 206d 6574 686f 642c 2073 6565 2053 6563 method, see Sec\n+0010b8b0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion \n+0010b8e0: 5365 7269 616c 697a 696e 6720 6269 6e61 Serializing bina\n+0010b8f0: 7279 2064 6174 6120 7769 7468 2044 494d ry data with DIM\n+0010b900: 4520 6174 7461 6368 6d65 6e74 733c 2f61 E attachments .

    .

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

    ..Retr\n+0010b980: 6965 7669 6e67 2061 2063 6f6c 6c65 6374 ieving a collect\n+0010b990: 696f 6e20 6f66 2044 494d 4520 6174 7461 ion of DIME atta\n+0010b9a0: 6368 6d65 6e74 733c 2f68 323e 0a3c 703e chments
  • .

    \n+0010b9b0: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments\n+0010b9c0: 2061 7265 2061 7574 6f6d 6174 6963 616c are automatical\n+0010b9d0: 6c79 2070 6172 7365 6420 616e 6420 7374 ly parsed and st\n+0010b9e0: 6f72 6564 2069 6e20 6d65 6d6f 7279 2028 ored in memory (\n+0010b9f0: 6f72 2070 6173 7365 6420 746f 2074 6865 or passed to the\n+0010ba00: 2073 7472 6561 6d69 6e67 2068 616e 646c streaming handl\n+0010ba10: 6572 7320 7669 6120 7468 6520 4449 4d45 ers via the DIME\n+0010ba20: 2063 616c 6c62 6163 6b20 6675 6e63 7469 callback functi\n+0010ba30: 6f6e 7320 7768 656e 2064 6566 696e 6564 ons when defined\n+0010ba40: 292e 2041 6674 6572 2072 6563 6569 7669 ). After receivi\n+0010ba50: 6e67 2061 2073 6574 206f 6620 4449 4d45 ng a set of DIME\n+0010ba60: 2061 7474 6163 686d 656e 7473 2c20 6569 attachments, ei\n+0010ba70: 7468 6572 2061 7420 7468 6520 636c 6965 ther at the clie\n+0010ba80: 6e74 2d73 6964 6520 6f72 2074 6865 2073 nt-side or the s\n+0010ba90: 6572 7665 722d 7369 6465 2c20 7468 6520 erver-side, the \n+0010baa0: 6c69 7374 206f 6620 4449 4d45 2061 7474 list of DIME att\n+0010bab0: 6163 686d 656e 7473 2063 616e 2062 6520 achments can be \n+0010bac0: 7472 6176 6572 7365 6420 746f 2065 7874 traversed to ext\n+0010bad0: 7261 6374 206d 6574 6120 6461 7461 2061 ract meta data a\n+0010bae0: 6e64 2074 6865 2061 7474 6163 686d 656e nd the attachmen\n+0010baf0: 7420 636f 6e74 656e 742e 3c2f 703e 0a3c t content.

    .<\n+0010bb00: 703e 546f 2074 7261 7665 7273 6520 7468 p>To traverse th\n+0010bb10: 6520 6c69 7374 206f 6620 4449 4d45 2061 e list of DIME a\n+0010bb20: 7474 6163 686d 656e 7473 2069 6e20 432c ttachments in C,\n+0010bb30: 2079 6f75 2075 7365 2061 206c 6f6f 7020 you use a loop \n+0010bb40: 7369 6d69 6c61 7220 746f 3a3c 2f70 3e0a similar to:

    .\n+0010bb50: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int n =\n+0010bba0: 2030 3b3c 2f64 6976 3e0a 3c64 6976 2063 0;
    .
    struct \n+0010bbe0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_multipart\n+0010bc20: 3c2f 613e 202a 6174 7461 6368 6d65 6e74 *attachment\n+0010bc30: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    for (\n+0010bc70: 6174 7461 6368 6d65 6e74 203d 203c 6120 attachment = soap->\n+0010bcb0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;dime.list; atta\n+0010bd60: 6368 6d65 6e74 3b20 6174 7461 6368 6d65 chment; attachme\n+0010bd70: 6e74 203d 2061 7474 6163 686d 656e 742d nt = attachment-\n+0010bd80: 2667 743b 3c61 2063 6c61 7373 3d22 636f >next\n+0010bde0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    ++n;
    \n+0010be20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    printf("Pa\n+0010be60: 7274 2025 643a 5c6e 2671 756f 743b 3c2f rt %d:\\n", n);
    \n+0010be80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    printf("pt\n+0010bec0: 7220 2020 2020 2020 203d 2570 5c6e 2671 r =%p\\n&q\n+0010bed0: 756f 743b 3c2f 7370 616e 3e2c 2061 7474 uot;, att\n+0010bee0: 6163 686d 656e 742d 2667 743b 3c61 2063 achment->\n+0010bf40: 7074 723c 2f61 3e29 3b3c 2f64 6976 3e0a ptr);
    .\n+0010bf50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("siz\n+0010bf90: 6520 2020 2020 2020 3d25 756c 5c6e 2671 e =%ul\\n&q\n+0010bfa0: 756f 743b 3c2f 7370 616e 3e2c 2061 7474 uot;, att\n+0010bfb0: 6163 686d 656e 742d 2667 743b 3c61 2063 achment->\n+0010c010: 7369 7a65 3c2f 613e 293b 3c2f 6469 763e size);
    \n+0010c020: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    printf("id\n+0010c060: 2020 2020 2020 2020 203d 2573 5c6e 2671 =%s\\n&q\n+0010c070: 756f 743b 3c2f 7370 616e 3e2c 2061 7474 uot;, att\n+0010c080: 6163 686d 656e 742d 2667 743b 3c61 2063 achment->\n+0010c0e0: 6964 3c2f 613e 203f 2061 7474 6163 686d id ? attachm\n+0010c0f0: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->id : "");
    . \n+0010c1a0: 2070 7269 6e74 6628 3c73 7061 6e20 636c printf("type \n+0010c1d0: 2020 2020 203d 2573 5c6e 2671 756f 743b =%s\\n"\n+0010c1e0: 3c2f 7370 616e 3e2c 2061 7474 6163 686d , attachm\n+0010c1f0: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->type\n+0010c250: 3c2f 613e 203f 2061 7474 6163 686d 656e ? attachmen\n+0010c260: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->type : "");
    .}\n+0010c310: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap\n+0010c3c0: 5f64 696d 653a 3a6c 6973 743c 2f61 3e3c _dime::list<\n+0010c3d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    struct \n+0010c3f0: 736f 6170 5f6d 756c 7469 7061 7274 202a soap_multipart *\n+0010c400: 206c 6973 743c 2f64 6976 3e3c 6469 7620 list
    li\n+0010c420: 7374 206f 6620 4449 4d45 2061 7474 6163 st of DIME attac\n+0010c430: 686d 656e 7473 2072 6563 6569 7665 643c hments received<\n+0010c440: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+0010c460: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+0010c470: 6170 322e 683a 3939 3731 3c2f 6469 763e ap2.h:9971
    \n+0010c480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0010c4d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    \n+0010c520: 736f 6170 3a3a 6469 6d65 3c2f 613e 3c2f soap::dime
    struct s\n+0010c550: 6f61 705f 6469 6d65 2064 696d 653c 2f64 oap_dime dime
    DIME attac\n+0010c580: 686d 656e 7473 2072 6563 6569 7665 642e hments received.\n+0010c590: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+0010c5b0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+0010c5c0: 6f61 7032 2e68 3a34 3138 343c 2f64 6976 oap2.h:4184
    .
    <\n+0010c5f0: 703e 432b 2b20 7072 6f67 7261 6d6d 6572 p>C++ programmer\n+0010c600: 7320 6361 6e20 7573 6520 616e 2069 7465 s can use an ite\n+0010c610: 7261 746f 7220 696e 7374 6561 643a 3c2f rator instead:.
    int \n+0010c670: 6e20 3d20 303b 3c2f 6469 763e 0a3c 6469 n = 0;
    .<\n+0010c690: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010c6a0: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow\">for (soap_mu\n+0010c710: 6c74 6970 6172 743a 3a69 7465 7261 746f ltipart::iterato\n+0010c720: 723c 2f61 3e20 6920 3d20 3c61 2063 6c61 r i = soap->dime.\n+0010c7b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 b\n+0010c800: 6567 696e 3c2f 613e 2829 3b20 6920 213d egin(); i !=\n+0010c810: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+0010c840: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->di\n+0010c890: 6d65 3c2f 613e 2e3c 6120 636c 6173 733d me.end();\n+0010c8f0: 202b 2b69 293c 2f64 6976 3e0a 3c64 6976 ++i)
    .{<\n+0010c910: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ++n;.
    printf(\n+0010c950: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0010c970: 743b 5061 7274 2025 643a 5c6e 2671 756f t;Part %d:\\n&quo\n+0010c980: 743b 3c2f 7370 616e 3e2c 206e 293b 3c2f t;, n);.
    printf(\n+0010c9b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0010c9d0: 743b 7074 7220 2020 2020 2020 203d 2570 t;ptr =%p\n+0010c9e0: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n+0010c9f0: 2069 2d26 6774 3b70 7472 293b 3c2f 6469 i->ptr);.
    ... // etc.
    }
    .<\n+0010ca60: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0010ca70: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+0010ca80: 5f64 696d 655f 6874 6d6c 5f61 3466 6530 _dime_html_a4fe0\n+0010ca90: 6435 3234 6366 6639 6532 6534 3637 3438 d524cff9e2e46748\n+0010caa0: 3764 6261 3138 6464 3631 6638 223e 3c64 7dba18dd61f8\">soap_dime::b\n+0010cb10: 6567 696e 3c2f 613e 3c2f 6469 763e 3c64 egin
    soap_multipart\n+0010cb40: 3a3a 6974 6572 6174 6f72 2062 6567 696e ::iterator begin\n+0010cb50: 2829 3c2f 6469 763e 3c64 6976 2063 6c61 ()
    C++ o\n+0010cb70: 6e6c 793a 2061 6e20 6974 6572 6174 6f72 nly: an iterator\n+0010cb80: 206f 7665 7220 736f 6170 5f6d 756c 7469 over soap_multi\n+0010cb90: 7061 7274 2061 7474 6163 686d 656e 7473 part attachments\n+0010cba0: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .soap_dime::en\n+0010cc60: 643c 2f61 3e3c 2f64 6976 3e3c 6469 7620 d
    s\n+0010cc80: 6f61 705f 6d75 6c74 6970 6172 743a 3a69 oap_multipart::i\n+0010cc90: 7465 7261 746f 7220 656e 6428 293c 2f64 terator end()
    C++ only: \n+0010ccc0: 616e 2069 7465 7261 746f 7220 6f76 6572 an iterator over\n+0010ccd0: 2073 6f61 705f 6d75 6c74 6970 6172 7420 soap_multipart \n+0010cce0: 6174 7461 6368 6d65 6e74 732e 3c2f 6469 attachments.
    .
    <\n+0010cd00: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0010cd10: 3c70 3e54 6865 203c 636f 6465 3e6f 7074

    The opt\n+0010cd20: 696f 6e73 3c2f 636f 6465 3e20 6d65 6d62 ions memb\n+0010cd30: 6572 2069 7320 6176 6169 6c61 626c 6520 er is available \n+0010cd40: 6173 2077 656c 6c2c 2062 7574 206e 6f74 as well, but not\n+0010cd50: 2073 686f 776e 2069 6e20 7468 6520 636f shown in the co\n+0010cd60: 6465 2061 626f 7665 2e20 5468 6520 3c63 de above. The options content is fo\n+0010cd90: 726d 6174 7465 6420 6163 636f 7264 696e rmatted accordin\n+0010cda0: 6720 746f 2074 6865 2044 494d 4520 7370 g to the DIME sp\n+0010cdb0: 6563 6966 6963 6174 696f 6e3a 2074 6865 ecification: the\n+0010cdc0: 2066 6972 7374 2074 776f 2062 7974 6573 first two bytes\n+0010cdd0: 2061 7265 2072 6573 6572 7665 6420 666f are reserved fo\n+0010cde0: 7220 7468 6520 6f70 7469 6f6e 2074 7970 r the option typ\n+0010cdf0: 652c 2074 6865 206e 6578 7420 7477 6f20 e, the next two \n+0010ce00: 6279 7465 7320 7374 6f72 6520 7468 6520 bytes store the \n+0010ce10: 7369 7a65 206f 6620 7468 6520 6f70 7469 size of the opti\n+0010ce20: 6f6e 2064 6174 612c 2066 6f6c 6c6f 7765 on data, followe\n+0010ce30: 6420 6279 2074 6865 2028 6269 6e61 7279 d by the (binary\n+0010ce40: 2920 6f70 7469 6f6e 2064 6174 612e 3c2f ) option data..

    A call to \n+0010ce60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_e\n+0010cf30: 6e64 3c2f 613e 3c2f 636f 6465 3e20 7265 nd re\n+0010cf40: 6d6f 7665 7320 616c 6c20 6f66 2074 6865 moves all of the\n+0010cf50: 2072 6563 6569 7665 6420 4449 4d45 2064 received DIME d\n+0010cf60: 6174 612e 2054 6f20 7072 6573 6572 7665 ata. To preserve\n+0010cf70: 2061 6e20 6174 7461 6368 6d65 6e74 2069 an attachment i\n+0010cf80: 6e20 6d65 6d6f 7279 2c20 7573 6520 3c63 n memory, use soap_unl\n+0010d060: 696e 6b3c 2f61 3e3c 2f63 6f64 653e 206f ink o\n+0010d070: 6e20 7468 6520 3c63 6f64 653e 7074 723c n the ptr<\n+0010d080: 2f63 6f64 653e 206d 656d 6265 7220 6f66 /code> member of\n+0010d090: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap_m\n+0010d110: 756c 7469 7061 7274 3c2f 613e 3c2f 636f ultipart struct. The \n+0010d130: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_u\n+0010d200: 6e6c 696e 6b3c 2f61 3e3c 2f63 6f64 653e nlink\n+0010d210: 2066 756e 6374 696f 6e20 6361 6e20 6265 function can be\n+0010d220: 2075 7365 6420 746f 2070 7265 7665 6e74 used to prevent\n+0010d230: 2064 6561 6c6c 6f63 6174 696f 6e20 6f66 deallocation of\n+0010d240: 2064 6573 6572 6961 6c69 7a65 6420 6461 deserialized da\n+0010d250: 7461 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ta.

    .

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

    ..Seriali\n+0010d2c0: 7a69 6e67 2062 696e 6172 7920 6461 7461 zing binary data\n+0010d2d0: 2077 6974 6820 4449 4d45 2061 7474 6163 with DIME attac\n+0010d2e0: 686d 656e 7473 3c2f 6832 3e0a 3c70 3e42 hments.

    B\n+0010d2f0: 696e 6172 7920 6461 7461 2073 746f 7265 inary data store\n+0010d300: 6420 696e 2065 7874 656e 6465 6420 3c63 d in extended xsd__base64Bin\n+0010d390: 6172 793c 2f61 3e3c 2f63 6f64 653e 2061 ary a\n+0010d3a0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd xsd__hexBinary<\n+0010d420: 2f61 3e3c 2f63 6f64 653e 2074 7970 6573 /a> types\n+0010d430: 2063 616e 2062 6520 7365 7269 616c 697a can be serializ\n+0010d440: 6564 2061 6e64 2064 6573 6572 6961 6c69 ed and deseriali\n+0010d450: 7a65 6420 6173 2044 494d 4520 6174 7461 zed as DIME atta\n+0010d460: 6368 6d65 6e74 7320 7768 656e 206f 6e65 chments when one\n+0010d470: 206f 7220 6d6f 7265 206f 6620 7468 6520 or more of the \n+0010d480: 6578 7472 6120 6d65 6d62 6572 7320 3c63 extra members id, <\n+0010d4a0: 636f 6465 3e74 7970 653c 2f63 6f64 653e code>type\n+0010d4b0: 2c20 616e 6420 3c63 6f64 653e 6f70 7469 , and opti\n+0010d4c0: 6f6e 733c 2f63 6f64 653e 2061 7265 206e ons are n\n+0010d4d0: 6f6e 2d4e 554c 4c2e 2054 6865 7365 2061 on-NULL. These a\n+0010d4e0: 7474 6163 686d 656e 7473 2077 696c 6c20 ttachments will \n+0010d4f0: 6265 2061 7574 6f6d 6174 6963 616c 6c79 be automatically\n+0010d500: 2074 7261 6e73 6d69 7474 6564 2070 7269 transmitted pri\n+0010d510: 6f72 2074 6f20 7468 6520 7365 7175 656e or to the sequen\n+0010d520: 6365 206f 6620 7365 636f 6e64 6172 7920 ce of secondary \n+0010d530: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments\n+0010d540: 2064 6566 696e 6564 2062 7920 7468 6520 defined by the \n+0010d550: 7573 6572 2077 6974 6820 3c63 6f64 653e user with \n+0010d560: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_set_\n+0010d5f0: 6469 6d65 5f61 7474 6163 686d 656e 743c dime_attachment<\n+0010d600: 2f61 3e3c 2f63 6f64 653e 2061 7320 6578 /a> as ex\n+0010d610: 706c 6169 6e65 6420 696e 2074 6865 2070 plained in the p\n+0010d620: 7265 7669 6f75 7320 7365 6374 696f 6e2e revious section.\n+0010d630: 2054 6865 2073 6572 6961 6c69 7a61 7469 The serializati\n+0010d640: 6f6e 2070 726f 6365 7373 2069 7320 6175 on process is au\n+0010d650: 746f 6d61 7465 6420 666f 7220 534f 4150 tomated for SOAP\n+0010d660: 2065 6e63 6f64 6564 206d 6573 7361 6765 encoded message\n+0010d670: 7320 616e 6420 4449 4d45 2061 7474 6163 s and DIME attac\n+0010d680: 686d 656e 7473 2077 696c 6c20 6265 2073 hments will be s\n+0010d690: 656e 6420 6576 656e 2077 6865 6e20 3c63 end even when soap_set_di\n+0010d720: 6d65 3c2f 613e 3c2f 636f 6465 3e20 6f72 me or\n+0010d730: 203c 636f 6465 3e3c 6120 636c 6173 733d so\n+0010d7c0: 6170 5f73 6574 5f64 696d 655f 6174 7461 ap_set_dime_atta\n+0010d7d0: 6368 6d65 6e74 3c2f 613e 3c2f 636f 6465 chment are not used. \n+0010d7f0: 466f 7220 6e6f 6e2d 534f 4150 2d65 6e63 For non-SOAP-enc\n+0010d800: 6f64 6564 206d 6573 7361 6765 7320 7375 oded messages su\n+0010d810: 6368 2061 7320 646f 6375 6d65 6e74 2f6c ch as document/l\n+0010d820: 6974 6572 616c 206d 6573 7361 6765 7320 iteral messages \n+0010d830: 796f 7520 6d75 7374 2073 7469 6c6c 2063 you must still c\n+0010d840: 616c 6c20 3c63 6f64 653e 3c61 2063 6c61 all soap_\n+0010d8c0: 7365 745f 6469 6d65 3c2f 613e 3c2f 636f set_dime to enable se\n+0010d8e0: 6e64 696e 6720 6d65 7373 6167 6573 2077 nding messages w\n+0010d8f0: 6974 6820 6174 7461 6368 6d65 6e74 732e ith attachments.\n+0010d900: 3c2f 703e 0a3c 703e 546f 2065 6e61 626c

    .

    To enabl\n+0010d910: 6520 7365 7269 616c 697a 6174 696f 6e20 e serialization \n+0010d920: 6f66 2074 6865 2064 6174 6120 6173 2044 of the data as D\n+0010d930: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+0010d940: 696e 7374 6561 6420 6f66 2069 6e6c 696e instead of inlin\n+0010d950: 6520 6261 7365 3634 2c20 7765 2065 7874 e base64, we ext\n+0010d960: 656e 6420 7468 6520 3c63 6f64 653e 3c61 end the xsd_\n+0010d9e0: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary type wi\n+0010da00: 7468 2074 6872 6565 2061 6464 6974 696f th three additio\n+0010da10: 6e61 6c20 6d65 6d62 6572 733a 3c2f 703e nal members:

    \n+0010da20: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+0010da60: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct xsd__base64B\n+0010dab0: 696e 6172 793c 2f61 3e20 3c2f 6469 763e inary
    \n+0010dac0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    \n+0010daf0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 unsig\n+0010db10: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned char\n+0010db40: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *__ptr\n+0010dba0: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n+0010dbc0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+0010dbe0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 __size; .
    char \n+0010dc90: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *id\n+0010dcf0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+0010dd10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010dd20: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *t\n+0010dd90: 7970 653c 2f61 3e3b 203c 2f64 6976 3e0a ype;
    .\n+0010dda0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+0010ddd0: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *options;
    .
    };.
    xs\n+0010df20: 645f 5f62 6173 6536 3442 696e 6172 793a d__base64Binary:\n+0010df30: 3a6f 7074 696f 6e73 3c2f 613e 3c2f 6469 :options
    char * opt\n+0010df60: 696f 6e73 3c2f 6469 763e 3c64 6976 2063 ions
    ext\n+0010df80: 7261 206d 656d 6265 723a 2044 494d 4520 ra member: DIME \n+0010df90: 6f70 7469 6f6e 7320 6f72 2061 2064 6573 options or a des\n+0010dfa0: 6372 6970 7469 6f6e 206f 6620 7468 6520 cription of the \n+0010dfb0: 4d49 4d45 2061 7474 6163 686d 656e 7420 MIME attachment \n+0010dfc0: 6f72 204e 554c 4c3c 2f64 6976 3e3c 6469 or NULL
    \n+0010dfe0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:98\n+0010e000: 3432 3c2f 6469 763e 3c2f 6469 763e 0a3c 42
    .<\n+0010e010: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0010e020: 6964 3d22 6173 7472 7563 7478 7364 5f5f id=\"astructxsd__\n+0010e030: 5f5f 6261 7365 3634 5f62 696e 6172 795f __base64_binary_\n+0010e040: 6874 6d6c 5f61 3633 3938 6539 6438 3630 html_a6398e9d860\n+0010e050: 3739 3839 3666 6163 6333 3030 3538 3731 79896facc3005871\n+0010e060: 6437 6665 3237 223e 3c64 6976 2063 6c61 d7fe27\">
    ext\n+0010e120: 7261 206d 656d 6265 723a 204e 554c 4c20 ra member: NULL \n+0010e130: 746f 2067 656e 6572 6174 6520 616e 2069 to generate an i\n+0010e140: 6420 6f72 2061 7373 6967 6e20 7468 6973 d or assign this\n+0010e150: 206d 656d 6265 7220 7661 7269 6162 6c65 member variable\n+0010e160: 2061 2075 6e69 7175 6520 5555 4944 3c2f a unique UUID
    Defini\n+0010e190: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+0010e1a0: 7032 2e68 3a39 3834 303c 2f64 6976 3e3c p2.h:9840
    <\n+0010e1b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+0010e290: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    char * type<\n+0010e2b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    extra me\n+0010e2d0: 6d62 6572 3a20 4d49 4d45 2074 7970 6520 mber: MIME type \n+0010e2e0: 6f66 2074 6865 2064 6174 613c 2f64 6976 of the data
    Definitio\n+0010e310: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+0010e320: 683a 3938 3431 3c2f 6469 763e 3c2f 6469 h:9841
    .

    The\n+0010e350: 203c 636f 6465 3e69 643c 2f63 6f64 653e id\n+0010e360: 206d 656d 6265 7220 6973 2066 6f72 2061 member is for a\n+0010e370: 7474 6163 686d 656e 7420 7265 6665 7265 ttachment refere\n+0010e380: 6e63 696e 672c 2074 7970 6963 616c 6c79 ncing, typically\n+0010e390: 2061 2063 6f6e 7465 6e74 2069 6420 2843 a content id (C\n+0010e3a0: 4944 2920 6f72 2061 2055 5549 4420 7768 ID) or a UUID wh\n+0010e3b0: 6963 6820 6361 6e20 6265 206f 6274 6169 ich can be obtai\n+0010e3c0: 6e65 6420 7769 7468 203c 636f 6465 3e3c ned with <\n+0010e3d0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0010e3e0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0010e3f0: 5f6d 6973 632e 6874 6d6c 2367 6135 6663 _misc.html#ga5fc\n+0010e400: 6633 6338 6636 6634 6263 3664 3565 3665 f3c8f6f4bc6d5e6e\n+0010e410: 6664 3761 3932 6365 6166 3339 3922 2074 fd7a92ceaf399\" t\n+0010e420: 6974 6c65 3d22 5265 7475 726e 7320 6120 itle=\"Returns a \n+0010e430: 7261 6e64 6f6d 697a 6564 2075 6e69 7175 randomized uniqu\n+0010e440: 6520 5555 4944 2073 7472 696e 672e 223e e UUID string.\">\n+0010e450: 736f 6170 5f72 616e 645f 7575 6964 3c2f soap_rand_uuid, a type m\n+0010e480: 656d 6265 7220 6973 2075 7365 6420 746f ember is used to\n+0010e490: 2073 7065 6369 6679 2074 6865 204d 494d specify the MIM\n+0010e4a0: 4520 7479 7065 206f 6620 7468 6520 6461 E type of the da\n+0010e4b0: 7461 2c20 7468 6520 3c63 6f64 653e 6f70 ta, the op\n+0010e4c0: 7469 6f6e 733c 2f63 6f64 653e 206d 656d tions mem\n+0010e4d0: 6265 7220 6973 2075 7365 6420 746f 2070 ber is used to p\n+0010e4e0: 6967 6779 2d62 6163 6b20 6164 6469 7469 iggy-back additi\n+0010e4f0: 6f6e 616c 2069 6e66 6f72 6d61 7469 6f6e onal information\n+0010e500: 2077 6974 6820 6120 4449 4d45 2061 7474 with a DIME att\n+0010e510: 6163 686d 656e 742e 2054 6865 206f 7264 achment. The ord\n+0010e520: 6572 206f 6620 7468 6520 6465 636c 6172 er of the declar\n+0010e530: 6174 696f 6e20 6f66 2074 6865 206d 656d ation of the mem\n+0010e540: 6265 7273 2069 7320 7369 676e 6966 6963 bers is signific\n+0010e550: 616e 742e 2049 6e20 6164 6469 7469 6f6e ant. In addition\n+0010e560: 2c20 6e6f 206f 7468 6572 206d 656d 6265 , no other membe\n+0010e570: 7273 206f 7220 6d65 7468 6f64 7320 6d61 rs or methods ma\n+0010e580: 7920 6265 2064 6563 6c61 7265 6420 6265 y be declared be\n+0010e590: 666f 7265 2061 6e79 206f 6620 7468 6573 fore any of thes\n+0010e5a0: 6520 6d65 6d62 6572 7320 696e 2074 6865 e members in the\n+0010e5b0: 2073 7472 7563 742f 636c 6173 732c 2062 struct/class, b\n+0010e5c0: 7574 2061 6464 6974 696f 6e61 6c20 6d65 ut additional me\n+0010e5d0: 6d62 6572 7320 616e 6420 6d65 7468 6f64 mbers and method\n+0010e5e0: 7320 6d61 7920 6170 7065 6172 2061 6674 s may appear aft\n+0010e5f0: 6572 2074 6865 206d 656d 6265 7220 6465 er the member de\n+0010e600: 636c 6172 6174 696f 6e73 2e20 5468 6520 clarations. The \n+0010e610: 6578 7465 6e64 6564 203c 636f 6465 3e3c extended <\n+0010e620: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0010e630: 663d 2273 7472 7563 7478 7364 5f5f 5f5f f=\"structxsd____\n+0010e640: 6865 785f 6269 6e61 7279 2e68 746d 6c22 hex_binary.html\"\n+0010e650: 2074 6974 6c65 3d22 5853 4420 6865 7842 title=\"XSD hexB\n+0010e660: 696e 6172 7920 7374 7275 6374 7572 6520 inary structure \n+0010e670: 7769 7468 2061 7474 6163 686d 656e 7420 with attachment \n+0010e680: 6461 7461 2e22 3e78 7364 5f5f 6865 7842 data.\">xsd__hexB\n+0010e690: 696e 6172 793c 2f61 3e3c 2f63 6f64 653e inary\n+0010e6a0: 2074 7970 6520 6973 2073 696d 696c 6172 type is similar\n+0010e6b0: 2e3c 2f70 3e0a 3c70 3e54 6865 203c 636f .

    .

    The id and\n+0010e6d0: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type members conta\n+0010e6f0: 696e 2074 6578 742e 2054 6865 2073 6574 in text. The set\n+0010e700: 2074 6865 2044 494d 452d 7370 6563 6966 the DIME-specif\n+0010e710: 6963 206f 7074 696f 6e73 206d 656d 6265 ic options membe\n+0010e720: 722c 2079 6f75 2063 616e 2075 7365 2074 r, you can use t\n+0010e730: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap_dim\n+0010e7b0: 655f 6f70 7469 6f6e 3c2f 613e 3c2f 636f e_option function char *soap_di\n+0010e7e0: 6d65 5f6f 7074 696f 6e28 7374 7275 6374 me_option(struct\n+0010e7f0: 2073 6f61 7020 2a73 6f61 702c 2075 6e73 soap *soap, uns\n+0010e800: 6967 6e65 6420 7368 6f72 7420 7479 7065 igned short type\n+0010e810: 2c20 636f 6e73 7420 6368 6172 202a 6f70 , const char *op\n+0010e820: 7469 6f6e 293c 2f63 6f64 653e 2e3c 2f70 tion)..

    This functi\n+0010e840: 6f6e 2072 6574 7572 6e73 2061 2073 7472 on returns a str\n+0010e850: 696e 6720 7769 7468 2074 6869 7320 656e ing with this en\n+0010e860: 636f 6469 6e67 2e20 466f 7220 6578 616d coding. For exam\n+0010e870: 706c 653c 2f70 3e0a 3c64 6976 2063 6c61 ple

    .
    \n+0010e8a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct xsd__\n+0010e900: 6261 7365 3634 4269 6e61 7279 3c2f 613e base64Binary\n+0010e910: 2069 6d61 6765 3b20 3c2f 6469 763e 0a3c image;
    .<\n+0010e920: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010e930: 3e69 6d61 6765 2e3c 6120 636c 6173 733d >image.\n+0010e990: 5f5f 7074 723c 2f61 3e20 3d20 2e2e 2e3b __ptr = ...;\n+0010e9a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    image.\n+0010e9c0: 5f5f 7369 7a65 203d 202e 2e2e 3b20 3c2f __size = ...; .
    image.id \n+0010e9f0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+0010ea10: 756f 743b 7575 6964 3a30 3932 3333 3532 uot;uuid:0923352\n+0010ea20: 332d 3334 3562 2d34 3335 312d 6236 3233 3-345b-4351-b623\n+0010ea30: 2d35 6473 6633 3573 6773 3564 3626 7175 -5dsf35sgs5d6&qu\n+0010ea40: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    image.type \n+0010ea70: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+0010ea90: 756f 743b 696d 6167 652f 6a70 6567 2671 uot;image/jpeg&q\n+0010eaa0: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    image.opti\n+0010ead0: 6f6e 7320 3d20 3c61 2063 6c61 7373 3d22 ons = soap_dim\n+0010eb30: 655f 6f70 7469 6f6e 3c2f 613e 283c 6120 e_option(soap, 0,\n+0010eb70: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0010eb90: 6f74 3b4d 7920 7765 6464 696e 6720 7069 ot;My wedding pi\n+0010eba0: 6374 7572 6526 7175 6f74 3b3c 2f73 7061 cture");
    .\n+0010ec80: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    char * soap_\n+0010eca0: 6469 6d65 5f6f 7074 696f 6e28 7374 7275 dime_option(stru\n+0010ecb0: 6374 2073 6f61 7020 2a73 6f61 702c 2075 ct soap *soap, u\n+0010ecc0: 6e73 6967 6e65 6420 7368 6f72 7420 6f70 nsigned short op\n+0010ecd0: 7479 7065 2c20 636f 6e73 7420 6368 6172 type, const char\n+0010ece0: 202a 6f70 7469 6f6e 293c 2f64 6976 3e3c *option)
    <\n+0010ecf0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0010ed00: 223e 4372 6561 7465 7320 6120 4449 4d45 \">Creates a DIME\n+0010ed10: 206f 7074 696f 6e2e 3c2f 6469 763e 3c2f option.
    .

    W\n+0010ed40: 6865 6e20 6569 7468 6572 2074 6865 203c hen either the <\n+0010ed50: 636f 6465 3e69 643c 2f63 6f64 653e 206f code>id o\n+0010ed60: 7220 3c63 6f64 653e 7479 7065 3c2f 636f r type member value\n+0010ed80: 7320 6172 6520 6e6f 6e2d 4e55 4c4c 2061 s are non-NULL a\n+0010ed90: 7420 7275 6e20 7469 6d65 2c20 7468 6520 t run time, the \n+0010eda0: 6461 7461 2077 696c 6c20 6265 2073 6572 data will be ser\n+0010edb0: 6961 6c69 7a65 6420 6173 2061 2044 494d ialized as a DIM\n+0010edc0: 4520 6174 7461 6368 6d65 6e74 2e3c 2f70 E attachment..

    The SOAP/XM\n+0010ede0: 4c20 6d65 7373 6167 6520 7265 6665 7273 L message refers\n+0010edf0: 2074 6f20 7468 6520 6174 7461 6368 6d65 to the attachme\n+0010ee00: 6e74 7320 7573 696e 6720 3c65 6d3e 3c63 nts using href<\n+0010ee20: 2f65 6d3e 2061 7474 7269 6275 7465 732e /em> attributes.\n+0010ee30: 2054 6869 7320 6765 6e65 7261 6c6c 7920 This generally \n+0010ee40: 776f 726b 7320 7769 6c6c 2077 6974 6820 works will with \n+0010ee50: 534f 4150 2052 5043 2065 6e63 6f64 6564 SOAP RPC encoded\n+0010ee60: 206d 6573 7361 6769 6e67 2c20 6265 6361 messaging, beca\n+0010ee70: 7573 6520 3c65 6d3e 3c63 6f64 653e 6872 use hr\n+0010ee80: 6566 3c2f 636f 6465 3e3c 2f65 6d3e 2061 ef a\n+0010ee90: 7474 7269 6275 7465 7320 6172 6520 7065 ttributes are pe\n+0010eea0: 726d 6974 7465 642e 2048 6f77 6576 6572 rmitted. However\n+0010eeb0: 2c20 7769 7468 2064 6f63 756d 656e 742f , with document/\n+0010eec0: 6c69 7465 7261 6c20 7374 796c 6520 7468 literal style th\n+0010eed0: 6520 7265 6665 7265 6e63 696e 6720 6d65 e referencing me\n+0010eee0: 6368 616e 6973 6d20 6d75 7374 2062 6520 chanism must be \n+0010eef0: 6578 706c 6963 6974 6c79 2064 6566 696e explicitly defin\n+0010ef00: 6564 2069 6e20 7468 6520 7363 6865 6d61 ed in the schema\n+0010ef10: 206f 6620 7468 6520 6269 6e61 7279 2074 of the binary t\n+0010ef20: 7970 652e 2054 6865 7265 666f 7265 2c20 ype. Therefore, \n+0010ef30: 4d54 4f4d 2069 7320 7468 6520 7072 6566 MTOM is the pref\n+0010ef40: 6572 7265 6420 6174 7461 6368 6d65 6e74 erred attachment\n+0010ef50: 206d 6563 6861 6e69 736d 2066 6f72 2064 mechanism for d\n+0010ef60: 6f63 756d 656e 742f 6c69 7465 7261 6c20 ocument/literal \n+0010ef70: 7374 796c 6520 6d65 7373 6167 696e 672e style messaging.\n+0010ef80: 3c2f 703e 0a3c 703e 5468 6520 6465 636c

    .

    The decl\n+0010ef90: 6172 6174 696f 6e20 6f66 2061 6e20 6578 aration of an ex\n+0010efa0: 7465 6e64 6564 2062 696e 6172 7920 7479 tended binary ty\n+0010efb0: 7065 2069 6e20 7468 6520 696e 7465 7266 pe in the interf\n+0010efc0: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n+0010efd0: 666f 7220 736f 6170 6370 7032 2069 733a for soapcpp2 is:\n+0010efe0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct ns__myBinaryDat\n+0010f040: 6154 7970 6520 3c2f 6469 763e 0a3c 6469 aType
    .{\n+0010f060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    unsigned<\n+0010f0a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *__\n+0010f0d0: 7074 723b 203c 2f64 6976 3e0a 3c64 6976 ptr;
    . \n+0010f0f0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+0010f110: 2f73 7061 6e3e 205f 5f73 697a 653b 203c /span> __size; <\n+0010f120: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *id;
    .\n+0010f180: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+0010f1a0: 6172 3c2f 7370 616e 3e20 2a74 7970 653b ar *type;\n+0010f1b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    char *options; .
    };
    .\n+0010f220: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    C++ pr\n+0010f240: 6f67 7261 6d6d 6572 7320 6361 6e20 7573 ogrammers can us\n+0010f250: 6520 696e 6865 7269 7461 6e63 6520 696e e inheritance in\n+0010f260: 7374 6561 6420 6f66 2074 6578 7475 616c stead of textual\n+0010f270: 2065 7874 656e 7369 6f6e 2072 6571 7569 extension requi\n+0010f280: 7265 6420 696e 2043 3a3c 2f70 3e0a 3c64 red in C:

    ..{\n+0010f340: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public:
    . \n+0010f380: 2020 3c73 7061 6e20 636c 6173 733d 226b unsi\n+0010f3a0: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned char *__pt\n+0010f430: 723c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 r;
    .\n+0010f450: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+0010f470: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t __size; .
    };
    \n+0010f500: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    class <\n+0010f530: 2f73 7061 6e3e 6e73 5f5f 6d79 4269 6e61 /span>ns__myBina\n+0010f540: 7279 4461 7461 5479 7065 203a 203c 7370 ryDataType : public\n+0010f570: 203c 6120 636c 6173 733d 2263 6f64 6522 xsd__bas\n+0010f5b0: 6536 3442 696e 6172 793c 2f61 3e20 3c2f e64Binary .
    { p\n+0010f5f0: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
    char \n+0010f640: 2a69 643b 203c 2f64 6976 3e0a 3c64 6976 *id;
    . \n+0010f660: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+0010f680: 3c2f 7370 616e 3e20 2a74 7970 653b 203c *type; <\n+0010f690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *options; .
    };
    .

    This def\n+0010f720: 696e 6573 2061 6e20 6578 7465 6e73 696f ines an extensio\n+0010f730: 6e20 6f66 203c 656d 3e3c 636f 6465 3e78 n of x\n+0010f740: 7364 3a62 6173 6536 3442 696e 6172 793c sd:base64Binary<\n+0010f750: 2f63 6f64 653e 3c2f 656d 3e2c 2073 7563 /code>, suc\n+0010f760: 6820 7468 6174 2074 6865 2064 6174 6120 h that the data \n+0010f770: 6361 6e20 6265 2073 6572 6961 6c69 7a65 can be serialize\n+0010f780: 6420 6173 2044 494d 4520 6174 7461 6368 d as DIME attach\n+0010f790: 6d65 6e74 7320 7573 696e 6720 3c65 6d3e ments using \n+0010f7a0: 3c63 6f64 653e 6872 6566 3c2f 636f 6465 href attribute\n+0010f7c0: 7320 666f 7220 7265 6665 7265 6e63 696e s for referencin\n+0010f7d0: 672e 2057 6865 6e20 6120 6469 6666 6572 g. When a differ\n+0010f7e0: 656e 7420 6174 7472 6962 7574 6520 6973 ent attribute is\n+0010f7f0: 2074 6f20 6265 2075 7365 642c 2074 6869 to be used, thi\n+0010f800: 7320 6d75 7374 2062 6520 6578 706c 6963 s must be explic\n+0010f810: 6974 6c79 2064 6566 696e 6564 3a3c 2f70 itly defined:.

    \n+0010f860: 2f2f 6773 6f61 7020 5753 7265 6620 7363 //gsoap WSref sc\n+0010f870: 6865 6d61 2069 6d70 6f72 743a 2068 7474 hema import: htt\n+0010f880: 703a 2f2f 7363 6865 6d61 732e 786d 6c73 p://schemas.xmls\n+0010f890: 6f61 702e 6f72 672f 7773 2f32 3030 322f oap.org/ws/2002/\n+0010f8a0: 3034 2f72 6566 6572 656e 6365 2f20 3c2f 04/reference/
    .struct ns__myBinaryDa\n+0010f900: 7461 5479 7065 203c 2f64 6976 3e0a 3c64 taType
    .\n+0010f920: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    unsigned\n+0010f960: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *_\n+0010f990: 5f70 7472 3b20 3c2f 6469 763e 0a3c 6469 _ptr;
    . \n+0010f9b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+0010f9d0: 3c2f 7370 616e 3e20 5f5f 7369 7a65 3b20 __size; \n+0010f9e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char *id;
    .<\n+0010fa30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010fa40: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n+0010fa60: 6861 723c 2f73 7061 6e3e 202a 7479 7065 har *type\n+0010fa70: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+0010fa90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010faa0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *options; <\n+0010fac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    @ char *WSref__locati\n+0010fb10: 6f6e 3b20 3c2f 6469 763e 0a3c 6469 7620 on;
    .
    };<\n+0010fb30: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+0010fb50: 5468 6520 6578 616d 706c 6520 6162 6f76 The example abov\n+0010fb60: 6520 7573 6573 2074 6865 203c 656d 3e3c e uses the <\n+0010fb70: 636f 6465 3e6c 6f63 6174 696f 6e3c 2f63 code>location attrib\n+0010fb90: 7574 6520 6465 6669 6e65 6420 696e 2074 ute defined in t\n+0010fba0: 6865 2063 6f6e 7465 6e74 2072 6566 6572 he content refer\n+0010fbb0: 656e 6365 2073 6368 656d 612c 2061 7320 ence schema, as \n+0010fbc0: 6465 6669 6e65 6420 696e 206f 6e65 206f defined in one o\n+0010fbd0: 6620 7468 6520 7665 6e64 6f72 2773 2073 f the vendor's s\n+0010fbe0: 7065 6369 6669 6320 5753 444c 2065 7874 pecific WSDL ext\n+0010fbf0: 656e 7369 6f6e 7320 666f 7220 4449 4d45 ensions for DIME\n+0010fc00: 203c 6120 6872 6566 3d22 6874 7470 3a2f http://www\n+0010fc60: 2e67 6f74 646f 746e 6574 2e63 6f6d 2f74 .gotdotnet.com/t\n+0010fc70: 6561 6d2f 786d 6c5f 7773 7370 6563 732f eam/xml_wsspecs/\n+0010fc80: 6469 6d65 2f57 5344 4c2d 4578 7465 6e73 dime/WSDL-Extens\n+0010fc90: 696f 6e2d 666f 722d 4449 4d45 2e68 746d ion-for-DIME.htm\n+0010fca0: 3c2f 613e 2e3c 2f70 3e0a 3c70 3e57 6865 .

    .

    Whe\n+0010fcb0: 6e20 7265 6365 6976 696e 6720 4449 4d45 n receiving DIME\n+0010fcc0: 2061 7474 6163 686d 656e 7473 2c20 7468 attachments, th\n+0010fcd0: 6520 4449 4d45 206d 6574 6120 6461 7461 e DIME meta data\n+0010fce0: 2061 6e64 2062 696e 6172 7920 636f 6e74 and binary cont\n+0010fcf0: 656e 7420 6172 6520 7374 6f72 6564 2069 ent are stored i\n+0010fd00: 6e20 7468 6520 7370 6563 6966 6965 6420 n the specified \n+0010fd10: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 xsd__base64B\n+0010fd90: 696e 6172 793c 2f61 3e3c 2f63 6f64 653e inary\n+0010fda0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and xsd__hexBinar\n+0010fe20: 793c 2f61 3e3c 2f63 6f64 653e 2062 696e y bin\n+0010fe30: 6172 7920 6461 7461 2074 7970 6573 206f ary data types o\n+0010fe40: 6e6c 7920 7768 656e 2074 6865 2058 4d4c nly when the XML\n+0010fe50: 2070 6172 7473 206f 6620 7468 6520 6d65 parts of the me\n+0010fe60: 7373 6167 6520 7573 6573 203c 656d 3e3c ssage uses <\n+0010fe70: 636f 6465 3e68 7265 663c 2f63 6f64 653e code>href\n+0010fe80: 3c2f 656d 3e20 6174 7472 6962 7574 6573 attributes\n+0010fe90: 2074 6f20 7265 6665 7220 746f 2074 6865 to refer to the\n+0010fea0: 7365 2061 7474 6163 686d 656e 7473 2e20 se attachments. \n+0010feb0: 4966 2073 6f2c 2074 6865 2062 696e 6172 If so, the binar\n+0010fec0: 7920 6461 7461 2074 7970 6520 3c63 6f64 y data type __ptr a\n+0010fee0: 6e64 203c 636f 6465 3e5f 5f73 697a 653c nd __size<\n+0010fef0: 2f63 6f64 653e 206d 656d 6265 7273 2061 /code> members a\n+0010ff00: 7265 2073 6574 2074 6f20 7468 6520 6c6f re set to the lo\n+0010ff10: 6361 7469 6f6e 2069 6e20 6d65 6d6f 7279 cation in memory\n+0010ff20: 206f 6620 7468 6520 6174 7461 6368 6d65 of the attachme\n+0010ff30: 6e74 2064 6174 6120 616e 6420 6c65 6e67 nt data and leng\n+0010ff40: 7468 2c20 7265 7370 6563 7469 7665 6c79 th, respectively\n+0010ff50: 2e3c 2f70 3e0a 3c70 3e4d 6573 7361 6765 .

    .

    Message\n+0010ff60: 7320 6d61 7920 636f 6e74 6169 6e20 6269 s may contain bi\n+0010ff70: 6e61 7279 2064 6174 6120 7468 6174 2072 nary data that r\n+0010ff80: 6566 6572 656e 6365 7320 6578 7465 726e eferences extern\n+0010ff90: 616c 2072 6573 6f75 7263 6573 206e 6f74 al resources not\n+0010ffa0: 2070 726f 7669 6465 6420 6173 2061 7474 provided as att\n+0010ffb0: 6163 686d 656e 7473 2e20 496e 2074 6861 achments. In tha\n+0010ffc0: 7420 6361 7365 2c20 7468 6520 3c63 6f64 t case, the __ptr m\n+0010ffe0: 656d 6265 7220 6973 204e 554c 4c20 616e ember is NULL an\n+0010fff0: 6420 7468 6520 3c63 6f64 653e 6964 3c2f d the id member ref\n+00110010: 6572 7320 746f 2074 6865 2065 7874 6572 ers to the exter\n+00110020: 6e61 6c20 6461 7461 2073 6f75 7263 652e nal data source.\n+00110030: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The dime_id_format\n+00110050: 3c2f 636f 6465 3e20 6174 7472 6962 7574 attribut\n+00110060: 6520 6f66 2074 6865 2063 7572 7265 6e74 e of the current\n+00110070: 2063 6f6e 7465 7874 2063 616e 2062 6520 context can be \n+00110080: 7365 7420 746f 2074 6865 2064 6566 6175 set to the defau\n+00110090: 6c74 2066 6f72 6d61 7420 6f66 2044 494d lt format of DIM\n+001100a0: 4520 6964 206d 656d 6265 7273 2e20 5468 E id members. Th\n+001100b0: 6520 666f 726d 6174 2073 7472 696e 6720 e format string \n+001100c0: 6d75 7374 2063 6f6e 7461 696e 2061 203c must contain a <\n+001100d0: 636f 6465 3e64 3c2f 636f 6465 3e20 666f code>d fo\n+001100e0: 726d 6174 2073 7065 6369 6669 6572 2028 rmat specifier (\n+001100f0: 6f72 2061 6e79 206f 7468 6572 203c 636f or any other int-ba\n+00110110: 7365 6420 666f 726d 6174 2073 7065 6369 sed format speci\n+00110120: 6669 6572 292e 2054 6865 2076 616c 7565 fier). The value\n+00110130: 206f 6620 7468 6973 2073 7065 6369 6669 of this specifi\n+00110140: 6572 2069 7320 6120 6e6f 6e2d 6e65 6761 er is a non-nega\n+00110150: 7469 7665 2069 6e74 6567 6572 2c20 7769 tive integer, wi\n+00110160: 7468 207a 6572 6f20 6265 696e 6720 7468 th zero being th\n+00110170: 6520 7661 6c75 6520 6f66 2074 6865 2044 e value of the D\n+00110180: 494d 4520 6174 7461 6368 6d65 6e74 2069 IME attachment i\n+00110190: 6420 666f 7220 7468 6520 534f 4150 206d d for the SOAP m\n+001101a0: 6573 7361 6765 2e20 466f 7220 6578 616d essage. For exam\n+001101b0: 706c 652c 3c2f 703e 0a3c 6469 7620 636c ple,

    .
    <\n+001101d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001101e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+00110230: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+00110260: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+001102c0: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    soap\n+00110310: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->dime_id_format\n+00110370: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "id-%x&q\n+001103a0: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    c\n+00110480: 6f6e 7374 2063 6861 7220 2a20 6469 6d65 onst char * dime\n+00110490: 5f69 645f 666f 726d 6174 3c2f 6469 763e _id_format
    \n+001104a0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n+001104c0: 6520 666f 726d 6174 2073 7472 696e 6720 e format string \n+001104d0: 746f 2067 656e 6572 6174 6520 4449 4d45 to generate DIME\n+001104e0: 2063 6f6e 7465 6e74 2049 4473 2e3c 2f64 content IDs.
    Definit\n+00110510: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00110520: 322e 683a 3431 3732 3c2f 6469 763e 3c2f 2.h:4172
    .

    A\n+00110550: 7320 6120 7265 7375 6c74 2c20 616c 6c20 s a result, all \n+00110560: 6174 7461 6368 6d65 6e74 7320 7769 7468 attachments with\n+00110570: 2061 204e 554c 4c20 3c63 6f64 653e 6964 a NULL id\n+00110580: 3c2f 636f 6465 3e20 6d65 6d62 6572 2077 member w\n+00110590: 696c 6c20 7573 6520 6120 6175 746f 2d67 ill use a auto-g\n+001105a0: 656e 6572 6174 6564 2069 6420 7661 6c75 enerated id valu\n+001105b0: 6520 6261 7365 6420 6f6e 2074 6865 2066 e based on the f\n+001105c0: 6f72 6d61 7420 7374 7269 6e67 2e3c 2f70 ormat string..

    WarningCare must be t\n+00110610: 616b 656e 206e 6f74 2074 6f20 696e 7472 aken not to intr\n+00110620: 6f64 7563 6520 6475 706c 6963 6174 6520 oduce duplicate \n+00110630: 636f 6e74 656e 7420 6964 2076 616c 7565 content id value\n+00110640: 732c 2077 6865 6e20 6173 7369 676e 696e s, when assignin\n+00110650: 6720 636f 6e74 656e 7420 6964 2076 616c g content id val\n+00110660: 7565 7320 746f 2074 6865 2069 6420 6d65 ues to the id me\n+00110670: 6d62 6572 7320 6f66 2044 494d 4520 6578 mbers of DIME ex\n+00110680: 7465 6e64 6564 2062 696e 6172 7920 6461 tended binary da\n+00110690: 7461 2074 7970 6573 2e20 436f 6e74 656e ta types. Conten\n+001106a0: 7420 6964 7320 6d75 7374 2062 6520 756e t ids must be un\n+001106b0: 6971 7565 2e3c 2f64 643e 3c2f 646c 3e0a ique.
    .\n+001106c0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

    .

    <\n+00110720: 2f61 3e0a 5374 7265 616d 696e 6720 4449 /a>.Streaming DI\n+00110730: 4d45 3c2f 6832 3e0a 3c70 3e53 7472 6561 ME

    .

    Strea\n+00110740: 6d69 6e67 2044 494d 4520 6973 2061 6368 ming DIME is ach\n+00110750: 6965 7665 6420 7769 7468 2063 616c 6c62 ieved with callb\n+00110760: 6163 6b20 6675 6e63 7469 6f6e 7320 746f ack functions to\n+00110770: 2066 6574 6368 2061 6e64 2073 746f 7265 fetch and store\n+00110780: 2064 6174 6120 6475 7269 6e67 2074 7261 data during tra\n+00110790: 6e73 6d69 7373 696f 6e2e 2054 6872 6565 nsmission. Three\n+001107a0: 2066 756e 6374 696f 6e20 6361 6c6c 6261 function callba\n+001107b0: 636b 7320 666f 7220 7374 7265 616d 696e cks for streamin\n+001107c0: 6720 4449 4d45 206f 7574 7075 7420 616e g DIME output an\n+001107d0: 6420 7468 7265 6520 6361 6c6c 6261 636b d three callback\n+001107e0: 7320 666f 7220 7374 7265 616d 696e 6720 s for streaming \n+001107f0: 4449 4d45 2069 6e70 7574 2061 7265 2061 DIME input are a\n+00110800: 7661 696c 6162 6c65 2e3c 2f70 3e0a 3c75 vailable.

    ..
  • voi\n+00110820: 6420 2a28 2a73 6f61 702e 6664 696d 6572 d *(*soap.fdimer\n+00110830: 6561 646f 7065 6e29 2873 7472 7563 7420 eadopen)(struct \n+00110840: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void\n+00110850: 202a 6861 6e64 6c65 2c20 636f 6e73 7420 *handle, const \n+00110860: 6368 6172 202a 6964 2c20 636f 6e73 7420 char *id, const \n+00110870: 6368 6172 202a 7479 7065 2c20 636f 6e73 char *type, cons\n+00110880: 7420 6368 6172 202a 6f70 7469 6f6e 7329 t char *options)\n+00110890: 3c2f 636f 6465 3e20 5468 6973 2063 616c This cal\n+001108a0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+001108b0: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n+001108c0: 2073 7461 7274 2073 656e 6469 6e67 2061 start sending a\n+001108d0: 2073 7472 6561 6d69 6e67 2044 494d 4520 streaming DIME \n+001108e0: 6174 7461 6368 6d65 6e74 2e20 5468 6973 attachment. This\n+001108f0: 2063 616c 6c62 6163 6b20 6f70 656e 7320 callback opens \n+00110900: 6120 7374 7265 616d 2074 6f20 7374 6172 a stream to star\n+00110910: 7420 7265 6164 696e 6720 7468 6520 6174 t reading the at\n+00110920: 7461 6368 6d65 6e74 2064 6174 6120 746f tachment data to\n+00110930: 2073 656e 642e 2054 6865 2061 6374 7561 send. The actua\n+00110940: 6c20 6461 7461 2073 7472 6561 6d20 7769 l data stream wi\n+00110950: 6c6c 2062 6520 7265 6164 2069 6e20 6368 ll be read in ch\n+00110960: 756e 6b73 2075 7369 6e67 2074 6865 203c unks using the <\n+00110970: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fdime\n+00110a10: 7265 6164 3c2f 613e 3c2f 636f 6465 3e20 read \n+00110a20: 6361 6c6c 6261 636b 2075 6e74 696c 206e callback until n\n+00110a30: 6f20 6d6f 7265 2064 6174 6120 6973 2061 o more data is a\n+00110a40: 7661 696c 6162 6c65 2061 6e64 2074 6865 vailable and the\n+00110a50: 203c 636f 6465 3e3c 6120 636c 6173 733d so\n+00110af0: 6170 3a3a 6664 696d 6572 6561 6463 6c6f ap::fdimereadclo\n+00110b00: 7365 3c2f 613e 3c2f 636f 6465 3e20 6361 se ca\n+00110b10: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+00110b20: 2074 6f20 636c 6f73 6520 7468 6520 7374 to close the st\n+00110b30: 7265 616d 2e20 5468 6520 3c63 6f64 653e ream. The \n+00110b40: 6861 6e64 6c65 3c2f 636f 6465 3e20 7061 handle pa\n+00110b50: 7261 6d65 7465 7220 636f 6e74 6169 6e73 rameter contains\n+00110b60: 2074 6865 2076 616c 7565 206f 6620 7468 the value of th\n+00110b70: 6520 3c63 6f64 653e 5f5f 7074 723c 2f63 e __ptr member vari\n+00110b90: 6162 6c65 206f 6620 7468 6520 6174 7461 able of the atta\n+00110ba0: 6368 6d65 6e74 2073 7472 7563 742f 636c chment struct/cl\n+00110bb0: 6173 7320 7769 7468 2064 6174 6120 2865 ass with data (e\n+00110bc0: 2e67 2e20 3c63 6f64 653e 3c61 2063 6c61 .g. xsd__bas\n+00110c40: 6536 3442 696e 6172 793c 2f61 3e3c 2f63 e64Binary or _xop__Includ\n+00110cd0: 653c 2f61 3e3c 2f63 6f64 653e 2077 6974 e wit\n+00110ce0: 6820 3c63 6f64 653e 5f5f 7074 723c 2f63 h __ptr, __si\n+00110d00: 7a65 3c2f 636f 6465 3e2c 203c 636f 6465 ze, id, type an\n+00110d30: 6420 3c63 6f64 653e 6f70 7469 6f6e 733c d options<\n+00110d40: 2f63 6f64 653e 206d 656d 6265 7273 292c /code> members),\n+00110d50: 2077 6869 6368 2073 686f 756c 6420 6265 which should be\n+00110d60: 2061 2070 6f69 6e74 6572 2074 6f20 7370 a pointer to sp\n+00110d70: 6563 6966 6963 2069 6e66 6f72 6d61 7469 ecific informati\n+00110d80: 6f6e 2073 7563 6820 6173 2061 2066 696c on such as a fil\n+00110d90: 6520 6465 7363 7269 7074 6f72 206f 7220 e descriptor or \n+00110da0: 6120 706f 696e 7465 7220 746f 2061 2073 a pointer to a s\n+00110db0: 6f6d 6520 6170 706c 6963 6174 696f 6e2d ome application-\n+00110dc0: 7370 6563 6966 6963 2064 6174 6120 746f specific data to\n+00110dd0: 2062 6520 7061 7373 6564 2074 6f20 7468 be passed to th\n+00110de0: 6973 2063 616c 6c62 6163 6b2e 2042 6f74 is callback. Bot\n+00110df0: 6820 7468 6520 3c63 6f64 653e 5f5f 7074 h the __pt\n+00110e00: 723c 2f63 6f64 653e 2061 6e64 203c 636f r and __size\n+00110e20: 206d 656d 6265 7273 206f 6620 7468 6520 members of the \n+00110e30: 6174 7461 6368 6d65 6e74 2073 7472 7563 attachment struc\n+00110e40: 742f 636c 6173 7320 7368 6f75 6c64 2068 t/class should h\n+00110e50: 6176 6520 6265 656e 2073 6574 2062 7920 ave been set by \n+00110e60: 7468 6520 6170 706c 6963 6174 696f 6e20 the application \n+00110e70: 7072 696f 7220 746f 2074 6865 2073 6572 prior to the ser\n+00110e80: 6961 6c69 7a61 7469 6f6e 206f 6620 7468 ialization of th\n+00110e90: 6520 6d65 7373 6167 6520 7769 7468 2061 e message with a\n+00110ea0: 7474 6163 686d 656e 7473 2e20 4966 2074 ttachments. If t\n+00110eb0: 6865 203c 636f 6465 3e5f 5f73 697a 653c he __size<\n+00110ec0: 2f63 6f64 653e 2069 7320 7a65 726f 2061 /code> is zero a\n+00110ed0: 6e64 2048 5454 5020 6368 756e 6b69 6e67 nd HTTP chunking\n+00110ee0: 2069 7320 656e 6162 6c65 6420 2877 6974 is enabled (wit\n+00110ef0: 6820 3c63 6f64 653e 2353 4f41 505f 494f h #SOAP_IO\n+00110f00: 5f43 4855 4e4b 3c2f 636f 6465 3e29 2c20 _CHUNK), \n+00110f10: 7468 656e 2063 6875 6e6b 6564 2044 494d then chunked DIM\n+00110f20: 4520 6174 7461 6368 6d65 6e74 7320 6172 E attachments ar\n+00110f30: 6520 7365 6e74 2c20 7365 6520 3c63 6f64 e sent, see soap::fdimerea\n+00110fe0: 643c 2f61 3e3c 2f63 6f64 653e 2e20 5468 d. Th\n+00110ff0: 6520 3c63 6f64 653e 6964 3c2f 636f 6465 e id, type and o\n+00111020: 7074 696f 6e73 3c2f 636f 6465 3e20 7061 ptions pa\n+00111030: 7261 6d65 7465 7273 2061 7265 2074 6865 rameters are the\n+00111040: 203c 636f 6465 3e69 643c 2f63 6f64 653e id\n+00111050: 2028 6f70 7469 6f6e 616c 2049 4429 2c20 (optional ID), \n+00111060: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type (a MIME type) \n+00111080: 616e 6420 3c63 6f64 653e 6f70 7469 6f6e and option\n+00111090: 733c 2f63 6f64 653e 2028 4449 4d45 206f s (DIME o\n+001110a0: 7074 696f 6e73 2061 7265 2073 6574 2077 ptions are set w\n+001110b0: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_di\n+00111130: 6d65 5f6f 7074 696f 6e3c 2f61 3e3c 2f63 me_option) of the att\n+00111150: 6163 686d 656e 7420 7374 7275 6374 2f63 achment struct/c\n+00111160: 6c61 7373 2c20 7265 7370 6563 7469 7665 lass, respective\n+00111170: 6c79 2c20 6f66 2077 6869 6368 2061 7420 ly, of which at \n+00111180: 6c65 6173 7420 6f6e 6520 6d65 6d62 6572 least one member\n+00111190: 2073 686f 756c 6420 6265 206e 6f6e 2d4e should be non-N\n+001111a0: 554c 4c2e 2054 6865 2063 616c 6c62 6163 ULL. The callbac\n+001111b0: 6b20 7368 6f75 6c64 2072 6574 7572 6e20 k should return \n+001111c0: 7468 6520 3c63 6f64 653e 6861 6e64 6c65 the handle\n+001111d0: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n+001111e0: 7220 7661 6c75 6520 6f72 2061 6e6f 7468 r value or anoth\n+001111f0: 6572 2070 6f69 6e74 6572 2076 616c 7565 er pointer value\n+00111200: 2c20 7768 6963 6820 6973 2070 6173 7365 , which is passe\n+00111210: 6420 6173 2074 6865 206e 6577 203c 636f d as the new handle\n+00111230: 2070 6172 616d 6574 6572 2074 6f20 3c63 parameter to soap::fdimer\n+001112e0: 6561 643c 2f61 3e3c 2f63 6f64 653e 2061 ead a\n+001112f0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd \n+00111390: 736f 6170 3a3a 6664 696d 6572 6561 6463 soap::fdimereadc\n+001113a0: 6c6f 7365 3c2f 613e 3c2f 636f 6465 3e20 lose \n+001113b0: 6361 6c6c 6261 636b 732e 2057 6865 6e20 callbacks. When \n+001113c0: 616e 2065 7272 6f72 206f 6363 7572 7265 an error occurre\n+001113d0: 6420 696e 2074 6869 7320 6361 6c6c 6261 d in this callba\n+001113e0: 636b 2c20 7468 6520 6361 6c6c 6261 636b ck, the callback\n+001113f0: 2073 686f 756c 6420 7265 7475 726e 204e should return N\n+00111400: 554c 4c20 616e 6420 7365 7420 3c63 6f64 ULL and set soap::er\n+001114c0: 726f 723c 2f61 3e3c 2f63 6f64 653e 2074 ror t\n+001114d0: 6f20 616e 2065 7272 6f72 2063 6f64 652c o an error code,\n+001114e0: 2065 2e67 2e20 7573 696e 6720 3c63 6f64 e.g. using soap_receiver_\n+001115a0: 6661 756c 743c 2f61 3e3c 2f63 6f64 653e fault\n+001115b0: 2e20 5468 6520 6361 6c6c 6261 636b 206d . The callback m\n+001115c0: 6179 2072 6574 7572 6e20 4e55 4c4c 2061 ay return NULL a\n+001115d0: 6e64 2073 6574 203c 636f 6465 3e3c 6120 nd set soap::error to #SOAP_OK when this spe\n+001116c0: 6369 6669 6320 4449 4d45 2061 7474 6163 cific DIME attac\n+001116d0: 686d 656e 7420 7368 6f75 6c64 206e 6f74 hment should not\n+001116e0: 2074 6f20 6265 2073 7472 6561 6d65 6420 to be streamed \n+001116f0: 616e 6420 7468 6520 656e 6769 6e65 2077 and the engine w\n+00111700: 696c 6c20 7369 6d70 6c79 2073 6b69 7020 ill simply skip \n+00111710: 6974 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f it.
  • .
  • size_t (*soap\n+00111730: 2e66 6469 6d65 7265 6164 2928 7374 7275 .fdimeread)(stru\n+00111740: 6374 2073 6f61 7020 2a73 6f61 702c 2076 ct soap *soap, v\n+00111750: 6f69 6420 2a68 616e 646c 652c 2063 6861 oid *handle, cha\n+00111760: 7220 2a62 7566 2c20 7369 7a65 5f74 206c r *buf, size_t l\n+00111770: 656e 293c 2f63 6f64 653e 2054 6869 7320 en) This \n+00111780: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+00111790: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n+001117a0: 2074 6f20 7265 6164 2061 2063 6875 6e6b to read a chunk\n+001117b0: 206f 6620 6174 7461 6368 6d65 6e74 2064 of attachment d\n+001117c0: 6174 6120 746f 2074 7261 6e73 6d69 742e ata to transmit.\n+001117d0: 2054 6865 203c 636f 6465 3e68 616e 646c The handl\n+001117e0: 653c 2f63 6f64 653e 2070 6172 616d 6574 e paramet\n+001117f0: 6572 2063 6f6e 7461 696e 7320 7468 6520 er contains the \n+00111800: 6861 6e64 6c65 2072 6574 7572 6e65 6420 handle returned \n+00111810: 6279 2074 6865 203c 636f 6465 3e3c 6120 by the soap::fdimer\n+001118c0: 6561 646f 7065 6e3c 2f61 3e3c 2f63 6f64 eadopen callback. The\n+001118e0: 203c 636f 6465 3e62 7566 3c2f 636f 6465 buf parameter is t\n+00111900: 6865 2062 7566 6665 7220 6f66 206c 656e he buffer of len\n+00111910: 6774 6820 3c63 6f64 653e 6c65 6e3c 2f63 gth len into which \n+00111930: 6120 6368 756e 6b20 6f66 2064 6174 6120 a chunk of data \n+00111940: 7368 6f75 6c64 2062 6520 7772 6974 7465 should be writte\n+00111950: 6e20 6279 2074 6865 2063 616c 6c62 6163 n by the callbac\n+00111960: 6b2e 2054 6865 2061 6374 7561 6c20 616d k. The actual am\n+00111970: 6f75 6e74 206f 6620 6461 7461 2077 7269 ount of data wri\n+00111980: 7474 656e 2069 6e74 6f20 7468 6520 6275 tten into the bu\n+00111990: 6666 6572 206d 6179 2062 6520 6c65 7373 ffer may be less\n+001119a0: 2074 6861 6e20 3c63 6f64 653e 6c65 6e3c than len<\n+001119b0: 2f63 6f64 653e 2061 6e64 2074 6869 7320 /code> and this \n+001119c0: 6163 7475 616c 2061 6d6f 756e 7420 7368 actual amount sh\n+001119d0: 6f75 6c64 2062 6520 7265 7475 726e 6564 ould be returned\n+001119e0: 2062 7920 7468 6520 6361 6c6c 6261 636b by the callback\n+001119f0: 2e20 4120 7265 7475 726e 2076 616c 7565 . A return value\n+00111a00: 206f 6620 7a65 726f 2069 6e64 6963 6174 of zero indicat\n+00111a10: 6573 2061 6e20 6572 726f 7220 616e 6420 es an error and \n+00111a20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n+00111ad0: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error should be set\n+00111af0: 2e20 5468 6520 3c63 6f64 653e 5f5f 7369 . The __si\n+00111b00: 7a65 3c2f 636f 6465 3e20 6d65 6d62 6572 ze member\n+00111b10: 2076 6172 6961 626c 6520 6f66 2074 6865 variable of the\n+00111b20: 2061 7474 6163 686d 656e 7420 7374 7275 attachment stru\n+00111b30: 6374 2f63 6c61 7373 2077 6974 6820 6461 ct/class with da\n+00111b40: 7461 2028 652e 672e 203c 636f 6465 3e3c ta (e.g. <\n+00111b50: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00111b60: 663d 2273 7472 7563 7478 7364 5f5f 5f5f f=\"structxsd____\n+00111b70: 6261 7365 3634 5f62 696e 6172 792e 6874 base64_binary.ht\n+00111b80: 6d6c 2220 7469 746c 653d 2258 5344 2062 ml\" title=\"XSD b\n+00111b90: 6173 6536 3442 696e 6172 7920 7374 7275 ase64Binary stru\n+00111ba0: 6374 7572 6520 7769 7468 2061 7474 6163 cture with attac\n+00111bb0: 686d 656e 7420 6461 7461 2e22 3e78 7364 hment data.\">xsd\n+00111bc0: 5f5f 6261 7365 3634 4269 6e61 7279 3c2f __base64Binary or _xop__I\n+00111c50: 6e63 6c75 6465 3c2f 613e 3c2f 636f 6465 nclude with __p\n+00111c70: 7472 3c2f 636f 6465 3e2c 203c 636f 6465 tr, __size, \n+00111c90: 3c63 6f64 653e 6964 3c2f 636f 6465 3e2c id,\n+00111ca0: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type and opt\n+00111cc0: 696f 6e73 3c2f 636f 6465 3e20 6d65 6d62 ions memb\n+00111cd0: 6572 7329 2073 686f 756c 6420 6265 2073 ers) should be s\n+00111ce0: 6574 2062 7920 7468 6520 6170 706c 6963 et by the applic\n+00111cf0: 6174 696f 6e20 7072 696f 7220 746f 2074 ation prior to t\n+00111d00: 6865 2073 6572 6961 6c69 7a61 7469 6f6e he serialization\n+00111d10: 206f 6620 7468 6520 6d65 7373 6167 6520 of the message \n+00111d20: 7769 7468 2061 7474 6163 686d 656e 7473 with attachments\n+00111d30: 2e20 5468 6520 7661 6c75 6520 6f66 203c . The value of <\n+00111d40: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size indicates the\n+00111d60: 2074 6f74 616c 2073 697a 6520 6f66 2074 total size of t\n+00111d70: 6865 2061 7474 6163 686d 656e 7420 6461 he attachment da\n+00111d80: 7461 2074 6f20 6265 2074 7261 6e73 6d69 ta to be transmi\n+00111d90: 7474 6564 2e20 4966 2074 6865 203c 636f tted. If the __size\n+00111db0: 206d 656d 6265 7220 7661 7269 6162 6c65 member variable\n+00111dc0: 2069 7320 7a65 726f 2061 6e64 2048 5454 is zero and HTT\n+00111dd0: 5020 6368 756e 6b69 6e67 2069 7320 656e P chunking is en\n+00111de0: 6162 6c65 6420 2877 6974 6820 3c63 6f64 abled (with #SOAP_IO_CHUNK\n+00111e00: 3c2f 636f 6465 3e29 2c20 7468 656e 2044 ), then D\n+00111e10: 494d 4520 6368 756e 6b65 6420 7472 616e IME chunked tran\n+00111e20: 7366 6572 7320 6172 6520 6163 7469 7661 sfers are activa\n+00111e30: 7465 6420 6279 2074 6865 2065 6e67 696e ted by the engin\n+00111e40: 652c 2077 6869 6368 2069 7320 6d6f 7265 e, which is more\n+00111e50: 2066 6c65 7869 626c 6520 7369 6e63 6520 flexible since \n+00111e60: 7468 6520 6174 7461 6368 6d65 6e74 2064 the attachment d\n+00111e70: 6174 6120 7369 7a65 2064 6f65 7320 6e6f ata size does no\n+00111e80: 7420 6e65 6564 2074 6f20 6265 2064 6574 t need to be det\n+00111e90: 6572 6d69 6e65 6420 696e 2061 6476 616e ermined in advan\n+00111ea0: 6365 2e20 546f 2075 7365 2044 494d 4520 ce. To use DIME \n+00111eb0: 6368 756e 6b65 6420 7472 616e 7366 6572 chunked transfer\n+00111ec0: 732c 2065 6e61 626c 6520 4854 5450 2063 s, enable HTTP c\n+00111ed0: 6875 6e6b 696e 6720 7769 7468 203c 636f hunking with #SOAP_IO_CHUN\n+00111ef0: 4b3c 2f63 6f64 653e 2028 616c 736f 203c K (also <\n+00111f00: 636f 6465 3e23 534f 4150 5f49 4f5f 5354 code>#SOAP_IO_ST\n+00111f10: 4f52 453c 2f63 6f64 653e 2063 616e 2062 ORE can b\n+00111f20: 6520 7573 6564 2c20 6275 7420 7468 6973 e used, but this\n+00111f30: 2062 7566 6665 7273 2074 6865 2065 6e74 buffers the ent\n+00111f40: 6972 6520 6d65 7373 6167 6520 696e 206d ire message in m\n+00111f50: 656d 6f72 7920 6265 666f 7265 2074 7261 emory before tra\n+00111f60: 6e73 6d69 7373 696f 6e29 2061 6e64 2073 nsmission) and s\n+00111f70: 6574 2074 6865 203c 636f 6465 3e5f 5f73 et the __s\n+00111f80: 697a 653c 2f63 6f64 653e 206d 656d 6265 ize membe\n+00111f90: 7220 7661 7269 6162 6c65 206f 6620 7468 r variable of th\n+00111fa0: 6520 6174 7461 6368 6d65 6e74 2073 7472 e attachment str\n+00111fb0: 7563 742f 636c 6173 7320 746f 207a 6572 uct/class to zer\n+00111fc0: 6f2e 2057 6865 6e20 4449 4d45 2061 7474 o. When DIME att\n+00111fd0: 6163 686d 656e 7420 6368 756e 6b69 6e67 achment chunking\n+00111fe0: 2069 7320 656e 6162 6c65 642c 2074 6869 is enabled, thi\n+00111ff0: 7320 6361 6c6c 6261 636b 2073 686f 756c s callback shoul\n+00112000: 6420 636f 6d70 6c65 7465 6c79 2066 696c d completely fil\n+00112010: 6c20 7468 6520 3c63 6f64 653e 6275 663c l the buf<\n+00112020: 2f63 6f64 653e 2062 7566 6665 7220 7769 /code> buffer wi\n+00112030: 7468 203c 636f 6465 3e6c 656e 3c2f 636f th len bytes unless\n+00112050: 2074 6865 206c 6173 7420 6461 7461 2063 the last data c\n+00112060: 6875 6e6b 2069 7320 7265 6163 6865 6420 hunk is reached \n+00112070: 616e 6420 6665 7765 7220 6279 7465 7320 and fewer bytes \n+00112080: 6172 6520 7265 7475 726e 6564 2e3c 2f6c are returned..
  • voi\n+001120a0: 6420 282a 736f 6170 2e66 6469 6d65 7265 d (*soap.fdimere\n+001120b0: 6164 636c 6f73 6529 2873 7472 7563 7420 adclose)(struct \n+001120c0: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void\n+001120d0: 202a 6861 6e64 6c65 293c 2f63 6f64 653e *handle)\n+001120e0: 2054 6869 7320 6361 6c6c 6261 636b 2069 This callback i\n+001120f0: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n+00112100: 656e 6769 6e65 2074 6f20 636c 6f73 6520 engine to close \n+00112110: 7468 6520 4449 4d45 2061 7474 6163 686d the DIME attachm\n+00112120: 656e 7420 7374 7265 616d 2061 6674 6572 ent stream after\n+00112130: 2072 6561 6469 6e67 2e20 5468 6520 3c63 reading. The handle parameter cont\n+00112160: 6169 6e73 2074 6865 2068 616e 646c 6520 ains the handle \n+00112170: 7265 7475 726e 6564 2062 7920 7468 6520 returned by the \n+00112180: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n+00112220: 703a 3a66 6469 6d65 7265 6164 6f70 656e p::fdimereadopen\n+00112230: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n+00112240: 6261 636b 2e3c 2f6c 693e 0a3c 6c69 3e3c back.
  • .
  • <\n+00112250: 636f 6465 3e76 6f69 6420 2a28 2a73 6f61 code>void *(*soa\n+00112260: 702e 6664 696d 6577 7269 7465 6f70 656e p.fdimewriteopen\n+00112270: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n+00112280: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n+00112290: 2a69 642c 2063 6f6e 7374 2063 6861 7220 *id, const char \n+001122a0: 2a74 7970 652c 2063 6f6e 7374 2063 6861 *type, const cha\n+001122b0: 7220 2a6f 7074 696f 6e73 293c 2f63 6f64 r *options) Called by the\n+001122d0: 2074 6f20 7374 6172 7420 7265 6365 6976 to start receiv\n+001122e0: 696e 6720 6120 7374 7265 616d 696e 6720 ing a streaming \n+001122f0: 4449 4d45 2061 7474 6163 686d 656e 742e DIME attachment.\n+00112300: 2054 6869 7320 6361 6c6c 6261 636b 206f This callback o\n+00112310: 7065 6e73 2061 2073 7472 6561 6d20 746f pens a stream to\n+00112320: 2073 7461 7274 2077 7269 7469 6e67 2074 start writing t\n+00112330: 6865 2061 7474 6163 686d 656e 7420 6461 he attachment da\n+00112340: 7461 2072 6563 6569 7665 642e 2054 6865 ta received. The\n+00112350: 2061 6374 7561 6c20 6461 7461 2073 7472 actual data str\n+00112360: 6561 6d20 7769 6c6c 2062 6520 7772 6974 eam will be writ\n+00112370: 7465 6e20 696e 2063 6875 6e6b 7320 7573 ten in chunks us\n+00112380: 696e 6720 7468 6520 3c63 6f64 653e 3c61 ing the s\n+00112420: 6f61 703a 3a66 6469 6d65 7772 6974 653c oap::fdimewrite<\n+00112430: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c62 /a> callb\n+00112440: 6163 6b20 756e 7469 6c20 6e6f 206d 6f72 ack until no mor\n+00112450: 6520 6461 7461 2069 7320 6176 6169 6c61 e data is availa\n+00112460: 626c 6520 616e 6420 7468 6520 3c63 6f64 ble and the soap::f\n+00112510: 6469 6d65 7772 6974 6563 6c6f 7365 3c2f dimewriteclose callba\n+00112530: 636b 2069 7320 6361 6c6c 6564 2074 6f20 ck is called to \n+00112540: 636c 6f73 6520 7468 6520 7374 7265 616d close the stream\n+00112550: 2e20 5468 6520 3c63 6f64 653e 6964 3c2f . The id, typ\n+00112570: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and options parameters are\n+001125a0: 2074 6865 203c 636f 6465 3e69 643c 2f63 the id, type\n+001125c0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and options\n+001125e0: 206f 6620 7468 6520 6174 7461 6368 6d65 of the attachme\n+001125f0: 6e74 2073 7472 7563 742f 636c 6173 7320 nt struct/class \n+00112600: 2865 2e67 2e20 3c63 6f64 653e 3c61 2063 (e.g. xsd__b\n+00112680: 6173 6536 3442 696e 6172 793c 2f61 3e3c ase64Binary<\n+00112690: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n+001126a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 _xop__Incl\n+00112710: 7564 653c 2f61 3e3c 2f63 6f64 653e 2077 ude w\n+00112720: 6974 6820 3c63 6f64 653e 5f5f 7074 723c ith __ptr<\n+00112730: 2f63 6f64 653e 2c20 3c63 6f64 653e 5f5f /code>, __\n+00112740: 7369 7a65 3c2f 636f 6465 3e2c 203c 636f size, id, type \n+00112770: 616e 6420 3c63 6f64 653e 6f70 7469 6f6e and option\n+00112780: 733c 2f63 6f64 653e 206d 656d 6265 7273 s members\n+00112790: 292c 2072 6573 7065 6374 6976 656c 792e ), respectively.\n+001127a0: 2054 6865 2063 616c 6c62 6163 6b20 7368 The callback sh\n+001127b0: 6f75 6c64 2072 6574 7572 6e20 6120 6861 ould return a ha\n+001127c0: 6e64 6c65 2c20 7768 6963 6820 6973 2070 ndle, which is p\n+001127d0: 6173 7365 6420 746f 2074 6865 203c 636f assed to the soap::fdimew\n+00112880: 7269 7465 3c2f 613e 3c2f 636f 6465 3e20 rite \n+00112890: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::fdimewrit\n+00112940: 6563 6c6f 7365 3c2f 613e 3c2f 636f 6465 eclose callbacks. The\n+00112960: 203c 636f 6465 3e5f 5f70 7472 3c2f 636f __ptr member varia\n+00112980: 626c 6520 6f66 2074 6865 2061 7474 6163 ble of the attac\n+00112990: 686d 656e 7420 7374 7275 6374 2f63 6c61 hment struct/cla\n+001129a0: 7373 2069 7320 7365 7420 6279 2074 6865 ss is set by the\n+001129b0: 2065 6e67 696e 6520 746f 2074 6865 2076 engine to the v\n+001129c0: 616c 7565 206f 6620 7468 6973 2068 616e alue of this han\n+001129d0: 646c 652e 2054 6865 203c 636f 6465 3e5f dle. The _\n+001129e0: 5f73 697a 653c 2f63 6f64 653e 206d 656d _size mem\n+001129f0: 6265 7220 7661 7269 6162 6c65 2069 7320 ber variable is \n+00112a00: 7365 7420 746f 2074 6865 2073 697a 6520 set to the size \n+00112a10: 6f66 2074 6865 2061 7474 6163 686d 656e of the attachmen\n+00112a20: 7420 7265 6365 6976 6564 2e20 5468 6520 t received. The \n+00112a30: 6d61 7869 6d75 6d20 4449 4d45 2061 7474 maximum DIME att\n+00112a40: 6163 686d 656e 7420 7369 7a65 2072 6563 achment size rec\n+00112a50: 6569 7665 6420 6973 206c 696d 6974 6564 eived is limited\n+00112a60: 2062 7920 3c63 6f64 653e 2353 4f41 505f by #SOAP_\n+00112a70: 4d41 5844 494d 4553 495a 453c 2f63 6f64 MAXDIMESIZE.
  • .
  • int (*soap.fd\n+00112aa0: 696d 6577 7269 7465 2928 7374 7275 6374 imewrite)(struct\n+00112ab0: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n+00112ac0: 6420 2a68 616e 646c 652c 2063 6f6e 7374 d *handle, const\n+00112ad0: 2063 6861 7220 2a62 7566 2c20 7369 7a65 char *buf, size\n+00112ae0: 5f74 206c 656e 293c 2f63 6f64 653e 2054 _t len) T\n+00112af0: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n+00112b00: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en\n+00112b10: 6769 6e65 2074 6f20 7772 6974 6520 6120 gine to write a \n+00112b20: 6368 756e 6b20 6f66 2061 7474 6163 686d chunk of attachm\n+00112b30: 656e 7420 6461 7461 2072 6563 6569 7665 ent data receive\n+00112b40: 642e 2054 6865 203c 636f 6465 3e68 616e d. The han\n+00112b50: 646c 653c 2f63 6f64 653e 2070 6172 616d dle param\n+00112b60: 6574 6572 2063 6f6e 7461 696e 7320 7468 eter contains th\n+00112b70: 6520 6861 6e64 6c65 2072 6574 7572 6e65 e handle returne\n+00112b80: 6420 6279 2074 6865 203c 636f 6465 3e3c d by the <\n+00112b90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00112ba0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00112bb0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+00112bc0: 6761 3362 3165 3461 6130 3436 6236 3833 ga3b1e4aa046b683\n+00112bd0: 3533 3531 3130 6133 3466 6334 3661 6231 535110a34fc46ab1\n+00112be0: 6562 2220 7469 746c 653d 2243 616c 6c62 eb\" title=\"Callb\n+00112bf0: 6163 6b20 746f 206f 7065 6e20 6120 7374 ack to open a st\n+00112c00: 7265 616d 696e 6720 4449 4d45 2061 7474 reaming DIME att\n+00112c10: 6163 686d 656e 7420 666f 7220 7772 6974 achment for writ\n+00112c20: 696e 672e 223e 736f 6170 3a3a 6664 696d ing.\">soap::fdim\n+00112c30: 6577 7269 7465 6f70 656e 3c2f 613e 3c2f ewriteopen callback. \n+00112c50: 5468 6520 3c63 6f64 653e 6275 663c 2f63 The buf parameter c\n+00112c70: 6f6e 7461 696e 7320 7468 6520 6461 7461 ontains the data\n+00112c80: 206f 6620 6c65 6e67 7468 203c 636f 6465 of length len. Ret\n+00112ca0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n+00112cb0: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n+00112cc0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n+00112d80: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n+00112d90: 6e74 2920 6572 726f 7220 636f 6465 2e3c nt) error code.<\n+00112da0: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e76 /li>.
  • v\n+00112db0: 6f69 6420 282a 736f 6170 2e66 6469 6d65 oid (*soap.fdime\n+00112dc0: 7772 6974 6563 6c6f 7365 2928 7374 7275 writeclose)(stru\n+00112dd0: 6374 2073 6f61 7020 2a73 6f61 702c 2076 ct soap *soap, v\n+00112de0: 6f69 6420 2a68 616e 646c 6529 3c2f 636f oid *handle) This callbac\n+00112e00: 6b20 6973 2063 616c 6c65 6420 6279 2074 k is called by t\n+00112e10: 6865 2065 6e67 696e 6520 746f 2063 6c6f he engine to clo\n+00112e20: 7365 2074 6865 2044 494d 4520 6174 7461 se the DIME atta\n+00112e30: 6368 6d65 6e74 2073 7472 6561 6d20 6166 chment stream af\n+00112e40: 7465 7220 7772 6974 696e 672e 2054 6865 ter writing. The\n+00112e50: 203c 636f 6465 3e68 616e 646c 653c 2f63 handle parameter c\n+00112e70: 6f6e 7461 696e 7320 7468 6520 6861 6e64 ontains the hand\n+00112e80: 6c65 2072 6574 7572 6e65 6420 6279 2074 le returned by t\n+00112e90: 6865 203c 636f 6465 3e3c 6120 636c 6173 he \n+00112f30: 736f 6170 3a3a 6664 696d 6577 7269 7465 soap::fdimewrite\n+00112f40: 6f70 656e 3c2f 613e 3c2f 636f 6465 3e20 open \n+00112f50: 6361 6c6c 6261 636b 2e3c 2f6c 693e 0a3c callback.
  • .<\n+00112f60: 2f75 6c3e 0a3c 703e 496e 2061 6464 6974 /ul>.

    In addit\n+00112f70: 696f 6e2c 2061 203c 636f 6465 3e76 6f69 ion, a voi\n+00112f80: 642a 203c 6120 636c 6173 733d 2265 6c22 d* soap:\n+00113040: 3a75 7365 723c 2f61 3e3c 2f63 6f64 653e :user\n+00113050: 206d 656d 6265 7220 6973 2061 7661 696c member is avail\n+00113060: 6162 6c65 2074 6f20 7061 7373 2075 7365 able to pass use\n+00113070: 722d 6465 6669 6e65 6420 6461 7461 2074 r-defined data t\n+00113080: 6f20 7468 6520 6361 6c6c 6261 636b 732e o the callbacks.\n+00113090: 2054 6869 7320 7761 792c 2079 6f75 2063 This way, you c\n+001130a0: 616e 2073 6574 203c 636f 6465 3e76 6f69 an set voi\n+001130b0: 642a 203c 6120 636c 6173 733d 2265 6c22 d* soap:\n+00113170: 3a75 7365 723c 2f61 3e3c 2f63 6f64 653e :user\n+00113180: 2074 6f20 706f 696e 7420 746f 2061 7070 to point to app\n+00113190: 6c69 6361 7469 6f6e 2064 6174 6120 7468 lication data th\n+001131a0: 6174 2074 6865 2063 616c 6c62 6163 6b73 at the callbacks\n+001131b0: 206e 6565 6420 7375 6368 2061 7320 6120 need such as a \n+001131c0: 6669 6c65 206e 616d 6520 666f 7220 6578 file name for ex\n+001131d0: 616d 706c 652e 3c2f 703e 0a3c 703e 5468 ample.

    .

    Th\n+001131e0: 6520 666f 6c6c 6f77 696e 6720 6578 616d e following exam\n+001131f0: 706c 6520 696c 6c75 7374 7261 7465 7320 ple illustrates \n+00113200: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n+00113210: 696e 6974 6961 6c69 7a61 7469 6f6e 206f initialization o\n+00113220: 6620 616e 2069 6d61 6765 2061 7474 6163 f an image attac\n+00113230: 686d 656e 7420 7374 7275 6374 2074 6f20 hment struct to \n+00113240: 7374 7265 616d 2061 2066 696c 6520 696e stream a file in\n+00113250: 746f 2061 2044 494d 4520 6174 7461 6368 to a DIME attach\n+00113260: 6d65 6e74 3a3c 2f70 3e0a 3c64 6976 2063 ment:

    .
    \n+00113280: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n+001132b0: 2f73 7061 6e3e 206d 6169 6e28 2920 3c2f /span> main() .
    {
    .<\n+001132e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001132f0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n+00113310: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+00113340: 6170 3c2f 613e 203c 6120 636c 6173 733d ap so\n+00113370: 6170 3c2f 613e 3b20 3c2f 6469 763e 0a3c ap;
    .<\n+00113380: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00113390: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n+001133b0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d xs\n+001133f0: 645f 5f62 6173 6536 3442 696e 6172 793c d__base64Binary<\n+00113400: 2f61 3e20 696d 6167 653b 203c 2f64 6976 /a> image; .
    FILE *fd; \n+00113430: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct s\n+00113470: 7461 7420 7362 3b20 3c2f 6469 763e 0a3c tat sb;
    .<\n+00113480: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00113490: 3e20 203c 6120 636c 6173 733d 2263 6f64 >
    soap_ini\n+001134f0: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); .
    if (!fs\n+00113570: 7461 7428 6669 6c65 6e6f 2866 6429 2c20 tat(fileno(fd), \n+00113580: 2661 6d70 3b73 6229 2026 616d 703b 2661 &sb) &&a\n+00113590: 6d70 3b20 7362 2e73 745f 7369 7a65 2026 mp; sb.st_size &\n+001135a0: 6774 3b20 3029 203c 2f64 6976 3e0a 3c64 gt; 0)
    .\n+001135c0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+001135e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // because\n+00113600: 2077 6520 6361 6e20 6765 7420 7468 6520 we can get the \n+00113610: 6c65 6e67 7468 206f 6620 7468 6520 6669 length of the fi\n+00113620: 6c65 2c20 7765 2063 616e 2073 7472 6561 le, we can strea\n+00113630: 6d20 6974 203c 2f73 7061 6e3e 3c2f 6469 m it ..
    \n+00113720: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00113750: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fdimerea\n+001137b0: 6463 6c6f 7365 3c2f 613e 203d 2064 696d dclose = dim\n+001137c0: 655f 7265 6164 5f63 6c6f 7365 3b20 3c2f e_read_close; .
    soap.fdimeread \n+00113880: 3d20 6469 6d65 5f72 6561 643b 203c 2f64 = dime_read; .
    image.\n+001138b0: 5f5f 7074 7220 3d20 283c 7370 616e 2063 __ptr = (unsigned cha\n+00113900: 723c 2f73 7061 6e3e 2a29 6664 3b20 3c73 r*)fd; // must set \n+00113930: 746f 206e 6f6e 2d4e 554c 4c20 2874 6869 to non-NULL (thi\n+00113940: 7320 6973 206f 7572 2066 6420 6861 6e64 s is our fd hand\n+00113950: 6c65 2077 6869 6368 2077 6520 6e65 6564 le which we need\n+00113960: 2069 6e20 7468 6520 6361 6c6c 6261 636b in the callback\n+00113970: 7329 203c 2f73 7061 6e3e 3c2f 6469 763e s)
    \n+00113980: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.__s\n+001139a0: 697a 6520 3d20 7362 2e73 745f 7369 7a65 ize = sb.st_size\n+001139b0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // must \n+001139d0: 7365 7420 7369 7a65 203c 2f73 7061 6e3e set size \n+001139e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    else .
    {
    \n+00113a60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // \n+00113a90: 646f 6e26 2333 393b 7420 6b6e 6f77 2074 don't know t\n+00113aa0: 6865 2073 697a 652c 2073 6f20 6275 6666 he size, so buff\n+00113ab0: 6572 2069 7420 3c2f 7370 616e 3e3c 2f64 er it .
    size_t i;
    . \n+00113b20: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+00113b40: 2f73 7061 6e3e 2063 3b20 3c2f 6469 763e /span> c;
    \n+00113b50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.__p\n+00113b70: 7472 203d 2028 3c73 7061 6e20 636c 6173 tr = (\n+00113b90: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n+00113ba0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*)soap\n+00113c20: 5f6d 616c 6c6f 633c 2f61 3e28 2661 6d70 _malloc(&\n+00113c30: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00113c60: 2c20 4d41 585f 4649 4c45 5f53 495a 4529 , MAX_FILE_SIZE)\n+00113c70: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+00113c90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00113ca0: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow\">for (i = 0; i &l\n+00113cc0: 743b 204d 4158 5f46 494c 455f 5349 5a45 t; MAX_FILE_SIZE\n+00113cd0: 3b20 692b 2b29 203c 2f64 6976 3e0a 3c64 ; i++)
    .\n+00113cf0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n+00113d10: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n+00113d30: 3c2f 7370 616e 3e20 2828 6320 3d20 6667 ((c = fg\n+00113d40: 6574 6328 6664 2929 203d 3d20 454f 4629 etc(fd)) == EOF)\n+00113d50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+00113d70: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n+00113d90: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
    \n+00113da0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image._\n+00113dc0: 5f70 7472 5b69 5d20 3d20 633b 203c 2f64 _ptr[i] = c; .
    } .
    image._\n-00113e10: 5f73 697a 6520 3d20 693b 203c 2f64 6976 _size = i; .
    }
    .<\n-00113e40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00113e50: 3e20 2069 6d61 6765 2e74 7970 6520 3d20 > image.type = \n-00113e60: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00113e80: 743b 696d 6167 652f 6a70 6567 2671 756f t;image/jpeg&quo\n-00113e90: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; ... \n-00114050: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n-00114070: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    \n-001140b0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... // success
    .
    } .
    .<\n-00114140: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00114150: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-00114170: 2f73 7061 6e3e 202a 6469 6d65 5f72 6561 /span> *dime_rea\n-00114180: 645f 6f70 656e 283c 7370 616e 2063 6c61 d_open(str\n-001141a0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle, const <\n-00114260: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00114270: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *\n-001142a0: 6964 3c2f 7370 616e 3e2c 203c 7370 616e id, const char *type, const char *options) .
    {
    .<\n-00114370: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00114380: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-001143a0: 7572 6e3c 2f73 7061 6e3e 2068 616e 646c urn handl\n-001143b0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    } .
    .<\n-001143f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00114400: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-00114420: 2f73 7061 6e3e 2064 696d 655f 7265 6164 /span> dime_read\n-00114430: 5f63 6c6f 7365 283c 7370 616e 2063 6c61 _close(str\n-00114450: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle) .
    {
    . \n-00114520: 2066 636c 6f73 6528 2846 494c 452a 2968 fclose((FILE*)h\n-00114530: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .<\n-00114540: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00114550: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    \n-001145a0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6469 size_t di\n-001145b0: 6d65 5f72 6561 6428 3c73 7061 6e20 636c me_read(st\n-001145d0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, void *handle, char *buf, size_t\n-001146c0: 206c 656e 2920 3c2f 6469 763e 0a3c 6469 len)
    .{\n-001146e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return fread(buf, 1,\n-00114730: 206c 656e 2c20 2846 494c 452a 2968 616e len, (FILE*)han\n-00114740: 646c 6529 3b20 3c2f 6469 763e 0a3c 6469 dle);
    .}\n-00114760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    voi\n-00114850: 6420 2a28 2a20 6664 696d 6572 6561 646f d *(* fdimereado\n-00114860: 7065 6e29 2873 7472 7563 7420 736f 6170 pen)(struct soap\n-00114870: 202a 736f 6170 2c20 766f 6964 202a 6861 *soap, void *ha\n-00114880: 6e64 6c65 2c20 636f 6e73 7420 6368 6172 ndle, const char\n-00114890: 202a 6964 2c20 636f 6e73 7420 6368 6172 *id, const char\n-001148a0: 202a 7479 7065 2c20 636f 6e73 7420 6368 *type, const ch\n-001148b0: 6172 202a 6f70 7469 6f6e 7329 3c2f 6469 ar *options)
    .\n-00114bf0: 7369 7a65 5f74 282a 2066 6469 6d65 7265 size_t(* fdimere\n-00114c00: 6164 2928 7374 7275 6374 2073 6f61 7020 ad)(struct soap \n-00114c10: 2a73 6f61 702c 2076 6f69 6420 2a68 616e *soap, void *han\n-00114c20: 646c 652c 2063 6861 7220 2a62 7566 2c20 dle, char *buf, \n-00114c30: 7369 7a65 5f74 206c 656e 293c 2f64 6976 size_t len)
    Callback to \n-00114c60: 7265 6164 2064 6174 6120 696e 2061 2044 read data in a D\n-00114c70: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n-00114c80: 7472 6561 6d2e 3c2f 6469 763e 3c64 6976 tream.
    <\n-00114ca0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:472\n-00114cc0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .
    s\n-00114d80: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 3c2f oap_malloc
    void * s\n-00114db0: 6f61 705f 6d61 6c6c 6f63 2873 7472 7563 oap_malloc(struc\n-00114dc0: 7420 736f 6170 202a 736f 6170 2c20 7369 t soap *soap, si\n-00114dd0: 7a65 5f74 206c 656e 293c 2f64 6976 3e3c ze_t len)
    <\n-00114de0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00114df0: 223e 416c 6c6f 6361 7465 2061 2062 6c6f \">Allocate a blo\n-00114e00: 636b 206f 6620 6865 6170 206d 656d 6f72 ck of heap memor\n-00114e10: 7920 6d61 6e61 6765 6420 6279 2074 6865 y managed by the\n-00114e20: 2073 7065 6369 6669 6564 2073 6f61 7020 specified soap \n-00114e30: 636f 6e74 6578 742e 3c2f 6469 763e 3c2f context.
    .

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

    \n-00114ec0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ma\n-00114f10: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .{<\n-00114f30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00114f60: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n-00114fd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-00115040: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n-00115050: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    <\n-001150a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001150b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001150c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-001150d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001150e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001150f0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-00115100: 6c23 6761 3362 3165 3461 6130 3436 6236 l#ga3b1e4aa046b6\n-00115110: 3833 3533 3531 3130 6133 3466 6334 3661 83535110a34fc46a\n-00115120: 6231 6562 223e 6664 696d 6577 7269 7465 b1eb\">fdimewrite\n-00115130: 6f70 656e 3c2f 613e 203d 2064 696d 655f open = dime_\n-00115140: 7772 6974 655f 6f70 656e 3b20 3c2f 6469 write_open; .. \n-00115230: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-00115260: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fdimewri\n-001152c0: 7465 3c2f 613e 203d 2064 696d 655f 7772 te = dime_wr\n-001152d0: 6974 653b 203c 2f64 6976 3e0a 3c64 6976 ite;
    . \n-001152f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-00115320: 735f 5f77 6562 6d65 7468 6f64 2826 616d s__webmethod(&am\n-00115330: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, ...))
    .<\n-00115370: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00115380: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n-001153a0: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else.
    ... <\n-00115410: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00115420: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n-00115430: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-00115450: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    vo\n-001154a0: 6964 3c2f 7370 616e 3e20 2a64 696d 655f id *dime_\n-001154b0: 7772 6974 655f 6f70 656e 283c 7370 616e write_open(struct <\n-001154e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001154f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115500: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-00115510: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00115540: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-00115580: 6172 3c2f 7370 616e 3e20 2a3c 7370 616e ar *id, \n-001155b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001155f0: 723c 2f73 7061 6e3e 202a 7479 7065 2c20 r *type, \n-00115600: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00115640: 723c 2f73 7061 6e3e 202a 6f70 7469 6f6e r *option\n-00115650: 7329 203c 2f64 6976 3e0a 3c64 6976 2063 s)
    .
    {.
    FILE *ha\n-00115690: 6e64 6c65 203d 203c 6120 636c 6173 733d ndle = fo\n-001156f0: 7065 6e3c 2f61 3e28 3c73 7061 6e20 636c pen("somefi\n-00115720: 6c65 2671 756f 743b 3c2f 7370 616e 3e2c le",\n-00115730: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00115750: 6f74 3b77 6226 7175 6f74 3b3c 2f73 7061 ot;wb");
    . \n-00115780: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!handle) .
    {
    \n-001157d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n-00115810: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->error = \n-00115870: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_EOF\n-001158d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n-001158f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115900: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115910: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00115920: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;errn\n-00115970: 756d 3c2f 613e 203d 2065 7272 6e6f 3b20 um = errno; \n-00115980: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get rea\n-001159a0: 736f 6e20 3c2f 7370 616e 3e3c 2f64 6976 son .
    }
    .<\n-001159d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001159e0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-00115a00: 7572 6e3c 2f73 7061 6e3e 2028 3c73 7061 urn ( fclose(\n+00113e10: 6664 293b 203c 2f64 6976 3e0a 3c64 6976 fd);
    . \n+00113e30: 2020 696d 6167 652e 5f5f 7369 7a65 203d image.__size =\n+00113e40: 2069 3b20 3c2f 6469 763e 0a3c 6469 7620 i;
    .
    }\n+00113e60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    imag\n+00113e80: 652e 7479 7065 203d 203c 7370 616e 2063 e.type = "image\n+00113eb0: 2f6a 7065 6726 7175 6f74 3b3c 2f73 7061 /jpeg";
    .
    i\n+00113ee0: 6d61 6765 2e6f 7074 696f 6e73 203d 203c mage.options = <\n+00113ef0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00113f00: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00113f10: 705f 5f64 696d 652e 6874 6d6c 2367 6134 p__dime.html#ga4\n+00113f20: 3832 3966 3833 3361 6265 3734 6665 6263 829f833abe74febc\n+00113f30: 6238 6535 6665 3933 3630 6162 3539 3122 b8e5fe9360ab591\"\n+00113f40: 3e73 6f61 705f 6469 6d65 5f6f 7074 696f >soap_dime_optio\n+00113f50: 6e3c 2f61 3e28 2661 6d70 3b3c 6120 636c n(&soap, 0, <\n+00113f90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00113fa0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00113fb0: 3b4d 7920 7069 6374 7572 6526 7175 6f74 ;My picture"\n+00113fc0: 3b3c 2f73 7061 6e3e 293b 203c 2f64 6976 ;); .
    \n+00114000: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n+00114010: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n+00114020: 6f64 2826 616d 703b 3c61 2063 6c61 7373 od(&s\n+00114050: 6f61 703c 2f61 3e2c 202e 2e2e 2929 3c2f oap, ...)).
    ... <\n+00114080: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00114090: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent\">// error
    .
    <\n+001140c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001140d0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    .
    \n+00114100: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // su\n+00114120: 6363 6573 733c 2f73 7061 6e3e 3c2f 6469 ccess.
    }
    .\n+00114160: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    void \n+001141a0: 2a64 696d 655f 7265 6164 5f6f 7065 6e28 *dime_read_open(\n+001141b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00114200: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+00114230: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n+00114250: 766f 6964 3c2f 7370 616e 3e20 2a68 616e void *han\n+00114260: 646c 652c 203c 7370 616e 2063 6c61 7373 dle, const\n+00114280: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *<\n+001142b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001142c0: 6f72 6474 7970 6522 3e69 643c 2f73 7061 ordtype\">id, const<\n+001142f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ty\n+00114320: 7065 2c20 3c73 7061 6e20 636c 6173 733d pe, const<\n+00114340: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *op\n+00114370: 7469 6f6e 7329 203c 2f64 6976 3e0a 3c64 tions)
    .\n+00114390: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    return handle; .
    }
    .\n+00114410: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    void \n+00114450: 6469 6d65 5f72 6561 645f 636c 6f73 6528 dime_read_close(\n+00114460: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001144b0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001144e0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n+00114500: 766f 6964 3c2f 7370 616e 3e20 2a68 616e void *han\n+00114510: 646c 6529 203c 2f64 6976 3e0a 3c64 6976 dle)
    .{<\n+00114530: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fclose\n+00114550: 2828 4649 4c45 2a29 6861 6e64 6c65 293b ((FILE*)handle);\n+00114560: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    .<\n+001145b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001145c0: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+001145d0: 2f73 7061 6e3e 2064 696d 655f 7265 6164 /span> dime_read\n+001145e0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+00114630: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+00114660: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, void *ha\n+00114690: 6e64 6c65 2c20 3c73 7061 6e20 636c 6173 ndle, \n+001146b0: 6368 6172 3c2f 7370 616e 3e20 2a62 7566 char *buf\n+001146c0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size\n+001146e0: 5f74 3c2f 7370 616e 3e20 6c65 6e29 203c _t len) <\n+001146f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+00114710: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n+00114740: 7475 726e 3c2f 7370 616e 3e20 6672 6561 turn frea\n+00114750: 6428 6275 662c 2031 2c20 6c65 6e2c 2028 d(buf, 1, len, (\n+00114760: 4649 4c45 2a29 6861 6e64 6c65 293b 203c FILE*)handle); <\n+00114770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+00114790: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::fdime\n+00114850: 7265 6164 6f70 656e 3c2f 613e 3c2f 6469 readopen
    void *(* f\n+00114880: 6469 6d65 7265 6164 6f70 656e 2928 7374 dimereadopen)(st\n+00114890: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+001148a0: 2076 6f69 6420 2a68 616e 646c 652c 2063 void *handle, c\n+001148b0: 6f6e 7374 2063 6861 7220 2a69 642c 2063 onst char *id, c\n+001148c0: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type,\n+001148d0: 2063 6f6e 7374 2063 6861 7220 2a6f 7074 const char *opt\n+001148e0: 696f 6e73 293c 2f64 6976 3e3c 6469 7620 ions)
    Ca\n+00114900: 6c6c 6261 636b 2074 6f20 6f70 656e 2061 llback to open a\n+00114910: 2073 7472 6561 6d69 6e67 2044 494d 4520 streaming DIME \n+00114920: 6174 7461 6368 6d65 6e74 2066 6f72 2072 attachment for r\n+00114930: 6561 6469 6e67 2e3c 2f64 6976 3e3c 6469 eading.
    \n+00114950: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:46\n+00114970: 3934 3c2f 6469 763e 3c2f 6469 763e 0a3c 94
    .<\n+00114980: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00114990: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+001149a0: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n+001149b0: 6c5f 6761 3135 3437 3532 6535 3533 6265 l_ga154752e553be\n+001149c0: 3431 6564 3362 3130 6665 3361 3132 3733 41ed3b10fe3a1273\n+001149d0: 6163 3731 223e 3c64 6976 2063 6c61 7373 ac71\">
    soap::fdimer\n+00114a40: 6561 6463 6c6f 7365 3c2f 613e 3c2f 6469 eadclose
    void(* fdi\n+00114a70: 6d65 7265 6164 636c 6f73 6529 2873 7472 mereadclose)(str\n+00114a80: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00114a90: 766f 6964 202a 6861 6e64 6c65 293c 2f64 void *handle)
    Callback t\n+00114ac0: 6f20 636c 6f73 6520 6120 4449 4d45 2061 o close a DIME a\n+00114ad0: 7474 6163 686d 656e 7420 7374 7265 616d ttachment stream\n+00114ae0: 2061 6674 6572 2072 6561 6469 6e67 2e3c after reading.<\n+00114af0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00114b10: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00114b20: 6170 322e 683a 3437 3339 3c2f 6469 763e ap2.h:4739
    \n+00114b30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap\n+00114bf0: 3a3a 6664 696d 6572 6561 643c 2f61 3e3c ::fdimeread<\n+00114c00: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    size_t(\n+00114c20: 2a20 6664 696d 6572 6561 6429 2873 7472 * fdimeread)(str\n+00114c30: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00114c40: 766f 6964 202a 6861 6e64 6c65 2c20 6368 void *handle, ch\n+00114c50: 6172 202a 6275 662c 2073 697a 655f 7420 ar *buf, size_t \n+00114c60: 6c65 6e29 3c2f 6469 763e 3c64 6976 2063 len)
    Cal\n+00114c80: 6c62 6163 6b20 746f 2072 6561 6420 6461 lback to read da\n+00114c90: 7461 2069 6e20 6120 4449 4d45 2061 7474 ta in a DIME att\n+00114ca0: 6163 686d 656e 7420 7374 7265 616d 2e3c achment stream.<\n+00114cb0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00114cd0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00114ce0: 6170 322e 683a 3437 3234 3c2f 6469 763e ap2.h:4724
    \n+00114cf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00114d60: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_mal\n+00114db0: 6c6f 633c 2f61 3e3c 2f64 6976 3e3c 6469 loc
    void * soap_mal\n+00114de0: 6c6f 6328 7374 7275 6374 2073 6f61 7020 loc(struct soap \n+00114df0: 2a73 6f61 702c 2073 697a 655f 7420 6c65 *soap, size_t le\n+00114e00: 6e29 3c2f 6469 763e 3c64 6976 2063 6c61 n)
    Alloc\n+00114e20: 6174 6520 6120 626c 6f63 6b20 6f66 2068 ate a block of h\n+00114e30: 6561 7020 6d65 6d6f 7279 206d 616e 6167 eap memory manag\n+00114e40: 6564 2062 7920 7468 6520 7370 6563 6966 ed by the specif\n+00114e50: 6965 6420 736f 6170 2063 6f6e 7465 7874 ied soap context\n+00114e60: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
    .

    The foll\n+00114e90: 6f77 696e 6720 6578 616d 706c 6520 696c owing example il\n+00114ea0: 6c75 7374 7261 7465 7320 7468 6520 7374 lustrates the st\n+00114eb0: 7265 616d 696e 6720 6f66 2061 2044 494d reaming of a DIM\n+00114ec0: 4520 6174 7461 6368 6d65 6e74 2069 6e74 E attachment int\n+00114ed0: 6f20 6120 6669 6c65 2062 7920 6120 636c o a file by a cl\n+00114ee0: 6965 6e74 3a3c 2f70 3e0a 3c64 6976 2063 ient:

    .
    \n+00114f00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n+00114f30: 2f73 7061 6e3e 206d 6169 6e28 2920 3c2f /span> main() .
    {
    .<\n+00114f60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00114f70: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n+00114f90: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+00114fc0: 6170 3c2f 613e 203c 6120 636c 6173 733d ap so\n+00114ff0: 6170 3c2f 613e 3b20 3c2f 6469 763e 0a3c ap;
    .<\n+00115000: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00115010: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_ini\n+00115070: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); .. \n+00115190: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n+001151c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fdimewrit\n+00115220: 6563 6c6f 7365 3c2f 613e 203d 2064 696d eclose = dim\n+00115230: 655f 7772 6974 655f 636c 6f73 653b 203c e_write_close; <\n+00115240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fdimewrite \n+001152f0: 3d20 6469 6d65 5f77 7269 7465 3b20 3c2f = dime_write; .
    if (so\n+00115340: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n+00115350: 6574 686f 6428 2661 6d70 3b3c 6120 636c ethod(&soap, ...)\n+00115390: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    ..\n+001153b0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // error\n+001153d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001153f0: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+00115410: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00115430: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+00115450: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n+00115460: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+00115480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    void *dime_write_o\n+001154e0: 7065 6e28 3c73 7061 6e20 636c 6173 733d pen(struct\n+00115500: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+00115530: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+00115560: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n+00115580: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *id\n+001155d0: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , c\n+001155f0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *type, c\n+00115640: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *options) .
    {
    . \n+001156b0: 2046 494c 4520 2a68 616e 646c 6520 3d20 FILE *handle = \n+001156c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fopen\n+00115720: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n+00115740: 6f74 3b73 6f6d 6566 696c 6526 7175 6f74 ot;somefile"\n+00115750: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "wb&q\n+00115780: 756f 743b 3c2f 7370 616e 3e29 3b20 3c2f uot;); .
    if (!h\n+001157d0: 616e 646c 6529 203c 2f64 6976 3e0a 3c64 andle)
    .\n+001157f0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+00115810: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00115840: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n+00115890: 6f72 3c2f 613e 203d 203c 6120 636c 6173 or = SOA\n+001158f0: 505f 454f 463c 2f61 3e3b 203c 2f64 6976 P_EOF; .
    s\n+00115940: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->errnum \n+001159a0: 3d20 6572 726e 6f3b 203c 7370 616e 2063 = errno; /\n+001159c0: 2f20 6765 7420 7265 6173 6f6e 203c 2f73 / get reason
    .
    }\n+001159f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    void*)handle; .
    }
    . \n-00115a70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void d\n-00115ab0: 696d 655f 7772 6974 655f 636c 6f73 6528 ime_write_close(\n-00115ac0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-00115b10: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-00115b40: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n-00115b60: 766f 6964 3c2f 7370 616e 3e20 2a68 616e void *han\n-00115b70: 646c 6529 203c 2f64 6976 3e0a 3c64 6976 dle)
    .{<\n-00115b90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fclose((FIL\n-00115c10: 452a 2968 616e 646c 6529 3b20 3c2f 6469 E*)handle); .
    }
    .\n-00115c50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int d\n-00115c90: 696d 655f 7772 6974 6528 3c73 7061 6e20 ime_write(\n-00115cb0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-00115cf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115d00: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115d10: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00115d20: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle, <\n-00115d50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00115d60: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-00115d90: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *buf, size_t len)
    .<\n-00115e20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00115e30: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    size_t nwritten; <\n-00115e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    while\n-00115ec0: 2028 6c65 6e29 203c 2f64 6976 3e0a 3c64 (len)
    .\n-00115ee0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-00115f00: 6e77 7269 7474 656e 203d 2066 7772 6974 nwritten = fwrit\n-00115f10: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(buf, 1, len, (FIL\n-00115f70: 452a 2968 616e 646c 6529 3b20 3c2f 6469 E*)handle); .
    if (!n\n-00115fc0: 7772 6974 7465 6e29 203c 2f64 6976 3e0a written)
    .\n-00115fd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .\n-00116000: 2020 2020 2020 3c61 2063 6c61 7373 3d22
    soa\n-00116030: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->errnum = \n-00116090: 6572 726e 6f3b 203c 7370 616e 2063 6c61 errno; // \n-001160b0: 6765 7420 7265 6173 6f6e 203c 2f73 7061 get reason
    .
    \n-001160e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-00116100: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-00116160: 505f 454f 463c 2f61 3e3b 203c 2f64 6976 P_EOF; .
    }
    \n-00116190: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    len -= nw\n-001161b0: 7269 7474 656e 3b20 3c2f 6469 763e 0a3c ritten;
    .<\n-001161c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001161d0: 3e20 2020 203c 6120 636c 6173 733d 2263 > bu\n-00116220: 663c 2f61 3e20 2b3d 206e 7772 6974 7465 f += nwritte\n-00116230: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    } \n-00116250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_OK;
    .
    }.
    \n-00116380: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap::\n-001163d0: 6664 696d 6577 7269 7465 3c2f 613e 3c2f fdimewrite
    int(* fd\n-00116400: 696d 6577 7269 7465 2928 7374 7275 6374 imewrite)(struct\n-00116410: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n-00116420: 6420 2a2c 2063 6f6e 7374 2063 6861 7220 d *, const char \n-00116430: 2a2c 2073 697a 655f 7429 3c2f 6469 763e *, size_t)
    \n-00116440: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback to w\n-00116460: 7269 7465 2064 6174 6120 696e 2061 2044 rite data in a D\n-00116470: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n-00116480: 7472 6561 6d2e 3c2f 6469 763e 3c64 6976 tream.
    <\n-001164a0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:482\n-001164c0: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
    .
    soap::fdimewr\n-00116590: 6974 6563 6c6f 7365 3c2f 613e 3c2f 6469 iteclose
    void(* fdi\n-001165c0: 6d65 7772 6974 6563 6c6f 7365 2928 7374 mewriteclose)(st\n-001165d0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-001165e0: 2076 6f69 6420 2a68 616e 646c 6529 3c2f void *handle)
    Callback \n-00116610: 746f 2063 6c6f 7365 2061 2044 494d 4520 to close a DIME \n-00116620: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n-00116630: 6d20 6166 7465 7220 7772 6974 696e 672e m after writing.\n-00116640: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-00116660: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-00116670: 6f61 7032 2e68 3a34 3833 333c 2f64 6976 oap2.h:4833
    .
    <\n-001166e0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-001166f0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soa\n-00116740: 703a 3a66 6469 6d65 7772 6974 656f 7065 p::fdimewriteope\n-00116750: 6e3c 2f61 3e3c 2f64 6976 3e3c 6469 7620 n
    v\n-00116770: 6f69 6420 2a28 2a20 6664 696d 6577 7269 oid *(* fdimewri\n-00116780: 7465 6f70 656e 2928 7374 7275 6374 2073 teopen)(struct s\n-00116790: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n-001167a0: 2063 6861 7220 2a69 642c 2063 6f6e 7374 char *id, const\n-001167b0: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con\n-001167c0: 7374 2063 6861 7220 2a6f 7074 696f 6e73 st char *options\n-001167d0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n-001167f0: 636b 2074 6f20 6f70 656e 2061 2073 7472 ck to open a str\n-00116800: 6561 6d69 6e67 2044 494d 4520 6174 7461 eaming DIME atta\n-00116810: 6368 6d65 6e74 2066 6f72 2077 7269 7469 chment for writi\n-00116820: 6e67 2e3c 2f64 6976 3e3c 6469 7620 636c ng.
    D\n-00116840: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-00116850: 7464 736f 6170 322e 683a 3438 3130 3c2f tdsoap2.h:4810
    .
    \n-00116920: 736f 6170 3a3a 666f 7065 6e3c 2f61 3e3c soap::fopen<\n-00116930: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    SOAP_SO\n-00116950: 434b 4554 282a 2066 6f70 656e 2928 7374 CKET(* fopen)(st\n-00116960: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-00116970: 2063 6f6e 7374 2063 6861 7220 2a65 6e64 const char *end\n-00116980: 706f 696e 742c 2063 6f6e 7374 2063 6861 point, const cha\n-00116990: 7220 2a68 6f73 742c 2069 6e74 2070 6f72 r *host, int por\n-001169a0: 7429 3c2f 6469 763e 3c64 6976 2063 6c61 t)
    Callb\n-001169c0: 6163 6b20 7468 6174 206f 7065 6e73 2061 ack that opens a\n-001169d0: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti\n-001169e0: 6f6e 2074 6f20 6120 7365 7276 6572 2065 on to a server e\n-001169f0: 6e64 706f 696e 742e 3c2f 6469 763e 3c64 ndpoint.
    Definition:<\n-00116a20: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4\n-00116a30: 3439 353c 2f64 6976 3e3c 2f64 6976 3e0a 495
    .\n-00116a40: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    i\n-00116b20: 6e74 282a 2066 636c 6f73 6529 2873 7472 nt(* fclose)(str\n-00116b30: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n-00116b40: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n-00116b60: 2074 6861 7420 636c 6f73 6573 2074 6865 that closes the\n-00116b70: 2063 7572 7265 6e74 2073 6f63 6b65 7420 current socket \n-00116b80: 636f 6e6e 6563 7469 6f6e 2e3c 2f64 6976 connection.
    Definitio\n-00116bb0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-00116bc0: 683a 3435 3230 3c2f 6469 763e 3c2f 6469 h:4520
    .
    SOAP_EOF
    #define \n-00116cb0: 534f 4150 5f45 4f46 3c2f 6469 763e 3c64 SOAP_EOF
    A soap_status e\n-00116ce0: 7272 6f72 2063 6f64 653a 2075 6e65 7870 rror code: unexp\n-00116cf0: 6563 7465 6420 656e 6420 6f66 2066 696c ected end of fil\n-00116d00: 652c 206e 6f20 696e 7075 742c 2074 7261 e, no input, tra\n-00116d10: 6e73 6d69 7373 696f 6e20 696e 7465 7272 nsmission interr\n-00116d20: 7570 7465 6420 6f72 2074 696d 6564 206f upted or timed o\n-00116d30: 7574 2028 7361 2e2e 2e3c 2f64 6976 3e3c ut (sa...
    <\n-00116d40: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-00116d50: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-00116d60: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-00116d70: 3233 3635 3c2f 6469 763e 3c2f 6469 763e 2365
    \n-00116d80: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

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

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

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

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

    .

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

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

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

    .

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

    .

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

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

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

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

    .

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

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

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

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

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

    .

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

    .

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

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

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

    .

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

    .

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

    .

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

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

    .

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

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

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

    .

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

    .
    .<\n-00125240: 703e 4578 616d 706c 6520 636c 6965 6e74 p>Example client\n-00125250: 2069 6e20 433a 3c2f 703e 0a3c 6469 7620 in C:

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

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

    .

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

    .

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

    .

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

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

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

    .

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

    .

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

    .

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

    .

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

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

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

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

    .

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

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

    .

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

    .

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

    .
    #i\n-0012bcf0: 6e63 6c75 6465 2026 7175 6f74 3b70 6c75 nclude "plu\n-0012bd00: 6769 6e2f 7773 6161 7069 2e68 2671 756f gin/wsaapi.h&quo\n-0012bd10: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-0012bd20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    struct \n-0012bd70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0012bda0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n-0012bdd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-0012be00: 7374 7275 6374 203c 2f73 7061 6e3e 7773 struct ws\n-0012be10: 615f 5f45 6e64 706f 696e 7452 6566 6572 a__EndpointRefer\n-0012be20: 656e 6365 5479 7065 2072 6570 6c79 546f enceType replyTo\n-0012be30: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // (anon\n-0012be50: 796d 6f75 7329 2072 6570 6c79 2061 6464 ymous) reply add\n-0012be60: 7265 7373 203c 2f73 7061 6e3e 3c2f 6469 ress .
    c\n-0012bea0: 6861 723c 2f73 7061 6e3e 202a 7265 733b har *res;\n-0012beb0: 203c 7370 616e 2063 6c61 7373 3d22 636f // server\n-0012bed0: 2072 6573 706f 6e73 6520 3c2f 7370 616e response
    .
    s\n-0012bf50: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n-0012bf60: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    soap_register_p\n-0012c010: 6c75 6769 6e3c 2f61 3e28 2661 6d70 3b3c lugin(&<\n-0012c020: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012c030: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012c040: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0012c050: 736f 6170 5f77 7361 293b 3c2f 6469 763e soap_wsa);
    \n-0012c060: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.send\n-0012c0f0: 5f74 696d 656f 7574 3c2f 613e 203d 2035 _timeout = 5\n-0012c100: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 5 sec\n-0012c120: 6f6e 6473 206d 6178 2073 6f63 6b65 7420 onds max socket \n-0012c130: 6465 6c61 7920 3c2f 7370 616e 3e3c 2f64 delay .
    soa\n-0012c180: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.r\n-0012c1d0: 6563 765f 7469 6d65 6f75 743c 2f61 3e20 ecv_timeout \n-0012c1e0: 3d20 353b 203c 7370 616e 2063 6c61 7373 = 5; // 5 \n-0012c200: 7365 636f 6e64 7320 6d61 7820 736f 636b seconds max sock\n-0012c210: 6574 2064 656c 6179 203c 2f73 7061 6e3e et delay \n-0012c220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-0012c250: 2f20 7365 7420 7570 2057 532d 4164 6472 / set up WS-Addr\n-0012c260: 6573 7369 6e67 2068 6561 6465 723c 2f73 essing header
    ..
    soa\n-0012c3a0: 705f 7773 615f 6164 645f 5265 706c 7954 p_wsa_add_ReplyT\n-0012c3b0: 6f28 2661 6d70 3b3c 6120 636c 6173 733d o(&so\n-0012c3e0: 6170 3c2f 613e 2c20 4e55 4c4c 293b 203c ap, NULL); <\n-0012c3f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012c400: 656e 7422 3e2f 2f20 616e 6f6e 796d 6f75 ent\">// anonymou\n-0012c410: 7320 5265 706c 7954 6f20 6164 6472 6573 s ReplyTo addres\n-0012c420: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n-0012c430: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012c440: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// Send a\n-0012c460: 6e64 2072 6563 6569 7665 206d 6573 7361 nd receive messa\n-0012c470: 6765 7320 6f76 6572 2055 4450 3a20 3c2f ges over UDP:
    .if (soap_call_ns_\n-0012c4d0: 5f65 6368 6f53 7472 696e 6728 2661 6d70 _echoString(&\n-0012c4e0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012c510: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0012c530: 756f 743b 736f 6170 2e75 6470 3a2f 2f65 uot;soap.udp://e\n-0012c540: 6e64 706f 696e 7420 2671 756f 743b 3c2f ndpoint "SOAP action\n-0012c560: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0012c580: 743b 2c20 2671 756f 743b 3c2f 7370 616e t;, "hello world!",\n-0012c5c0: 2026 616d 703b 7265 7329 2920 3c2f 7370 &res))
    .
    {\n-0012c610: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (soap.\n-0012c650: 6572 726f 7220 3d3d 2053 4f41 505f 454f error == SOAP_EO\n-0012c660: 4620 2661 6d70 3b26 616d 703b 2073 6f61 F && soa\n-0012c670: 702e 6572 726e 756d 203d 3d20 3029 203c p.errnum == 0) <\n-0012c680: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0012c6a0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0012c6b0: 6e67 6c69 7465 7261 6c22 3e20 2020 202e ngliteral\"> .\n-0012c6c0: 2e2e 202f 2f20 5469 6d65 6f75 743a 206e .. // Timeout: n\n-0012c6d0: 6f20 7265 7370 6f6e 7365 2066 726f 6d20 o response from \n-0012c6e0: 7365 7276 6572 2028 6d65 7373 6167 6520 server (message \n-0012c6f0: 616c 7265 6164 7920 6465 6c69 7665 7265 already delivere\n-0012c700: 643f 2920 3c2f 7370 616e 3e3c 2f64 6976 d?) .
    \n-0012c740: 2020 656c 7365 203c 2f73 7061 6e3e 3c2f else .
    soap_prin\n-0012c790: 745f 6661 756c 7428 2661 6d70 3b73 6f61 t_fault(&soa\n-0012c7a0: 702c 2073 7464 6572 7229 3b20 3c2f 7370 p, stderr);
    .
    }
    .
    else
    .
    ... // \n-0012c870: 5544 5020 7365 7276 6572 2072 6573 706f UDP server respo\n-0012c880: 6e73 6520 6973 2073 746f 7265 6420 696e nse is stored in\n-0012c890: 2026 2333 393b 7265 7326 2333 393b 203c 'res' <\n-0012c8a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0012c8c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0012c8d0: 6e67 6c69 7465 7261 6c22 3e2f 2f20 6368 ngliteral\">// ch\n-0012c8e0: 6563 6b20 534f 4150 2068 6561 6465 7220 eck SOAP header \n-0012c8f0: 7265 6365 6976 6564 2c20 6966 2061 7070 received, if app\n-0012c900: 6c69 6361 626c 6520 3c2f 7370 616e 3e3c licable <\n-0012c910: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    check_header\n-0012c950: 2826 616d 703b 736f 6170 2e68 6561 6465 (&soap.heade\n-0012c960: 7229 3b20 3c2f 7370 616e 3e3c 2f64 6976 r); .
    \n-0012c9a0: 736f 6170 5f64 6573 7472 6f79 2826 616d soap_destroy(&am\n-0012c9b0: 703b 736f 6170 293b 3c2f 7370 616e 3e3c p;soap);<\n-0012c9c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_end(&am\n-0012ca00: 703b 736f 6170 293b 3c2f 7370 616e 3e3c p;soap);<\n-0012ca10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_done(&a\n-0012ca50: 6d70 3b73 6f61 7029 3b3c 2f73 7061 6e3e mp;soap);\n-0012ca60: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    .... Back to table \n-0012caa0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-0012cab0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

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

    .

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

    .
    <\n-0012cd30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012cd40: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-0012cd60: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n-0012cd70: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: \n-0012cd80: 2020 2020 2020 2062 6361 7374 5374 7269 bcastStri\n-0012cd90: 6e67 2077 7361 5f5f 4d65 7373 6167 6549 ng wsa__MessageI\n-0012cda0: 4420 3c2f 7370 616e 3e3c 2f64 6976 3e0a D
    .\n-0012cdb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-0012cde0: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n-0012cdf0: 642d 6865 6164 6572 2d70 6172 743a 2020 d-header-part: \n-0012ce00: 2020 2020 2020 2020 6263 6173 7453 7472 bcastStr\n-0012ce10: 696e 6720 7773 615f 5f54 6f20 3c2f 7370 ing wsa__To
    .
    //gsoap ns ser\n-0012ce60: 7669 6365 206d 6574 686f 642d 6865 6164 vice method-head\n-0012ce70: 6572 2d70 6172 743a 2020 2020 2020 2020 er-part: \n-0012ce80: 2020 6263 6173 7453 7472 696e 6720 7773 bcastString ws\n-0012ce90: 615f 5f41 6374 696f 6e20 3c2f 7370 616e a__Action
    .
    \n-0012ced0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-0012cee0: 6365 206d 6574 686f 642d 6865 6164 6572 ce method-header\n-0012cef0: 2d70 6172 743a 2020 2020 2020 2020 2020 -part: \n-0012cf00: 6263 6173 7453 7472 696e 6720 7773 615f bcastString wsa_\n-0012cf10: 5f52 6570 6c79 546f 203c 2f73 7061 6e3e _ReplyTo \n-0012cf20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n-0012cf60: 5f5f 6263 6173 7453 7472 696e 6728 3c73 __bcastString(char *str, void)\n-0012cfc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    //gsoap ns serv\n-0012d000: 6963 6520 6d65 7468 6f64 2d68 6561 6465 ice method-heade\n-0012d010: 722d 7061 7274 3a20 2020 2020 2020 2020 r-part: \n-0012d020: 2062 6361 7374 5374 7269 6e67 5265 7370 bcastStringResp\n-0012d030: 6f6e 7365 2077 7361 5f5f 4d65 7373 6167 onse wsa__Messag\n-0012d040: 6549 4420 3c2f 7370 616e 3e3c 2f64 6976 eID .
    //gsoa\n-0012d080: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n-0012d090: 686f 642d 6865 6164 6572 2d70 6172 743a hod-header-part:\n-0012d0a0: 2020 2020 2020 2020 2020 6263 6173 7453 bcastS\n-0012d0b0: 7472 696e 6752 6573 706f 6e73 6520 7773 tringResponse ws\n-0012d0c0: 615f 5f54 6f20 3c2f 7370 616e 3e3c 2f64 a__To .
    //gs\n-0012d100: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n-0012d110: 6574 686f 642d 6865 6164 6572 2d70 6172 ethod-header-par\n-0012d120: 743a 2020 2020 2020 2020 2020 6263 6173 t: bcas\n-0012d130: 7453 7472 696e 6752 6573 706f 6e73 6520 tStringResponse \n-0012d140: 7773 615f 5f41 6374 696f 6e20 3c2f 7370 wsa__Action
    .
    //gsoap ns ser\n-0012d190: 7669 6365 206d 6574 686f 642d 6865 6164 vice method-head\n-0012d1a0: 6572 2d70 6172 743a 2020 2020 2020 2020 er-part: \n-0012d1b0: 2020 6263 6173 7453 7472 696e 6752 6573 bcastStringRes\n-0012d1c0: 706f 6e73 6520 7773 615f 5f52 656c 6174 ponse wsa__Relat\n-0012d1d0: 6573 546f 203c 2f73 7061 6e3e 3c2f 6469 esTo .
    i\n-0012d210: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6263 nt ns__bc\n-0012d220: 6173 7453 7472 696e 6752 6573 706f 6e73 astStringRespons\n-0012d230: 6528 3c73 7061 6e20 636c 6173 733d 226b e(char\n-0012d250: 3c2f 7370 616e 3e20 2a72 6573 2c20 3c73 *res, void);
    .

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

    .

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

    .
    #includ\n-0012d3d0: 6520 2671 756f 743b 706c 7567 696e 2f77 e "plugin/w\n-0012d3e0: 7361 6170 692e 6826 7175 6f74 3b3c 2f73 saapi.h"
    .
    .
    str\n-0012d440: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    struc\n-0012d4e0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t SOAP_ENV_\n-0012d530: 5f48 6561 6465 723c 2f61 3e20 6865 6164 _Header head\n-0012d540: 6572 3b20 3c2f 6469 763e 0a3c 6469 7620 er;
    .
    struct wsa__EndpointRe\n-0012d590: 6665 7265 6e63 6554 7970 6520 7265 706c ferenceType repl\n-0012d5a0: 7954 6f3b 203c 2f64 6976 3e0a 3c64 6976 yTo;
    .char *res;
    \n-0012d5f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_ini\n-0012d660: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); ..
    soap.connect_fla\n-0012d800: 6773 3c2f 613e 203d 2053 4f5f 4252 4f41 gs = SO_BROA\n-0012d810: 4443 4153 543b 203c 2f64 6976 3e0a 3c64 DCAST;
    .\n-0012d830: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-0012d860: 3c61 2063 6c61 7373 3d22 636f 6465 2220 send_ti\n-0012d8b0: 6d65 6f75 743c 2f61 3e20 3d20 353b 203c meout = 5; <\n-0012d8c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012d8d0: 656e 7422 3e2f 2f20 3520 7365 636f 6e64 ent\">// 5 second\n-0012d8e0: 7320 6d61 7820 736f 636b 6574 2064 656c s max socket del\n-0012d8f0: 6179 203c 2f73 7061 6e3e 3c2f 6469 763e ay
    \n-0012d900: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.recv\n-0012d990: 5f74 696d 656f 7574 3c2f 613e 203d 2035 _timeout = 5\n-0012d9a0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 5 sec\n-0012d9c0: 6f6e 6473 206d 6178 2073 6f63 6b65 7420 onds max socket \n-0012d9d0: 6465 6c61 7920 3c2f 7370 616e 3e3c 2f64 delay .
    // s\n-0012da10: 6574 2075 7020 5753 2d41 6464 7265 7373 et up WS-Address\n-0012da20: 696e 6720 6865 6164 6572 3c2f 7370 616e ing header
    .
    soap_w\n-0012da50: 7361 5f72 6571 7565 7374 2826 616d 703b sa_request(&\n-0012da60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0012da90: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0012dab0: 6f74 3b6d 6573 7361 6765 2049 4426 7175 ot;message ID&qu\n-0012dac0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "en\n-0012daf0: 6470 6f69 6e74 2671 756f 743b 3c2f 7370 dpoint", "SOAP acti\n-0012db30: 6f6e 2671 756f 743b 3c2f 7370 616e 3e29 on")\n-0012db40: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_w\n-0012db60: 7361 5f61 6464 5f52 6570 6c79 546f 2826 sa_add_ReplyTo(&\n-0012db70: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-0012dba0: 2f61 3e2c 204e 554c 4c29 3b20 3c73 7061 /a>, NULL); // anonymous R\n-0012dbd0: 6570 6c79 546f 2061 6464 7265 7373 3c2f eplyTo address
    .if (soap_send_ns_\n-0012dc30: 5f62 6361 7374 5374 7269 6e67 2826 616d _bcastString(&am\n-0012dc40: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, &\n-0012dc90: 7175 6f74 3b73 6f61 702e 7564 703a 2f2f quot;soap.udp://\n-0012dca0: 656e 6470 6f69 6e74 2671 756f 743b 3c2f endpoint", "SOAP ac\n-0012dce0: 7469 6f6e 2671 756f 743b 3c2f 7370 616e tion", &\n-0012dd10: 7175 6f74 3b68 656c 6c6f 2077 6f72 6c64 quot;hello world\n-0012dd20: 2126 7175 6f74 3b3c 2f73 7061 6e3e 2929 !"))\n-0012dd30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    while (1)
    . \n-0012dee0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .. \n-0012dfa0: 2020 2020 203c 7370 616e 2063 6c61 7373 b\n-0012dfc0: 7265 616b 3c2f 7370 616e 3e3b 203c 2f64 reak; .
    ... // Got respo\n-0012e010: 6e73 6520 2623 3339 3b72 6573 2623 3339 nse 'res'\n-0012e020: 3b20 6672 6f6d 2061 2073 6572 7665 7220 ; from a server \n-0012e030: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0012e050: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n-0012e070: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0012e080: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n-0012e0c0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.err\n-0012e110: 6f72 3c2f 613e 203d 3d20 3c61 2063 6c61 or == SO\n-0012e170: 4150 5f45 4f46 3c2f 613e 2026 616d 703b AP_EOF &\n-0012e180: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & soa\n-0012e1b0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.e\n-0012e200: 7272 6e75 6d3c 2f61 3e20 3d3d 2030 2920 rrnum == 0) \n-0012e210: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n-0012e230: 203c 7370 616e 2063 6c61 7373 3d22 636f // Timeou\n-0012e250: 743a 206e 6f20 6d6f 7265 206d 6573 7361 t: no more messa\n-0012e260: 6765 7320 7265 6365 6976 6564 203c 2f73 ges received
    .
    <\n-0012e290: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0012e2a0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n-0012e2d0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n-0012e330: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n-0012e340: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012e350: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012e360: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0012e370: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-0012e380: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    ..\n-0012e450: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n-0012e500: 0a3c 6469 7620 636c 6173 733d 226c 696e .

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

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

    .

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

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

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

    .
    \n-0012e910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n-0012e940: 636c 7564 6520 2671 756f 743b 706c 7567 clude "plug\n-0012e950: 696e 2f77 7361 6170 692e 6826 7175 6f74 in/wsaapi.h"\n-0012e960: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n-0012e970: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012e980: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-0012e9c0: 6d61 696e 2829 203c 2f64 6976 3e0a 3c64 main()
    .\n-0012e9e0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-0012ea20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0012ea50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n-0012ea80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap_init1(\n-0012eb00: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-0012eb30: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , SOAP_IO\n-0012eb90: 5f55 4450 3c2f 613e 293b 203c 7370 616e _UDP); // must set UDP\n-0012ebc0: 2066 6c61 6720 3c2f 7370 616e 3e3c 2f64 flag .. \n-0012ecb0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // bind to\n-0012ecd0: 2068 6f73 7420 284e 554c 4c20 3d20 6375 host (NULL = cu\n-0012ece0: 7272 656e 7420 686f 7374 2920 616e 6420 rrent host) and \n-0012ecf0: 706f 7274 3a20 3c2f 7370 616e 3e3c 2f64 port: .
    if (!\n-0012ed90: 736f 6170 5f76 616c 6964 5f73 6f63 6b65 soap_valid_socke\n-0012eda0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soap_bind<\n-0012ee00: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0012ee30: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, host, port, \n-0012eee0: 4241 434b 4c4f 4729 2929 203c 2f64 6976 BACKLOG))) .
    {
    .\n-0012ef20: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n-0012ef80: 745f 6661 756c 743c 2f61 3e28 2661 6d70 t_fault(&\n-0012ef90: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012efc0: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
    exit(EXI\n-0012eff0: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    }
    .\n-0012f020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    wh\n-0012f050: 696c 653c 2f73 7061 6e3e 2028 3129 3c2f ile (1).
    {
    \n-0012f080: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (soap\n-0012f110: 5f73 6572 7665 3c2f 613e 2826 616d 703b _serve(&\n-0012f120: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0012f150: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    \n-0012f170: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n-0012f1d0: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n-0012f210: 7464 6572 7229 3b20 3c73 7061 6e20 636c tderr); //\n-0012f230: 2072 6570 6f72 7420 7468 6520 7072 6f62 report the prob\n-0012f240: 6c65 6d20 3c2f 7370 616e 3e3c 2f64 6976 lem .
    soa\n-0012f2c0: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a\n-0012f2d0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    . \n-0012f320: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n-0012f380: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0012f3b0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    }
    .<\n-0012f3e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f3f0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_don\n-0012f450: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap); // close conn\n-0012f4b0: 6563 7469 6f6e 203c 2f73 7061 6e3e 3c2f ection .
    }
    .\n-0012f4e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n-0012f530: 206e 735f 5f65 6368 6f53 7472 696e 6728 ns__echoString(\n-0012f540: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-0012f590: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-0012f5c0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n-0012f5e0: 6368 6172 3c2f 7370 616e 3e20 2a73 7472 char *str\n-0012f5f0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n-0012f610: 3c2f 7370 616e 3e20 2a2a 7265 7329 203c **res) <\n-0012f620: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-0012f640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // che\n-0012f670: 636b 2069 6620 5753 2d41 6464 7265 7373 ck if WS-Address\n-0012f680: 696e 6720 6865 6164 6572 7320 6172 6520 ing headers are \n-0012f690: 7072 6573 656e 7420 616e 6420 636f 7272 present and corr\n-0012f6a0: 6563 743c 2f73 7061 6e3e 3c2f 6469 763e ect
    \n-0012f6b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-0012f6e0: 663c 2f73 7061 6e3e 2028 736f 6170 5f77 f (soap_w\n-0012f6f0: 7361 5f63 6865 636b 283c 6120 636c 6173 sa_check(\n-0012f720: 736f 6170 3c2f 613e 2929 3c2f 6469 763e soap))
    \n-0012f730: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return <\n-0012f770: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012f780: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012f790: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0012f7a0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n-0012f7f0: 723c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 r;
    . \n-0012f810: 203c 7370 616e 2063 6c61 7373 3d22 636f // should\n-0012f830: 2063 6865 636b 2066 6f72 2064 7570 6c69 check for dupli\n-0012f840: 6361 7465 206d 6573 7361 6765 7320 2873 cate messages (s\n-0012f850: 6f6d 6574 6869 6e67 2074 6861 7420 5753 omething that WS\n-0012f860: 2d52 656c 6961 626c 654d 6573 7361 6769 -ReliableMessagi\n-0012f870: 6e67 2064 6f65 7320 746f 6f29 3c2f 7370 ng does too)
    .
    if (check_receive\n-0012f8d0: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap->h\n-0012f950: 6561 6465 723c 2f61 3e2d 2667 743b 7773 eader->ws\n-0012f960: 615f 5f4d 6573 7361 6765 4944 2929 203c a__MessageID)) <\n-0012f970: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    //\n-0012f9c0: 2052 6571 7565 7374 206d 6573 7361 6765 Request message\n-0012f9d0: 2061 6c72 6561 6479 2072 6563 6569 7665 already receive\n-0012f9e0: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n-0012f9f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-0012fa20: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_STOP;\n-0012fa90: 203c 7370 616e 2063 6c61 7373 3d22 636f // don\n-0012fab0: 393b 7420 7265 7475 726e 2072 6573 706f 9;t return respo\n-0012fac0: 6e73 6520 3c2f 7370 616e 3e3c 2f64 6976 nse .
    }
    .<\n-0012faf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012fb00: 3e20 202a 7265 7320 3d20 7374 723b 203c > *res = str; <\n-0012fb10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-0012fb40: 2f2f 2072 6574 7572 6e20 4f4b 2077 6974 // return OK wit\n-0012fb50: 6820 5753 2d41 6464 7265 7373 696e 6720 h WS-Addressing \n-0012fb60: 7265 706c 7920 6865 6164 6572 732c 206d reply headers, m\n-0012fb70: 6573 7361 6765 2049 4420 6973 2069 645f essage ID is id_\n-0012fb80: 636f 756e 742b 313c 2f73 7061 6e3e 3c2f count+1.
    return\n-0012fbd0: 2073 6f61 705f 7773 615f 7265 706c 7928 soap_wsa_reply(\n-0012fbe0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0012fc10: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_int2s\n-0012fc70: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0012fca0: 2c20 6964 5f63 6f75 6e74 2b2b 292c 203c , id_count++), <\n-0012fcb0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0012fcc0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0012fcd0: 3b68 7474 703a 2f2f 6765 6e69 7669 612e ;http://genivia.\n-0012fce0: 636f 6d2f 7564 702f 6563 686f 5374 7269 com/udp/echoStri\n-0012fcf0: 6e67 5265 7370 6f6e 7365 2671 756f 743b ngResponse"\n-0012fd00: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    .\n-0012fd10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int ns__\n-0012fd80: 7365 6e64 5374 7269 6e67 283c 7370 616e sendString(struct <\n-0012fdb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012fdc0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012fdd0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-0012fde0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0012fe10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0012fe30: 2f73 7061 6e3e 202a 7374 7229 203c 2f64 /span> *str) .
    {
    .\n-0012fe70: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_wsa_\n-0012fea0: 6368 6563 6b28 3c61 2063 6c61 7373 3d22 check(soa\n-0012fed0: 703c 2f61 3e29 293c 2f64 6976 3e0a 3c64 p))
    .\n-0012fef0: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-0012ff10: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn soap->\n-0012ff50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error;
    .
    // should ch\n-0012ffe0: 6563 6b20 666f 7220 6475 706c 6963 6174 eck for duplicat\n-0012fff0: 6520 6d65 7373 6167 6573 203c 2f73 7061 e messages
    .
    if\n-00130040: 2028 6368 6563 6b5f 7265 6365 6976 6564 (check_received\n-00130050: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00130080: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->he\n-001300d0: 6164 6572 3c2f 613e 2d26 6774 3b77 7361 ader->wsa\n-001300e0: 5f5f 4d65 7373 6167 6549 4429 2920 3c2f __MessageID)) .
    {
    \n-00130110: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // \n-00130140: 5265 7175 6573 7420 6d65 7373 6167 6520 Request message \n-00130150: 616c 7265 6164 7920 7265 6365 6976 6564 already received\n-00130160: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00130170: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00130180: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n-001301a0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_STOP;<\n-00130210: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    return <\n-00130270: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00130280: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00130290: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-001302a0: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n-001302b0: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n-001302c0: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b3c 0\">SOAP_OK;<\n-001302d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n-001302f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int ns__sendString\n-00130350: 5265 7370 6f6e 7365 283c 7370 616e 2063 Response(s\n-00130370: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-001303e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001303f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *res) .
    {
    . \n-00130440: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-00130460: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-001304c0: 5f4e 4f5f 4d45 5448 4f44 3c2f 613e 3b20 _NO_METHOD; \n-001304d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // we don&\n-001304f0: 2333 393b 7420 7365 7276 6520 7468 6973 #39;t serve this\n-00130500: 206f 7065 7261 7469 6f6e 3c2f 7370 616e operation
    .
    }.
    S\n-001305e0: 4f41 505f 494f 5f55 4450 3c2f 613e 3c2f OAP_IO_UDP
    #define \n-00130610: 534f 4150 5f49 4f5f 5544 503c 2f64 6976 SOAP_IO_UDP
    soap_mode IO\n-00130640: 2069 6e70 7574 2f6f 7574 7075 7420 666c input/output fl\n-00130650: 6167 2076 616c 7565 2074 6f20 7573 6520 ag value to use \n-00130660: 5544 5020 6461 7461 6772 616d 732c 206d UDP datagrams, m\n-00130670: 6573 7361 6765 2073 697a 6520 6973 206c essage size is l\n-00130680: 696d 6974 6564 2074 6f20 5544 5020 7061 imited to UDP pa\n-00130690: 636b 6574 2073 697a 653c 2f64 6976 3e3c cket size
    <\n-001306a0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-001306b0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-001306c0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-001306d0: 3135 3936 3c2f 6469 763e 3c2f 6469 763e 1596
    \n-001306e0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    const char * s\n-001307c0: 6f61 705f 696e 7432 7328 7374 7275 6374 oap_int2s(struct\n-001307d0: 2073 6f61 7020 2a73 6f61 702c 2069 6e74 soap *soap, int\n-001307e0: 2076 616c 7565 293c 2f64 6976 3e3c 6469 value)
    \n-00130800: 436f 6e76 6572 7420 6120 7369 676e 6564 Convert a signed\n-00130810: 2033 3220 6269 7420 696e 7465 6765 7220 32 bit integer \n-00130820: 746f 2061 2064 6563 696d 616c 2073 7472 to a decimal str\n-00130830: 696e 672e 3c2f 6469 763e 3c2f 6469 763e ing.
    \n-00130840: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

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

    .

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

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

    .

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

    .

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

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

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

    .

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

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

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

    ..
    .\n-00131d30: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......<\n-00131f80: 636f 6465 3e23 5749 5448 5f43 4f4d 5041 code>#WITH_COMPA\n-00131f90: 543c 2f63 6f64 653e 2020 203c 2f74 643e T \n-00131fa0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-00132030: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..c\n-001321b0: 7265 6174 6573 2061 6e20 6576 656e 2073 reates an even s\n-001321c0: 6d61 6c6c 6572 2066 6f6f 7470 7269 6e74 maller footprint\n-001321d0: 2065 7865 6375 7461 626c 652c 2073 6565 executable, see\n-001321e0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Ho\n-00132210: 7720 746f 206d 696e 696d 697a 6520 6170 w to minimize ap\n-00132220: 706c 6963 6174 696f 6e20 6d65 6d6f 7279 plication memory\n-00132230: 2066 6f6f 7470 7269 6e74 3c2f 613e 2020 footprint \n-00132240: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00132270: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00132280: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00132290: 3e3c 636f 6465 3e23 5749 5448 5f46 4153 >#WITH_FAS\n-001322a0: 543c 2f63 6f64 653e 2020 203c 2f74 643e T \n-001322b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n-00132340: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..<\n-00132490: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.....\n-00132640: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...<\n-00132750: 636f 6465 3e23 5749 5448 5f4f 5045 4e53 code>#WITH_OPENS\n-00132760: 534c 3c2f 636f 6465 3e20 2020 3c2f 7464 SL .\n-00132860: 3c74 7220 636c 6173 733d 226d 6172 6b64 .......\n-00132c60: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n-00132d50: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n-00132dc0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00132dd0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00132de0: 3e72 656d 6f76 6520 7468 6520 7573 6520 >remove the use \n-00132df0: 6f66 206c 6f63 616c 6520 6675 6e63 7469 of locale functi\n-00132e00: 6f6e 7320 746f 2069 6d70 726f 7665 2070 ons to improve p\n-00132e10: 6f72 7461 6269 6c69 7479 2020 2020 3c2f ortability ..<\n-00132f50: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....<\n-00133070: 636f 6465 3e23 5749 5448 5f52 4550 4c41 code>#WITH_REPLA\n-00133080: 4345 5f49 4c4c 4547 414c 5f55 5446 383c CE_ILLEGAL_UTF8<\n-00133090: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-001330c0: 656e 6162 6c65 2073 7472 6963 7420 5554 enable strict UT\n-001330d0: 462d 382c 2072 6570 6c61 6365 7320 5554 F-8, replaces UT\n-001330e0: 462d 3820 636f 6e74 656e 7420 7468 6174 F-8 content that\n-001330f0: 2069 7320 6f75 7473 6964 6520 7468 6520 is outside the \n-00133100: 616c 6c6f 7765 6420 7261 6e67 6520 7769 allowed range wi\n-00133110: 7468 2055 2b46 4646 4420 2020 203c 2f74 th U+FFFD ..e\n-001331b0: 6e61 626c 6573 2046 6173 7443 4749 2c20 nables FastCGI, \n-001331c0: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section FastCGI \n-00133200: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n-00133230: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....\n-00133470: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-00133530: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00133540: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00133550: 3e3c 636f 6465 3e23 5749 5448 5f4e 4f5a >#WITH_NOZ\n-00133560: 4f4e 453c 2f63 6f64 653e 2020 203c 2f74 ONE ..<\n-001336c0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n-00133730: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-001337c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001337d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001337e0: 3e3c 636f 6465 3e23 5749 5448 5f4e 4f47 >#WITH_NOG\n-001337f0: 4c4f 4241 4c3c 2f63 6f64 653e 2020 203c LOBAL <\n-00133800: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>\n-001338a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n-00133b10: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00133b20: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00133b30: 3e3c 636f 6465 3e23 5749 5448 5f43 4441 >#WITH_CDA\n-00133b40: 5441 3c2f 636f 6465 3e20 2020 3c2f 7464 TA ...\n-00133cd0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n-00133d60: 656e 6162 6c65 7320 432b 2b20 6261 7365 enables C++ base\n-00133d70: 2073 6572 7669 6365 2063 6c61 7373 6573 service classes\n-00133d80: 2077 6974 6820 6465 6661 756c 7420 7669 with default vi\n-00133d90: 7274 7561 6c20 6d65 7468 6f64 7320 7265 rtual methods re\n-00133da0: 7475 726e 696e 6720 6661 756c 7420 3c63 turning fault #SOAP_NO_MET\n-00133dc0: 484f 443c 2f63 6f64 653e 2c20 7265 7175 HOD, requ\n-00133dd0: 6972 6573 2073 6f61 7063 7070 3220 6f70 ires soapcpp2 op\n-00133de0: 7469 6f6e 203c 636f 6465 3e2d 693c 2f63 tion -i or -j\n-00133e00: 3c2f 636f 6465 3e20 2020 203c 2f74 643e \n-00133e10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n-00133f20: 3c63 6f64 653e 2357 4954 485f 534f 434b #WITH_SOCK\n-00133f30: 4554 5f43 4c4f 5345 5f4f 4e5f 4558 4954 ET_CLOSE_ON_EXIT\n-00133f40: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-00133f50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00133f60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00133f70: 3e70 7265 7665 6e74 7320 6120 7365 7276 >prevents a serv\n-00133f80: 6572 2070 6f72 7420 6672 6f6d 2073 7461 er port from sta\n-00133f90: 7969 6e67 2069 6e20 6c69 7374 656e 696e ying in listenin\n-00133fa0: 6720 6d6f 6465 2061 6674 6572 2065 7869 g mode after exi\n-00133fb0: 7420 6279 2069 6e74 6572 6e61 6c6c 7920 t by internally \n-00133fc0: 7365 7474 696e 6720 3c63 6f64 653e 6663 setting fc\n-00133fd0: 6e74 6c28 736f 636b 2c20 465f 5345 5446 ntl(sock, F_SETF\n-00133fe0: 442c 2046 445f 434c 4f45 5845 4329 3c2f D, FD_CLOEXEC) ......

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

    .<\n-001343c0: 7461 626c 6520 636c 6173 733d 226d 6172 table class=\"mar\n-001343d0: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable\">..
    ....<\n-001345d0: 636f 6465 3e23 534f 4150 5f42 5546 4c45 code>#SOAP_BUFLE\n-001345e0: 4e3c 2f63 6f64 653e 2020 203c 2f74 643e N \n-001345f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-00134690: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001346a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001346b0: 3e3c 636f 6465 3e23 534f 4150 5f48 4452 >#SOAP_HDR\n-001346c0: 4c45 4e3c 2f63 6f64 653e 2020 203c 2f74 LEN <\n-00134720: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......\n-00134910: 3c63 6f64 653e 2353 4f41 505f 4d41 5841 #SOAP_MAXA\n-00134920: 4c4c 4f43 5349 5a45 3c2f 636f 6465 3e20 LLOCSIZE \n-00134930: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ..t\n-00134a40: 6865 206d 6178 696d 756d 2061 6c6c 6f63 he maximum alloc\n-00134a50: 6174 696f 6e20 7468 7265 7368 6f6c 6420 ation threshold \n-00134a60: 746f 2070 7265 2d61 6c6c 6f63 6174 6520 to pre-allocate \n-00134a70: 534f 4150 2061 7272 6179 7320 696e 206d SOAP arrays in m\n-00134a80: 656d 6f72 7920 2020 203c 2f74 643e 3c2f emory ..\n-00134b20: 7468 6520 6d61 7869 6d75 6d20 4449 4d45 the maximum DIME\n-00134b30: 2061 7474 6163 686d 656e 7420 7369 7a65 attachment size\n-00134b40: 2061 6c6c 6f77 6564 2074 6f20 7265 6365 allowed to rece\n-00134b50: 6976 6520 2020 203c 2f74 643e 3c2f 7472 ive ..\n-00134c50: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n-00134ce0: 7472 7573 7465 6420 696e 666c 6174 6564 trusted inflated\n-00134cf0: 2063 6f6e 7465 6e74 2073 697a 6520 2831 content size (1\n-00134d00: 204d 4220 6279 2064 6566 6175 6c74 2920 MB by default) \n-00134d10: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n-00134d40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00134d50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00134d60: 3e3c 636f 6465 3e23 534f 4150 5f4d 4158 >#SOAP_MAX\n-00134d70: 4b45 4550 414c 4956 453c 2f63 6f64 653e KEEPALIVE\n-00134d80: 2020 203c 2f74 643e 3c74 6420 636c 6173 \n-00134e80: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...\n-00134f80: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-00134fa0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .....\n-001351b0: 3c63 6f64 653e 2353 4f41 505f 4d49 4e44 #SOAP_MIND\n-001351c0: 4546 4c41 5445 5241 5449 4f3c 2f63 6f64 EFLATERATIO <\n-00135250: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n-001352c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......<\n-00135540: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00135550: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00135560: 3e3c 636f 6465 3e23 534f 4150 5f55 4e4b >#SOAP_UNK\n-00135570: 4e4f 574e 5f55 4e49 434f 4445 5f43 4841 NOWN_UNICODE_CHA\n-00135580: 523c 2f63 6f64 653e 2020 203c 2f74 643e R \n-00135590: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-00135660: 636f 6465 3e23 534f 4150 5f4c 4f4e 475f code>#SOAP_LONG_\n-00135670: 464f 524d 4154 3c2f 636f 6465 3e20 2020 FORMAT \n-00135680: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..\n-00135780: 6d61 6372 6f20 7468 6174 2072 6570 7265 macro that repre\n-00135790: 7365 6e74 7320 7468 6520 3c63 6f64 653e sents the \n-001357a0: 2355 4c4f 4e47 3634 3c2f 636f 6465 3e20 #ULONG64 \n-001357b0: 7072 696e 7466 2025 2d66 6f72 6d61 7420 printf %-format \n-001357c0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n-001357f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .
    range validation che\n+000f2920: 636b 2020 2020 3c2f 7468 3e3c 2f74 723e ck
    1 1 &l\n+000f29b0: 743b 3d20 7820 2020 203c 2f74 643e 3c2f t;= x
    1 \n+000f2a10: 3a3c 2f63 6f64 653e 2020 203c 2f74 643e : 1 <= x <\n+000f2a50: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    : 10 \n+000f2ab0: 203c 2f74 643e 3c74 6420 636c 6173 733d x <= \n+000f2ae0: 3130 2020 2020 3c2f 7464 3e3c 2f74 723e 10
    1 : 1\n+000f2b40: 303c 2f63 6f64 653e 2020 203c 2f74 643e 0 1 <= x <\n+000f2b80: 3d20 3130 2020 2020 3c2f 7464 3e3c 2f74 = 10
    1 &l\n+000f2be0: 743b 203a 2026 6c74 3b20 3130 3c2f 636f t; : < 10 1 &\n+000f2c20: 6c74 3b20 7820 266c 743b 2031 3020 2020 lt; x < 10 \n+000f2c30: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    1 : <\n+000f2d30: 2031 303c 2f63 6f64 653e 2020 203c 2f74 10 1 <= x &l\n+000f2d70: 743b 2031 3020 2020 203c 2f74 643e 3c2f t; 10
    : \n+000f2dd0: 266c 743b 2031 303c 2f63 6f64 653e 2020 < 10 \n+000f2de0: 203c 2f74 643e 3c74 6420 636c 6173 733d x < 1\n+000f2e10: 3020 2020 203c 2f74 643e 3c2f 7472 3e0a 0
    < 10\n+000f2e70: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    1 < : 1 &l\n+000f2f40: 743b 2078 2020 2020 3c2f 7464 3e3c 2f74 t; x
    1 &l\n+000f2fa0: 743b 3c2f 636f 6465 3e20 2020 3c2f 7464 t; 1 < x <\n+000f2fe0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    1 < : 10<\n+000f3040: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    defi\n-00131cf0: 6e65 2020 203c 2f74 683e 3c74 6820 636c ne resu\n-00131d20: 6c74 2020 2020 3c2f 7468 3e3c 2f74 723e lt
    #SOAPD\n-00131d80: 4546 535f 483c 2f63 6f64 653e 2020 203c EFS_H <\n-00131d90: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>the header\n-00131dc0: 2066 696c 6520 746f 2069 6e63 6c75 6465 file to include\n-00131dd0: 2c20 6966 2064 6966 6665 7265 6e74 2066 , if different f\n-00131de0: 726f 6d20 3c63 6f64 653e 736f 6170 6465 rom soapde\n-00131df0: 6673 2e68 3c2f 636f 6465 3e20 2020 203c fs.h <\n-00131e00: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #WITH_SOAPDE\n-00131e60: 4653 5f48 3c2f 636f 6465 3e20 2020 3c2f FS_H includes th\n-00131ea0: 6520 3c63 6f64 653e 736f 6170 6465 6673 e soapdefs\n-00131eb0: 2e68 3c2f 636f 6465 3e20 6669 6c65 2066 .h file f\n-00131ec0: 6f72 2063 7573 746f 6d20 7365 7474 696e or custom settin\n-00131ed0: 6773 2c20 7365 6520 5365 6374 696f 6e20 gs, see Section \n-00131ee0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Using t\n-00131f10: 6865 2073 6f61 7064 6566 732e 6820 6865 he soapdefs.h he\n-00131f20: 6164 6572 2066 696c 653c 2f61 3e20 2020 ader file \n-00131f30: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    removes depend\n-00131fd0: 656e 6379 206f 6e20 432b 2b20 7374 7265 ency on C++ stre\n-00131fe0: 616d 206c 6962 7261 7269 6573 2061 6e64 am libraries and\n-00131ff0: 2043 2b2b 2065 7863 6570 7469 6f6e 7320 C++ exceptions \n-00132000: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #WITH_LE\n-00132060: 414e 3c2f 636f 6465 3e20 2020 3c2f 7464 AN creates a sma\n-001320a0: 6c6c 2d66 6f6f 7470 7269 6e74 2065 7865 ll-footprint exe\n-001320b0: 6375 7461 626c 652c 2073 6565 2053 6563 cutable, see Sec\n-001320c0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion How to\n-001320f0: 206d 696e 696d 697a 6520 6170 706c 6963 minimize applic\n-00132100: 6174 696f 6e20 6d65 6d6f 7279 2066 6f6f ation memory foo\n-00132110: 7470 7269 6e74 3c2f 613e 2020 2020 3c2f tprint
    #WITH_LEANER
    use faster mem\n-001322e0: 6f72 7920 616c 6c6f 6361 7469 6f6e 2077 ory allocation w\n-001322f0: 6865 6e20 7573 6564 2077 6974 6820 3c63 hen used with #WITH_LEAN or #\n-00132320: 5749 5448 5f4c 4541 4e45 523c 2f63 6f64 WITH_LEANER
    #WITH_\n-00132390: 434f 4f4b 4945 533c 2f63 6f64 653e 2020 COOKIES \n-001323a0: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n-001323d0: 4854 5450 2063 6f6f 6b69 6573 2c20 7365 HTTP cookies, se\n-001323e0: 6520 5365 6374 696f 6e73 203c 6120 636c e Sections Client-s\n-00132420: 6964 6520 636f 6f6b 6965 2073 7570 706f ide cookie suppo\n-00132430: 7274 3c2f 613e 2061 6e64 203c 6120 636c rt and Server-s\n-00132470: 6964 6520 636f 6f6b 6965 2073 7570 706f ide cookie suppo\n-00132480: 7274 3c2f 613e 2020 2020 3c2f 7464 3e3c rt
    #\n-001324e0: 5749 5448 5f49 4e53 4543 5552 455f 434f WITH_INSECURE_CO\n-001324f0: 4f4b 4945 533c 2f63 6f64 653e 2020 203c OKIES <\n-00132500: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables HT\n-00132530: 5450 2063 6f6f 6b69 6573 2061 6e64 2061 TP cookies and a\n-00132540: 6c6c 6f77 7320 636f 6f6b 6965 7320 7769 llows cookies wi\n-00132550: 7468 2074 6865 6972 2053 6563 7572 6520 th their Secure \n-00132560: 666c 6167 2073 6574 2074 6f20 6265 2073 flag set to be s\n-00132570: 656e 7420 6f76 6572 2069 6e73 6563 7572 ent over insecur\n-00132580: 6520 6368 616e 6e65 6c73 2020 2020 3c2f e channels
    #WITH_IPV6 ena\n-00132620: 626c 6573 2049 5076 3620 7375 7070 6f72 bles IPv6 suppor\n-00132630: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
    #WITH_\n-00132690: 4950 5636 5f56 364f 4e4c 593c 2f63 6f64 IPV6_V6ONLY enab\n-001326d0: 6c65 7320 4950 7636 2073 7570 706f 7274 les IPv6 support\n-001326e0: 2077 6974 6820 4950 7636 2d6f 6e6c 7920 with IPv6-only \n-001326f0: 7365 7276 6572 206f 7074 696f 6e20 2020 server option \n-00132700: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    enables OpenS\n-001327a0: 534c 2c20 7365 6520 5365 6374 696f 6e73 SL, see Sections\n-001327b0: 203c 6120 636c 6173 733d 2265 6c22 2068 S\n-001327e0: 6563 7572 6520 636c 6965 6e74 7320 7769 ecure clients wi\n-001327f0: 7468 2048 5454 5053 3c2f 613e 2061 6e64 th HTTPS and\n-00132800: 203c 6120 636c 6173 733d 2265 6c22 2068 S\n-00132830: 6563 7572 6520 5765 6220 7365 7276 6963 ecure Web servic\n-00132840: 6573 2077 6974 6820 4854 5450 533c 2f61 es with HTTPS
    #WITH_\n-001328b0: 474e 5554 4c53 3c2f 636f 6465 3e20 2020 GNUTLS \n-001328c0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 enables G\n-001328f0: 4e55 544c 532c 2073 6565 2053 6563 7469 NUTLS, see Secti\n-00132900: 6f6e 7320 3c61 2063 6c61 7373 3d22 656c ons Secure clients\n-00132940: 2077 6974 6820 4854 5450 533c 2f61 3e20 with HTTPS \n-00132950: 616e 6420 3c61 2063 6c61 7373 3d22 656c and Secure Web ser\n-00132990: 7669 6365 7320 7769 7468 2048 5454 5053 vices with HTTPS\n-001329a0: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #WIT\n-00132a00: 485f 475a 4950 3c2f 636f 6465 3e20 2020 H_GZIP \n-00132a10: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 enables g\n-00132a40: 7a69 7020 616e 6420 6465 666c 6174 6520 zip and deflate \n-00132a50: 636f 6d70 7265 7373 696f 6e2c 2073 6565 compression, see\n-00132a60: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Zlib compre\n-00132aa0: 7373 696f 6e3c 2f61 3e20 2020 203c 2f74 ssion
    #WITH_ZLIB ena\n-00132b40: 626c 6573 2064 6566 6c61 7465 2063 6f6d bles deflate com\n-00132b50: 7072 6573 7369 6f6e 206f 6e6c 792c 2073 pression only, s\n-00132b60: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Zlib comp\n-00132ba0: 7265 7373 696f 6e3c 2f61 3e20 2020 203c ression <\n-00132bb0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #WITH_NTLM en\n-00132c40: 6162 6c65 7320 4e54 4c4d 2073 7570 706f ables NTLM suppo\n-00132c50: 7274 2020 2020 3c2f 7464 3e3c 2f74 723e rt
    #WITH\n-00132cb0: 5f43 5f4c 4f43 414c 453c 2f63 6f64 653e _C_LOCALE\n-00132cc0: 2020 203c 2f74 643e 3c74 6420 636c 6173 force \n-00132cf0: 7468 6520 7573 6520 6c6f 6361 6c65 2066 the use locale f\n-00132d00: 756e 6374 696f 6e73 2077 6865 6e20 6176 unctions when av\n-00132d10: 6169 6c61 626c 6520 746f 2065 6e73 7572 ailable to ensur\n-00132d20: 6520 6c6f 6361 6c65 2d69 6e64 6570 656e e locale-indepen\n-00132d30: 6465 6e74 206e 756d 6265 7220 636f 6e76 dent number conv\n-00132d40: 6572 7369 6f6e 7320 2020 203c 2f74 643e ersions
    #\n-00132da0: 5749 5448 5f4e 4f5f 435f 4c4f 4341 4c45 WITH_NO_C_LOCALE\n-00132db0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #WITH_INCLUDE\n-00132e80: 5f58 4c4f 4341 4c45 5f48 3c2f 636f 6465 _XLOCALE_H force\n-00132ec0: 2074 6865 2069 6e63 6c75 7369 6f6e 206f the inclusion o\n-00132ed0: 6620 3c63 6f64 653e 266c 743b 786c 6f63 f <xloc\n-00132ee0: 616c 652e 6826 6774 3b3c 2f63 6f64 653e ale.h>\n-00132ef0: 2074 6f20 6465 6669 6e65 203c 636f 6465 to define locale_t\n-00132f10: 2061 6e64 203c 636f 6465 3e5f 6c3c 2f63 and _l functions, \n-00132f30: 746f 2069 6d70 726f 7665 2070 6f72 7461 to improve porta\n-00132f40: 6269 6c69 7479 2020 2020 3c2f 7464 3e3c bility
    #W\n-00132fa0: 4954 485f 444f 4d3c 2f63 6f64 653e 2020 ITH_DOM \n-00132fb0: 203c 2f74 643e 3c74 6420 636c 6173 733d enable D\n-00132fe0: 4f4d 2070 6172 7369 6e67 2069 6e20 7468 OM parsing in th\n-00132ff0: 6520 656e 6769 6e65 2c20 7265 7175 6972 e engine, requir\n-00133000: 6564 2062 7920 7468 6520 5753 2d53 6563 ed by the WS-Sec\n-00133010: 7572 6974 7920 706c 7567 696e 2020 2020 urity plugin \n-00133020: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #WITH_FASTCGI
    #WITH_NO\n-00133260: 494f 3c2f 636f 6465 3e20 2020 3c2f 7464 IO removes IO op\n-001332a0: 6572 6174 696f 6e73 2c20 746f 2065 6c69 erations, to eli\n-001332b0: 6d69 6e61 7465 2074 6865 2075 7365 206f minate the use o\n-001332c0: 6620 4253 4420 736f 636b 6574 732c 2073 f BSD sockets, s\n-001332d0: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section \n-00133300: 486f 7720 746f 2072 656d 6f76 6520 7468 How to remove th\n-00133310: 6520 4253 4420 736f 636b 6574 206c 6962 e BSD socket lib\n-00133320: 7261 7279 2072 6571 7569 7265 6d65 6e74 rary requirement\n-00133330: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #WIT\n-00133390: 485f 4e4f 4944 5245 463c 2f63 6f64 653e H_NOIDREF\n-001333a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 remove\n-001333d0: 7320 6964 2061 6e64 2068 7265 662f 7265 s id and href/re\n-001333e0: 6620 6d75 6c74 692d 7265 6665 7265 6e63 f multi-referenc\n-001333f0: 6520 6461 7461 2c20 6d6f 7265 2061 6767 e data, more agg\n-00133400: 7265 7373 6976 6520 7468 616e 2075 7369 ressive than usi\n-00133410: 6e67 2074 6865 203c 636f 6465 3e23 534f ng the #SO\n-00133420: 4150 5f58 4d4c 5f54 5245 453c 2f63 6f64 AP_XML_TREE runtime flag \n-00133440: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #WITH_NO\n-001334a0: 4854 5450 3c2f 636f 6465 3e20 2020 3c2f HTTP removes the\n-001334e0: 2048 5454 5020 7374 6163 6b20 746f 2072 HTTP stack to r\n-001334f0: 6564 7563 6520 636f 6465 2073 697a 6520 educe code size \n-00133500: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    disables and\n-001335a0: 2069 676e 6f72 6573 2074 6865 2074 696d ignores the tim\n-001335b0: 657a 6f6e 6520 696e 203c 636f 6465 3e78 ezone in x\n-001335c0: 7364 3a64 6174 6554 696d 653c 2f63 6f64 sd:dateTime values
    #WITH_NOEMPTYN\n-00133640: 414d 4553 5041 4345 533c 2f63 6f64 653e AMESPACES\n-00133650: 2020 203c 2f74 643e 3c74 6420 636c 6173 disabl\n-00133680: 6573 2078 6d6c 6e73 3d22 2220 6465 6661 es xmlns=\"\" defa\n-00133690: 756c 7420 656d 7074 7920 6e61 6d65 7370 ult empty namesp\n-001336a0: 6163 6573 2066 726f 6d20 584d 4c20 6d65 aces from XML me\n-001336b0: 7373 6167 6573 2020 2020 3c2f 7464 3e3c ssages
    #W\n-00133710: 4954 485f 4e4f 454d 5054 5953 5452 5543 ITH_NOEMPTYSTRUC\n-00133720: 543c 2f63 6f64 653e 2020 203c 2f74 643e T inserts a dumm\n-00133760: 7920 6d65 6d62 6572 2069 6e20 656d 7074 y member in empt\n-00133770: 7920 7374 7275 6374 7320 746f 2061 6c6c y structs to all\n-00133780: 6f77 2063 6f6d 7069 6c61 7469 6f6e 2020 ow compilation \n-00133790: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    omit SOAP \n-00133830: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n-00133840: 2073 6572 6961 6c69 7a61 7469 6f6e 2063 serialization c\n-00133850: 6f64 652c 2070 7265 7665 6e74 7320 6475 ode, prevents du\n-00133860: 706c 6963 6174 6520 6465 6669 6e69 7469 plicate definiti\n-00133870: 6f6e 7320 7769 7468 2067 656e 6572 6174 ons with generat\n-00133880: 6564 2073 6f61 7058 595a 4c69 6220 636f ed soapXYZLib co\n-00133890: 6465 2020 2020 3c2f 7464 3e3c 2f74 723e de
    #WITH_\n-001338f0: 4e4f 4e41 4d45 5350 4143 4553 3c2f 636f NONAMESPACES dis\n-00133930: 6162 6c65 7320 6465 7065 6e64 656e 6365 ables dependence\n-00133940: 206f 6e20 676c 6f62 616c 203c 636f 6465 on global namespaces table, a tabl\n-00133970: 6520 6d75 7374 2062 6520 7365 7420 6578 e must be set ex\n-00133980: 706c 6963 6974 6c79 2077 6974 6820 3c63 plicitly with soap_set_nam\n-00133a60: 6573 7061 6365 733c 2f61 3e3c 2f63 6f64 espaces see also Sect\n-00133a80: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion XML \n-00133ab0: 6e61 6d65 7370 6163 6573 2061 6e64 2074 namespaces and t\n-00133ac0: 6865 206e 616d 6573 7061 6365 206d 6170 he namespace map\n-00133ad0: 7069 6e67 2074 6162 6c65 3c2f 613e 2020 ping table \n-00133ae0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    retains the p\n-00133b80: 6172 7365 6420 4344 4154 4120 7365 6374 arsed CDATA sect\n-00133b90: 696f 6e73 2069 6e20 6c69 7465 7261 6c20 ions in literal \n-00133ba0: 584d 4c20 7374 7269 6e67 7320 2020 203c XML strings <\n-00133bb0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #WITH_PURE_VI\n-00133c10: 5254 5541 4c3c 2f63 6f64 653e 2020 203c RTUAL <\n-00133c20: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables C+\n-00133c50: 2b20 6162 7374 7261 6374 2073 6572 7669 + abstract servi\n-00133c60: 6365 2063 6c61 7373 6573 2077 6974 6820 ce classes with \n-00133c70: 7075 7265 2076 6972 7475 616c 206d 6574 pure virtual met\n-00133c80: 686f 6473 2c20 7265 7175 6972 6573 2073 hods, requires s\n-00133c90: 6f61 7063 7070 3220 6f70 7469 6f6e 203c oapcpp2 option <\n-00133ca0: 636f 6465 3e2d 693c 2f63 6f64 653e 206f code>-i o\n-00133cb0: 7220 3c63 6f64 653e 2d6a 3c2f 636f 6465 r -j
    #WITH_\n-00133d20: 4445 4641 554c 545f 5649 5254 5541 4c3c DEFAULT_VIRTUAL<\n-00133d30: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #\n-00133e60: 5749 5448 5f43 4153 4549 4e53 454e 5349 WITH_CASEINSENSI\n-00133e70: 5449 5645 5441 4753 3c2f 636f 6465 3e20 TIVETAGS \n-00133e80: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enables\n-00133eb0: 2063 6173 6520 696e 7365 6e73 6974 6976 case insensitiv\n-00133ec0: 6520 584d 4c20 7061 7273 696e 6720 2020 e XML parsing \n-00133ed0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    #WI\n-00134050: 5448 5f54 4350 4649 4e3c 2f63 6f64 653e TH_TCPFIN\n-00134060: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n-00134090: 7320 5443 5020 4649 4e20 6166 7465 7220 s TCP FIN after \n-001340a0: 7365 6e64 7320 7768 656e 2073 6f63 6b65 sends when socke\n-001340b0: 7420 6973 2072 6561 6479 2074 6f20 636c t is ready to cl\n-001340c0: 6f73 6520 2020 203c 2f74 643e 3c2f 7472 ose
    #WIT\n-00134120: 485f 5345 4c46 5f50 4950 453c 2f63 6f64 H_SELF_PIPE enab\n-00134160: 6c65 7320 6120 2273 656c 6620 7069 7065 les a \"self pipe\n-00134170: 2220 746f 2065 6e61 626c 6520 7468 6520 \" to enable the \n-00134180: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n-00134220: 705f 636c 6f73 655f 636f 6e6e 6563 7469 p_close_connecti\n-00134230: 6f6e 3c2f 613e 3c2f 636f 6465 3e20 6675 on fu\n-00134240: 6e63 7469 6f6e 2028 6753 4f41 5020 322e nction (gSOAP 2.\n-00134250: 382e 3731 206f 7220 6772 6561 7465 7229 8.71 or greater)\n-00134260: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c2f
    de\n-00134420: 6669 6e65 2020 203c 2f74 683e 3c74 6820 fine re\n-00134450: 7375 6c74 2020 2020 3c2f 7468 3e3c 2f74 sult
    #SOA\n-001344b0: 505f 4e4f 5448 524f 573c 2f63 6f64 653e P_NOTHROW\n-001344c0: 2020 203c 2f74 643e 3c74 6420 636c 6173 expand\n-001344f0: 7320 746f 203c 636f 6465 3e28 7374 643a s to (std:\n-00134500: 3a6e 6f74 6872 6f77 293c 2f63 6f64 653e :nothrow)\n-00134510: 2074 6f20 7072 6576 656e 7420 6d65 6d6f to prevent memo\n-00134520: 7279 2061 6c6c 6f63 6174 696f 6e20 6578 ry allocation ex\n-00134530: 6365 7074 696f 6e73 2028 3c63 6f64 653e ceptions (\n-00134540: 2353 4f41 505f 454f 4d3c 2f63 6f64 653e #SOAP_EOM\n-00134550: 2069 7320 7573 6564 2069 6e73 7465 6164 is used instead\n-00134560: 292c 2074 6869 7320 6d61 6372 6f20 6361 ), this macro ca\n-00134570: 6e20 6265 2063 6861 6e67 6564 2020 2020 n be changed \n-00134580: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    the length of \n-00134620: 7468 6520 696e 7465 726e 616c 206d 6573 the internal mes\n-00134630: 7361 6765 2062 7566 6665 722c 2069 6d70 sage buffer, imp\n-00134640: 6163 7473 2063 6f6d 6d75 6e69 6361 7469 acts communicati\n-00134650: 6f6e 7320 7065 7266 6f72 6d61 6e63 6520 ons performance \n-00134660: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    the maximum \n-00134700: 6c65 6e67 7468 206f 6620 4854 5450 2068 length of HTTP h\n-00134710: 6561 6465 7273 2020 2020 3c2f 7464 3e3c eaders
    #\n-00134770: 534f 4150 5f54 4147 4c45 4e3c 2f63 6f64 SOAP_TAGLEN the \n-001347b0: 6d61 7869 6d75 6d20 6c65 6e67 7468 206f maximum length o\n-001347c0: 6620 584d 4c20 7461 6773 2061 6e64 2055 f XML tags and U\n-001347d0: 524c 7320 2020 203c 2f74 643e 3c2f 7472 RLs
    #SOAP\n-00134830: 5f54 4d50 4c45 4e3c 2f63 6f64 653e 2020 _TMPLEN \n-00134840: 203c 2f74 643e 3c74 6420 636c 6173 733d the maxi\n-00134870: 6d75 6d20 6c65 6e67 7468 206f 6620 7465 mum length of te\n-00134880: 6d70 6f72 6172 7920 7374 7269 6e67 2076 mporary string v\n-00134890: 616c 7565 732c 2073 686f 7274 2073 7472 alues, short str\n-001348a0: 696e 6773 2061 6e64 2062 7269 6566 2065 ings and brief e\n-001348b0: 7272 6f72 206d 6573 7361 6765 7320 2020 rror messages \n-001348c0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    the max\n-00134960: 696d 756d 2073 697a 6520 6f66 2061 2062 imum size of a b\n-00134970: 6c6f 636b 206f 6620 6d65 6d6f 7279 2074 lock of memory t\n-00134980: 6861 7420 3c63 6f64 653e 6d61 6c6c 6f63 hat malloc\n-00134990: 3c2f 636f 6465 3e20 6361 6e20 616c 6c6f can allo\n-001349a0: 6361 7465 2020 2020 3c2f 7464 3e3c 2f74 cate
    #SOA\n-00134a00: 505f 4d41 5841 5252 4159 5349 5a45 3c2f P_MAXARRAYSIZE
    #S\n-00134ae0: 4f41 505f 4d41 5844 494d 4553 495a 453c OAP_MAXDIMESIZE<\n-00134af0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP\n-00134bb0: 5f4d 4158 4549 4e54 523c 2f63 6f64 653e _MAXEINTR\n-00134bc0: 2020 203c 2f74 643e 3c74 6420 636c 6173 maximu\n-00134bf0: 6d20 6e75 6d62 6572 206f 6620 4549 4e54 m number of EINT\n-00134c00: 5220 696e 7465 7272 7570 7473 2074 6f20 R interrupts to \n-00134c10: 6967 6e6f 7265 2077 6869 6c65 2070 6f6c ignore while pol\n-00134c20: 6c69 6e67 2061 2073 6f63 6b65 7420 666f ling a socket fo\n-00134c30: 7220 7065 6e64 696e 6720 6163 7469 7669 r pending activi\n-00134c40: 7479 2020 2020 3c2f 7464 3e3c 2f74 723e ty
    #SOAP\n-00134ca0: 5f4d 4158 494e 464c 4154 4553 495a 453c _MAXINFLATESIZE<\n-00134cb0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    maximu\n-00134db0: 6d20 6974 6572 6174 696f 6e73 2069 6e20 m iterations in \n-00134dc0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap_se\n-00134e40: 7276 653c 2f61 3e3c 2f63 6f64 653e 206c rve l\n-00134e50: 6f6f 7020 6f6e 2048 5454 5020 6b65 6570 oop on HTTP keep\n-00134e60: 2d61 6c69 7665 2063 6f6e 6e65 6374 696f -alive connectio\n-00134e70: 6e73 2020 2020 3c2f 7464 3e3c 2f74 723e ns
    #SOAP\n-00134ed0: 5f4d 4158 4c45 4e47 5448 3c2f 636f 6465 _MAXLENGTH maxim\n-00134f10: 756d 2073 7472 696e 6720 636f 6e74 656e um string conten\n-00134f20: 7420 6c65 6e67 7468 2066 6f72 2073 7472 t length for str\n-00134f30: 696e 6773 206e 6f74 2061 6c72 6561 6479 ings not already\n-00134f40: 2063 6f6e 7374 7261 696e 6564 2062 7920 constrained by \n-00134f50: 584d 4c20 7363 6865 6d61 2076 616c 6964 XML schema valid\n-00134f60: 6174 696f 6e20 636f 6e73 7472 6169 6e74 ation constraint\n-00134f70: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    #SOAP_M\n-00134fd0: 4158 4c45 5645 4c3c 2f63 6f64 653e 2020 AXLEVEL \n-00134fe0: 203c 2f74 643e 3c74 6420 636c 6173 733d maximum \n-00135010: 584d 4c20 6e65 7374 696e 6720 6465 7074 XML nesting dept\n-00135020: 6820 6c65 7665 6c20 7065 726d 6974 7465 h level permitte\n-00135030: 6420 6279 2074 6865 2058 4d4c 2070 6172 d by the XML par\n-00135040: 7365 7220 2020 203c 2f74 643e 3c2f 7472 ser
    #SOA\n-001350a0: 505f 4d41 584f 4343 5552 533c 2f63 6f64 P_MAXOCCURS maxi\n-001350e0: 6d75 6d20 6e75 6d62 6572 206f 6620 6172 mum number of ar\n-001350f0: 7261 7920 6f72 2063 6f6e 7461 696e 6572 ray or container\n-00135100: 2065 6c65 6d65 6e74 7320 666f 7220 636f elements for co\n-00135110: 6e74 6169 6e65 7273 2074 6861 7420 6172 ntainers that ar\n-00135120: 6520 6e6f 7420 616c 7265 6164 7920 636f e not already co\n-00135130: 6e73 7472 6169 6e65 6420 6279 2058 4d4c nstrained by XML\n-00135140: 2073 6368 656d 6120 7661 6c69 6461 7469 schema validati\n-00135150: 6f6e 2063 6f6e 7374 7261 696e 7473 2020 on constraints \n-00135160: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    trus\n-00135200: 7465 6420 6465 666c 6174 696f 6e20 7261 ted deflation ra\n-00135210: 7469 6f20 6166 7465 7220 3c63 6f64 653e tio after \n-00135220: 2353 4f41 505f 4d41 5849 4e46 4c41 5445 #SOAP_MAXINFLATE\n-00135230: 5349 5a45 3c2f 636f 6465 3e20 6973 2072 SIZE is r\n-00135240: 6561 6368 6564 2020 2020 3c2f 7464 3e3c eached
    #\n-001352a0: 534f 4150 5f50 5552 455f 5649 5254 5541 SOAP_PURE_VIRTUA\n-001352b0: 4c3c 2f63 6f64 653e 2020 203c 2f74 643e L set to =\n-001352f0: 2030 3c2f 636f 6465 3e20 7768 656e 203c 0 when <\n-00135300: 636f 6465 3e23 5749 5448 5f50 5552 455f code>#WITH_PURE_\n-00135310: 5649 5254 5541 4c3c 2f63 6f64 653e 2069 VIRTUAL i\n-00135320: 7320 6465 6669 6e65 6420 2020 203c 2f74 s defined
    #SOAP_SSL_RSA_B\n-00135390: 4954 533c 2f63 6f64 653e 2020 203c 2f74 ITS length of th\n-001353d0: 6520 5253 4120 6b65 7920 2832 3034 3820 e RSA key (2048 \n-001353e0: 6279 2064 6566 6175 6c74 2920 2020 203c by default) <\n-001353f0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_UNKNOW\n-00135450: 4e5f 4348 4152 3c2f 636f 6465 3e20 2020 N_CHAR \n-00135460: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 an 8 bit \n-00135490: 696e 7465 6765 7220 7468 6174 2072 6570 integer that rep\n-001354a0: 7265 7365 6e74 7320 6120 6368 6172 6163 resents a charac\n-001354b0: 7465 7220 7468 6174 2063 6f75 6c64 206e ter that could n\n-001354c0: 6f74 2062 6520 636f 6e76 6572 7465 6420 ot be converted \n-001354d0: 746f 2061 6e20 4153 4349 4920 6368 6172 to an ASCII char\n-001354e0: 2c20 692e 652e 2077 6865 6e20 636f 6e76 , i.e. when conv\n-001354f0: 6572 7469 6e67 2061 6e20 584d 4c20 556e erting an XML Un\n-00135500: 6963 6f64 6520 6368 6172 6163 7465 7220 icode character \n-00135510: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    integer Unicod\n-001355c0: 6520 7661 6c75 6520 7265 7072 6573 656e e value represen\n-001355d0: 7469 6e67 2061 2063 6861 7261 6374 6572 ting a character\n-001355e0: 2074 6861 7420 7265 706c 6163 6573 2061 that replaces a\n-001355f0: 6e20 696e 7661 6c69 6420 556e 6963 6f64 n invalid Unicod\n-00135600: 6520 636f 6465 2070 6f69 6e74 2020 2020 e code point \n-00135610: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    macro tha\n-001356b0: 7420 7265 7072 6573 656e 7473 2074 6865 t represents the\n-001356c0: 203c 636f 6465 3e23 4c4f 4e47 3634 3c2f #LONG64 printf %-f\n-001356e0: 6f72 6d61 7420 2020 203c 2f74 643e 3c2f ormat
    #SO\n-00135740: 4150 5f55 4c4f 4e47 5f46 4f52 4d41 543c AP_ULONG_FORMAT<\n-00135750: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP_IN\n-00135820: 5641 4c49 445f 534f 434b 4554 3c2f 636f VALID_SOCKET por\n-00135860: 7461 626c 6520 696e 7661 6c69 6420 736f table invalid so\n-00135870: 636b 6574 2076 616c 7565 2c20 6361 6e20 cket value, can \n-00135880: 616c 736f 2075 7365 203c 636f 6465 3e23 also use #\n-00135890: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soa\n-00135940: 705f 7661 6c69 645f 736f 636b 6574 2873 p_valid_socket(s\n-00135950: 6f63 6b29 3c2f 613e 3c2f 636f 6465 3e20 ock) \n-00135960: 746f 2063 6865 636b 2069 6620 3c63 6f64 to check if sock is\n-00135980: 2076 616c 6964 2020 203c 2f74 643e 3c2f valid
    .

    War\n-001359c0: 6e69 6e67 3c2f 6474 3e3c 6464 3e49 7420 ning
    It \n-001359d0: 6973 2069 6d70 6f72 7461 6e74 2074 6861 is important tha\n-001359e0: 7420 616e 7920 6f66 2074 6865 7365 206d t any of these m\n-001359f0: 6163 726f 7320 7768 656e 2064 6566 696e acros when defin\n-00135a00: 6564 2073 686f 756c 6420 6265 2063 6f6e ed should be con\n-00135a10: 7369 7374 656e 746c 7920 6465 6669 6e65 sistently define\n-00135a20: 6420 7768 656e 2063 6f6d 7069 6c69 6e67 d when compiling\n-00135a30: 2073 6f75 7263 6520 636f 6465 2066 696c source code fil\n-00135a40: 6573 2c20 7375 6368 2061 7320 3c65 6d3e es, such as \n-00135a50: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n-00135a60: 6f61 7032 2e63 7070 3c2f 636f 6465 3e3c oap2.cpp<\n-00135a70: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n-00135a80: 736f 6170 432e 6370 703c 2f63 6f64 653e soapC.cpp\n-00135a90: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , soapClient.cpp<\n-00135ab0: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, soapServe\n-00135ad0: 722e 6370 703c 2f63 6f64 653e 3c2f 656d r.cpp, and all appli\n-00135af0: 6361 7469 6f6e 2073 6f75 7263 6520 636f cation source co\n-00135b00: 6465 2066 696c 6573 2074 6861 7420 696e de files that in\n-00135b10: 636c 7564 6520 3c65 6d3e 3c63 6f64 653e clude \n-00135b20: 6773 6f61 702f 7374 6473 6f61 7032 2e68 gsoap/stdsoap2.h\n-00135b30: 3c2f 636f 6465 3e3c 2f65 6d3e 206f 7220 or \n-00135b40: 3c65 6d3e 3c63 6f64 653e 736f 6170 482e soapH.\n-00135b50: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2049 h. I\n-00135b60: 6620 7468 6520 6d61 6372 6f73 2061 7265 f the macros are\n-00135b70: 206e 6f74 2063 6f6e 7369 7374 656e 746c not consistentl\n-00135b80: 7920 6465 6669 6e65 6420 6174 2063 6f6d y defined at com\n-00135b90: 7069 6c65 2074 696d 6520 7468 656e 2074 pile time then t\n-00135ba0: 6865 2061 7070 6c69 6361 7469 6f6e 2077 he application w\n-00135bb0: 696c 6c20 6c69 6b65 6c79 2063 7261 7368 ill likely crash\n-00135bc0: 2064 7565 2074 6f20 6120 6d69 736d 6174 due to a mismat\n-00135bd0: 6368 6573 2069 6e20 7468 6520 6465 636c ches in the decl\n-00135be0: 6172 6174 696f 6e20 616e 6420 7573 6520 aration and use \n-00135bf0: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the soap context\n-00135c60: 2074 6861 7420 6973 2063 7573 746f 6d69 that is customi\n-00135c70: 7a65 6420 6279 2074 6865 7365 2066 6c61 zed by these fla\n-00135c80: 6773 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 gs.
    ..... Back to table \n-00135cb0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-00135cc0: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

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

    .

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

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

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

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

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

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

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

    In\n-0013a7c0: 2061 6464 6974 696f 6e20 746f 2074 6865 addition to the\n-0013a7d0: 2063 6f6e 7465 7874 206d 6f64 6520 666c context mode fl\n-0013a7e0: 6167 732c 2074 6865 2066 6f6c 6c6f 7769 ags, the followi\n-0013a7f0: 6e67 2063 6f6e 7465 7874 2066 6c61 6773 ng context flags\n-0013a800: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n-0013a810: 7365 7420 3c63 6f64 653e 7365 7473 6f63 set setsoc\n-0013a820: 6b6f 7074 3c2f 636f 6465 3e20 6c65 7665 kopt leve\n-0013a830: 6c20 3c63 6f64 653e 534f 4c5f 534f 434b l SOL_SOCK\n-0013a840: 4554 3c2f 636f 6465 3e20 6f70 7469 6f6e ET option\n-0013a850: 7320 7768 656e 2073 6f63 6b65 7473 2061 s when sockets a\n-0013a860: 7265 2063 7265 6174 6564 2c20 7468 6f75 re created, thou\n-0013a870: 6768 2073 6f6d 6520 6f70 7469 6f6e 7320 gh some options \n-0013a880: 6d61 7920 6e6f 7420 6265 2061 7070 6c69 may not be appli\n-0013a890: 6361 626c 6520 746f 2079 6f75 7220 6f70 cable to your op\n-0013a8a0: 6572 6174 696e 6720 7379 7374 656d 3a3c erating system:<\n-0013a8b0: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>..\n-0013a8f0: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b .\n-0013a960: 7265 7375 6c74 2020 2020 3c2f 7468 3e3c result <\n-0013a970: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.........\n-0013b0f0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-0013b110: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..\n-0013b290: 3c74 7220 636c 6173 733d 226d 6172 6b64 ......<\n-0013b870: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-0013b880: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-0013b890: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-0013ba30: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-0013bb50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013bb60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013bb70: 3e65 6e61 626c 6573 206c 6f63 616c 2061 >enables local a\n-0013bb80: 6464 7265 7373 2072 6575 7365 2069 6d6d ddress reuse imm\n-0013bb90: 6564 6961 7465 6c79 2c20 7573 6520 7769 ediately, use wi\n-0013bba0: 7468 2063 6175 7469 6f6e 2020 2020 3c2f th caution ...
    context flag \n-0013a920: 7769 7468 2073 6574 736f 636b 6f70 7420 with setsockopt \n-0013a930: 6f70 7469 6f6e 2020 203c 2f74 683e 3c74 option
    soap::conn\n-0013aa80: 6563 745f 666c 6167 733c 2f61 3e3c 2f63 ect_flags = SO_\n-0013aaa0: 4e4f 5349 4750 4950 453c 2f63 6f64 653e NOSIGPIPE\n-0013aab0: 2020 203c 2f74 643e 3c74 6420 636c 6173 disabl\n-0013aae0: 6573 2053 4947 5049 5045 2020 2020 3c2f es SIGPIPE
    soap:\n-0013ac00: 3a63 6f6e 6e65 6374 5f66 6c61 6773 3c2f :connect_flags = SO_DEBUG turns\n-0013ac60: 206f 6e20 7265 636f 7264 696e 6720 6f66 on recording of\n-0013ac70: 2064 6562 7567 6769 6e67 2069 6e66 6f72 debugging infor\n-0013ac80: 6d61 7469 6f6e 2069 6e20 7468 6520 756e mation in the un\n-0013ac90: 6465 726c 7969 6e67 2070 726f 746f 636f derlying protoco\n-0013aca0: 6c20 6d6f 6475 6c65 7320 2020 203c 2f74 l modules
    soap::c\n-0013adc0: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n-0013add0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n-0013ade0: 534f 5f42 524f 4144 4341 5354 3c2f 636f SO_BROADCAST per\n-0013ae20: 6d69 7473 2073 656e 6469 6e67 206f 6620 mits sending of \n-0013ae30: 6272 6f61 6463 6173 7420 6d65 7373 6167 broadcast messag\n-0013ae40: 6573 2c20 666f 7220 6578 616d 706c 6520 es, for example \n-0013ae50: 7769 7468 2055 4450 2c20 7768 656e 2070 with UDP, when p\n-0013ae60: 6572 6d69 7474 6564 2020 2020 3c2f 7464 ermitted
    soap::c\n-0013af80: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n-0013af90: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n-0013afa0: 534f 5f4c 494e 4745 523c 2f63 6f64 653e SO_LINGER\n-0013afb0: 2020 203c 2f74 643e 3c74 6420 636c 6173 sets c\n-0013afe0: 6c69 656e 742d 7369 6465 206c 696e 6765 lient-side linge\n-0013aff0: 7220 7469 6d65 2074 6f20 7468 6520 7661 r time to the va\n-0013b000: 6c75 6520 6f66 203c 636f 6465 3e3c 6120 lue of soap::linge\n-0013b0d0: 725f 7469 6d65 3c2f 613e 3c2f 636f 6465 r_time
    soap::connect_f\n-0013b200: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n-0013b210: 3d20 3c63 6f64 653e 534f 5f44 4f4e 5452 = SO_DONTR\n-0013b220: 4f55 5445 3c2f 636f 6465 3e20 2020 3c2f OUTE enables rou\n-0013b260: 7469 6e67 2062 7970 6173 7320 666f 7220 ting bypass for \n-0013b270: 6f75 7467 6f69 6e67 206d 6573 7361 6765 outgoing message\n-0013b280: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    soap::accept_f\n-0013b3a0: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n-0013b3b0: 3d20 3c63 6f64 653e 534f 5f4e 4f53 4947 = SO_NOSIG\n-0013b3c0: 5049 5045 3c2f 636f 6465 3e20 2020 3c2f PIPE disables SI\n-0013b400: 4750 4950 4520 2863 6865 636b 2079 6f75 GPIPE (check you\n-0013b410: 7220 4f53 2c20 7468 6973 2069 7320 6e6f r OS, this is no\n-0013b420: 7420 706f 7274 6162 6c65 2920 2020 203c t portable) <\n-0013b430: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    soap:\n-0013b540: 3a61 6363 6570 745f 666c 6167 733c 2f61 :accept_flags = SO_DEBUG\n-0013b570: 2020 203c 2f74 643e 3c74 6420 636c 6173 turns \n-0013b5a0: 6f6e 2072 6563 6f72 6469 6e67 206f 6620 on recording of \n-0013b5b0: 6465 6275 6767 696e 6720 696e 666f 726d debugging inform\n-0013b5c0: 6174 696f 6e20 696e 2074 6865 2075 6e64 ation in the und\n-0013b5d0: 6572 6c79 696e 6720 7072 6f74 6f63 6f6c erlying protocol\n-0013b5e0: 206d 6f64 756c 6573 2020 2020 3c2f 7464 modules
    soap::a\n-0013b700: 6363 6570 745f 666c 6167 733c 2f61 3e3c ccept_flags<\n-0013b710: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S\n-0013b720: 4f5f 4c49 4e47 4552 3c2f 636f 6465 3e20 O_LINGER \n-0013b730: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 sets se\n-0013b760: 7276 6572 2d73 6964 6520 6c69 6e67 6572 rver-side linger\n-0013b770: 2074 696d 6520 746f 2074 6865 2076 616c time to the val\n-0013b780: 7565 206f 6620 3c63 6f64 653e 3c61 2063 ue of soap::linger\n-0013b850: 5f74 696d 653c 2f61 3e3c 2f63 6f64 653e _time\n-0013b860: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    \n-0013b970: 736f 6170 3a3a 6163 6365 7074 5f66 6c61 soap::accept_fla\n-0013b980: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n-0013b990: 3c63 6f64 653e 534f 5f44 4f4e 5452 4f55 SO_DONTROU\n-0013b9a0: 5445 3c2f 636f 6465 3e20 2020 3c2f 7464 TE enables routi\n-0013b9e0: 6e67 2062 7970 6173 7320 666f 7220 6f75 ng bypass for ou\n-0013b9f0: 7467 6f69 6e67 206d 6573 7361 6765 7320 tgoing messages \n-0013ba00: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    \n-0013bb10: 736f 6170 3a3a 6269 6e64 5f66 6c61 6773 soap::bind_flags\n-0013bb20: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = SO_REUSEADDR\n-0013bb40: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    soap::\n-0013bcc0: 6269 6e64 5f66 6c61 6773 3c2f 613e 3c2f bind_flags = SO\n-0013bce0: 5f52 4555 5345 504f 5254 3c2f 636f 6465 _REUSEPORT enabl\n-0013bd20: 6573 2064 7570 6c69 6361 7465 2061 6464 es duplicate add\n-0013bd30: 7265 7373 2061 6e64 2070 6f72 7420 6269 ress and port bi\n-0013bd40: 6e64 696e 6773 2020 203c 2f74 643e 3c2f ndings
    .

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

    .

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

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

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

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

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

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

    .
    Class::Class(\n-00149c50: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    so\n-00149cb0: 6170 3c2f 613e 203d 204e 554c 4c3b 3c2f ap = NULL;.
    name = \n-00149ce0: 4e55 4c4c 3b3c 2f64 6976 3e0a 3c64 6976 NULL;
    .} \n-00149d00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Class::\n-00149d20: 7e43 6c61 7373 2829 203c 2f64 6976 3e0a ~Class()
    .\n+0011fe10: 3e20 2020 2066 636c 6f73 6528 6664 293b > fclose(fd);\n+0011fe20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    im\n+0011fe40: 6167 652e 5f5f 7369 7a65 203d 2069 3b20 age.__size = i; \n+0011fe50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    image.ty\n+0011fe90: 7065 203d 203c 7370 616e 2063 6c61 7373 pe = "image/jpe\n+0011fec0: 6726 7175 6f74 3b3c 2f73 7061 6e3e 3b20 g"; \n+0011fed0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // MIME ty\n+0011fef0: 7065 203c 2f73 7061 6e3e 3c2f 6469 763e pe
    \n+0011ff00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.optio\n+0011ff20: 6e73 203d 203c 7370 616e 2063 6c61 7373 ns = "This is m\n+0011ff50: 7920 7069 6374 7572 6526 7175 6f74 3b3c y picture"<\n+0011ff60: 2f73 7061 6e3e 3b20 3c73 7061 6e20 636c /span>; //\n+0011ff80: 2064 6573 6372 6970 7469 6f6e 206f 6620 description of \n+0011ff90: 6f62 6a65 6374 203c 2f73 7061 6e3e 3c2f object .
    if (so\n+0011ffe0: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n+0011fff0: 6574 686f 6428 2661 6d70 3b3c 6120 636c ethod(&soap, ...)\n+00120030: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    ..\n+00120050: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // error\n+00120070: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00120090: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+001200b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001200d0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+001200f0: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n+00120100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+00120120: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    void *mime_read_op\n+00120180: 656e 283c 7370 616e 2063 6c61 7373 3d22 en(struct<\n+001201a0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001201d0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+00120200: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, void *\n+00120230: 6861 6e64 6c65 2c20 3c73 7061 6e20 636c handle, co\n+00120250: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+00120280: 202a 3c73 7061 6e20 636c 6173 733d 226b *id, con\n+001202c0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001202f0: 2a74 7970 652c 203c 7370 616e 2063 6c61 *type, con\n+00120310: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00120340: 2a64 6573 6372 6970 7469 6f6e 2920 3c2f *description) .
    {
    .<\n+00120370: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120380: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+001203a0: 7572 6e3c 2f73 7061 6e3e 2068 616e 646c urn handl\n+001203b0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    } .
    .<\n+001203f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120400: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n+00120420: 2f73 7061 6e3e 206d 696d 655f 7265 6164 /span> mime_read\n+00120430: 5f63 6c6f 7365 283c 7370 616e 2063 6c61 _close(str\n+00120450: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle) .
    {
    . \n+00120520: 2066 636c 6f73 6528 2846 494c 452a 2968 fclose((FILE*)h\n+00120530: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .<\n+00120540: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120550: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    \n+001205a0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6d69 size_t mi\n+001205b0: 6d65 5f72 6561 6428 3c73 7061 6e20 636c me_read(st\n+001205d0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, void *handle, char *buf, size_t\n+001206c0: 206c 656e 2920 3c2f 6469 763e 0a3c 6469 len)
    .{\n+001206e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return fread(buf, 1,\n+00120730: 206c 656e 2c20 2846 494c 452a 2968 616e len, (FILE*)han\n+00120740: 646c 6529 3b20 3c2f 6469 763e 0a3c 6469 dle);
    .}\n+00120760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .<\n+001208b0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001208c0: 223e 4361 6c6c 6261 636b 2074 6f20 6f70 \">Callback to op\n+001208d0: 656e 2061 2073 7472 6561 6d69 6e67 204d en a streaming M\n+001208e0: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm\n+001208f0: 656e 7420 666f 7220 7265 6164 696e 672e ent for reading.\n+00120900: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    .
    v\n+00120a30: 6f69 6428 2a20 666d 696d 6572 6561 6463 oid(* fmimereadc\n+00120a40: 6c6f 7365 2928 7374 7275 6374 2073 6f61 lose)(struct soa\n+00120a50: 7020 2a73 6f61 702c 2076 6f69 6420 2a68 p *soap, void *h\n+00120a60: 616e 646c 6529 3c2f 6469 763e 3c64 6976 andle)
    C\n+00120a80: 616c 6c62 6163 6b20 746f 2063 6c6f 7365 allback to close\n+00120a90: 2061 204d 494d 452f 4d54 4f4d 2061 7474 a MIME/MTOM att\n+00120aa0: 6163 686d 656e 7420 7374 7265 616d 2061 achment stream a\n+00120ab0: 6674 6572 2072 6561 6469 6e67 2e3c 2f64 fter reading.
    Definit\n+00120ae0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00120af0: 322e 683a 3439 3239 3c2f 6469 763e 3c2f 2.h:4929
    .
    \n+00120b70: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap::\n+00120bc0: 666d 696d 6572 6561 643c 2f61 3e3c 2f64 fmimeread
    size_t(* \n+00120bf0: 666d 696d 6572 6561 6429 2873 7472 7563 fmimeread)(struc\n+00120c00: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n+00120c10: 6964 202a 6861 6e64 6c65 2c20 6368 6172 id *handle, char\n+00120c20: 202a 6275 662c 2073 697a 655f 7420 6c65 *buf, size_t le\n+00120c30: 6e29 3c2f 6469 763e 3c64 6976 2063 6c61 n)
    Callb\n+00120c50: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data\n+00120c60: 2069 6e20 6120 4d49 4d45 2f4d 544f 4d20 in a MIME/MTOM \n+00120c70: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n+00120c80: 6d2e 3c2f 6469 763e 3c64 6976 2063 6c61 m.
    De\n+00120ca0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00120cb0: 6473 6f61 7032 2e68 3a34 3931 343c 2f64 dsoap2.h:4914
    .
    \n+00120cd0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Message\n+001229f0: 2063 6f6d 7072 6573 7369 6f6e 2077 6974 compression wit\n+00122a00: 6820 3c63 6f64 653e 2353 4f41 505f 454e h #SOAP_EN\n+00122a10: 435f 5a4c 4942 3c2f 636f 6465 3e20 6361 C_ZLIB ca\n+00122a20: 6e20 6265 2075 7365 6420 7769 7468 204d n be used with M\n+00122a30: 494d 4520 746f 2063 6f6d 7072 6573 7320 IME to compress \n+00122a40: 7468 6520 656e 7469 7265 206d 6573 7361 the entire messa\n+00122a50: 6765 2e20 486f 7765 7665 722c 2063 6f6d ge. However, com\n+00122a60: 7072 6573 7369 6f6e 2072 6571 7569 7265 pression require\n+00122a70: 7320 6275 6666 6572 696e 6720 746f 2064 s buffering to d\n+00122a80: 6574 6572 6d69 6e65 2074 6865 2048 5454 etermine the HTT\n+00122a90: 5020 636f 6e74 656e 7420 6c65 6e67 7468 P content length\n+00122aa0: 2068 6561 6465 722c 2077 6869 6368 2063 header, which c\n+00122ab0: 616e 6365 6c73 2074 6865 2062 656e 6566 ancels the benef\n+00122ac0: 6974 7320 6f66 2073 7472 6561 6d69 6e67 its of streaming\n+00122ad0: 204d 494d 452e 2054 6f20 6176 6f69 6420 MIME. To avoid \n+00122ae0: 7468 6973 2c20 796f 7520 7368 6f75 6c64 this, you should\n+00122af0: 2075 7365 2063 6875 6e6b 6564 2048 5454 use chunked HTT\n+00122b00: 5020 2877 6974 6820 7468 6520 6f75 7470 P (with the outp\n+00122b10: 7574 2d6d 6f64 6520 3c63 6f64 653e 2353 ut-mode #S\n+00122b20: 4f41 505f 494f 5f43 4855 4e4b 3c2f 636f OAP_IO_CHUNK flag) with c\n+00122b40: 6f6d 7072 6573 7369 6f6e 2061 6e64 2073 ompression and s\n+00122b50: 7472 6561 6d69 6e67 204d 494d 452e 2041 treaming MIME. A\n+00122b60: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid\n+00122b70: 652c 2077 6865 6e20 796f 7520 7365 7420 e, when you set \n+00122b80: 3c63 6f64 653e 2353 4f41 505f 494f 5f43 #SOAP_IO_C\n+00122b90: 4855 4e4b 3c2f 636f 6465 3e20 6265 666f HUNK befo\n+00122ba0: 7265 2063 616c 6c69 6e67 203c 636f 6465 re calling \n+00122c20: 736f 6170 5f73 6572 7665 3c2f 613e 3c2f soap_serve, the engin\n+00122c40: 6520 7769 6c6c 2061 7574 6f6d 6174 6963 e will automatic\n+00122c50: 616c 6c79 2072 6576 6572 7420 746f 2062 ally revert to b\n+00122c60: 7566 6665 7269 6e67 2028 3c63 6f64 653e uffering (\n+00122c70: 2353 4f41 505f 494f 5f53 544f 5245 3c2f #SOAP_IO_STORE flag is se\n+00122c90: 7429 2e20 596f 7520 6361 6e20 6368 6563 t). You can chec\n+00122ca0: 6b20 7468 6973 2066 6c61 6720 7769 7468 k this flag with\n+00122cb0: 203c 636f 6465 3e28 736f 6170 2d26 6774 (soap->\n+00122cc0: 3b6f 6d6f 6465 2026 616d 703b 2053 4f41 ;omode & SOA\n+00122cd0: 505f 494f 2920 3d3d 2053 4f41 505f 494f P_IO) == SOAP_IO\n+00122ce0: 5f43 4855 4e4b 3c2f 636f 6465 3e20 746f _CHUNK to\n+00122cf0: 2073 6565 2069 6620 7468 6520 636c 6965 see if the clie\n+00122d00: 6e74 2061 6363 6570 7473 2063 6875 6e6b nt accepts chunk\n+00122d10: 696e 672e 204d 6f72 6520 696e 666f 726d ing. More inform\n+00122d20: 6174 696f 6e20 6162 6f75 7420 7374 7265 ation about stre\n+00122d30: 616d 696e 6720 6368 756e 6b65 6420 4d49 aming chunked MI\n+00122d40: 4d45 2063 616e 2062 6520 666f 756e 6420 ME can be found \n+00122d50: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Streamin\n+00122d90: 6720 6368 756e 6b65 6420 4d49 4d45 2f4d g chunked MIME/M\n+00122da0: 544f 4d3c 2f61 3e20 2e2e 3c2f 703e 0a3c TOM ..

    .<\n+00122db0: 703e 4e6f 7465 2074 6861 7420 7468 6520 p>Note that the \n+00122dc0: 6578 616d 706c 6520 6162 6f76 6520 666f example above fo\n+00122dd0: 7220 3c63 6f64 653e 6d69 6d65 5f72 6561 r mime_rea\n+00122de0: 643c 2f63 6f64 653e 2075 7365 7320 6120 d uses a \n+00122df0: 6861 6e64 6c65 2074 6861 7420 706f 696e handle that poin\n+00122e00: 7473 2074 6f20 7468 6520 6f70 656e 2066 ts to the open f\n+00122e10: 696c 6520 3c63 6f64 653e 4649 4c45 2a3c ile FILE*<\n+00122e20: 2f63 6f64 653e 2e20 5468 6520 7369 6d70 /code>. The simp\n+00122e30: 6c65 2065 7861 6d70 6c65 2061 626f 7665 le example above\n+00122e40: 2069 7320 6e6f 7420 7265 636f 6d6d 656e is not recommen\n+00122e50: 6465 6420 7768 656e 2074 6865 2070 6c61 ded when the pla\n+00122e60: 7466 6f72 6d20 696d 706f 7365 7320 6120 tform imposes a \n+00122e70: 6c69 6d69 7420 6f6e 2074 6865 206e 756d limit on the num\n+00122e80: 6265 7220 6f66 206f 7065 6e20 6669 6c65 ber of open file\n+00122e90: 2064 6573 6372 6970 746f 7273 2e20 596f descriptors. Yo\n+00122ea0: 7520 6361 6e20 7573 6520 7468 6520 6861 u can use the ha\n+00122eb0: 6e64 6c65 2074 6f20 7061 7373 2061 6c6f ndle to pass alo\n+00122ec0: 6e67 206d 6f72 6520 696e 666f 726d 6174 ng more informat\n+00122ed0: 696f 6e20 7468 616e 206a 7573 7420 7468 ion than just th\n+00122ee0: 6520 6669 6c65 2064 6573 6372 6970 746f e file descripto\n+00122ef0: 722e 2053 6f20 666f 7220 6578 616d 706c r. So for exampl\n+00122f00: 652c 2077 6865 6e20 7468 6520 6e75 6d62 e, when the numb\n+00122f10: 6572 206f 6620 6f70 656e 2066 696c 6520 er of open file \n+00122f20: 6465 7363 7269 7074 6f72 7320 6973 206c descriptors is l\n+00122f30: 696d 6974 6564 206f 6e20 796f 7572 2070 imited on your p\n+00122f40: 6c61 7466 6f72 6d2c 2079 6f75 2073 686f latform, you sho\n+00122f50: 756c 6420 6c65 7420 7468 6520 6861 6e64 uld let the hand\n+00122f60: 6c65 2070 6f69 6e74 2074 6f20 6120 7374 le point to a st\n+00122f70: 7275 6374 7572 6520 7769 7468 2066 696c ructure with fil\n+00122f80: 652d 7265 6c61 7465 6420 696e 666f 726d e-related inform\n+00122f90: 6174 696f 6e2e 2054 6865 2043 2b2b 2065 ation. The C++ e\n+00122fa0: 7861 6d70 6c65 2062 656c 6f77 2069 6c6c xample below ill\n+00122fb0: 7573 7472 6174 6573 2074 6869 733a 3c2f ustrates this:.
    file.\n+00122ff0: 786f 705f 5f49 6e63 6c75 6465 203d 2073 xop__Include = s\n+00123000: 6f61 705f 6e65 775f 5f78 6f70 5f5f 496e oap_new__xop__In\n+00123010: 636c 7564 6528 3c61 2063 6c61 7373 3d22 clude(soa\n+00123040: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n+00123050: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00123060: 3e66 696c 652e 786f 705f 5f49 6e63 6c75 >file.xop__Inclu\n+00123070: 6465 2d26 6774 3b69 6420 3d20 4e55 4c4c de->id = NULL\n+00123080: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    file.\n+001230a0: 786f 705f 5f49 6e63 6c75 6465 2d26 6774 xop__Include->\n+001230b0: 3b74 7970 6520 3d20 7479 7065 3b20 3c2f ;type = type; .
    file.xop_\n+001230e0: 5f49 6e63 6c75 6465 2d26 6774 3b6f 7074 _Include->opt\n+001230f0: 696f 6e73 203d 204e 554c 4c3b 203c 2f64 ions = NULL; .
    .\n+00123130: 6669 6c65 2e78 6d69 6d65 355f 5f63 6f6e file.xmime5__con\n+00123140: 7465 6e74 5479 7065 203d 2074 7970 653b tentType = type;\n+00123150: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    file.f\n+00123170: 696c 656e 616d 6520 3d20 6669 6c65 6e61 ilename = filena\n+00123180: 6d65 3b20 3c2f 6469 763e 0a3c 6469 7620 me;
    .
    .
    // \n+001231d0: 5468 6520 6f62 6a65 6374 2068 6f6c 6469 The object holdi\n+001231e0: 6e67 2061 6c6c 2069 6e66 6f72 6d61 7469 ng all informati\n+001231f0: 6f6e 2074 6f20 7265 6164 2064 6174 6120 on to read data \n+00123200: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00123220: 4669 6c65 5374 7265 616d 496e 202a 696e FileStreamIn *in\n+00123230: 7320 3d20 3c73 7061 6e20 636c 6173 733d s = new FileStreamI\n+00123260: 6e28 6572 726f 7268 616e 646c 6572 293b n(errorhandler);\n+00123270: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ins-&g\n+00123290: 743b 7365 7446 696c 6550 6174 6828 3c61 t;setFilePath(path)\n+001232f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    ins-&\n+00123310: 6774 3b73 6574 4669 6c65 4e61 6d65 2866 gt;setFileName(f\n+00123320: 696c 656e 616d 6529 3b20 3c2f 6469 763e ilename);
    \n+00123330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    fil\n+00123360: 652e 786f 705f 5f49 6e63 6c75 6465 2d26 e.xop__Include-&\n+00123370: 6774 3b5f 5f73 697a 6520 3d20 7369 7a65 gt;__size = size\n+00123380: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    file.\n+001233a0: 786f 705f 5f49 6e63 6c75 6465 2d26 6774 xop__Include->\n+001233b0: 3b5f 5f70 7472 203d 2028 3c73 7061 6e20 ;__ptr = (unsigned ch\n+00123400: 6172 3c2f 7370 616e 3e2a 2969 6e73 3b3c ar*)ins;<\n+00123410: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00123460: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00123470: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+001234b0: 6f61 703a 3a70 6174 683c 2f61 3e3c 2f64 oap::path
    char path\n+001234e0: 5b53 4f41 505f 5441 474c 454e 5d3c 2f64 [SOAP_TAGLEN]
    The client\n+00123510: 2072 6571 7565 7374 2070 6174 6820 6173 request path as\n+00123520: 2072 6563 6569 7665 6420 6f6e 2074 6865 received on the\n+00123530: 2073 6572 7665 7220 7369 6465 2e3c 2f64 server side.
    Definit\n+00123560: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00123570: 322e 683a 3430 3332 3c2f 6469 763e 3c2f 2.h:4032
    .

    T\n+001235a0: 6f20 7265 6164 2074 6865 204d 544f 4d20 o read the MTOM \n+001235b0: 6461 7461 2066 6f72 2074 7261 6e73 6d69 data for transmi\n+001235c0: 7373 696f 6e3a 3c2f 703e 0a3c 6469 7620 ssion:

    .
    voi\n+00123610: 643c 2f73 7061 6e3e 202a 6d69 6d65 5f72 d *mime_r\n+00123620: 6561 645f 6f70 656e 283c 7370 616e 2063 ead_open(s\n+00123640: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+001236b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001236c0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *handle, const\n+00123700: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+00123720: 2f73 7061 6e3e 202a 3c73 7061 6e20 636c /span> *id, const \n+00123770: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *type, const \n+001237c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *descripti\n+001237f0: 6f6e 2920 3c2f 6469 763e 0a3c 6469 7620 on)
    .
    {.
    if (!h\n+00123850: 616e 646c 6529 203c 2f64 6976 3e0a 3c64 andle)
    .\n+00123870: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n+00123890: 7475 726e 3c2f 7370 616e 3e20 4e55 4c4c turn NULL\n+001238a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    Fil\n+001238c0: 6553 7472 6561 6d49 6e20 2a69 6e73 203d eStreamIn *ins =\n+001238d0: 2028 4669 6c65 5374 7265 616d 496e 2a29 (FileStreamIn*)\n+001238e0: 6861 6e64 6c65 3b20 3c2f 6469 763e 0a3c handle;
    .<\n+001238f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00123900: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00123920: 2f73 7061 6e3e 2028 2169 6e73 2d26 6774 /span> (!ins->\n+00123930: 3b6f 7065 6e28 2929 203c 2f64 6976 3e0a ;open())
    .\n+00123940: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+00123970: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->e\n+001239f0: 7272 6f72 3c2f 613e 203d 203c 6120 636c rror = S\n+00123a50: 4f41 505f 4552 523c 2f61 3e3b 203c 2f64 OAP_ERR; .
    return NULL;
    .<\n+00123ab0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00123ac0: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n+00123ae0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+00123b00: 3c2f 7370 616e 3e20 6861 6e64 6c65 3b20 handle; \n+00123b10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    vo\n+00123b60: 6964 3c2f 7370 616e 3e20 6d69 6d65 5f72 id mime_r\n+00123b70: 6561 645f 636c 6f73 6528 3c73 7061 6e20 ead_close(\n+00123b90: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00123bd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00123be0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00123bf0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00123c00: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle) <\n+00123c30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+00123c50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n+00123c80: 3c2f 7370 616e 3e20 2821 6861 6e64 6c65 (!handle\n+00123c90: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    <\n+00123cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00123cc0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00123cd0: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n+00123ce0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00123cf0: 3e20 2046 696c 6553 7472 6561 6d49 6e20 > FileStreamIn \n+00123d00: 2a69 6e73 203d 2028 4669 6c65 5374 7265 *ins = (FileStre\n+00123d10: 616d 496e 2a29 6861 6e64 6c65 3b20 3c2f amIn*)handle; .
    d\n+00123d50: 656c 6574 653c 2f73 7061 6e3e 2069 6e73 elete ins\n+00123d60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    \n+00123db0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6d69 size_t mi\n+00123dc0: 6d65 5f72 6561 6428 3c73 7061 6e20 636c me_read(st\n+00123de0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, void *handle, char *buf\n+00123ef0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n+00123f10: 7369 7a65 5f74 3c2f 7370 616e 3e20 6c65 size_t le\n+00123f20: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {.
    if (!ha\n+00123f80: 6e64 6c65 2920 3c2f 6469 763e 0a3c 6469 ndle)
    . \n+00123fa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n+00123fc0: 7572 6e3c 2f73 7061 6e3e 2030 3b20 3c2f urn 0; .
    FileStr\n+00123ff0: 6561 6d49 6e20 2a69 6e73 203d 2028 4669 eamIn *ins = (Fi\n+00124000: 6c65 5374 7265 616d 496e 2a29 6861 6e64 leStreamIn*)hand\n+00124010: 6c65 3b20 3c2f 6469 763e 0a3c 6469 7620 le;
    .
    <\n+00124030: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00124040: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+00124050: 2f73 7061 6e3e 206e 7265 6164 203d 2069 /span> nread = i\n+00124060: 6e73 2d26 6774 3b72 6561 6428 3c61 2063 ns->read(buf, le\n+001240c0: 6e29 3b20 3c2f 6469 763e 0a3c 6469 7620 n);
    .
    <\n+001240e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001240f0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (ins->stre\n+00124110: 616d 4572 726f 7228 2929 203c 2f64 6976 amError()) .
    {
    .\n+00124150: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap<\n+00124180: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error = ins\n+001241e0: 2d26 6774 3b73 7472 6561 6d45 7272 6f72 ->streamError\n+001241f0: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    \n+00124210: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00124230: 6e3c 2f73 7061 6e3e 2030 3b20 3c2f 6469 n 0; .
    }
    .\n+00124260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n+00124290: 7475 726e 3c2f 7370 616e 3e20 6e72 6561 turn nrea\n+001242a0: 643b 203c 2f64 6976 3e0a 3c64 6976 2063 d;
    .
    }.
    SOAP_ERR<\n+00124380: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    #define\n+001243a0: 2053 4f41 505f 4552 523c 2f64 6976 3e3c SOAP_ERR
    <\n+001243b0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001243c0: 223e 4120 736f 6170 5f73 7461 7475 7320 \">A soap_status \n+001243d0: 6572 726f 7220 636f 6465 3a20 616e 2075 error code: an u\n+001243e0: 6e73 7065 6369 6669 6564 2065 7272 6f72 nspecified error\n+001243f0: 206f 6363 7572 7265 642e 3c2f 6469 763e occurred.
    \n+00124400: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+00124420: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+00124430: 3a32 3337 343c 2f64 6976 3e3c 2f64 6976 :2374
    .

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

    .<\n+00124490: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>\n+001244c0: 0a52 6564 6972 6563 7469 6e67 2069 6e62 .Redirecting inb\n+001244d0: 6f75 6e64 204d 494d 452f 4d54 4f4d 2073 ound MIME/MTOM s\n+001244e0: 7472 6561 6d73 2062 6173 6564 206f 6e20 treams based on \n+001244f0: 534f 4150 2062 6f64 7920 636f 6e74 656e SOAP body conten\n+00124500: 743c 2f68 323e 0a3c 703e 5768 656e 2069 t.

    When i\n+00124510: 7420 6973 2070 7265 6665 7261 626c 6520 t is preferable \n+00124520: 6f72 2072 6571 7569 7265 6420 746f 2072 or required to r\n+00124530: 6564 6972 6563 7420 696e 626f 756e 6420 edirect inbound \n+00124540: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n+00124550: 6d65 6e74 2073 7472 6561 6d73 2062 6173 ment streams bas\n+00124560: 6564 206f 6e20 534f 4150 206d 6573 7361 ed on SOAP messa\n+00124570: 6765 2062 6f64 7920 636f 6e74 656e 742c ge body content,\n+00124580: 2077 6865 7265 2066 6f72 2065 7861 6d70 where for examp\n+00124590: 6c65 2074 6865 206e 616d 6573 206f 6620 le the names of \n+001245a0: 7468 6520 7265 736f 7572 6365 7320 6172 the resources ar\n+001245b0: 6520 6c69 7374 6564 2069 6e20 7468 6520 e listed in the \n+001245c0: 534f 4150 206d 6573 7361 6765 2062 6f64 SOAP message bod\n+001245d0: 792c 2061 6e20 616c 7465 726e 6174 6976 y, an alternativ\n+001245e0: 6520 6d65 6368 616e 6973 6d20 6d75 7374 e mechanism must\n+001245f0: 2062 6520 7573 6564 2074 6f20 6861 6e64 be used to hand\n+00124600: 6c65 2074 6865 2061 7474 6163 686d 656e le the attachmen\n+00124610: 7473 2e20 5468 6973 206d 6563 6861 6e69 ts. This mechani\n+00124620: 736d 2063 616e 2062 6520 7573 6564 2061 sm can be used a\n+00124630: 7420 7468 6520 636c 6965 6e74 2061 6e64 t the client and\n+00124640: 2073 6572 7665 7220 7369 6465 2e3c 2f70 server side..

    Because the\n+00124660: 2072 6f75 7469 6e67 206f 6620 7468 6520 routing of the \n+00124670: 7374 7265 616d 7320 6973 2061 6363 6f6d streams is accom\n+00124680: 706c 6973 6865 6420 7769 7468 2065 7870 plished with exp\n+00124690: 6c69 6369 7420 6675 6e63 7469 6f6e 2063 licit function c\n+001246a0: 616c 6c73 2c20 7468 6973 206d 6574 686f alls, this metho\n+001246b0: 6420 7368 6f75 6c64 206f 6e6c 7920 6265 d should only be\n+001246c0: 2075 7365 6420 7768 656e 2072 6571 7569 used when requi\n+001246d0: 7265 6420 616e 6420 7368 6f75 6c64 206e red and should n\n+001246e0: 6f74 2062 6520 636f 6e73 6964 6572 6564 ot be considered\n+001246f0: 206f 7074 696f 6e61 6c2e 2054 6861 7420 optional. That \n+00124700: 6973 2c20 7768 656e 2079 6f75 2065 6e61 is, when you ena\n+00124710: 626c 6520 7468 6973 206d 6574 686f 642c ble this method,\n+00124720: 2079 6f75 206d 7573 7420 6368 6563 6b20 you must check \n+00124730: 666f 7220 7065 6e64 696e 6720 4d49 4d45 for pending MIME\n+00124740: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment\n+00124750: 7320 616e 6420 6861 6e64 6c65 2074 6865 s and handle the\n+00124760: 6d20 6170 7072 6f70 7269 6174 656c 792e m appropriately.\n+00124770: 2054 6869 7320 6973 2074 7275 6520 6576 This is true ev\n+00124780: 656e 2077 6865 6e20 796f 7520 646f 6e27 en when you don'\n+00124790: 7420 6578 7065 6374 204d 494d 452f 4d54 t expect MIME/MT\n+001247a0: 4f4d 2061 7474 6163 686d 656e 7473 2069 OM attachments i\n+001247b0: 6e20 7468 6520 7061 796c 6f61 642c 2062 n the payload, b\n+001247c0: 6563 6175 7365 2074 6865 2070 6565 7220 ecause the peer \n+001247d0: 6d61 7920 7472 6963 6b20 796f 7520 6279 may trick you by\n+001247e0: 2073 656e 6469 6e67 2061 7474 6163 686d sending attachm\n+001247f0: 656e 7473 2061 6e79 7761 7920 616e 6420 ents anyway and \n+00124800: 796f 7520 7368 6f75 6c64 2062 6520 7072 you should be pr\n+00124810: 6570 6172 6564 2074 6f20 6163 6365 7074 epared to accept\n+00124820: 206f 7220 7265 6a65 6374 2074 6865 6d2e or reject them.\n+00124830: 3c2f 703e 0a3c 703e 5468 6520 6578 706c

    .

    The expl\n+00124840: 6963 6974 204d 494d 452f 4d54 4f4d 2073 icit MIME/MTOM s\n+00124850: 7472 6561 6d69 6e67 206d 6563 6861 6e69 treaming mechani\n+00124860: 736d 2063 6f6e 7369 7374 7320 6f66 2074 sm consists of t\n+00124870: 6872 6565 2041 5049 2066 756e 6374 696f hree API functio\n+00124880: 6e73 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 ns:

    .
      .void soap_post_c\n+00124930: 6865 636b 5f6d 696d 655f 6174 7461 6368 heck_mime_attach\n+00124940: 6d65 6e74 7328 7374 7275 6374 2073 6f61 ments(struct soa\n+00124950: 7020 2a73 6f61 7029 3c2f 613e 3c2f 636f p *soap) This functio\n+00124970: 6e20 656e 6162 6c65 7320 706f 7374 2d70 n enables post-p\n+00124980: 726f 6365 7373 696e 6720 6f66 204d 494d rocessing of MIM\n+00124990: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n+001249a0: 7473 2072 6563 6569 7665 642e 2054 6869 ts received. Thi\n+001249b0: 7320 6d65 616e 7320 7468 6174 2074 6865 s means that the\n+001249c0: 2070 7265 7365 6e63 6520 6f66 204d 494d presence of MIM\n+001249d0: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n+001249e0: 7473 206d 7573 7420 6265 2065 7870 6c69 ts must be expli\n+001249f0: 6369 746c 7920 6368 6563 6b65 6420 6279 citly checked by\n+00124a00: 2063 616c 6c69 6e67 203c 636f 6465 3e3c calling <\n+00124a10: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00124a20: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00124a30: 5f6d 696d 652e 6874 6d6c 2367 6166 3263 _mime.html#gaf2c\n+00124a40: 6236 3631 6133 3166 3063 6334 3331 6133 b661a31f0cc431a3\n+00124a50: 3733 3831 3235 6464 6564 6238 6622 2074 738125ddedb8f\" t\n+00124a60: 6974 6c65 3d22 4368 6563 6b20 666f 7220 itle=\"Check for \n+00124a70: 6120 4d49 4d45 2f4d 544f 4d20 6174 7461 a MIME/MTOM atta\n+00124a80: 6368 6d65 6e74 2e22 3e73 6f61 705f 6368 chment.\">soap_ch\n+00124a90: 6563 6b5f 6d69 6d65 5f61 7474 6163 686d eck_mime_attachm\n+00124aa0: 656e 7473 3c2f 613e 3c2f 636f 6465 3e20 ents \n+00124ab0: 6166 7465 7220 7468 6520 6d65 7373 6167 after the messag\n+00124ac0: 6520 7761 7320 7265 6365 6976 6564 2e20 e was received. \n+00124ad0: 5768 656e 2074 6869 7320 6675 6e63 7469 When this functi\n+00124ae0: 6f6e 2072 6574 7572 6e73 206e 6f6e 7a65 on returns nonze\n+00124af0: 726f 2028 7472 7565 292c 2074 6865 6e20 ro (true), then \n+00124b00: 7468 6520 6174 7461 6368 6d65 6e74 7320 the attachments \n+00124b10: 6361 6e20 6265 2072 6574 7269 6576 6564 can be retrieved\n+00124b20: 2062 7920 6361 6c6c 696e 6720 3c63 6f64 by calling soap_recv_\n+00124bb0: 6d69 6d65 5f61 7474 6163 686d 656e 743c mime_attachment<\n+00124bc0: 2f61 3e3c 2f63 6f64 653e 2072 6570 6561 /a> repea\n+00124bd0: 7465 646c 7920 746f 2072 6574 7269 6576 tedly to retriev\n+00124be0: 6520 6561 6368 2061 7474 6163 686d 656e e each attachmen\n+00124bf0: 7420 756e 7469 6c20 7468 6973 2066 756e t until this fun\n+00124c00: 6374 696f 6e20 7265 7475 726e 7320 4e55 ction returns NU\n+00124c10: 4c4c 2e20 5468 6973 2066 756e 6374 696f LL. This functio\n+00124c20: 6e20 7265 7475 726e 7320 6120 706f 696e n returns a poin\n+00124c30: 7465 7220 746f 2061 203c 636f 6465 3e73 ter to a s\n+00124c40: 7472 7563 7420 3c61 2063 6c61 7373 3d22 truct soap_multip\n+00124cc0: 6172 743c 2f61 3e3c 2f63 6f64 653e 2061 art a\n+00124cd0: 7474 6163 686d 656e 742e 3c2f 6c69 3e0a ttachment..\n+00124ce0: 3c6c 693e 3c63 6f64 653e 696e 7420 3c61
    • int soap_che\n+00124d70: 636b 5f6d 696d 655f 6174 7461 6368 6d65 ck_mime_attachme\n+00124d80: 6e74 7328 7374 7275 6374 2073 6f61 7020 nts(struct soap \n+00124d90: 2a73 6f61 7029 3c2f 613e 3c2f 636f 6465 *soap) This function \n+00124db0: 6368 6563 6b73 2074 6865 2070 7265 7365 checks the prese\n+00124dc0: 6e63 6520 6f66 2061 204d 494d 452f 4d54 nce of a MIME/MT\n+00124dd0: 4f4d 2061 7474 6163 686d 656e 7420 6166 OM attachment af\n+00124de0: 7465 7220 6361 6c6c 696e 6720 6120 7365 ter calling a se\n+00124df0: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n+00124e00: 6279 2072 6574 7572 6e69 6e67 206e 6f6e by returning non\n+00124e10: 7a65 726f 2077 6865 6e20 6174 7461 6368 zero when attach\n+00124e20: 6d65 6e74 7320 6172 6520 7072 6573 656e ments are presen\n+00124e30: 742e 2052 6574 7572 6e73 206e 6f6e 7a65 t. Returns nonze\n+00124e40: 726f 2069 6620 6174 7461 6368 6d65 6e74 ro if attachment\n+00124e50: 7320 6172 6520 7072 6573 656e 742e 2052 s are present. R\n+00124e60: 6571 7569 7265 7320 3c63 6f64 653e 3c61 equires soap_post\n+00124f00: 5f63 6865 636b 5f6d 696d 655f 6174 7461 _check_mime_atta\n+00124f10: 6368 6d65 6e74 733c 2f61 3e3c 2f63 6f64 chments.
    • .
    • struct soap_mu\n+00124fb0: 6c74 6970 6172 743c 2f61 3e20 2a73 6f61 ltipart *soa\n+00124fc0: 705f 7265 6376 5f6d 696d 655f 6174 7461 p_recv_mime_atta\n+00124fd0: 6368 6d65 6e74 2873 7472 7563 7420 736f chment(struct so\n+00124fe0: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void *\n+00124ff0: 6861 6e64 6c65 293c 2f63 6f64 653e 2054 handle) T\n+00125000: 6869 7320 6675 6e63 7469 6f6e 2070 6172 his function par\n+00125010: 7365 7320 616e 2061 7474 6163 686d 656e ses an attachmen\n+00125020: 7420 616e 6420 696e 766f 6b65 7320 7468 t and invokes th\n+00125030: 6520 4d49 4d45 2063 616c 6c62 6163 6b73 e MIME callbacks\n+00125040: 2077 6865 6e20 7365 742e 2054 6865 203c when set. The <\n+00125050: 636f 6465 3e68 616e 646c 653c 2f63 6f64 code>handle parameter is \n+00125070: 7061 7373 6564 2074 6f20 3c63 6f64 653e passed to \n+00125080: 666d 696d 6577 7269 7465 6f70 656e 3c2f fmimewriteopen. The handl\n+001250a0: 6520 6d61 7920 636f 6e74 6169 6e20 616e e may contain an\n+001250b0: 7920 6461 7461 2074 6861 7420 6973 2065 y data that is e\n+001250c0: 7874 7261 6374 6564 2066 726f 6d20 7468 xtracted from th\n+001250d0: 6520 534f 4150 206d 6573 7361 6765 2062 e SOAP message b\n+001250e0: 6f64 7920 746f 2067 7569 6465 2074 6865 ody to guide the\n+001250f0: 2072 6564 6972 6563 7469 6f6e 206f 6620 redirection of \n+00125100: 7468 6520 7374 7265 616d 2069 6e20 7468 the stream in th\n+00125110: 6520 6361 6c6c 6261 636b 732e 2052 6574 e callbacks. Ret\n+00125120: 7572 6e73 2061 2073 7472 7563 7420 7769 urns a struct wi\n+00125130: 7468 2061 203c 636f 6465 3e63 6861 7220 th a char \n+00125140: 2a70 7472 3c2f 636f 6465 3e20 6d65 6d62 *ptr memb\n+00125150: 6572 2074 6861 7420 636f 6e74 6169 6e73 er that contains\n+00125160: 2074 6865 2068 616e 646c 6520 7661 6c75 the handle valu\n+00125170: 6520 7265 7475 726e 6564 2062 7920 7468 e returned by th\n+00125180: 6520 3c63 6f64 653e 666d 696d 6577 7269 e fmimewri\n+00125190: 7465 6f70 656e 3c2f 636f 6465 3e20 6361 teopen ca\n+001251a0: 6c6c 6261 636b 2c20 616e 6420 3c63 6f64 llback, and char *id, char *t\n+001251d0: 7970 653c 2f63 6f64 653e 2c20 616e 6420 ype, and \n+001251e0: 3c63 6f64 653e 6368 6172 202a 6465 7363 char *desc\n+001251f0: 7269 7074 696f 6e3c 2f63 6f64 653e 206d ription m\n+00125200: 656d 6265 7220 7661 7269 6162 6c65 7320 ember variables \n+00125210: 7769 7468 2074 6865 204d 494d 4520 6964 with the MIME id\n+00125220: 2c20 7479 7065 2c20 616e 6420 6465 7363 , type, and desc\n+00125230: 7269 7074 696f 6e20 696e 666f 2077 6865 ription info whe\n+00125240: 6e20 7072 6573 656e 7420 696e 2074 6865 n present in the\n+00125250: 2061 7474 6163 686d 656e 742e 3c2f 6c69 attachment..
    .

    Examp\n+00125270: 6c65 2063 6c69 656e 7420 696e 2043 3a3c le client in C:<\n+00125280: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct \n+001252d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00125300: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00125330: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+00125390: 313c 2f61 3e28 3c61 2063 6c61 7373 3d22 1(SOAP_EN\n+001253f0: 435f 4d54 4f4d 3c2f 613e 293b 203c 2f64 C_MTOM); .
    soap_pos\n+00125470: 745f 6368 6563 6b5f 6d69 6d65 5f61 7474 t_check_mime_att\n+00125480: 6163 686d 656e 7473 3c2f 613e 283c 6120 achments(soap); <\n+001254c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soa\n+00125500: 705f 6361 6c6c 5f6e 735f 5f6d 794d 6574 p_call_ns__myMet\n+00125510: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap<\n+00125540: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...)) .
    {
    . \n+00125580: 3c61 2063 6c61 7373 3d22 636f 6465 2220
    soap_print_fa\n+001255e0: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n+00125610: 6f61 703c 2f61 3e2c 2073 7464 6572 7229 oap, stderr)\n+00125620: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // an er\n+00125640: 726f 7220 6f63 6375 7272 6564 203c 2f73 ror occurred
    .
    }.\n+001257b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+001257e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // atta\n+00125800: 6368 6d65 6e74 7320 6172 6520 7072 6573 chments are pres\n+00125810: 656e 742c 2063 6861 6e6e 656c 2069 7320 ent, channel is \n+00125820: 7374 696c 6c20 6f70 656e 203c 2f73 7061 still open
    .
    <\n+00125850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00125860: 6f72 6466 6c6f 7722 3e64 6f3c 2f73 7061 ordflow\">do
    .
    {\n+00125890: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .\n+001258b0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // get \n+001258d0: 6461 7461 2026 2333 393b 6861 6e64 6c65 data 'handle\n+001258e0: 2623 3339 3b20 6672 6f6d 2053 4f41 5020 ' from SOAP \n+001258f0: 7265 7370 6f6e 7365 2061 6e64 2070 6173 response and pas\n+00125900: 7320 746f 2063 616c 6c62 6163 6b73 203c s to callbacks <\n+00125910: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00125930: 2020 2020 202e 2e2e 203c 7370 616e 2063 ... /\n+00125950: 2f20 7365 7420 7468 6520 666d 696d 6520 / set the fmime \n+00125960: 6361 6c6c 6261 636b 732c 2069 6620 6e65 callbacks, if ne\n+00125970: 6564 6564 203c 2f73 7061 6e3e 3c2f 6469 eded .
    struct <\n+001259c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001259d0: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n+001259e0: 5f6d 756c 7469 7061 7274 2e68 746d 6c22 _multipart.html\"\n+001259f0: 3e73 6f61 705f 6d75 6c74 6970 6172 743c >soap_multipart<\n+00125a00: 2f61 3e20 2a63 6f6e 7465 6e74 203d 203c /a> *content = <\n+00125a10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00125a20: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00125a30: 705f 5f6d 696d 652e 6874 6d6c 2367 6131 p__mime.html#ga1\n+00125a40: 3137 6665 3730 6235 3839 6130 3861 3966 17fe70b589a08a9f\n+00125a50: 6139 6164 3036 6333 6635 6264 3030 3922 a9ad06c3f5bd009\"\n+00125a60: 3e73 6f61 705f 7265 6376 5f6d 696d 655f >soap_recv_mime_\n+00125a70: 6174 7461 6368 6d65 6e74 3c2f 613e 283c attachment(<\n+00125a80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00125a90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00125aa0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00125ab0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (void<\n+00125ad0: 2f73 7061 6e3e 2a29 6861 6e64 6c65 293b /span>*)handle);\n+00125ae0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+00125b00: 7072 696e 7466 283c 7370 616e 2063 6c61 printf("Receive\n+00125b30: 6420 6174 7461 6368 6d65 6e74 2077 6974 d attachment wit\n+00125b40: 6820 6964 3d25 7320 616e 6420 7479 7065 h id=%s and type\n+00125b50: 3d25 735c 6e26 7175 6f74 3b3c 2f73 7061 =%s\\n", content->\n+00125b70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 id?conte\n+00125bd0: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->id:&q\n+00125c50: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;", content-><\n+00125c70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00125c80: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n+00125c90: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n+00125ca0: 6134 3935 6338 6432 3065 3033 3334 6265 a495c8d20e0334be\n+00125cb0: 3162 3133 3435 3139 3363 6132 6662 3736 1b1345193ca2fb76\n+00125cc0: 3422 3e74 7970 653c 2f61 3e3f 636f 6e74 4\">type?cont\n+00125cd0: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->type\n+00125d30: 3c2f 613e 3a3c 7370 616e 2063 6c61 7373 :"");
    .\n+00125d80: 2020 2020 7d20 3c73 7061 6e20 636c 6173 } \n+00125da0: 7768 696c 653c 2f73 7061 6e3e 2028 636f while (co\n+00125db0: 6e74 656e 7429 3b20 3c2f 6469 763e 0a3c ntent);
    .<\n+00125dc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00125dd0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+00125df0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap->error\n+00125e80: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    \n+00125ea0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+00125f00: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n+00125f30: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n+00125f40: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    st\n+00126270: 7275 6374 2073 6f61 705f 6d75 6c74 6970 ruct soap_multip\n+00126280: 6172 7420 2a20 736f 6170 5f72 6563 765f art * soap_recv_\n+00126290: 6d69 6d65 5f61 7474 6163 686d 656e 7428 mime_attachment(\n+001262a0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+001262b0: 702c 2076 6f69 6420 2a68 616e 646c 6529 p, void *handle)\n+001262c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Get a M\n+001262e0: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm\n+001262f0: 656e 742e 3c2f 6469 763e 3c2f 6469 763e ent.
    \n+00126300: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    int so\n+001263f0: 6170 5f70 6f73 745f 6368 6563 6b5f 6d69 ap_post_check_mi\n+00126400: 6d65 5f61 7474 6163 686d 656e 7473 2873 me_attachments(s\n+00126410: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00126420: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Enable\n+00126440: 2070 6f73 742d 7072 6f63 6573 7369 6e67 post-processing\n+00126450: 206f 6620 4d49 4d45 2f4d 544f 4d20 6174 of MIME/MTOM at\n+00126460: 7461 6368 6d65 6e74 732e 3c2f 6469 763e tachments.
    \n+00126470: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .

    Th\n+001265f0: 6520 7365 7276 6572 2d73 6964 6520 7365 e server-side se\n+00126600: 7276 6963 6520 6f70 6572 6174 696f 6e73 rvice operations\n+00126610: 2061 7265 2069 6d70 6c65 6d65 6e74 6564 are implemented\n+00126620: 2061 7320 7573 7561 6c2c 2062 7574 2077 as usual, but w\n+00126630: 6974 6820 6164 6469 7469 6f6e 616c 2063 ith additional c\n+00126640: 6865 636b 7320 666f 7220 4d49 4d45 2f4d hecks for MIME/M\n+00126650: 544f 4d20 6174 7461 6368 6d65 6e74 733a TOM attachments:\n+00126660: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main()
    .<\n+001266c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001266d0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap\n+00126740: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+001267d0: 7731 3c2f 613e 283c 6120 636c 6173 733d w1(SOAP_E\n+00126830: 4e43 5f4d 544f 4d3c 2f61 3e29 3b20 3c2f NC_MTOM); .
    soap_\n+001268b0: 706f 7374 5f63 6865 636b 5f6d 696d 655f post_check_mime_\n+001268c0: 6174 7461 6368 6d65 6e74 733c 2f61 3e28 attachments(\n+001268d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+00126900: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soa\n+00126970: 705f 7365 7276 653c 2f61 3e28 3c61 2063 p_serve(soap); .
    }
    .<\n+001269d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001269e0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n+00126a20: 6e73 5f5f 6d79 4d65 7468 6f64 283c 7370 ns__myMethod(struct\n+00126a50: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00126a80: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, ...)
    .<\n+00126ac0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00126ad0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    ...\n+00126af0: 203c 7370 616e 2063 6c61 7373 3d22 636f // server\n+00126b10: 2d73 6964 6520 7072 6f63 6573 7369 6e67 -side processing\n+00126b20: 206c 6f67 6963 203c 2f73 7061 6e3e 3c2f logic .
    if (\n+00126bc0: 736f 6170 5f63 6865 636b 5f6d 696d 655f soap_check_mime_\n+00126bd0: 6174 7461 6368 6d65 6e74 733c 2f61 3e28 attachments(\n+00126be0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+00126c10: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    \n+00126c60: 2f2f 2061 7474 6163 686d 656e 7473 2061 // attachments a\n+00126c70: 7265 2070 7265 7365 6e74 2c20 6368 616e re present, chan\n+00126c80: 6e65 6c20 6973 2073 7469 6c6c 206f 7065 nel is still ope\n+00126c90: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n+00126ca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00126cd0: 646f 3c2f 7370 616e 3e20 3c2f 6469 763e do
    \n+00126ce0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .<\n+00126d00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00126d10: 3e20 2020 2020 202e 2e2e 203c 7370 616e > ... // get data \n+00126d40: 393b 6861 6e64 6c65 2623 3339 3b20 6672 9;handle' fr\n+00126d50: 6f6d 2053 4f41 5020 7265 7175 6573 7420 om SOAP request \n+00126d60: 616e 6420 7061 7373 2074 6f20 6361 6c6c and pass to call\n+00126d70: 6261 636b 7320 3c2f 7370 616e 3e3c 2f64 backs .
    ... \n+00126da0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // set the\n+00126dc0: 2066 6d69 6d65 2063 616c 6c62 6163 6b73 fmime callbacks\n+00126dd0: 2c20 6966 206e 6565 6465 6420 3c2f 7370 , if needed
    .
    \n+00126e00: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+00126e20: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soap_mul\n+00126e60: 7469 7061 7274 3c2f 613e 202a 636f 6e74 tipart *cont\n+00126e70: 656e 7420 3d20 3c61 2063 6c61 7373 3d22 ent = soap_rec\n+00126ed0: 765f 6d69 6d65 5f61 7474 6163 686d 656e v_mime_attachmen\n+00126ee0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n+00126f10: 703c 2f61 3e2c 2028 3c73 7061 6e20 636c p, (void*)h\n+00126f40: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .<\n+00126f50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00126f60: 3e20 2020 2020 2070 7269 6e74 6628 3c73 > printf("\n+00126f90: 5265 6365 6976 6564 2061 7474 6163 686d Received attachm\n+00126fa0: 656e 7420 7769 7468 2069 643d 2573 2061 ent with id=%s a\n+00126fb0: 6e64 2074 7970 653d 2573 5c6e 2671 756f nd type=%s\\n&quo\n+00126fc0: 743b 3c2f 7370 616e 3e2c 2063 6f6e 7465 t;, conte\n+00126fd0: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->id?content->id:""\n+001270c0: 3b3c 2f73 7061 6e3e 2c20 636f 6e74 656e ;, conten\n+001270d0: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->type?content-><\n+00127140: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00127150: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n+00127160: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html#\n+00127170: 6134 3935 6338 6432 3065 3033 3334 6265 a495c8d20e0334be\n+00127180: 3162 3133 3435 3139 3363 6132 6662 3736 1b1345193ca2fb76\n+00127190: 3422 3e74 7970 653c 2f61 3e3a 3c73 7061 4\">type:"&q\n+001271c0: 756f 743b 3c2f 7370 616e 3e29 3b20 3c2f uot;); .
    } while (content); <\n+00127220: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if \n+00127260: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00127290: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er\n+001272e0: 726f 723c 2f61 3e29 203c 2f64 6976 3e0a ror)
    .\n+001272f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    return \n+00127330: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00127360: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n+001273b0: 6f72 3c2f 613e 3b20 3c2f 6469 763e 0a3c or;
    .<\n+001273c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001273d0: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n+001273f0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // ser\n+00127410: 7665 722d 7369 6465 2070 726f 6365 7373 ver-side process\n+00127420: 696e 6720 6c6f 6769 6320 3c2f 7370 616e ing logic
    ..}<\n+001274f0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

    .\n+00127570: 5374 7265 616d 696e 6720 6368 756e 6b65 Streaming chunke\n+00127580: 6420 4d49 4d45 2f4d 544f 4d3c 2f68 323e d MIME/MTOM

    \n+00127590: 0a3c 703e 546f 2073 656e 6420 4d49 4d45 .

    To send MIME\n+001275a0: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment\n+001275b0: 732c 2074 6865 2061 7474 6163 686d 656e s, the attachmen\n+001275c0: 7420 7369 7a65 7320 6d75 7374 2062 6520 t sizes must be \n+001275d0: 6465 7465 726d 696e 6564 2069 6e20 6164 determined in ad\n+001275e0: 7661 6e63 6520 746f 2063 616c 6375 6c61 vance to calcula\n+001275f0: 7465 2048 5454 5020 6d65 7373 6167 6520 te HTTP message \n+00127600: 6c65 6e67 7468 2072 6571 7569 7265 6420 length required \n+00127610: 746f 2073 7472 6561 6d20 4d49 4d45 2f4d to stream MIME/M\n+00127620: 544f 4d20 6f76 6572 2048 5454 502e 2048 TOM over HTTP. H\n+00127630: 6f77 6576 6572 2c20 6368 756e 6b65 6420 owever, chunked \n+00127640: 4d49 4d45 2f4d 544f 4d20 746f 6765 7468 MIME/MTOM togeth\n+00127650: 6572 2077 6974 6820 6368 756e 6b65 6420 er with chunked \n+00127660: 4854 5450 2063 616e 2062 6520 7573 6564 HTTP can be used\n+00127670: 2074 6f20 6f6d 6974 2074 6869 7320 7374 to omit this st\n+00127680: 6570 2e20 4669 7273 7420 7365 7420 7468 ep. First set th\n+00127690: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO\n+001276a0: 5f43 4855 4e4b 3c2f 636f 6465 3e20 666c _CHUNK fl\n+001276b0: 6167 2e20 5468 656e 2c20 746f 2073 7472 ag. Then, to str\n+001276c0: 6561 6d20 6368 756e 6b65 6420 4d49 4d45 eam chunked MIME\n+001276d0: 2f4d 544f 4d2c 2073 6574 2074 6865 203c /MTOM, set the <\n+001276e0: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size member of an \n+00127700: 6174 7461 6368 6d65 6e74 2074 6f20 7a65 attachment to ze\n+00127710: 726f 2061 6e64 2065 6e61 626c 6520 4d49 ro and enable MI\n+00127720: 4d45 2f4d 544f 4d20 6368 756e 6b69 6e67 ME/MTOM chunking\n+00127730: 2e20 5468 6520 4d49 4d45 2f4d 544f 4d20 . The MIME/MTOM \n+00127740: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap:\n+001277e0: 3a66 6d69 6d65 7265 6164 3c2f 613e 3c2f :fmimeread callback t\n+00127800: 6865 6e20 6665 7463 6865 7320 6461 7461 hen fetches data\n+00127810: 2069 6e20 6368 756e 6b73 2061 6e64 2069 in chunks and i\n+00127820: 7420 6973 2069 6d70 6f72 7461 6e74 2074 t is important t\n+00127830: 6f20 6669 6c6c 2074 6865 2065 6e74 6972 o fill the entir\n+00127840: 6520 6275 6666 6572 2075 6e6c 6573 7320 e buffer unless \n+00127850: 7468 6520 656e 6420 6f66 2074 6865 2064 the end of the d\n+00127860: 6174 6120 6861 7320 6265 656e 2072 6561 ata has been rea\n+00127870: 6368 6564 2061 6e64 2074 6865 206c 6173 ched and the las\n+00127880: 7420 6368 756e 6b20 6973 2074 6f20 6265 t chunk is to be\n+00127890: 2073 656e 642e 2054 6861 7420 6973 2c20 send. That is, \n+001278a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap:\n+00127940: 3a66 6d69 6d65 7265 6164 3c2f 613e 3c2f :fmimeread should ret\n+00127960: 7572 6e20 7468 6520 7661 6c75 6520 6f66 urn the value of\n+00127970: 2074 6865 206c 6173 7420 3c63 6f64 653e the last \n+00127980: 6c65 6e3c 2f63 6f64 653e 2070 6172 616d len param\n+00127990: 6574 6572 2061 6e64 2066 696c 6c20 7468 eter and fill th\n+001279a0: 6520 656e 7469 7265 2062 7566 6665 7220 e entire buffer \n+001279b0: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf\n+001279c0: 2066 6f72 2061 6c6c 2063 6875 6e6b 7320 for all chunks \n+001279d0: 6578 6365 7074 2074 6865 206c 6173 742e except the last.\n+001279e0: 2046 6f72 2074 6865 206c 6173 7420 6974 For the last it\n+001279f0: 2072 6574 7572 6e73 2030 2e3c 2f70 3e0a returns 0.

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

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

    .

    .SOAP/X\n+00127a60: 4d4c 206f 7665 7220 5544 503c 2f68 313e ML over UDP

    \n+00127a70: 0a3c 703e 5544 5020 6973 2061 2073 696d .

    UDP is a sim\n+00127a80: 706c 652c 2075 6e72 656c 6961 626c 6520 ple, unreliable \n+00127a90: 6461 7461 6772 616d 2070 726f 746f 636f datagram protoco\n+00127aa0: 6c3a 2055 4450 2073 6f63 6b65 7473 2061 l: UDP sockets a\n+00127ab0: 7265 2063 6f6e 6e65 6374 696f 6e6c 6573 re connectionles\n+00127ac0: 732e 2055 4450 2061 6464 7265 7373 2066 s. UDP address f\n+00127ad0: 6f72 6d61 7473 2061 7265 2069 6465 6e74 ormats are ident\n+00127ae0: 6963 616c 2074 6f20 7468 6f73 6520 7573 ical to those us\n+00127af0: 6564 2062 7920 5443 502e 2049 6e20 7061 ed by TCP. In pa\n+00127b00: 7274 6963 756c 6172 2055 4450 2070 726f rticular UDP pro\n+00127b10: 7669 6465 7320 6120 706f 7274 2069 6465 vides a port ide\n+00127b20: 6e74 6966 6965 7220 696e 2061 6464 6974 ntifier in addit\n+00127b30: 696f 6e20 746f 2074 6865 206e 6f72 6d61 ion to the norma\n+00127b40: 6c20 496e 7465 726e 6574 2061 6464 7265 l Internet addre\n+00127b50: 7373 2066 6f72 6d61 742e 2054 6865 2055 ss format. The U\n+00127b60: 4450 2070 6f72 7420 7370 6163 6520 6973 DP port space is\n+00127b70: 2073 6570 6172 6174 6520 6672 6f6d 2074 separate from t\n+00127b80: 6865 2054 4350 2070 6f72 7420 7370 6163 he TCP port spac\n+00127b90: 6520 2869 2e65 2e20 6120 5544 5020 706f e (i.e. a UDP po\n+00127ba0: 7274 206d 6179 206e 6f74 2062 6520 2263 rt may not be \"c\n+00127bb0: 6f6e 6e65 6374 6564 2220 746f 2061 2054 onnected\" to a T\n+00127bc0: 4350 2070 6f72 7429 2e20 496e 2061 6464 CP port). In add\n+00127bd0: 6974 696f 6e20 6272 6f61 6463 6173 7420 ition broadcast \n+00127be0: 7061 636b 6574 7320 6d61 7920 6265 2073 packets may be s\n+00127bf0: 656e 7420 2861 7373 756d 696e 6720 7468 ent (assuming th\n+00127c00: 6520 756e 6465 726c 7969 6e67 206e 6574 e underlying net\n+00127c10: 776f 726b 2073 7570 706f 7274 7320 7468 work supports th\n+00127c20: 6973 2920 6279 2075 7369 6e67 2061 2072 is) by using a r\n+00127c30: 6573 6572 7665 6420 2262 726f 6164 6361 eserved \"broadca\n+00127c40: 7374 0a61 6464 7265 7373 223b 2074 6869 st.address\"; thi\n+00127c50: 7320 6164 6472 6573 7320 6973 206e 6574 s address is net\n+00127c60: 776f 726b 2069 6e74 6572 6661 6365 2064 work interface d\n+00127c70: 6570 656e 6465 6e74 2e3c 2f70 3e0a 3c70 ependent.

    .Client-side mes\n+00127c90: 7361 6765 7320 7769 7468 2053 4f41 502d sages with SOAP-\n+00127ca0: 6f76 6572 2d55 4450 2065 6e64 706f 696e over-UDP endpoin\n+00127cb0: 7420 5552 4c73 2028 3c63 6f64 653e 736f t URLs (so\n+00127cc0: 6170 2e75 6470 3a2f 2f2e 2e2e 3c2f 636f ap.udp://...) are automat\n+00127ce0: 6963 616c 6c79 2074 7261 6e73 6d69 7474 ically transmitt\n+00127cf0: 6564 2061 7320 6461 7461 6772 616d 732e ed as datagrams.\n+00127d00: 2053 6572 7665 722d 7369 6465 2061 7070 Server-side app\n+00127d10: 6c69 6361 7469 6f6e 7320 7368 6f75 6c64 lications should\n+00127d20: 2073 6574 2074 6865 203c 636f 6465 3e23 set the #\n+00127d30: 534f 4150 5f49 4f5f 5544 503c 2f63 6f64 SOAP_IO_UDP mode flag to \n+00127d50: 6163 6365 7074 2055 4450 2072 6571 7565 accept UDP reque\n+00127d60: 7374 732c 2065 2e67 2e20 7573 696e 6720 sts, e.g. using \n+00127d70: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_new1\n+00127e30: 3c2f 636f 6465 3e2c 203c 636f 6465 3e3c , <\n+00127e40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00127e50: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00127e60: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+00127e70: 6338 3731 3236 6333 6534 3564 3266 6461 c87126c3e45d2fda\n+00127e80: 3438 3865 3938 3332 6332 6464 3562 6531 488e9832c2dd5be1\n+00127e90: 2220 7469 746c 653d 2249 6e69 7469 616c \" title=\"Initial\n+00127ea0: 697a 6520 6120 7374 6163 6b2d 616c 6c6f ize a stack-allo\n+00127eb0: 6361 7465 6420 736f 6170 2063 6f6e 7465 cated soap conte\n+00127ec0: 7874 2077 6974 6820 696e 7075 7420 616e xt with input an\n+00127ed0: 6420 6f75 7470 7574 2073 6f61 705f 6d6f d output soap_mo\n+00127ee0: 6465 2066 6c61 6773 2e22 3e73 6f61 705f de flags.\">soap_\n+00127ef0: 696e 6974 313c 2f61 3e3c 2f63 6f64 653e init1\n+00127f00: 2c20 6f72 203c 636f 6465 3e3c 6120 636c , or soap_set_m\n+00127fb0: 6f64 653c 2f61 3e3c 2f63 6f64 653e 2e3c ode.<\n+00127fc0: 2f70 3e0a 3c70 3e54 6865 206d 6178 696d /p>.

    The maxim\n+00127fd0: 756d 206d 6573 7361 6765 206c 656e 6774 um message lengt\n+00127fe0: 6820 666f 7220 6461 7461 6772 616d 2070 h for datagram p\n+00127ff0: 6163 6b65 7473 2069 7320 7265 7374 7269 ackets is restri\n+00128000: 6374 6564 2062 7920 7468 6520 6275 6666 cted by the buff\n+00128010: 6572 2073 697a 6520 3c63 6f64 653e 2353 er size #S\n+00128020: 4f41 505f 4255 464c 454e 3c2f 636f 6465 OAP_BUFLEN, which is 6553\n+00128040: 3620 6279 2064 6566 6175 6c74 2c20 756e 6 by default, un\n+00128050: 6c65 7373 2063 6f6d 7069 6c65 6420 7769 less compiled wi\n+00128060: 7468 203c 636f 6465 3e23 5749 5448 5f4c th #WITH_L\n+00128070: 4541 4e3c 2f63 6f64 653e 2074 6f20 7375 EAN to su\n+00128080: 7070 6f72 7420 736d 616c 6c2d 7363 616c pport small-scal\n+00128090: 6520 656d 6265 6464 6564 2073 7973 7465 e embedded syste\n+001280a0: 6d73 2e20 466f 7220 5544 5020 7472 616e ms. For UDP tran\n+001280b0: 7370 6f72 7420 3c63 6f64 653e 2353 4f41 sport #SOA\n+001280c0: 505f 4255 464c 454e 3c2f 636f 6465 3e20 P_BUFLEN \n+001280d0: 6d75 7374 206e 6f74 2065 7863 6565 6420 must not exceed \n+001280e0: 7468 6520 6d61 7869 6d75 6d20 5544 5020 the maximum UDP \n+001280f0: 7061 636b 6574 2073 697a 6520 3635 3533 packet size 6553\n+00128100: 3620 2874 6865 2073 697a 6520 6f66 2064 6 (the size of d\n+00128110: 6174 6167 7261 6d20 6d65 7373 6167 6573 atagram messages\n+00128120: 2069 7320 636f 6e73 7472 6169 6e65 6420 is constrained \n+00128130: 6279 2074 6865 2055 4450 2070 6163 6b65 by the UDP packe\n+00128140: 7420 7369 7a65 2032 5e31 363d 3635 3533 t size 2^16=6553\n+00128150: 3620 6173 2070 6572 2055 4450 2073 7461 6 as per UDP sta\n+00128160: 6e64 6172 6429 2e20 596f 7520 6361 6e20 ndard). You can \n+00128170: 7573 6520 636f 6d70 7265 7373 696f 6e20 use compression \n+00128180: 7769 7468 203c 636f 6465 3e23 534f 4150 with #SOAP\n+00128190: 5f45 4e43 5f5a 4c49 423c 2f63 6f64 653e _ENC_ZLIB\n+001281a0: 2074 6f20 7265 6475 6365 2074 6865 206d to reduce the m\n+001281b0: 6573 7361 6765 2073 697a 652c 2062 7574 essage size, but\n+001281c0: 206e 6f74 6520 7468 6174 2063 6f6d 7072 note that compr\n+001281d0: 6573 7365 6420 534f 4150 2d6f 7665 722d essed SOAP-over-\n+001281e0: 5544 5020 6973 2061 2067 534f 4150 2d73 UDP is a gSOAP-s\n+001281f0: 7065 6369 6669 6320 6665 6174 7572 6520 pecific feature \n+00128200: 6265 6361 7573 6520 6974 2069 7320 6e6f because it is no\n+00128210: 7420 7061 7274 206f 6620 7468 6520 534f t part of the SO\n+00128220: 4150 2d6f 7665 722d 5544 5020 7370 6563 AP-over-UDP spec\n+00128230: 6966 6963 6174 696f 6e2e 3c2f 703e 0a3c ification.

    .<\n+00128240: 703e 5468 6520 534f 4150 2d6f 7665 722d p>The SOAP-over-\n+00128250: 5544 5020 7370 6563 6966 6963 6174 696f UDP specificatio\n+00128260: 6e20 7265 6c69 6573 206f 6e20 5753 2d41 n relies on WS-A\n+00128270: 6464 7265 7373 696e 672e 2054 6865 203c ddressing. The <\n+00128280: 656d 3e3c 636f 6465 3e77 7361 2e68 3c2f em>wsa.h file \n+001282a0: 696e 2074 6865 203c 636f 6465 3e69 6d70 in the imp\n+001282b0: 6f72 743c 2f63 6f64 653e 2064 6972 6563 ort direc\n+001282c0: 746f 7279 2064 6566 696e 6573 2074 6865 tory defines the\n+001282d0: 2057 532d 4164 6472 6573 7369 6e67 2065 WS-Addressing e\n+001282e0: 6c65 6d65 6e74 7320 666f 7220 636c 6965 lements for clie\n+001282f0: 6e74 2061 6e64 2073 6572 7665 7220 6170 nt and server ap\n+00128300: 706c 6963 6174 696f 6e73 2e3c 2f70 3e0a plications.

    .\n+00128310: 3c70 3e54 6865 2067 534f 4150 2069 6d70

    The gSOAP imp\n+00128320: 6c65 6d65 6e74 6174 696f 6e20 636f 6e66 lementation conf\n+00128330: 6f72 6d73 2074 6f20 7468 6520 534f 4150 orms to the SOAP\n+00128340: 2d6f 7665 722d 5544 5020 7265 7175 6972 -over-UDP requir\n+00128350: 656d 656e 7473 3a3c 2f70 3e0a 3c75 6c3e ements:

    .
      \n+00128360: 0a3c 6c69 3e53 4f41 502d 6f76 6572 2d55 .
    • SOAP-over-U\n+00128370: 4450 2073 6572 7665 7220 656e 6470 6f69 DP server endpoi\n+00128380: 6e74 2055 524c 2066 6f72 6d61 743a 203c nt URL format: <\n+00128390: 656d 3e3c 636f 6465 3e73 6f61 702e 7564 em>soap.ud\n+001283a0: 703a 2f2f 686f 7374 3a70 6f72 742f 7061 p://host:port/pa\n+001283b0: 7468 3c2f 636f 6465 3e3c 2f65 6d3e 3c2f th.
    • Support \n+001283d0: 6f6e 652d 7761 7920 6d65 7373 6167 652d one-way message-\n+001283e0: 6578 6368 616e 6765 2070 6174 7465 726e exchange pattern\n+001283f0: 2028 4d45 5029 2077 6865 7265 2061 2053 (MEP) where a S\n+00128400: 4f41 5020 656e 7665 6c6f 7065 2069 7320 OAP envelope is \n+00128410: 6361 7272 6965 6420 696e 2061 2075 7365 carried in a use\n+00128420: 7220 6461 7461 6772 616d 2e3c 2f6c 693e r datagram.
    • \n+00128430: 0a3c 6c69 3e53 7570 706f 7274 2072 6571 .
    • Support req\n+00128440: 7565 7374 2d72 6573 706f 6e73 6520 6d65 uest-response me\n+00128450: 7373 6167 652d 6578 6368 616e 6765 2070 ssage-exchange p\n+00128460: 6174 7465 726e 2028 4d45 5029 2077 6865 attern (MEP) whe\n+00128470: 7265 2053 4f41 5020 656e 7665 6c6f 7065 re SOAP envelope\n+00128480: 7320 6172 6520 6361 7272 6965 6420 696e s are carried in\n+00128490: 2075 7365 7220 6461 7461 6772 616d 732e user datagrams.\n+001284a0: 3c2f 6c69 3e0a 3c6c 693e 5375 7070 6f72
    • .
    • Suppor\n+001284b0: 7420 6d75 6c74 6963 6173 7420 7472 616e t multicast tran\n+001284c0: 736d 6973 7369 6f6e 206f 6620 534f 4150 smission of SOAP\n+001284d0: 2065 6e76 656c 6f70 6573 2063 6172 7269 envelopes carri\n+001284e0: 6564 2069 6e20 7573 6572 2064 6174 6167 ed in user datag\n+001284f0: 7261 6d73 2e3c 2f6c 693e 0a3c 6c69 3e53 rams.
    • .
    • S\n+00128500: 7570 706f 7274 2062 6f74 6820 534f 4150 upport both SOAP\n+00128510: 2031 2e31 2061 6e64 2053 4f41 5020 312e 1.1 and SOAP 1.\n+00128520: 3220 656e 7665 6c6f 7065 732e 3c2f 6c69 2 envelopes..
    .

    The f\n+00128540: 6f6c 6c6f 7769 6e67 2061 6464 6974 696f ollowing additio\n+00128550: 6e61 6c20 6665 6174 7572 6573 2061 7265 nal features are\n+00128560: 2061 6c73 6f20 6176 6169 6c61 626c 652c also available,\n+00128570: 2062 7574 2061 7265 206e 6f74 2073 7570 but are not sup\n+00128580: 706f 7274 6564 2062 7920 7468 6520 534f ported by the SO\n+00128590: 4150 2d6f 7665 722d 5544 5020 7370 6563 AP-over-UDP spec\n+001285a0: 6966 6963 6174 696f 6e3a 3c2f 703e 0a3c ification:

    .<\n+001285b0: 756c 3e0a 3c6c 693e 5a6c 6962 2f67 7a69 ul>.
  • Zlib/gzi\n+001285c0: 7020 6d65 7373 6167 6520 636f 6d70 7265 p message compre\n+001285d0: 7373 696f 6e20 2875 7365 2063 6f6d 7069 ssion (use compi\n+001285e0: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_GZIP).
  • .
  • \n+00128610: 534f 4150 2077 6974 6820 4449 4d45 2061 SOAP with DIME a\n+00128620: 7474 6163 686d 656e 7473 206f 7665 7220 ttachments over \n+00128630: 5544 502e 3c2f 6c69 3e0a 3c6c 693e 534f UDP.
  • .
  • SO\n+00128640: 4150 2077 6974 6820 4d49 4d45 2f4d 544f AP with MIME/MTO\n+00128650: 4d20 6174 7461 6368 6d65 6e74 7320 6f76 M attachments ov\n+00128660: 6572 2055 4450 2e3c 2f6c 693e 0a3c 6c69 er UDP.
  • .Support for IPv\n+00128680: 3620 2875 7365 2063 6f6d 7069 6c65 2d74 6 (use compile-t\n+00128690: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n+001286a0: 5749 5448 5f49 5056 363c 2f63 6f64 653e WITH_IPV6\n+001286b0: 293c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e )..

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

    .Using \n+00128720: 5753 2d41 6464 7265 7373 696e 6720 7769 WS-Addressing wi\n+00128730: 7468 2053 4f41 502d 6f76 6572 2d55 4450 th SOAP-over-UDP\n+00128740: 3c2f 6832 3e0a 3c70 3e41 2053 4f41 502d

    .

    A SOAP-\n+00128750: 6f76 6572 2d55 4450 2061 7070 6c69 6361 over-UDP applica\n+00128760: 7469 6f6e 206d 6179 2075 7365 2057 532d tion may use WS-\n+00128770: 4164 6472 6573 7369 6e67 2074 6f20 636f Addressing to co\n+00128780: 6e74 726f 6c20 6d65 7373 6167 6520 6465 ntrol message de\n+00128790: 6c69 7665 7279 2061 7320 7065 7220 534f livery as per SO\n+001287a0: 4150 2d6f 7665 722d 5544 5020 7370 6563 AP-over-UDP spec\n+001287b0: 6966 6963 6174 696f 6e2e 3c2f 703e 0a3c ification.

    .<\n+001287c0: 703e 5468 6520 3c65 6d3e 3c63 6f64 653e p>The \n+001287d0: 7773 612e 683c 2f63 6f64 653e 3c2f 656d wsa.h file in the import directory defi\n+00128810: 6e65 7320 7468 6520 5753 2d41 6464 7265 nes the WS-Addre\n+00128820: 7373 696e 6720 656c 656d 656e 7473 2e20 ssing elements. \n+00128830: 546f 2069 6e63 6c75 6465 2074 6865 2057 To include the W\n+00128840: 532d 4164 6472 6573 7369 6e67 2065 6c65 S-Addressing ele\n+00128850: 6d65 6e74 7320 696e 2074 6865 2053 4f41 ments in the SOA\n+00128860: 5020 4865 6164 6572 2066 6f72 206d 6573 P Header for mes\n+00128870: 7361 6769 6e67 2c20 6120 5753 2d41 6464 saging, a WS-Add\n+00128880: 7265 7373 696e 6720 6361 7061 626c 6520 ressing capable \n+00128890: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 SOAP_ENV__Heade\n+00128900: 723c 2f61 3e3c 2f63 6f64 653e 2073 7472 r str\n+00128910: 7563 7420 7368 6f75 6c64 2062 6520 6465 uct should be de\n+00128920: 6669 6e65 6420 696e 2079 6f75 7220 6865 fined in your he\n+00128930: 6164 6572 2066 696c 6520 6279 2069 6d70 ader file by imp\n+00128940: 6f72 7469 6e67 203c 656d 3e3c 636f 6465 orting gsoap/import/ws\n+00128960: 612e 683c 2f63 6f64 653e 3c2f 656d 3e20 a.h
    \n+00128970: 6f72 203c 656d 3e3c 636f 6465 3e67 736f or gso\n+00128980: 6170 2f69 6d70 6f72 742f 7773 6135 2e68 ap/import/wsa5.h\n+00128990: 3c2f 636f 6465 3e3c 2f65 6d3e 3a3c 2f70 :.
    #import &qu\n+001289f0: 6f74 3b77 7361 2e68 2671 756f 743b 3c2f ot;wsa.h"
    .

    We also i\n+00128a30: 6e63 6c75 6465 6420 6120 3c63 6f64 653e ncluded a \n+00128a40: 2f2f 6773 6f61 7020 7773 6120 7363 6865 //gsoap wsa sche\n+00128a50: 6d61 2069 6d70 6f72 743a 3c2f 636f 6465 ma import: directive in t\n+00128a70: 6865 203c 656d 3e3c 636f 6465 3e77 7361 he wsa\n+00128a80: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .h f\n+00128a90: 696c 6520 746f 2065 6e61 626c 6520 7468 ile to enable th\n+00128aa0: 6520 6765 6e65 7261 7469 6f6e 206f 6620 e generation of \n+00128ab0: 5753 444c 2073 7065 6369 6669 6361 7469 WSDL specificati\n+00128ac0: 6f6e 7320 7468 6174 2069 6d70 6f72 7420 ons that import \n+00128ad0: 2869 6e73 7465 6164 206f 6620 696e 636c (instead of incl\n+00128ae0: 7564 6573 2920 7468 6520 5753 2d41 6464 udes) the WS-Add\n+00128af0: 7265 7373 696e 6720 656c 656d 656e 7473 ressing elements\n+00128b00: 2e20 4e6f 7465 2074 6861 7420 7468 6520 . Note that the \n+00128b10: 3c63 6f64 653e 2f2f 6773 6f61 706f 7074 //gsoapopt\n+00128b20: 2077 3c2f 636f 6465 3e20 6469 7265 6374 w direct\n+00128b30: 6976 6520 2877 6869 6368 2061 6464 7320 ive (which adds \n+00128b40: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+00128b50: 2d77 3c2f 636f 6465 3e3c 2f62 3e20 746f -w to\n+00128b60: 2072 756e 203c 623e 3c63 6f64 653e 736f run so\n+00128b70: 6170 6370 7032 202d 773c 2f63 6f64 653e apcpp2 -w\n+00128b80: 3c2f 623e 2920 6d75 7374 206e 6f74 2062 ) must not b\n+00128b90: 6520 7072 6573 656e 7420 696e 2079 6f75 e present in you\n+00128ba0: 7220 6865 6164 6572 2066 696c 6520 746f r header file to\n+00128bb0: 2065 6e61 626c 6520 5753 444c 2067 656e enable WSDL gen\n+00128bc0: 6572 6174 696f 6e2e 3c2f 703e 0a3c 703e eration.

    .

    \n+00128bd0: 4f6e 652d 7761 7920 534f 4150 2d6f 7665 One-way SOAP-ove\n+00128be0: 722d 5544 5020 6d65 7373 6167 6573 2028 r-UDP messages (\n+00128bf0: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Asynchronous\n+00128c30: 206f 6e65 2d77 6179 206d 6573 7361 6765 one-way message\n+00128c40: 2070 6173 7369 6e67 3c2f 613e 2029 2073 passing ) s\n+00128c50: 686f 756c 6420 6265 2064 6563 6c61 7265 hould be declare\n+00128c60: 6420 746f 2069 6e63 6c75 6465 2074 6865 d to include the\n+00128c70: 203c 656d 3e3c 636f 6465 3e77 7361 3a4d wsa:M\n+00128c80: 6573 7361 6765 4944 3c2f 636f 6465 3e3c essageID<\n+00128c90: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n+00128ca0: 7773 613a 546f 3c2f 636f 6465 3e3c 2f65 wsa:To, and wsa:Action element\n+00128ce0: 7320 696e 2074 6865 2053 4f41 5020 4865 s in the SOAP He\n+00128cf0: 6164 6572 206f 6620 7468 6520 7265 7175 ader of the requ\n+00128d00: 6573 7420 6d65 7373 6167 6520 6173 2066 est message as f\n+00128d10: 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 ollows:

    .
    //gsoa\n+00128d60: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n+00128d70: 686f 642d 6865 6164 6572 2d70 6172 743a hod-header-part:\n+00128d80: 2020 2020 2020 2020 2020 7365 6e64 5374 sendSt\n+00128d90: 7269 6e67 2077 7361 5f5f 4d65 7373 6167 ring wsa__Messag\n+00128da0: 6549 4420 3c2f 7370 616e 3e3c 2f64 6976 eID .
    //gsoa\n+00128de0: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n+00128df0: 686f 642d 6865 6164 6572 2d70 6172 743a hod-header-part:\n+00128e00: 2020 2020 2020 2020 2020 7365 6e64 5374 sendSt\n+00128e10: 7269 6e67 2077 7361 5f5f 546f 203c 2f73 ring wsa__To
    .
    //gsoap ns se\n+00128e60: 7276 6963 6520 6d65 7468 6f64 2d68 6561 rvice method-hea\n+00128e70: 6465 722d 7061 7274 3a20 2020 2020 2020 der-part: \n+00128e80: 2020 2073 656e 6453 7472 696e 6720 7773 sendString ws\n+00128e90: 615f 5f41 6374 696f 6e20 3c2f 7370 616e a__Action
    .
    int n\n+00128ee0: 735f 5f73 656e 6453 7472 696e 6728 3c73 s__sendString(char *str, void)\n+00128f40: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+00128f60: 703e 5265 7175 6573 742d 7265 7370 6f6e p>Request-respon\n+00128f70: 7365 2053 4f41 502d 6f76 6572 2d55 4450 se SOAP-over-UDP\n+00128f80: 206d 6573 7361 6765 7320 7368 6f75 6c64 messages should\n+00128f90: 2062 6520 6465 636c 6172 6564 2074 6f20 be declared to \n+00128fa0: 696e 636c 7564 6520 7468 6520 3c65 6d3e include the \n+00128fb0: 3c63 6f64 653e 7773 613a 4d65 7373 6167 wsa:Messag\n+00128fc0: 6549 443c 2f63 6f64 653e 3c2f 656d 3e2c eID,\n+00128fd0: 203c 656d 3e3c 636f 6465 3e77 7361 3a54 wsa:T\n+00128fe0: 6f3c 2f63 6f64 653e 3c2f 656d 3e2c 203c o, <\n+00128ff0: 656d 3e3c 636f 6465 3e77 7361 3a41 6374 em>wsa:Act\n+00129000: 696f 6e3c 2f63 6f64 653e 3c2f 656d 3e2c ion
    ,\n+00129010: 2061 6e64 203c 656d 3e3c 636f 6465 3e77 and w\n+00129020: 7361 3a52 6570 6c79 546f 3c2f 636f 6465 sa:ReplyTo elements \n+00129040: 696e 2074 6865 2053 4f41 5020 4865 6164 in the SOAP Head\n+00129050: 6572 206f 6620 7468 6520 7265 7175 6573 er of the reques\n+00129060: 7420 6d65 7373 6167 652c 2061 6e64 2074 t message, and t\n+00129070: 6865 2074 6865 203c 656d 3e3c 636f 6465 he the wsa:MessageID, \n+001290a0: 3c63 6f64 653e 7773 613a 546f 3c2f 636f wsa:To, wsa:Action, and \n+001290e0: 3c65 6d3e 3c63 6f64 653e 7773 613a 5265 wsa:Re\n+001290f0: 6c61 7465 7354 6f3c 2f63 6f64 653e 3c2f latesTo elements in \n+00129110: 7468 6520 534f 4150 2048 6561 6465 7220 the SOAP Header \n+00129120: 6f66 2074 6865 2072 6573 706f 6e73 6520 of the response \n+00129130: 6d65 7373 6167 653a 3c2f 703e 0a3c 6469 message:

    .
    //gso\n+00129180: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+00129190: 7468 6f64 2d68 6561 6465 722d 7061 7274 thod-header-part\n+001291a0: 3a20 2020 2020 2020 2020 2065 6368 6f53 : echoS\n+001291b0: 7472 696e 6720 7773 615f 5f4d 6573 7361 tring wsa__Messa\n+001291c0: 6765 4944 203c 2f73 7061 6e3e 3c2f 6469 geID .
    //gso\n+00129200: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+00129210: 7468 6f64 2d68 6561 6465 722d 7061 7274 thod-header-part\n+00129220: 3a20 2020 2020 2020 2020 2065 6368 6f53 : echoS\n+00129230: 7472 696e 6720 7773 615f 5f54 6f20 3c2f tring wsa__To
    .//gsoap ns s\n+00129280: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he\n+00129290: 6164 6572 2d70 6172 743a 2020 2020 2020 ader-part: \n+001292a0: 2020 2020 6563 686f 5374 7269 6e67 2077 echoString w\n+001292b0: 7361 5f5f 4163 7469 6f6e 203c 2f73 7061 sa__Action
    .
    //gsoap ns serv\n+00129300: 6963 6520 6d65 7468 6f64 2d69 6e70 7574 ice method-input\n+00129310: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: \n+00129320: 2065 6368 6f53 7472 696e 6720 7773 615f echoString wsa_\n+00129330: 5f52 6570 6c79 546f 203c 2f73 7061 6e3e _ReplyTo \n+00129340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+00129370: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+00129380: 6520 6d65 7468 6f64 2d6f 7574 7075 742d e method-output-\n+00129390: 6865 6164 6572 2d70 6172 743a 2020 2065 header-part: e\n+001293a0: 6368 6f53 7472 696e 6720 7773 615f 5f52 choString wsa__R\n+001293b0: 656c 6174 6573 546f 203c 2f73 7061 6e3e elatesTo \n+001293c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n+00129400: 5f5f 6563 686f 5374 7269 6e67 283c 7370 __echoString(char *str, char *\n+00129460: 2a72 6573 293b 3c2f 6469 763e 0a3c 2f64 *res);
    .

    For the c\n+00129490: 6f6e 7465 6e74 2072 6571 7569 7265 6d65 ontent requireme\n+001294a0: 6e74 7320 6f66 2074 6865 7365 2065 6c65 nts of these ele\n+001294b0: 6d65 6e74 732c 2070 6c65 6173 6520 636f ments, please co\n+001294c0: 6e73 756c 7420 7468 6520 534f 4150 2d6f nsult the SOAP-o\n+001294d0: 7665 722d 5544 5020 7370 6563 6966 6963 ver-UDP specific\n+001294e0: 6174 696f 6e20 616e 642f 6f72 2072 6561 ation and/or rea\n+001294f0: 6420 7468 6520 6e65 7874 2073 6563 7469 d the next secti\n+00129500: 6f6e 7320 6578 706c 6169 6e69 6e67 2053 ons explaining S\n+00129510: 4f41 502d 6f76 6572 2d55 4450 2075 6e69 OAP-over-UDP uni\n+00129520: 6361 7374 2c20 6d75 6c74 6963 6173 742c cast, multicast,\n+00129530: 206f 6e65 2d77 6179 2c20 616e 6420 7265 one-way, and re\n+00129540: 7175 6573 742d 7265 7370 6f6e 7365 2063 quest-response c\n+00129550: 6c69 656e 7420 616e 6420 7365 7276 6572 lient and server\n+00129560: 2061 7070 6c69 6361 7469 6f6e 732e 3c2f applications..

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

    .

    \n+001295d0: 0a43 6c69 656e 742d 7369 6465 206f 6e65 .Client-side one\n+001295e0: 2d77 6179 2055 4450 2075 6e69 6361 7374 -way UDP unicast\n+001295f0: 3c2f 6833 3e0a 3c70 3e54 6869 7320 6578

    .

    This ex\n+00129600: 616d 706c 6520 6173 7375 6d65 7320 7468 ample assumes th\n+00129610: 6174 2074 6865 2069 6e74 6572 6661 6365 at the interface\n+00129620: 2068 6561 6465 7220 6669 6c65 2069 6e63 header file inc\n+00129630: 6c75 6465 7320 7468 6520 534f 4150 2048 ludes the SOAP H\n+00129640: 6561 6465 7220 7769 7468 2057 532d 4164 eader with WS-Ad\n+00129650: 6472 6573 7369 6e67 2065 6c65 6d65 6e74 dressing element\n+00129660: 732c 2073 6565 203c 6120 636c 6173 733d s, see The WS-Addressi\n+001296a0: 6e67 2070 6c75 6769 6e3c 2f61 3e2c 2061 ng plugin, a\n+001296b0: 6e64 2074 6865 203c 636f 6465 3e6e 735f nd the ns_\n+001296c0: 5f73 656e 6453 7472 696e 673c 2f63 6f64 _sendString function disc\n+001296e0: 7573 7365 6420 696e 2053 6563 7469 6f6e ussed in Section\n+001296f0: 203c 6120 636c 6173 733d 2265 6c22 2068 Using WS\n+00129720: 2d41 6464 7265 7373 696e 6720 7769 7468 -Addressing with\n+00129730: 2053 4f41 502d 6f76 6572 2d55 4450 3c2f SOAP-over-UDP.

    .
    \n+00129770: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n+00129790: 7564 6520 2671 756f 743b 706c 7567 696e ude "plugin\n+001297a0: 2f77 7361 6170 692e 6826 7175 6f74 3b3c /wsaapi.h"<\n+001297b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001297d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n+00129800: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    soap\n+001298e0: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n+001298f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00129900: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00129910: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+00129920: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..\n+00129a00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n+00129a30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 send_ti\n+00129a80: 6d65 6f75 743c 2f61 3e20 3d20 353b 203c meout = 5; <\n+00129a90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00129aa0: 656e 7422 3e2f 2f20 3520 7365 636f 6e64 ent\">// 5 second\n+00129ab0: 7320 6d61 7820 736f 636b 6574 2064 656c s max socket del\n+00129ac0: 6179 203c 2f73 7061 6e3e 3c2f 6469 763e ay
    \n+00129ad0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // set \n+00129b00: 7570 2057 532d 4164 6472 6573 7369 6e67 up WS-Addressing\n+00129b10: 2068 6561 6465 723c 2f73 7061 6e3e 3c2f header.
    soap_wsa_\n+00129b40: 7265 7175 6573 7428 2661 6d70 3b3c 6120 request(&soap, "\n+00129ba0: 6d65 7373 6167 6520 4944 2671 756f 743b message ID"\n+00129bb0: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "endpo\n+00129be0: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int"\n+00129bf0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+00129c10: 756f 743b 534f 4150 2061 6374 696f 6e26 uot;SOAP action&\n+00129c20: 7175 6f74 3b3c 2f73 7061 6e3e 293b 3c2f quot;);.
    // \n+00129c60: 5365 6e64 2074 6865 206d 6573 7361 6765 Send the message\n+00129c70: 206f 7665 7220 5544 503a 203c 2f73 7061 over UDP:
    .
    if (\n+00129cc0: 736f 6170 5f73 656e 645f 6e73 5f5f 6563 soap_send_ns__ec\n+00129cd0: 686f 5374 7269 6e67 2826 616d 703b 3c61 hoString(&soap, <\n+00129d10: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00129d20: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00129d30: 3b73 6f61 702e 7564 703a 2f2f 656e 6470 ;soap.udp://endp\n+00129d40: 6f69 6e74 2671 756f 743b 3c2f 7370 616e oint", &\n+00129d70: 7175 6f74 3b53 4f41 5020 6163 7469 6f6e quot;SOAP action\n+00129d80: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n+00129d90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00129da0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00129db0: 3b68 656c 6c6f 2077 6f72 6c64 2126 7175 ;hello world!&qu\n+00129dc0: 6f74 3b3c 2f73 7061 6e3e 2929 203c 2f64 ot;)) .
    soap_\n+00129e40: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n+00129e50: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+00129e80: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); <\n+00129e90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00129ea0: 656e 7422 3e2f 2f20 6572 726f 7220 3c2f ent\">// error
    .soap_destroy<\n+00129f30: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+00129f60: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n+00129f70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_end\n+00129fe0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
    soap_do\n+0012a090: 6e65 3c2f 613e 2826 616d 703b 3c61 2063 ne(&soap);.
    soap_register\n+0012a190: 5f70 6c75 6769 6e3c 2f61 3e3c 2f64 6976 _plugin
    int soap_re\n+0012a1c0: 6769 7374 6572 5f70 6c75 6769 6e28 7374 gister_plugin(st\n+0012a1d0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0012a1e0: 2069 6e74 282a 6663 7265 6174 6529 2873 int(*fcreate)(s\n+0012a1f0: 7472 7563 7420 736f 6170 202a 2c20 7374 truct soap *, st\n+0012a200: 7275 6374 2073 6f61 705f 706c 7567 696e ruct soap_plugin\n+0012a210: 202a 2c20 766f 6964 202a 2929 3c2f 6469 *, void *))
    Register a \n+0012a240: 706c 7567 696e 2e3c 2f64 6976 3e3c 2f64 plugin.
    .

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

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

    .Clien\n+0012a2d0: 742d 7369 6465 206f 6e65 2d77 6179 2055 t-side one-way U\n+0012a2e0: 4450 206d 756c 7469 6361 7374 3c2f 6833 DP multicast.

    This exampl\n+0012a300: 6520 6973 2073 696d 696c 6172 2074 6f20 e is similar to \n+0012a310: 7468 6520 6f6e 652d 7761 7920 756e 6963 the one-way unic\n+0012a320: 6173 7420 6578 616d 706c 6520 6469 7363 ast example disc\n+0012a330: 7573 7365 6420 6162 6f76 652c 2062 7574 ussed above, but\n+0012a340: 2075 7365 7320 6120 6272 6f61 6463 6173 uses a broadcas\n+0012a350: 7420 6164 6472 6573 7320 616e 6420 7468 t address and th\n+0012a360: 6520 3c63 6f64 653e 534f 5f42 524f 4144 e SO_BROAD\n+0012a370: 4341 5354 3c2f 636f 6465 3e20 736f 636b CAST sock\n+0012a380: 6574 206f 7074 696f 6e3a 3c2f 703e 0a3c et option:

    .<\n+0012a390: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0012a3a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #include "\n+0012a3e0: 3b70 6c75 6769 6e2f 7773 6161 7069 2e68 ;plugin/wsaapi.h\n+0012a3f0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    .\n+0012a430: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+0012a480: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> soap<\n+0012a4b0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    .in\n+0012a4d0: 5f61 6464 725f 7420 6164 6472 203d 2069 _addr_t addr = i\n+0012a4e0: 6e65 745f 6164 6472 283c 7370 616e 2063 net_addr("1.2.3\n+0012a510: 2e34 2671 756f 743b 3c2f 7370 616e 3e29 .4")\n+0012a520: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // optio\n+0012a540: 6e61 6c20 3c2f 7370 616e 3e3c 2f64 6976 nal .
    soap_in\n+0012a5c0: 6974 3c2f 613e 2826 616d 703b 3c61 2063 it(&soap); ..
    soap.send_timeo\n+0012a760: 7574 3c2f 613e 203d 2035 3b20 3c73 7061 ut = 5; // 5 seconds m\n+0012a790: 6178 2073 6f63 6b65 7420 6465 6c61 793c ax socket delay<\n+0012a7a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012a7c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012a7d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012a7e0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0012a7f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012a800: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012a810: 6874 6d6c 2361 3532 6132 3266 6166 6333 html#a52a22fafc3\n+0012a820: 3639 6233 6135 3466 6230 6431 3666 3533 69b3a54fb0d16f53\n+0012a830: 3135 3837 3934 223e 636f 6e6e 6563 745f 158794\">connect_\n+0012a840: 666c 6167 733c 2f61 3e20 3d20 534f 5f42 flags = SO_B\n+0012a850: 524f 4144 4341 5354 3b20 3c73 7061 6e20 ROADCAST; \n+0012a870: 2f2f 2072 6571 7569 7265 6420 666f 7220 // required for \n+0012a880: 6272 6f61 6463 6173 7420 3c2f 7370 616e broadcast
    .
    soap.ipv4_multicas\n+0012a930: 745f 6966 3c2f 613e 203d 2026 616d 703b t_if = &\n+0012a940: 6164 6472 3b20 3c73 7061 6e20 636c 6173 addr; // o\n+0012a960: 7074 696f 6e61 6c20 666f 7220 4950 7634 ptional for IPv4\n+0012a970: 3a20 7365 6520 7365 7473 6f63 6b6f 7074 : see setsockopt\n+0012a980: 2049 5050 524f 544f 5f49 5020 4950 5f4d IPPROTO_IP IP_M\n+0012a990: 554c 5449 4341 5354 5f49 4620 3c2f 7370 ULTICAST_IF
    .
    soap.ipv6_multic\n+0012aa40: 6173 745f 6966 3c2f 613e 203d 2061 6464 ast_if = add\n+0012aa50: 723b 203c 7370 616e 2063 6c61 7373 3d22 r; // opti\n+0012aa70: 6f6e 616c 2066 6f72 2049 5076 363a 206d onal for IPv6: m\n+0012aa80: 756c 7469 6361 7374 2073 696e 365f 7363 ulticast sin6_sc\n+0012aa90: 6f70 655f 6964 203c 2f73 7061 6e3e 3c2f ope_id .
    so\n+0012aae0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n+0012ab30: 6970 7634 5f6d 756c 7469 6361 7374 5f74 ipv4_multicast_t\n+0012ab40: 746c 3c2f 613e 203d 2031 3b20 3c73 7061 tl = 1; // optional, s\n+0012ab70: 6565 2073 6574 736f 636b 6f70 7420 4950 ee setsockopt IP\n+0012ab80: 5052 4f54 4f5f 4950 2c20 4950 5f4d 554c PROTO_IP, IP_MUL\n+0012ab90: 5449 4341 5354 5f54 544c 203c 2f73 7061 TICAST_TTL
    .
    // set up WS-Ad\n+0012abe0: 6472 6573 7369 6e67 2068 6561 6465 723c dressing header<\n+0012abf0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .s\n+0012ac10: 6f61 705f 7773 615f 7265 7175 6573 7428 oap_wsa_request(\n+0012ac20: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+0012ac50: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "message \n+0012ac80: 4944 2671 756f 743b 3c2f 7370 616e 3e2c ID",\n+0012ac90: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0012acb0: 6f74 3b65 6e64 706f 696e 7426 7175 6f74 ot;endpoint"\n+0012acc0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "SOAP\n+0012acf0: 2061 6374 696f 6e26 7175 6f74 3b3c 2f73 action");
    .<\n+0012ad20: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0012ad30: 656e 7422 3e2f 2f20 5365 6e64 2074 6865 ent\">// Send the\n+0012ad40: 206d 6573 7361 6765 206f 7665 7220 5544 message over UD\n+0012ad50: 5020 746f 2061 2062 726f 6164 6361 7374 P to a broadcast\n+0012ad60: 2061 6464 7265 7373 3a20 3c2f 7370 616e address:

    .
    if (s\n+0012adb0: 6f61 705f 7365 6e64 5f6e 735f 5f65 6368 oap_send_ns__ech\n+0012adc0: 6f53 7472 696e 6728 2661 6d70 3b3c 6120 oString(&soap, "\n+0012ae20: 736f 6170 2e75 6470 3a2f 2f65 6e64 706f soap.udp://endpo\n+0012ae30: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int"\n+0012ae40: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+0012ae60: 756f 743b 534f 4150 2061 6374 696f 6e26 uot;SOAP action&\n+0012ae70: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+0012aea0: 6865 6c6c 6f20 776f 726c 6421 2671 756f hello world!&quo\n+0012aeb0: 743b 3c2f 7370 616e 3e29 2920 3c2f 6469 t;)) .
    soap_p\n+0012af30: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(&\n+0012af40: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012af70: 2f61 3e2c 2073 7464 6572 7229 3b20 3c73 /a>, stderr); // report er\n+0012afa0: 726f 7220 3c2f 7370 616e 3e3c 2f64 6976 ror .
    soap_de\n+0012b020: 7374 726f 793c 2f61 3e28 2661 6d70 3b3c stroy(&<\n+0012b030: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012b040: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012b050: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+0012b060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n+0012b0d0: 6170 5f65 6e64 3c2f 613e 2826 616d 703b ap_end(&\n+0012b0e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+0012b110: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    s\n+0012b180: 6f61 705f 646f 6e65 3c2f 613e 2826 616d oap_done(&am\n+0012b190: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    soap::ipv6_mu\n+0012b270: 6c74 6963 6173 745f 6966 3c2f 613e 3c2f lticast_if
    unsigned\n+0012b2a0: 2069 6e74 2069 7076 365f 6d75 6c74 6963 int ipv6_multic\n+0012b2b0: 6173 745f 6966 3c2f 6469 763e 3c64 6976 ast_if
    U\n+0012b2d0: 7365 722d 6465 6669 6e61 626c 6520 7661 ser-definable va\n+0012b2e0: 6c75 6520 746f 2073 6574 2073 6f63 6b61 lue to set socka\n+0012b2f0: 6464 725f 696e 363a 3a73 696e 365f 7363 ddr_in6::sin6_sc\n+0012b300: 6f70 655f 6964 2077 6865 6e20 6e6f 6e7a ope_id when nonz\n+0012b310: 6572 6f2e 3c2f 6469 763e 3c64 6976 2063 ero.
    \n+0012b330: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0012b340: 7374 6473 6f61 7032 2e68 3a33 3539 323c stdsoap2.h:3592<\n+0012b350: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soap::conne\n+0012b400: 6374 5f66 6c61 6773 3c2f 613e 3c2f 6469 ct_flags
    int connec\n+0012b430: 745f 666c 6167 733c 2f64 6976 3e3c 6469 t_flags
    \n+0012b450: 5573 6572 2d64 6566 696e 6162 6c65 2073 User-definable s\n+0012b460: 6574 736f 636b 6f70 7420 6c65 7665 6c20 etsockopt level \n+0012b470: 534f 4c5f 534f 434b 4554 2066 6c61 6773 SOL_SOCKET flags\n+0012b480: 2077 6865 6e20 636f 6e6e 6563 7469 6e67 when connecting\n+0012b490: 2073 6f61 703a 3a73 6f63 6b65 7420 746f soap::socket to\n+0012b4a0: 2061 2073 6572 7665 7220 2874 6865 2076 a server (the v\n+0012b4b0: 616c 7565 202e 2e2e 3c2f 6469 763e 3c64 alue ...
    Definition:<\n+0012b4e0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n+0012b4f0: 3337 373c 2f64 6976 3e3c 2f64 6976 3e0a 377
    .\n+0012b500: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    u\n+0012b5d0: 6e73 6967 6e65 6420 6368 6172 2069 7076 nsigned char ipv\n+0012b5e0: 345f 6d75 6c74 6963 6173 745f 7474 6c3c 4_multicast_ttl<\n+0012b5f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n+0012b610: 696e 6162 6c65 2076 616c 7565 2074 6f20 inable value to \n+0012b620: 7365 7420 7365 7473 6f63 6b6f 7074 206c set setsockopt l\n+0012b630: 6576 656c 2049 5050 524f 544f 5f49 5020 evel IPPROTO_IP \n+0012b640: 746f 2049 505f 4d55 4c54 4943 4153 545f to IP_MULTICAST_\n+0012b650: 5454 4c20 7768 656e 206e 6f6e 7a65 726f TTL when nonzero\n+0012b660: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+0012b680: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+0012b690: 736f 6170 322e 683a 3336 3230 3c2f 6469 soap2.h:3620
    .
    soap::ipv4_mul\n+0012b750: 7469 6361 7374 5f69 663c 2f61 3e3c 2f64 ticast_if
    char * ip\n+0012b780: 7634 5f6d 756c 7469 6361 7374 5f69 663c v4_multicast_if<\n+0012b790: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n+0012b7b0: 696e 6162 6c65 2076 616c 7565 2074 6f20 inable value to \n+0012b7c0: 7365 7420 7365 7473 6f63 6b6f 7074 206c set setsockopt l\n+0012b7d0: 6576 656c 2049 5050 524f 544f 5f49 5020 evel IPPROTO_IP \n+0012b7e0: 746f 2049 505f 4d55 4c54 4943 4153 545f to IP_MULTICAST_\n+0012b7f0: 4946 2077 6865 6e20 6e6f 6e2d 4e55 4c4c IF when non-NULL\n+0012b800: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+0012b820: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+0012b830: 736f 6170 322e 683a 3335 3939 3c2f 6469 soap2.h:3599
    .
    <\n+0012b850: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0012b860: 3c70 3e50 6c65 6173 6520 7265 6665 7220

    Please refer \n+0012b870: 746f 2074 6865 2073 6f63 6b65 7420 6f70 to the socket op\n+0012b880: 7469 6f6e 7320 666f 7220 3c63 6f64 653e tions for \n+0012b890: 4950 5052 4f54 4f5f 4950 3c2f 636f 6465 IPPROTO_IP IP_MULTI\n+0012b8b0: 4341 5354 5f49 463c 2f63 6f64 653e 2074 CAST_IF t\n+0012b8c0: 6f20 7370 6563 6966 7920 7468 6520 6465 o specify the de\n+0012b8d0: 6661 756c 7420 696e 7465 7266 6163 6520 fault interface \n+0012b8e0: 666f 7220 6d75 6c74 6963 6173 7420 6461 for multicast da\n+0012b8f0: 7461 6772 616d 7320 746f 2062 6520 7365 tagrams to be se\n+0012b900: 6e74 2066 726f 6d2e 2054 6869 7320 6973 nt from. This is\n+0012b910: 2061 203c 636f 6465 3e73 7472 7563 7420 a struct \n+0012b920: 696e 5f61 6464 723c 2f63 6f64 653e 2028 in_addr (\n+0012b930: 3c63 6f64 653e 696e 5f61 6464 725f 743c in_addr_t<\n+0012b940: 2f63 6f64 653e 2066 6f72 203c 636f 6465 /code> for sin6_scope_id) interface\n+0012b970: 2076 616c 7565 2e20 4f74 6865 7277 6973 value. Otherwis\n+0012b980: 652c 2074 6865 2064 6566 6175 6c74 2069 e, the default i\n+0012b990: 6e74 6572 6661 6365 2073 6574 2062 7920 nterface set by \n+0012b9a0: 7468 6520 7379 7374 656d 2061 646d 696e the system admin\n+0012b9b0: 6973 7472 6174 6f72 2077 696c 6c20 6265 istrator will be\n+0012b9c0: 2075 7365 6420 2869 6620 616e 7929 2e3c used (if any).<\n+0012b9d0: 2f70 3e0a 3c70 3e50 6c65 6173 6520 7265 /p>.

    Please re\n+0012b9e0: 6665 7220 746f 2074 6865 2073 6f63 6b65 fer to the socke\n+0012b9f0: 7420 6f70 7469 6f6e 7320 666f 7220 3c63 t options for IPPROTO_IP IP_M\n+0012ba20: 554c 5449 4341 5354 5f54 544c 3c2f 636f ULTICAST_TTL to limit the\n+0012ba40: 206c 6966 6574 696d 6520 6f66 2074 6865 lifetime of the\n+0012ba50: 2070 6163 6b65 742e 204d 756c 7469 6361 packet. Multica\n+0012ba60: 7374 2064 6174 6167 7261 6d73 2061 7265 st datagrams are\n+0012ba70: 2073 656e 7420 7769 7468 2061 2064 6566 sent with a def\n+0012ba80: 6175 6c74 2076 616c 7565 206f 6620 312c ault value of 1,\n+0012ba90: 2074 6f20 7072 6576 656e 7420 7468 656d to prevent them\n+0012baa0: 2074 6f20 6265 2066 6f72 7761 7264 6564 to be forwarded\n+0012bab0: 2062 6579 6f6e 6420 7468 6520 6c6f 6361 beyond the loca\n+0012bac0: 6c20 6e65 7477 6f72 6b2e 2054 6869 7320 l network. This \n+0012bad0: 7061 7261 6d65 7465 7220 6361 6e20 6265 parameter can be\n+0012bae0: 2073 6574 2062 6574 7765 656e 2031 2074 set between 1 t\n+0012baf0: 6f20 3235 352e 3c2f 703e 0a3c 703e f09f o 255.

    .

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

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

    .Client-s\n+0012bb70: 6964 6520 7265 7175 6573 742d 7265 7370 ide request-resp\n+0012bb80: 6f6e 7365 2055 4450 2075 6e69 6361 7374 onse UDP unicast\n+0012bb90: 3c2f 6833 3e0a 3c70 3e54 6869 7320 6578

    .

    This ex\n+0012bba0: 616d 706c 6520 6173 7375 6d65 7320 7468 ample assumes th\n+0012bbb0: 6174 2074 6865 2069 6e74 6572 6661 6365 at the interface\n+0012bbc0: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n+0012bbd0: 2073 6f61 7063 7070 3220 696e 636c 7564 soapcpp2 includ\n+0012bbe0: 6573 2074 6865 2053 4f41 5020 4865 6164 es the SOAP Head\n+0012bbf0: 6572 2077 6974 6820 5753 2d41 6464 7265 er with WS-Addre\n+0012bc00: 7373 696e 6720 656c 656d 656e 7473 2069 ssing elements i\n+0012bc10: 6d70 6f72 7465 6420 7769 7468 203c 636f mported with #import \"wsa.\n+0012bc30: 6822 3c2f 636f 6465 3e20 616e 6420 7468 h\" and th\n+0012bc40: 6520 3c63 6f64 653e 6e73 5f5f 6563 686f e ns__echo\n+0012bc50: 5374 7269 6e67 3c2f 636f 6465 3e20 6675 String fu\n+0012bc60: 6e63 7469 6f6e 2064 6973 6375 7373 6564 nction discussed\n+0012bc70: 2069 6e20 5365 6374 696f 6e20 3c61 2063 in Section Using WS-Addr\n+0012bcb0: 6573 7369 6e67 2077 6974 6820 534f 4150 essing with SOAP\n+0012bcc0: 2d6f 7665 722d 5544 503c 2f61 3e20 2e3c -over-UDP .<\n+0012bcd0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #include \n+0012bd20: 2671 756f 743b 706c 7567 696e 2f77 7361 "plugin/wsa\n+0012bd30: 6170 692e 6826 7175 6f74 3b3c 2f73 7061 api.h"
    .
    .\n+0012be00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struct \n+0012be30: 3c2f 7370 616e 3e77 7361 5f5f 456e 6470 wsa__Endp\n+0012be40: 6f69 6e74 5265 6665 7265 6e63 6554 7970 ointReferenceTyp\n+0012be50: 6520 7265 706c 7954 6f3b 203c 7370 616e e replyTo; // (anonymous) \n+0012be80: 7265 706c 7920 6164 6472 6573 7320 3c2f reply address
    .char *res; \n+0012bef0: 2f2f 2073 6572 7665 7220 7265 7370 6f6e // server respon\n+0012bf00: 7365 203c 2f73 7061 6e3e 3c2f 6469 763e se
    \n+0012bf10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_ini\n+0012bf80: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); ..
    soap.send_timeou\n+0012c120: 743c 2f61 3e20 3d20 353b 203c 7370 616e t = 5; // 5 seconds ma\n+0012c150: 7820 736f 636b 6574 2064 656c 6179 203c x socket delay <\n+0012c160: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012c180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012c190: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012c1a0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0012c1b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012c1c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012c1d0: 6874 6d6c 2361 6335 6435 6662 3932 6666 html#ac5d5fb92ff\n+0012c1e0: 6664 6137 3234 6363 6233 6230 3338 6432 fda724ccb3b038d2\n+0012c1f0: 6262 3233 3838 223e 7265 6376 5f74 696d bb2388\">recv_tim\n+0012c200: 656f 7574 3c2f 613e 203d 2035 3b20 3c73 eout = 5; // 5 seconds\n+0012c230: 206d 6178 2073 6f63 6b65 7420 6465 6c61 max socket dela\n+0012c240: 7920 3c2f 7370 616e 3e3c 2f64 6976 3e0a y
    .\n+0012c250: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // set u\n+0012c280: 7020 5753 2d41 6464 7265 7373 696e 6720 p WS-Addressing \n+0012c290: 6865 6164 6572 3c2f 7370 616e 3e3c 2f64 header.
    soap_wsa_r\n+0012c2c0: 6571 7565 7374 2826 616d 703b 3c61 2063 equest(&soap, "m\n+0012c320: 6573 7361 6765 2049 4426 7175 6f74 3b3c essage ID"<\n+0012c330: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "endpoi\n+0012c360: 6e74 2671 756f 743b 3c2f 7370 616e 3e2c nt",\n+0012c370: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0012c390: 6f74 3b53 4f41 5020 6163 7469 6f6e 2671 ot;SOAP action&q\n+0012c3a0: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    soap_wsa_a\n+0012c3d0: 6464 5f52 6570 6c79 546f 2826 616d 703b dd_ReplyTo(&\n+0012c3e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+0012c410: 204e 554c 4c29 3b20 3c73 7061 6e20 636c NULL); //\n+0012c430: 2061 6e6f 6e79 6d6f 7573 2052 6570 6c79 anonymous Reply\n+0012c440: 546f 2061 6464 7265 7373 3c2f 7370 616e To address
    .
    \n+0012c480: 2f2f 2053 656e 6420 616e 6420 7265 6365 // Send and rece\n+0012c490: 6976 6520 6d65 7373 6167 6573 206f 7665 ive messages ove\n+0012c4a0: 7220 5544 503a 203c 2f73 7061 6e3e 3c2f r UDP: .
    if (soap\n+0012c4f0: 5f63 616c 6c5f 6e73 5f5f 6563 686f 5374 _call_ns__echoSt\n+0012c500: 7269 6e67 2826 616d 703b 3c61 2063 6c61 ring(&soap, "soa\n+0012c560: 702e 7564 703a 2f2f 656e 6470 6f69 6e74 p.udp://endpoint\n+0012c570: 2026 7175 6f74 3b3c 2f73 7061 6e3e 534f "SO\n+0012c580: 4150 2061 6374 696f 6e3c 7370 616e 2063 AP action", &qu\n+0012c5b0: 6f74 3b3c 2f73 7061 6e3e 6865 6c6c 6f20 ot;hello \n+0012c5c0: 776f 726c 6421 3c73 7061 6e20 636c 6173 world!", &r\n+0012c5f0: 6573 2929 203c 2f73 7061 6e3e 3c2f 6469 es)) .
    {
    .\n+0012c640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+0012c670: 6966 2028 736f 6170 2e65 7272 6f72 203d if (soap.error =\n+0012c680: 3d20 534f 4150 5f45 4f46 2026 616d 703b = SOAP_EOF &\n+0012c690: 2661 6d70 3b20 736f 6170 2e65 7272 6e75 & soap.errnu\n+0012c6a0: 6d20 3d3d 2030 2920 3c2f 7370 616e 3e3c m == 0) <\n+0012c6b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // T\n+0012c6f0: 696d 656f 7574 3a20 6e6f 2072 6573 706f imeout: no respo\n+0012c700: 6e73 6520 6672 6f6d 2073 6572 7665 7220 nse from server \n+0012c710: 286d 6573 7361 6765 2061 6c72 6561 6479 (message already\n+0012c720: 2064 656c 6976 6572 6564 3f29 203c 2f73 delivered?)
    .
    else \n+0012c770: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012c790: 3c73 7061 6e20 636c 6173 733d 2273 7472 \n+0012c7b0: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault\n+0012c7c0: 2826 616d 703b 736f 6170 2c20 7374 6465 (&soap, stde\n+0012c7d0: 7272 293b 203c 2f73 7061 6e3e 3c2f 6469 rr); .
    }
    \n+0012c820: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    e\n+0012c850: 6c73 6520 3c2f 7370 616e 3e3c 2f64 6976 lse .
    \n+0012c890: 2020 2e2e 2e20 2f2f 2055 4450 2073 6572 ... // UDP ser\n+0012c8a0: 7665 7220 7265 7370 6f6e 7365 2069 7320 ver response is \n+0012c8b0: 7374 6f72 6564 2069 6e20 2623 3339 3b72 stored in 'r\n+0012c8c0: 6573 2623 3339 3b20 3c2f 7370 616e 3e3c es' <\n+0012c8d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // check SOA\n+0012c910: 5020 6865 6164 6572 2072 6563 6569 7665 P header receive\n+0012c920: 642c 2069 6620 6170 706c 6963 6162 6c65 d, if applicable\n+0012c930: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012c940: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012c950: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 >che\n+0012c970: 636b 5f68 6561 6465 7228 2661 6d70 3b73 ck_header(&s\n+0012c980: 6f61 702e 6865 6164 6572 293b 203c 2f73 oap.header);
    .
    soap_de\n+0012c9d0: 7374 726f 7928 2661 6d70 3b73 6f61 7029 stroy(&soap)\n+0012c9e0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+0012c9f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012ca00: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 >soa\n+0012ca20: 705f 656e 6428 2661 6d70 3b73 6f61 7029 p_end(&soap)\n+0012ca30: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+0012ca40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012ca50: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 >soa\n+0012ca70: 705f 646f 6e65 2826 616d 703b 736f 6170 p_done(&soap\n+0012ca80: 293b 3c2f 7370 616e 3e3c 2f64 6976 3e0a );
    .\n+0012ca90: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

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

    ..Client-sid\n+0012cb20: 6520 7265 7175 6573 742d 7265 7370 6f6e e request-respon\n+0012cb30: 7365 206d 756c 7469 6361 7374 3c2f 6833 se multicast.

    This exampl\n+0012cb50: 6520 6973 2073 696d 696c 6172 2074 6f20 e is similar to \n+0012cb60: 7468 6520 7265 7175 6573 742d 7265 7370 the request-resp\n+0012cb70: 6f6e 7365 2075 6e69 6361 7374 2065 7861 onse unicast exa\n+0012cb80: 6d70 6c65 2064 6973 6375 7373 6564 2061 mple discussed a\n+0012cb90: 626f 7665 2c20 6275 7420 7573 6573 2061 bove, but uses a\n+0012cba0: 2062 726f 6164 6361 7374 2061 6464 7265 broadcast addre\n+0012cbb0: 7373 2061 6e64 2074 6865 203c 636f 6465 ss and the SO_BROADCAST socket opti\n+0012cbe0: 6f6e 2e20 4265 6361 7573 6520 7765 2065 on. Because we e\n+0012cbf0: 7870 6563 7420 746f 2072 6563 6569 7665 xpect to receive\n+0012cc00: 206d 756c 7469 706c 6520 7265 7370 6f6e multiple respon\n+0012cc10: 7365 732c 2077 6520 616c 736f 206e 6565 ses, we also nee\n+0012cc20: 6420 746f 2075 7365 2073 6570 6172 6174 d to use separat\n+0012cc30: 6520 7265 7175 6573 742d 7265 7370 6f6e e request-respon\n+0012cc40: 7365 206d 6573 7361 6765 7320 746f 2073 se messages to s\n+0012cc50: 656e 6420 6f6e 6520 7265 7175 6573 7420 end one request \n+0012cc60: 616e 6420 636f 6e73 756d 6520 6d75 6c74 and consume mult\n+0012cc70: 6970 6c65 2072 6573 706f 6e73 6573 2e20 iple responses. \n+0012cc80: 496e 2074 6869 7320 6578 616d 706c 6520 In this example \n+0012cc90: 7765 2064 6566 696e 6564 2061 203c 636f we defined a bcastString request an\n+0012ccc0: 6420 6120 3c63 6f64 653e 6263 6173 7453 d a bcastS\n+0012ccd0: 7472 696e 6752 6573 706f 6e73 653c 2f63 tringResponse response me\n+0012ccf0: 7373 6167 652c 2077 6869 6368 2061 7265 ssage, which are\n+0012cd00: 2065 7373 656e 7469 616c 6c79 2064 6563 essentially dec\n+0012cd10: 6c61 7265 6420 6173 206f 6e65 2d77 6179 lared as one-way\n+0012cd20: 206d 6573 7361 6765 7320 696e 2074 6865 messages in the\n+0012cd30: 2068 6561 6465 7220 6669 6c65 3a3c 2f70 header file:.

    \n+0012cd80: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+0012cd90: 6365 206d 6574 686f 642d 6865 6164 6572 ce method-header\n+0012cda0: 2d70 6172 743a 2020 2020 2020 2020 2020 -part: \n+0012cdb0: 6263 6173 7453 7472 696e 6720 7773 615f bcastString wsa_\n+0012cdc0: 5f4d 6573 7361 6765 4944 203c 2f73 7061 _MessageID
    .
    //gsoap ns serv\n+0012ce10: 6963 6520 6d65 7468 6f64 2d68 6561 6465 ice method-heade\n+0012ce20: 722d 7061 7274 3a20 2020 2020 2020 2020 r-part: \n+0012ce30: 2062 6361 7374 5374 7269 6e67 2077 7361 bcastString wsa\n+0012ce40: 5f5f 546f 203c 2f73 7061 6e3e 3c2f 6469 __To .
    //gso\n+0012ce80: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+0012ce90: 7468 6f64 2d68 6561 6465 722d 7061 7274 thod-header-part\n+0012cea0: 3a20 2020 2020 2020 2020 2062 6361 7374 : bcast\n+0012ceb0: 5374 7269 6e67 2077 7361 5f5f 4163 7469 String wsa__Acti\n+0012cec0: 6f6e 203c 2f73 7061 6e3e 3c2f 6469 763e on
    \n+0012ced0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+0012cf00: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+0012cf10: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: \n+0012cf20: 2020 2020 2020 2020 2062 6361 7374 5374 bcastSt\n+0012cf30: 7269 6e67 2077 7361 5f5f 5265 706c 7954 ring wsa__ReplyT\n+0012cf40: 6f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a o
    .\n+0012cf50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n+0012cf80: 2f73 7061 6e3e 206e 735f 5f62 6361 7374 /span> ns__bcast\n+0012cf90: 5374 7269 6e67 283c 7370 616e 2063 6c61 String(char *st\n+0012cfc0: 722c 203c 7370 616e 2063 6c61 7373 3d22 r, voi\n+0012cfe0: 643c 2f73 7061 6e3e 293b 203c 2f64 6976 d); .
    //gsoa\n+0012d020: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n+0012d030: 686f 642d 6865 6164 6572 2d70 6172 743a hod-header-part:\n+0012d040: 2020 2020 2020 2020 2020 6263 6173 7453 bcastS\n+0012d050: 7472 696e 6752 6573 706f 6e73 6520 7773 tringResponse ws\n+0012d060: 615f 5f4d 6573 7361 6765 4944 203c 2f73 a__MessageID
    .
    //gsoap ns se\n+0012d0b0: 7276 6963 6520 6d65 7468 6f64 2d68 6561 rvice method-hea\n+0012d0c0: 6465 722d 7061 7274 3a20 2020 2020 2020 der-part: \n+0012d0d0: 2020 2062 6361 7374 5374 7269 6e67 5265 bcastStringRe\n+0012d0e0: 7370 6f6e 7365 2077 7361 5f5f 546f 203c sponse wsa__To <\n+0012d0f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012d110: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0012d120: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+0012d130: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h\n+0012d140: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: \n+0012d150: 2020 2020 2062 6361 7374 5374 7269 6e67 bcastString\n+0012d160: 5265 7370 6f6e 7365 2077 7361 5f5f 4163 Response wsa__Ac\n+0012d170: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion
    .
    //gso\n+0012d1b0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+0012d1c0: 7468 6f64 2d68 6561 6465 722d 7061 7274 thod-header-part\n+0012d1d0: 3a20 2020 2020 2020 2020 2062 6361 7374 : bcast\n+0012d1e0: 5374 7269 6e67 5265 7370 6f6e 7365 2077 StringResponse w\n+0012d1f0: 7361 5f5f 5265 6c61 7465 7354 6f20 3c2f sa__RelatesTo
    .int ns__bcastStri\n+0012d250: 6e67 5265 7370 6f6e 7365 283c 7370 616e ngResponse(char\n+0012d280: 202a 7265 732c 203c 7370 616e 2063 6c61 *res, void);.

    T\n+0012d2d0: 6f20 6f62 7461 696e 2072 6573 706f 6e73 o obtain respons\n+0012d2e0: 6520 6f6e 652d 7761 7920 6f70 6572 6174 e one-way operat\n+0012d2f0: 696f 6e73 2c20 7573 6520 3c61 2068 7265 ions, use wsdl2h -b\n+0012d320: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+0012d330: 6f6e 203c 623e 3c63 6f64 653e 2d62 3c2f on -b..

    The client\n+0012d360: 2063 6f64 6520 696e 636c 7564 6573 2061 code includes a\n+0012d370: 206c 6f6f 7020 746f 2072 6563 6569 7665 loop to receive\n+0012d380: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag\n+0012d390: 6573 2075 6e74 696c 2061 2074 696d 656f es until a timeo\n+0012d3a0: 7574 206f 6363 7572 733a 3c2f 703e 0a3c ut occurs:

    .<\n+0012d3b0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0012d3c0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #include "\n+0012d400: 3b70 6c75 6769 6e2f 7773 6161 7069 2e68 ;plugin/wsaapi.h\n+0012d410: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    .\n+0012d450: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+0012d4a0: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> soap<\n+0012d4d0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    .struct \n+0012d550: 534f 4150 5f45 4e56 5f5f 4865 6164 6572 SOAP_ENV__Header\n+0012d560: 3c2f 613e 2068 6561 6465 723b 203c 2f64 header; .
    stru\n+0012d5a0: 6374 203c 2f73 7061 6e3e 7773 615f 5f45 ct wsa__E\n+0012d5b0: 6e64 706f 696e 7452 6566 6572 656e 6365 ndpointReference\n+0012d5c0: 5479 7065 2072 6570 6c79 546f 3b20 3c2f Type replyTo; .
    char *re\n+0012d610: 733b 203c 2f64 6976 3e0a 3c64 6976 2063 s;
    .
    soap_init(&\n+0012d690: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012d6c0: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    .<\n+0012d6e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012d6f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0012d700: 705f 5f70 6c75 6769 6e2e 6874 6d6c 2367 p__plugin.html#g\n+0012d710: 6164 3634 3565 3561 3538 6564 3434 3266 ad645e5a58ed442f\n+0012d720: 6534 3735 3364 6363 3233 3338 6338 6264 e4753dcc2338c8bd\n+0012d730: 6222 3e73 6f61 705f 7265 6769 7374 6572 b\">soap_register\n+0012d740: 5f70 6c75 6769 6e3c 2f61 3e28 2661 6d70 _plugin(&\n+0012d750: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+0012d780: 2c20 736f 6170 5f77 7361 293b 3c2f 6469 , soap_wsa);.
    soap\n+0012d7d0: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .co\n+0012d820: 6e6e 6563 745f 666c 6167 733c 2f61 3e20 nnect_flags \n+0012d830: 3d20 534f 5f42 524f 4144 4341 5354 3b20 = SO_BROADCAST; \n+0012d840: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    soap.recv_timeou\n+0012d9c0: 743c 2f61 3e20 3d20 353b 203c 7370 616e t = 5; // 5 seconds ma\n+0012d9f0: 7820 736f 636b 6574 2064 656c 6179 203c x socket delay <\n+0012da00: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012da20: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0012da30: 656e 7422 3e2f 2f20 7365 7420 7570 2057 ent\">// set up W\n+0012da40: 532d 4164 6472 6573 7369 6e67 2068 6561 S-Addressing hea\n+0012da50: 6465 723c 2f73 7061 6e3e 3c2f 6469 763e der
    \n+0012da60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_wsa_requ\n+0012da80: 6573 7428 2661 6d70 3b3c 6120 636c 6173 est(&\n+0012dab0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "mess\n+0012dae0: 6167 6520 4944 2671 756f 743b 3c2f 7370 age ID", "endpoint&\n+0012db20: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+0012db50: 534f 4150 2061 6374 696f 6e26 7175 6f74 SOAP action"\n+0012db60: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
    \n+0012db70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_wsa_add_\n+0012db90: 5265 706c 7954 6f28 2661 6d70 3b3c 6120 ReplyTo(&soap, NU\n+0012dbd0: 4c4c 293b 203c 7370 616e 2063 6c61 7373 LL); // an\n+0012dbf0: 6f6e 796d 6f75 7320 5265 706c 7954 6f20 onymous ReplyTo \n+0012dc00: 6164 6472 6573 733c 2f73 7061 6e3e 3c2f address.
    if (soap\n+0012dc50: 5f73 656e 645f 6e73 5f5f 6263 6173 7453 _send_ns__bcastS\n+0012dc60: 7472 696e 6728 2661 6d70 3b3c 6120 636c tring(&soap, "so\n+0012dcc0: 6170 2e75 6470 3a2f 2f65 6e64 706f 696e ap.udp://endpoin\n+0012dcd0: 7426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 t", \n+0012dce0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0012dd00: 743b 534f 4150 2061 6374 696f 6e26 7175 t;SOAP action&qu\n+0012dd10: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "he\n+0012dd40: 6c6c 6f20 776f 726c 6421 2671 756f 743b llo world!"\n+0012dd50: 3c2f 7370 616e 3e29 2920 3c2f 6469 763e ))
    \n+0012dd60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+0012dd90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012dda0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0012ddb0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n+0012ddc0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n+0012ddd0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n+0012dde0: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n+0012ddf0: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n+0012de30: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    .}\n+0012de50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else <\n+0012de90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+0012deb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    wh\n+0012dee0: 696c 653c 2f73 7061 6e3e 2028 3129 3c2f ile (1).
    {
    \n+0012df10: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    } .
    if (soap.error \n+0012e140: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == SOAP_EOF<\n+0012e1a0: 2f61 3e20 2661 6d70 3b26 616d 703b 203c /a> && <\n+0012e1b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012e1c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012e1d0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+0012e1e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012e1f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012e200: 6874 6d6c 2361 3130 6236 3664 3664 3438 html#a10b66d6d48\n+0012e210: 3936 3930 6237 6430 6635 3931 6165 3236 9690b7d0f591ae26\n+0012e220: 3333 6464 3133 223e 6572 726e 756d 3c2f 33dd13\">errnum == 0)
    .\n+0012e240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... \n+0012e270: 2f2f 2054 696d 656f 7574 3a20 6e6f 206d // Timeout: no m\n+0012e280: 6f72 6520 6d65 7373 6167 6573 2072 6563 ore messages rec\n+0012e290: 6569 7665 6420 3c2f 7370 616e 3e3c 2f64 eived .
    else ..
    } .
    soap_\n+0012e430: 6465 7374 726f 793c 2f61 3e28 2661 6d70 destroy(&\n+0012e440: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+0012e470: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n+0012e4e0: 736f 6170 5f65 6e64 3c2f 613e 2826 616d soap_end(&am\n+0012e4f0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    soap_done(&\n+0012e5a0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0012e5d0: 2f61 3e29 3b3c 2f64 6976 3e0a 3c2f 6469 /a>);
    .

    Note that \n+0012e600: 6120 7365 7276 6572 2066 6f72 2074 6865 a server for the\n+0012e610: 203c 636f 6465 3e62 6361 7374 5374 7269 bcastStri\n+0012e620: 6e67 3c2f 636f 6465 3e20 646f 6573 206e ng does n\n+0012e630: 6f74 206e 6565 6420 746f 2075 7365 2074 ot need to use t\n+0012e640: 776f 2d6f 6e65 2077 6179 206d 6573 7361 wo-one way messa\n+0012e650: 6765 732e 2054 6875 732c 206d 756c 7469 ges. Thus, multi\n+0012e660: 6361 7374 2072 6571 7565 7374 2d72 6573 cast request-res\n+0012e670: 706f 6e73 6520 6d65 7373 6167 6520 7061 ponse message pa\n+0012e680: 7474 6572 6e20 6361 6e20 6265 2064 6563 ttern can be dec\n+0012e690: 6c61 7265 6420 616e 6420 696d 706c 656d lared and implem\n+0012e6a0: 656e 7465 6420 6173 2072 6571 7565 7374 ented as request\n+0012e6b0: 2d72 6573 706f 6e73 6520 6f70 6572 6174 -response operat\n+0012e6c0: 696f 6e73 2061 7420 7468 6520 7365 7276 ions at the serv\n+0012e6d0: 6572 2073 6964 652e 3c2f 703e 0a3c 703e er side.

    .

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

    .S\n+0012e740: 4f41 502d 6f76 6572 2d55 4450 2073 6572 OAP-over-UDP ser\n+0012e750: 7665 723c 2f68 323e 0a3c 703e 5468 6520 ver

    .

    The \n+0012e760: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl\n+0012e770: 6520 636f 6465 2069 6c6c 7573 7472 6174 e code illustrat\n+0012e780: 6573 2061 2053 4f41 502d 6f76 6572 2d55 es a SOAP-over-U\n+0012e790: 4450 2073 6572 7665 7220 666f 7220 6f6e DP server for on\n+0012e7a0: 652d 7761 7920 3c63 6f64 653e 7365 6e64 e-way send\n+0012e7b0: 5374 7269 6e67 3c2f 636f 6465 3e20 616e String an\n+0012e7c0: 6420 7265 7175 6573 742d 7265 7370 6f6e d request-respon\n+0012e7d0: 7365 203c 636f 6465 3e65 6368 6f53 7472 se echoStr\n+0012e7e0: 696e 673c 2f63 6f64 653e 206d 6573 7361 ing messa\n+0012e7f0: 6765 732e 2054 6869 7320 6578 616d 706c ges. This exampl\n+0012e800: 6520 6173 7375 6d65 7320 7468 6174 2074 e assumes that t\n+0012e810: 6865 2069 6e74 6572 6661 6365 2068 6561 he interface hea\n+0012e820: 6465 7220 6669 6c65 2069 6e63 6c75 6465 der file include\n+0012e830: 7320 7468 6520 534f 4150 2048 6561 6465 s the SOAP Heade\n+0012e840: 7220 7769 7468 2057 532d 4164 6472 6573 r with WS-Addres\n+0012e850: 7369 6e67 2065 6c65 6d65 6e74 7320 696d sing elements im\n+0012e860: 706f 7274 6564 2077 6974 6820 3c63 6f64 ported with #import \"wsa.h\n+0012e880: 223c 2f63 6f64 653e 2061 6e64 2074 6865 \" and the\n+0012e890: 203c 636f 6465 3e6e 735f 5f65 6368 6f53 ns__echoS\n+0012e8a0: 7472 696e 673c 2f63 6f64 653e 2066 756e tring fun\n+0012e8b0: 6374 696f 6e20 6469 7363 7573 7365 6420 ction discussed \n+0012e8c0: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Using WS-Addre\n+0012e900: 7373 696e 6720 7769 7468 2053 4f41 502d ssing with SOAP-\n+0012e910: 6f76 6572 2d55 4450 3c2f 613e 202e 3c2f over-UDP ..

    #include &\n+0012e970: 7175 6f74 3b70 6c75 6769 6e2f 7773 6161 quot;plugin/wsaa\n+0012e980: 7069 2e68 2671 756f 743b 3c2f 7370 616e pi.h"
    .
    .
    in\n+0012e9e0: 743c 2f73 7061 6e3e 206d 6169 6e28 2920 t main() \n+0012e9f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+0012ea10: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n+0012eab0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_i\n+0012eb20: 6e69 7431 3c2f 613e 2826 616d 703b 3c61 nit1(&soap, <\n+0012eb60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012eb70: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0012eb80: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n+0012eb90: 3338 3864 6165 3961 6263 3830 6364 3666 388dae9abc80cd6f\n+0012eba0: 3664 3065 6366 6261 3338 3364 6130 3362 6d0ecfba383da03b\n+0012ebb0: 223e 534f 4150 5f49 4f5f 5544 503c 2f61 \">SOAP_IO_UDP); // mus\n+0012ebe0: 7420 7365 7420 5544 5020 666c 6167 203c t set UDP flag <\n+0012ebf0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0012ec10: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_regist\n+0012ec70: 6572 5f70 6c75 6769 6e3c 2f61 3e28 2661 er_plugin(&a\n+0012ec80: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, soap_wsa);.
    /\n+0012ecf0: 2f20 6269 6e64 2074 6f20 686f 7374 2028 / bind to host (\n+0012ed00: 4e55 4c4c 203d 2063 7572 7265 6e74 2068 NULL = current h\n+0012ed10: 6f73 7429 2061 6e64 2070 6f72 743a 203c ost) and port: <\n+0012ed20: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0012ed40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!
    soap_va\n+0012edc0: 6c69 645f 736f 636b 6574 3c2f 613e 283c lid_socket(<\n+0012edd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012ede0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0012edf0: 705f 5f69 6f2e 6874 6d6c 2367 6130 6139 p__io.html#ga0a9\n+0012ee00: 3732 3561 3365 6462 6332 3762 3937 3435 725a3edbc27b9745\n+0012ee10: 3631 3930 6665 6534 3763 6331 3822 3e73 6190fee47cc18\">s\n+0012ee20: 6f61 705f 6269 6e64 3c2f 613e 2826 616d oap_bind(&am\n+0012ee30: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, host\n+0012eeb0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , p\n+0012ef00: 6f72 743c 2f61 3e2c 2042 4143 4b4c 4f47 ort, BACKLOG\n+0012ef10: 2929 2920 3c2f 6469 763e 0a3c 6469 7620 )))
    .
    {\n+0012ef30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    \n+0012f010: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n+0012f020: 5245 293b 203c 2f64 6976 3e0a 3c64 6976 RE);
    . \n+0012f040: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    while (1)
    .\n+0012f0a0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+0012f0c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_serve<\n+0012f140: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+0012f170: 736f 6170 3c2f 613e 2929 203c 2f64 6976 soap)) .
    soa\n+0012f1f0: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault(&so\n+0012f230: 6170 3c2f 613e 2c20 7374 6465 7272 293b ap, stderr);\n+0012f240: 203c 7370 616e 2063 6c61 7373 3d22 636f // report\n+0012f260: 2074 6865 2070 726f 626c 656d 203c 2f73 the problem
    ..
    .
    i\n+0012f550: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6563 nt ns__ec\n+0012f560: 686f 5374 7269 6e67 283c 7370 616e 2063 hoString(s\n+0012f580: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+0012f5f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0012f600: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *str, char\n+0012f640: 202a 2a72 6573 2920 3c2f 6469 763e 0a3c **res)
    .<\n+0012f650: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012f660: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    // check if W\n+0012f6a0: 532d 4164 6472 6573 7369 6e67 2068 6561 S-Addressing hea\n+0012f6b0: 6465 7273 2061 7265 2070 7265 7365 6e74 ders are present\n+0012f6c0: 2061 6e64 2063 6f72 7265 6374 3c2f 7370 and correct
    .
    if (soap_wsa_chec\n+0012f720: 6b28 3c61 2063 6c61 7373 3d22 636f 6465 k(soap))
    .
    \n+0012f770: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+0012f790: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+0012f7c0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error;<\n+0012f820: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+0012f850: 2f2f 2073 686f 756c 6420 6368 6563 6b20 // should check \n+0012f860: 666f 7220 6475 706c 6963 6174 6520 6d65 for duplicate me\n+0012f870: 7373 6167 6573 2028 736f 6d65 7468 696e ssages (somethin\n+0012f880: 6720 7468 6174 2057 532d 5265 6c69 6162 g that WS-Reliab\n+0012f890: 6c65 4d65 7373 6167 696e 6720 646f 6573 leMessaging does\n+0012f8a0: 2074 6f6f 293c 2f73 7061 6e3e 3c2f 6469 too).
    if (chec\n+0012f8f0: 6b5f 7265 6365 6976 6564 283c 6120 636c k_received(soap-><\n+0012f930: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012f940: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012f950: 6874 6d6c 2361 6330 3931 6466 6534 6530 html#ac091dfe4e0\n+0012f960: 3162 3661 3038 3264 3931 3663 3338 3165 1b6a082d916c381e\n+0012f970: 3730 3036 6261 223e 6865 6164 6572 3c2f 7006ba\">header->wsa__Mess\n+0012f990: 6167 6549 4429 2920 3c2f 6469 763e 0a3c ageID))
    .<\n+0012f9a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012f9b0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n+0012f9d0: 203c 7370 616e 2063 6c61 7373 3d22 636f // Reques\n+0012f9f0: 7420 6d65 7373 6167 6520 616c 7265 6164 t message alread\n+0012fa00: 7920 7265 6365 6976 6564 203c 2f73 7061 y received
    .
    <\n+0012fa30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0012fa40: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+0012fa50: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n+0012fab0: 5354 4f50 3c2f 613e 3b20 3c73 7061 6e20 STOP; \n+0012fad0: 2f2f 2064 6f6e 2623 3339 3b74 2072 6574 // don't ret\n+0012fae0: 7572 6e20 7265 7370 6f6e 7365 203c 2f73 urn response
    .
    }\n+0012fb10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    *res\n+0012fb30: 203d 2073 7472 3b20 3c2f 6469 763e 0a3c = str;
    .<\n+0012fb40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012fb50: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // retu\n+0012fb70: 726e 204f 4b20 7769 7468 2057 532d 4164 rn OK with WS-Ad\n+0012fb80: 6472 6573 7369 6e67 2072 6570 6c79 2068 dressing reply h\n+0012fb90: 6561 6465 7273 2c20 6d65 7373 6167 6520 eaders, message \n+0012fba0: 4944 2069 7320 6964 5f63 6f75 6e74 2b31 ID is id_count+1\n+0012fbb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012fbd0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+0012fbf0: 726e 3c2f 7370 616e 3e20 736f 6170 5f77 rn soap_w\n+0012fc00: 7361 5f72 6570 6c79 283c 6120 636c 6173 sa_reply(\n+0012fc30: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, soap_\n+0012fc90: 696e 7432 733c 2f61 3e28 3c61 2063 6c61 int2s(soap, id_co\n+0012fcd0: 756e 742b 2b29 2c20 3c73 7061 6e20 636c unt++), "http:/\n+0012fd00: 2f67 656e 6976 6961 2e63 6f6d 2f75 6470 /genivia.com/udp\n+0012fd10: 2f65 6368 6f53 7472 696e 6752 6573 706f /echoStringRespo\n+0012fd20: 6e73 6526 7175 6f74 3b3c 2f73 7061 6e3e nse"\n+0012fd30: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    } .
    .\n+0012fd80: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__sendStr\n+0012fdb0: 696e 6728 3c73 7061 6e20 636c 6173 733d ing(struct\n+0012fdd0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+0012fe00: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+0012fe30: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, char \n+0012fe60: 2a73 7472 2920 3c2f 6469 763e 0a3c 6469 *str)
    .{\n+0012fe80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+0012fec0: 736f 6170 5f77 7361 5f63 6865 636b 283c soap_wsa_check(<\n+0012fed0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012fee0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012fef0: 6874 6d6c 223e 736f 6170 3c2f 613e 2929 html\">soap))\n+0012ff00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return soap\n+0012ff70: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error;.
    // \n+00130000: 7368 6f75 6c64 2063 6865 636b 2066 6f72 should check for\n+00130010: 2064 7570 6c69 6361 7465 206d 6573 7361 duplicate messa\n+00130020: 6765 7320 3c2f 7370 616e 3e3c 2f64 6976 ges .
    \n+00130060: 6966 3c2f 7370 616e 3e20 2863 6865 636b if (check\n+00130070: 5f72 6563 6569 7665 6428 3c61 2063 6c61 _received(soap->header->wsa__Messa\n+00130110: 6765 4944 2929 203c 2f64 6976 3e0a 3c64 geID))
    .\n+00130130: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+00130150: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Request\n+00130170: 206d 6573 7361 6765 2061 6c72 6561 6479 message already\n+00130180: 2072 6563 6569 7665 6420 3c2f 7370 616e received
    ..<\n+00130240: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00130250: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n+00130270: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+00130290: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n+001302f0: 5f4f 4b3c 2f61 3e3b 3c2f 6469 763e 0a3c _OK;
    .<\n+00130300: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00130310: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    \n+00130360: 696e 743c 2f73 7061 6e3e 206e 735f 5f73 int ns__s\n+00130370: 656e 6453 7472 696e 6752 6573 706f 6e73 endStringRespons\n+00130380: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa\n+001303d0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00130400: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, char *r\n+00130430: 6573 2920 3c2f 6469 763e 0a3c 6469 7620 es)
    .
    {.
    return\n+00130490: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_NO_MET\n+001304f0: 484f 443c 2f61 3e3b 203c 7370 616e 2063 HOD; /\n+00130510: 2f20 7765 2064 6f6e 2623 3339 3b74 2073 / we don't s\n+00130520: 6572 7665 2074 6869 7320 6f70 6572 6174 erve this operat\n+00130530: 696f 6e3c 2f73 7061 6e3e 3c2f 6469 763e ion
    \n+00130540: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .#define SOAP_IO\n+00130640: 5f55 4450 3c2f 6469 763e 3c64 6976 2063 _UDP
    soa\n+00130660: 705f 6d6f 6465 2049 4f20 696e 7075 742f p_mode IO input/\n+00130670: 6f75 7470 7574 2066 6c61 6720 7661 6c75 output flag valu\n+00130680: 6520 746f 2075 7365 2055 4450 2064 6174 e to use UDP dat\n+00130690: 6167 7261 6d73 2c20 6d65 7373 6167 6520 agrams, message \n+001306a0: 7369 7a65 2069 7320 6c69 6d69 7465 6420 size is limited \n+001306b0: 746f 2055 4450 2070 6163 6b65 7420 7369 to UDP packet si\n+001306c0: 7a65 3c2f 6469 763e 3c64 6976 2063 6c61 ze
    De\n+001306e0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+001306f0: 6473 6f61 7032 2e68 3a31 3539 363c 2f64 dsoap2.h:1596
    .
    <\n+00130770: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+00130780: 726f 7570 5f5f 7332 732e 6874 6d6c 2367 roup__s2s.html#g\n+00130790: 6139 6166 6466 3864 6537 6138 3337 3366 a9afdf8de7a8373f\n+001307a0: 3137 3437 6634 3166 3865 3364 3565 6533 1747f41f8e3d5ee3\n+001307b0: 3922 3e73 6f61 705f 696e 7432 733c 2f61 9\">soap_int2s
    const\n+001307e0: 2063 6861 7220 2a20 736f 6170 5f69 6e74 char * soap_int\n+001307f0: 3273 2873 7472 7563 7420 736f 6170 202a 2s(struct soap *\n+00130800: 736f 6170 2c20 696e 7420 7661 6c75 6529 soap, int value)\n+00130810: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Convert\n+00130830: 2061 2073 6967 6e65 6420 3332 2062 6974 a signed 32 bit\n+00130840: 2069 6e74 6567 6572 2074 6f20 6120 6465 integer to a de\n+00130850: 6369 6d61 6c20 7374 7269 6e67 2e3c 2f64 cimal string.
    .
    \n+00130870: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

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

    \n+00131b60: 0a43 6f6d 7069 6c65 2d74 696d 6520 666c .Compile-time fl\n+00131b70: 6167 733c 2f68 313e 0a3c 703e 5468 6520 ags

    .

    The \n+00131b80: 666f 6c6c 6f77 696e 6720 6d61 6372 6f73 following macros\n+00131b90: 2061 7265 2064 6566 696e 6564 2069 6e20 are defined in \n+00131ba0: 7468 6520 4150 4920 646f 6375 6d65 6e74 the API document\n+00131bb0: 6174 696f 6e20 4d6f 6475 6c65 203c 6120 ation Module WITH_M\n+00131bf0: 4143 524f 2063 6f6d 7069 6c65 2d74 696d ACRO compile-tim\n+00131c00: 6520 666c 6167 733c 2f61 3e2e 2054 6865 e flags. The\n+00131c10: 7365 206d 6163 726f 7320 6172 6520 7573 se macros are us\n+00131c20: 6564 2074 6f20 656e 6162 6c65 206f 7220 ed to enable or \n+00131c30: 6469 7361 626c 6520 6665 6174 7572 6573 disable features\n+00131c40: 2061 7320 7370 6563 6966 6965 6420 6265 as specified be\n+00131c50: 6c6f 772c 2062 7920 636f 6d70 696c 696e low, by compilin\n+00131c60: 6720 736f 7572 6365 2063 6f64 6520 6669 g source code fi\n+00131c70: 6c65 7320 7769 7468 2063 6f6d 7069 6c65 les with compile\n+00131c80: 7220 6f70 7469 6f6e 203c 623e 3c63 6f64 r option -D \n+00131ca0: 746f 2073 6574 2074 6865 206d 6163 726f to set the macro\n+00131cb0: 3a3c 2f70 3e0a 3c74 6162 6c65 2063 6c61 :

    .
    context fl\n-0013c210: 6167 2077 6974 6820 7365 6e74 2f72 6563 ag with sent/rec\n-0013c220: 7620 666c 6167 7320 2020 3c2f 7468 3e3c v flags
    <\n-0013c2b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013c2c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013c2d0: 6d6c 2361 6165 3365 6565 3737 3164 3863 ml#aae3eee771d8c\n-0013c2e0: 3430 3331 6433 3064 3463 6137 3633 3365 4031d30d4ca7633e\n-0013c2f0: 6466 3966 2220 7469 746c 653d 2255 7365 df9f\" title=\"Use\n-0013c300: 722d 6465 6669 6e61 626c 6520 736f 636b r-definable sock\n-0013c310: 6574 2073 656e 6420 616e 6420 7265 6376 et send and recv\n-0013c320: 2066 6c61 6773 2c20 666f 7220 6578 616d flags, for exam\n-0013c330: 706c 6520 6173 7369 676e 204d 5347 5f4e ple assign MSG_N\n-0013c340: 4f53 4947 4e41 4c20 746f 2064 6973 6162 OSIGNAL to disab\n-0013c350: 6c65 2073 6967 7069 7065 2028 7468 6520 le sigpipe (the \n-0013c360: 7661 2e2e 2e22 3e73 6f61 703a 3a73 6f63 va...\">soap::soc\n-0013c370: 6b65 745f 666c 6167 733c 2f61 3e3c 2f63 ket_flags = MSG\n-0013c390: 5f4e 4f53 4947 4e41 4c3c 2f63 6f64 653e _NOSIGNAL\n-0013c3a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 disabl\n-0013c3d0: 6573 2053 4947 5049 5045 2020 2020 3c2f es SIGPIPE
    soap:\n-0013c4f0: 3a73 6f63 6b65 745f 666c 6167 733c 2f61 :socket_flags = MSG_DONTROUTE
    ....t\n+00131de0: 6865 2068 6561 6465 7220 6669 6c65 2074 he header file t\n+00131df0: 6f20 696e 636c 7564 652c 2069 6620 6469 o include, if di\n+00131e00: 6666 6572 656e 7420 6672 6f6d 203c 636f fferent from soapdefs.h ..<\n+00131f60: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......\n+00132270: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....<\n+001323d0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001323e0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001323f0: 3e65 6e61 626c 6573 2048 5454 5020 636f >enables HTTP co\n+00132400: 6f6b 6965 732c 2073 6565 2053 6563 7469 okies, see Secti\n+00132410: 6f6e 7320 3c61 2063 6c61 7373 3d22 656c ons Client-side coo\n+00132450: 6b69 6520 7375 7070 6f72 743c 2f61 3e20 kie support \n+00132460: 616e 6420 3c61 2063 6c61 7373 3d22 656c and Server-side coo\n+001324a0: 6b69 6520 7375 7070 6f72 743c 2f61 3e20 kie support \n+001324b0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+001324e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 e\n+00132550: 6e61 626c 6573 2048 5454 5020 636f 6f6b nables HTTP cook\n+00132560: 6965 7320 616e 6420 616c 6c6f 7773 2063 ies and allows c\n+00132570: 6f6f 6b69 6573 2077 6974 6820 7468 6569 ookies with thei\n+00132580: 7220 5365 6375 7265 2066 6c61 6720 7365 r Secure flag se\n+00132590: 7420 746f 2062 6520 7365 6e74 206f 7665 t to be sent ove\n+001325a0: 7220 696e 7365 6375 7265 2063 6861 6e6e r insecure chann\n+001325b0: 656c 7320 2020 203c 2f74 643e 3c2f 7472 els ....<\n+00132730: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n+00132910: 656e 6162 6c65 7320 474e 5554 4c53 2c20 enables GNUTLS, \n+00132920: 7365 6520 5365 6374 696f 6e73 203c 6120 see Sections Secur\n+00132960: 6520 636c 6965 6e74 7320 7769 7468 2048 e clients with H\n+00132970: 5454 5053 3c2f 613e 2061 6e64 203c 6120 TTPS and Secur\n+001329b0: 6520 5765 6220 7365 7276 6963 6573 2077 e Web services w\n+001329c0: 6974 6820 4854 5450 533c 2f61 3e20 2020 ith HTTPS \n+001329d0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+00132a20: 636f 6465 3e23 5749 5448 5f47 5a49 503c code>#WITH_GZIP<\n+00132a30: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+00132a60: 656e 6162 6c65 7320 677a 6970 2061 6e64 enables gzip and\n+00132a70: 2064 6566 6c61 7465 2063 6f6d 7072 6573 deflate compres\n+00132a80: 7369 6f6e 2c20 7365 6520 5365 6374 696f sion, see Sectio\n+00132a90: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Zl\n+00132ac0: 6962 2063 6f6d 7072 6573 7369 6f6e 3c2f ib compression \n+00132ae0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .......<\n+00132d80: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00132d90: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00132da0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n+00132fa0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00132fb0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00132fc0: 3e3c 636f 6465 3e23 5749 5448 5f44 4f4d >#WITH_DOM\n+00132fd0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00132fe0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00132ff0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00133000: 3e65 6e61 626c 6520 444f 4d20 7061 7273 >enable DOM pars\n+00133010: 696e 6720 696e 2074 6865 2065 6e67 696e ing in the engin\n+00133020: 652c 2072 6571 7569 7265 6420 6279 2074 e, required by t\n+00133030: 6865 2057 532d 5365 6375 7269 7479 2070 he WS-Security p\n+00133040: 6c75 6769 6e20 2020 203c 2f74 643e 3c2f lugin ..\n+00133150: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......<\n+001333b0: 636f 6465 3e23 5749 5448 5f4e 4f49 4452 code>#WITH_NOIDR\n+001333c0: 4546 3c2f 636f 6465 3e20 2020 3c2f 7464 EF ....\n+00133610: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+00133710: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00133720: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00133730: 3e3c 636f 6465 3e23 5749 5448 5f4e 4f45 >#WITH_NOE\n+00133740: 4d50 5459 5354 5255 4354 3c2f 636f 6465 MPTYSTRUCT \n+001337c0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..o\n+00133850: 6d69 7420 534f 4150 2048 6561 6465 7220 mit SOAP Header \n+00133860: 616e 6420 4661 756c 7420 7365 7269 616c and Fault serial\n+00133870: 697a 6174 696f 6e20 636f 6465 2c20 7072 ization code, pr\n+00133880: 6576 656e 7473 2064 7570 6c69 6361 7465 events duplicate\n+00133890: 2064 6566 696e 6974 696f 6e73 2077 6974 definitions wit\n+001338a0: 6820 6765 6e65 7261 7465 6420 736f 6170 h generated soap\n+001338b0: 5859 5a4c 6962 2063 6f64 6520 2020 203c XYZLib code <\n+001338c0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..\n+00133b10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....e\n+00133c70: 6e61 626c 6573 2043 2b2b 2061 6273 7472 nables C++ abstr\n+00133c80: 6163 7420 7365 7276 6963 6520 636c 6173 act service clas\n+00133c90: 7365 7320 7769 7468 2070 7572 6520 7669 ses with pure vi\n+00133ca0: 7274 7561 6c20 6d65 7468 6f64 732c 2072 rtual methods, r\n+00133cb0: 6571 7569 7265 7320 736f 6170 6370 7032 equires soapcpp2\n+00133cc0: 206f 7074 696f 6e20 3c63 6f64 653e 2d69 option -i\n+00133cd0: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or -j ...<\n+00133e40: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00133e50: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00133e60: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00133eb0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n+00133f00: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n+00134070: 3c63 6f64 653e 2357 4954 485f 5443 5046 #WITH_TCPF\n+00134080: 494e 3c2f 636f 6465 3e20 2020 3c2f 7464 IN ..<\n+00134140: 636f 6465 3e23 5749 5448 5f53 454c 465f code>#WITH_SELF_\n+00134150: 5049 5045 3c2f 636f 6465 3e20 2020 3c2f PIPE .
    define result <\n+00131d50: 2f74 683e 3c2f 7472 3e0a 3c74 7220 636c /th>
    #SOAPDEFS_H
    #WI\n+00131e80: 5448 5f53 4f41 5044 4546 535f 483c 2f63 TH_SOAPDEFS_H in\n+00131ec0: 636c 7564 6573 2074 6865 203c 636f 6465 cludes the soapdefs.h file for cust\n+00131ef0: 6f6d 2073 6574 7469 6e67 732c 2073 6565 om settings, see\n+00131f00: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Using the soap\n+00131f40: 6465 6673 2e68 2068 6561 6465 7220 6669 defs.h header fi\n+00131f50: 6c65 3c2f 613e 2020 2020 3c2f 7464 3e3c le
    #W\n+00131fb0: 4954 485f 434f 4d50 4154 3c2f 636f 6465 ITH_COMPAT remov\n+00131ff0: 6573 2064 6570 656e 6465 6e63 7920 6f6e es dependency on\n+00132000: 2043 2b2b 2073 7472 6561 6d20 6c69 6272 C++ stream libr\n+00132010: 6172 6965 7320 616e 6420 432b 2b20 6578 aries and C++ ex\n+00132020: 6365 7074 696f 6e73 2020 2020 3c2f 7464 ceptions
    #WITH_LEAN crea\n+001320c0: 7465 7320 6120 736d 616c 6c2d 666f 6f74 tes a small-foot\n+001320d0: 7072 696e 7420 6578 6563 7574 6162 6c65 print executable\n+001320e0: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section How to minimi\n+00132120: 7a65 2061 7070 6c69 6361 7469 6f6e 206d ze application m\n+00132130: 656d 6f72 7920 666f 6f74 7072 696e 743c emory footprint<\n+00132140: 2f61 3e20 2020 203c 2f74 643e 3c2f 7472 /a>
    #WITH\n+001321a0: 5f4c 4541 4e45 523c 2f63 6f64 653e 2020 _LEANER \n+001321b0: 203c 2f74 643e 3c74 6420 636c 6173 733d creates \n+001321e0: 616e 2065 7665 6e20 736d 616c 6c65 7220 an even smaller \n+001321f0: 666f 6f74 7072 696e 7420 6578 6563 7574 footprint execut\n+00132200: 6162 6c65 2c20 7365 6520 5365 6374 696f able, see Sectio\n+00132210: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n How to mi\n+00132240: 6e69 6d69 7a65 2061 7070 6c69 6361 7469 nimize applicati\n+00132250: 6f6e 206d 656d 6f72 7920 666f 6f74 7072 on memory footpr\n+00132260: 696e 743c 2f61 3e20 2020 203c 2f74 643e int
    \n+001322c0: 2357 4954 485f 4641 5354 3c2f 636f 6465 #WITH_FAST use f\n+00132300: 6173 7465 7220 6d65 6d6f 7279 2061 6c6c aster memory all\n+00132310: 6f63 6174 696f 6e20 7768 656e 2075 7365 ocation when use\n+00132320: 6420 7769 7468 203c 636f 6465 3e23 5749 d with #WI\n+00132330: 5448 5f4c 4541 4e3c 2f63 6f64 653e 206f TH_LEAN o\n+00132340: 7220 3c63 6f64 653e 2357 4954 485f 4c45 r #WITH_LE\n+00132350: 414e 4552 3c2f 636f 6465 3e20 2020 203c ANER <\n+00132360: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #WITH_COOKIES\n+001323c0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #WITH_IN\n+00132510: 5345 4355 5245 5f43 4f4f 4b49 4553 3c2f SECURE_COOKIES
    #WITH\n+00132610: 5f49 5056 363c 2f63 6f64 653e 2020 203c _IPV6 <\n+00132620: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables IP\n+00132650: 7636 2073 7570 706f 7274 2020 2020 3c2f v6 support
    #WITH_IPV6_V6\n+001326c0: 4f4e 4c59 3c2f 636f 6465 3e20 2020 3c2f ONLY enables IPv\n+00132700: 3620 7375 7070 6f72 7420 7769 7468 2049 6 support with I\n+00132710: 5076 362d 6f6e 6c79 2073 6572 7665 7220 Pv6-only server \n+00132720: 6f70 7469 6f6e 2020 2020 3c2f 7464 3e3c option
    #W\n+00132780: 4954 485f 4f50 454e 5353 4c3c 2f63 6f64 ITH_OPENSSL enab\n+001327c0: 6c65 7320 4f70 656e 5353 4c2c 2073 6565 les OpenSSL, see\n+001327d0: 2053 6563 7469 6f6e 7320 3c61 2063 6c61 Sections Secure c\n+00132810: 6c69 656e 7473 2077 6974 6820 4854 5450 lients with HTTP\n+00132820: 533c 2f61 3e20 616e 6420 3c61 2063 6c61 S and Secure W\n+00132860: 6562 2073 6572 7669 6365 7320 7769 7468 eb services with\n+00132870: 2048 5454 5053 3c2f 613e 2020 2020 3c2f HTTPS
    #WITH_GNUTLS<\n+001328e0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #WITH\n+00132b30: 5f5a 4c49 423c 2f63 6f64 653e 2020 203c _ZLIB <\n+00132b40: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables de\n+00132b70: 666c 6174 6520 636f 6d70 7265 7373 696f flate compressio\n+00132b80: 6e20 6f6e 6c79 2c20 7365 6520 5365 6374 n only, see Sect\n+00132b90: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion \n+00132bc0: 5a6c 6962 2063 6f6d 7072 6573 7369 6f6e Zlib compression\n+00132bd0: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #WIT\n+00132c30: 485f 4e54 4c4d 3c2f 636f 6465 3e20 2020 H_NTLM \n+00132c40: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 enables N\n+00132c70: 544c 4d20 7375 7070 6f72 7420 2020 203c TLM support <\n+00132c80: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #WITH_C_LOCA\n+00132ce0: 4c45 3c2f 636f 6465 3e20 2020 3c2f 7464 LE force the use\n+00132d20: 206c 6f63 616c 6520 6675 6e63 7469 6f6e locale function\n+00132d30: 7320 7768 656e 2061 7661 696c 6162 6c65 s when available\n+00132d40: 2074 6f20 656e 7375 7265 206c 6f63 616c to ensure local\n+00132d50: 652d 696e 6465 7065 6e64 656e 7420 6e75 e-independent nu\n+00132d60: 6d62 6572 2063 6f6e 7665 7273 696f 6e73 mber conversions\n+00132d70: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_NO\n+00132dd0: 5f43 5f4c 4f43 414c 453c 2f63 6f64 653e _C_LOCALE\n+00132de0: 2020 203c 2f74 643e 3c74 6420 636c 6173 remove\n+00132e10: 2074 6865 2075 7365 206f 6620 6c6f 6361 the use of loca\n+00132e20: 6c65 2066 756e 6374 696f 6e73 2074 6f20 le functions to \n+00132e30: 696d 7072 6f76 6520 706f 7274 6162 696c improve portabil\n+00132e40: 6974 7920 2020 203c 2f74 643e 3c2f 7472 ity
    #WIT\n+00132ea0: 485f 494e 434c 5544 455f 584c 4f43 414c H_INCLUDE_XLOCAL\n+00132eb0: 455f 483c 2f63 6f64 653e 2020 203c 2f74 E_H force the in\n+00132ef0: 636c 7573 696f 6e20 6f66 203c 636f 6465 clusion of <xlocale.h&g\n+00132f10: 743b 3c2f 636f 6465 3e20 746f 2064 6566 t; to def\n+00132f20: 696e 6520 3c63 6f64 653e 6c6f 6361 6c65 ine locale\n+00132f30: 5f74 3c2f 636f 6465 3e20 616e 6420 3c63 _t and _l fu\n+00132f50: 6e63 7469 6f6e 732c 2074 6f20 696d 7072 nctions, to impr\n+00132f60: 6f76 6520 706f 7274 6162 696c 6974 7920 ove portability \n+00132f70: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #W\n+001330a0: 4954 485f 5245 504c 4143 455f 494c 4c45 ITH_REPLACE_ILLE\n+001330b0: 4741 4c5f 5554 4638 3c2f 636f 6465 3e20 GAL_UTF8 \n+001330c0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enable \n+001330f0: 7374 7269 6374 2055 5446 2d38 2c20 7265 strict UTF-8, re\n+00133100: 706c 6163 6573 2055 5446 2d38 2063 6f6e places UTF-8 con\n+00133110: 7465 6e74 2074 6861 7420 6973 206f 7574 tent that is out\n+00133120: 7369 6465 2074 6865 2061 6c6c 6f77 6564 side the allowed\n+00133130: 2072 616e 6765 2077 6974 6820 552b 4646 range with U+FF\n+00133140: 4644 2020 2020 3c2f 7464 3e3c 2f74 723e FD
    #WITH_\n+001331a0: 4641 5354 4347 493c 2f63 6f64 653e 2020 FASTCGI \n+001331b0: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n+001331e0: 4661 7374 4347 492c 2073 6565 2053 6563 FastCGI, see Sec\n+001331f0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Fas\n+00133220: 7443 4749 3c2f 613e 2020 2020 3c2f 7464 tCGI
    #WITH_NOIO remo\n+001332c0: 7665 7320 494f 206f 7065 7261 7469 6f6e ves IO operation\n+001332d0: 732c 2074 6f20 656c 696d 696e 6174 6520 s, to eliminate \n+001332e0: 7468 6520 7573 6520 6f66 2042 5344 2073 the use of BSD s\n+001332f0: 6f63 6b65 7473 2c20 7365 6520 5365 6374 ockets, see Sect\n+00133300: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion How to \n+00133330: 7265 6d6f 7665 2074 6865 2042 5344 2073 remove the BSD s\n+00133340: 6f63 6b65 7420 6c69 6272 6172 7920 7265 ocket library re\n+00133350: 7175 6972 656d 656e 743c 2f61 3e20 2020 quirement \n+00133360: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    removes id an\n+00133400: 6420 6872 6566 2f72 6566 206d 756c 7469 d href/ref multi\n+00133410: 2d72 6566 6572 656e 6365 2064 6174 612c -reference data,\n+00133420: 206d 6f72 6520 6167 6772 6573 7369 7665 more aggressive\n+00133430: 2074 6861 6e20 7573 696e 6720 7468 6520 than using the \n+00133440: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n+00133450: 5452 4545 3c2f 636f 6465 3e20 7275 6e74 TREE runt\n+00133460: 696d 6520 666c 6167 2020 2020 3c2f 7464 ime flag
    #WITH_NOHTTP re\n+00133500: 6d6f 7665 7320 7468 6520 4854 5450 2073 moves the HTTP s\n+00133510: 7461 636b 2074 6f20 7265 6475 6365 2063 tack to reduce c\n+00133520: 6f64 6520 7369 7a65 2020 2020 3c2f 7464 ode size
    \n+00133580: 2357 4954 485f 4e4f 5a4f 4e45 3c2f 636f #WITH_NOZONE dis\n+001335c0: 6162 6c65 7320 616e 6420 6967 6e6f 7265 ables and ignore\n+001335d0: 7320 7468 6520 7469 6d65 7a6f 6e65 2069 s the timezone i\n+001335e0: 6e20 3c63 6f64 653e 7873 643a 6461 7465 n xsd:date\n+001335f0: 5469 6d65 3c2f 636f 6465 3e20 7661 6c75 Time valu\n+00133600: 6573 2020 2020 3c2f 7464 3e3c 2f74 723e es
    #WITH\n+00133660: 5f4e 4f45 4d50 5459 4e41 4d45 5350 4143 _NOEMPTYNAMESPAC\n+00133670: 4553 3c2f 636f 6465 3e20 2020 3c2f 7464 ES disables xmln\n+001336b0: 733d 2222 2064 6566 6175 6c74 2065 6d70 s=\"\" default emp\n+001336c0: 7479 206e 616d 6573 7061 6365 7320 6672 ty namespaces fr\n+001336d0: 6f6d 2058 4d4c 206d 6573 7361 6765 7320 om XML messages \n+001336e0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    inser\n+00133780: 7473 2061 2064 756d 6d79 206d 656d 6265 ts a dummy membe\n+00133790: 7220 696e 2065 6d70 7479 2073 7472 7563 r in empty struc\n+001337a0: 7473 2074 6f20 616c 6c6f 7720 636f 6d70 ts to allow comp\n+001337b0: 696c 6174 696f 6e20 2020 203c 2f74 643e ilation
    \n+00133810: 2357 4954 485f 4e4f 474c 4f42 414c 3c2f #WITH_NOGLOBAL
    #WITH_NONAMES\n+00133920: 5041 4345 533c 2f63 6f64 653e 2020 203c PACES <\n+00133930: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>disables d\n+00133960: 6570 656e 6465 6e63 6520 6f6e 2067 6c6f ependence on glo\n+00133970: 6261 6c20 3c63 6f64 653e 6e61 6d65 7370 bal namesp\n+00133980: 6163 6573 3c2f 636f 6465 3e20 7461 626c aces tabl\n+00133990: 652c 2061 2074 6162 6c65 206d 7573 7420 e, a table must \n+001339a0: 6265 2073 6574 2065 7870 6c69 6369 746c be set explicitl\n+001339b0: 7920 7769 7468 203c 636f 6465 3e3c 6120 y with soa\n+00133a80: 705f 7365 745f 6e61 6d65 7370 6163 6573 p_set_namespaces\n+00133a90: 3c2f 613e 3c2f 636f 6465 3e20 7365 6520 see \n+00133aa0: 616c 736f 2053 6563 7469 6f6e 203c 6120 also Section XML namespa\n+00133ae0: 6365 7320 616e 6420 7468 6520 6e61 6d65 ces and the name\n+00133af0: 7370 6163 6520 6d61 7070 696e 6720 7461 space mapping ta\n+00133b00: 626c 653c 2f61 3e20 2020 203c 2f74 643e ble
    \n+00133b60: 2357 4954 485f 4344 4154 413c 2f63 6f64 #WITH_CDATA reta\n+00133ba0: 696e 7320 7468 6520 7061 7273 6564 2043 ins the parsed C\n+00133bb0: 4441 5441 2073 6563 7469 6f6e 7320 696e DATA sections in\n+00133bc0: 206c 6974 6572 616c 2058 4d4c 2073 7472 literal XML str\n+00133bd0: 696e 6773 2020 2020 3c2f 7464 3e3c 2f74 ings
    #WIT\n+00133c30: 485f 5055 5245 5f56 4952 5455 414c 3c2f H_PURE_VIRTUAL
    #WITH_DEFAULT\n+00133d50: 5f56 4952 5455 414c 3c2f 636f 6465 3e20 _VIRTUAL \n+00133d60: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enables\n+00133d90: 2043 2b2b 2062 6173 6520 7365 7276 6963 C++ base servic\n+00133da0: 6520 636c 6173 7365 7320 7769 7468 2064 e classes with d\n+00133db0: 6566 6175 6c74 2076 6972 7475 616c 206d efault virtual m\n+00133dc0: 6574 686f 6473 2072 6574 7572 6e69 6e67 ethods returning\n+00133dd0: 2066 6175 6c74 203c 636f 6465 3e23 534f fault #SO\n+00133de0: 4150 5f4e 4f5f 4d45 5448 4f44 3c2f 636f AP_NO_METHOD, requires so\n+00133e00: 6170 6370 7032 206f 7074 696f 6e20 3c63 apcpp2 option -i or\n+00133e20: 203c 636f 6465 3e2d 6a3c 2f63 6f64 653e -j\n+00133e30: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_CA\n+00133e90: 5345 494e 5345 4e53 4954 4956 4554 4147 SEINSENSITIVETAG\n+00133ea0: 533c 2f63 6f64 653e 2020 203c 2f74 643e S enables case i\n+00133ee0: 6e73 656e 7369 7469 7665 2058 4d4c 2070 nsensitive XML p\n+00133ef0: 6172 7369 6e67 2020 2020 3c2f 7464 3e3c arsing
    #\n+00133f50: 5749 5448 5f53 4f43 4b45 545f 434c 4f53 WITH_SOCKET_CLOS\n+00133f60: 455f 4f4e 5f45 5849 543c 2f63 6f64 653e E_ON_EXIT\n+00133f70: 2020 203c 2f74 643e 3c74 6420 636c 6173 preven\n+00133fa0: 7473 2061 2073 6572 7665 7220 706f 7274 ts a server port\n+00133fb0: 2066 726f 6d20 7374 6179 696e 6720 696e from staying in\n+00133fc0: 206c 6973 7465 6e69 6e67 206d 6f64 6520 listening mode \n+00133fd0: 6166 7465 7220 6578 6974 2062 7920 696e after exit by in\n+00133fe0: 7465 726e 616c 6c79 2073 6574 7469 6e67 ternally setting\n+00133ff0: 203c 636f 6465 3e66 636e 746c 2873 6f63 fcntl(soc\n+00134000: 6b2c 2046 5f53 4554 4644 2c20 4644 5f43 k, F_SETFD, FD_C\n+00134010: 4c4f 4558 4543 293c 2f63 6f64 653e 2020 LOEXEC) \n+00134020: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    enables TCP F\n+001340c0: 494e 2061 6674 6572 2073 656e 6473 2077 IN after sends w\n+001340d0: 6865 6e20 736f 636b 6574 2069 7320 7265 hen socket is re\n+001340e0: 6164 7920 746f 2063 6c6f 7365 2020 2020 ady to close \n+001340f0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    enables a \"\n+00134190: 7365 6c66 2070 6970 6522 2074 6f20 656e self pipe\" to en\n+001341a0: 6162 6c65 2074 6865 203c 636f 6465 3e3c able the <\n+001341b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001341c0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001341d0: 5f69 6f2e 6874 6d6c 2367 6131 3339 6166 _io.html#ga139af\n+001341e0: 6266 3931 3663 3834 3732 3466 6566 3366 bf916c84724fef3f\n+001341f0: 3832 6163 6134 3835 3764 3322 2074 6974 82aca4857d3\" tit\n+00134200: 6c65 3d22 436c 6f73 6520 7468 6520 636f le=\"Close the co\n+00134210: 6e6e 6563 7469 6f6e 206f 6620 7468 6520 nnection of the \n+00134220: 7370 6563 6966 6965 6420 636f 6e74 6578 specified contex\n+00134230: 7420 7573 696e 6720 6120 7365 6c66 2d70 t using a self-p\n+00134240: 6970 652e 223e 736f 6170 5f63 6c6f 7365 ipe.\">soap_close\n+00134250: 5f63 6f6e 6e65 6374 696f 6e3c 2f61 3e3c _connection<\n+00134260: 2f63 6f64 653e 2066 756e 6374 696f 6e20 /code> function \n+00134270: 2867 534f 4150 2032 2e38 2e37 3120 6f72 (gSOAP 2.8.71 or\n+00134280: 2067 7265 6174 6572 2920 2020 3c2f 7464 greater)
    .\n+001342a0: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n+001342b0: 2073 7562 7365 7420 6f66 206d 6163 726f subset of macro\n+001342c0: 7320 6172 6520 6465 6669 6e65 6420 696e s are defined in\n+001342d0: 2074 6865 2041 5049 2064 6f63 756d 656e the API documen\n+001342e0: 7461 7469 6f6e 204d 6f64 756c 6520 3c61 tation Module SOAP_\n+00134320: 4d41 4352 4f20 636f 6d70 696c 652d 7469 MACRO compile-ti\n+00134330: 6d65 2076 616c 7565 733c 2f61 3e2e 2054 me values. T\n+00134340: 6865 7365 206d 6163 726f 7320 6172 6520 hese macros are \n+00134350: 7573 6564 2074 6f20 656e 6162 6c65 206f used to enable o\n+00134360: 7220 6469 7361 626c 6520 6665 6174 7572 r disable featur\n+00134370: 6573 2061 7320 7370 6563 6966 6965 6420 es as specified \n+00134380: 6265 6c6f 772c 2062 7920 636f 6d70 696c below, by compil\n+00134390: 696e 6720 736f 7572 6365 2063 6f64 6520 ing source code \n+001343a0: 6669 6c65 7320 7769 7468 2063 6f6d 7069 files with compi\n+001343b0: 6c65 7220 6f70 7469 6f6e 203c 623e 3c63 ler option -D to set the mac\n+001343e0: 726f 3a3c 2f70 3e0a 3c74 6162 6c65 2063 ro:

    .....<\n+001344d0: 636f 6465 3e23 534f 4150 5f4e 4f54 4852 code>#SOAP_NOTHR\n+001344e0: 4f57 3c2f 636f 6465 3e20 2020 3c2f 7464 OW ......\n+00134770: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00134870: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00134880: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00134890: 3e74 6865 206d 6178 696d 756d 206c 656e >the maximum len\n+001348a0: 6774 6820 6f66 2074 656d 706f 7261 7279 gth of temporary\n+001348b0: 2073 7472 696e 6720 7661 6c75 6573 2c20 string values, \n+001348c0: 7368 6f72 7420 7374 7269 6e67 7320 616e short strings an\n+001348d0: 6420 6272 6965 6620 6572 726f 7220 6d65 d brief error me\n+001348e0: 7373 6167 6573 2020 2020 3c2f 7464 3e3c ssages <\n+001348f0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n+00134960: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00134a20: 636f 6465 3e23 534f 4150 5f4d 4158 4152 code>#SOAP_MAXAR\n+00134a30: 5241 5953 495a 453c 2f63 6f64 653e 2020 RAYSIZE \n+00134a40: 203c 2f74 643e 3c74 6420 636c 6173 733d ..<\n+00134ae0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00134af0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00134b00: 3e3c 636f 6465 3e23 534f 4150 5f4d 4158 >#SOAP_MAX\n+00134b10: 4449 4d45 5349 5a45 3c2f 636f 6465 3e20 DIMESIZE \n+00134b20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ..........<\n+00135010: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00135020: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00135030: 3e6d 6178 696d 756d 2058 4d4c 206e 6573 >maximum XML nes\n+00135040: 7469 6e67 2064 6570 7468 206c 6576 656c ting depth level\n+00135050: 2070 6572 6d69 7474 6564 2062 7920 7468 permitted by th\n+00135060: 6520 584d 4c20 7061 7273 6572 2020 2020 e XML parser \n+00135070: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n+001350c0: 636f 6465 3e23 534f 4150 5f4d 4158 4f43 code>#SOAP_MAXOC\n+001350d0: 4355 5253 3c2f 636f 6465 3e20 2020 3c2f CURS \n+00135190: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n+001352a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00135360: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....\n+001354b0: 616e 2038 2062 6974 2069 6e74 6567 6572 an 8 bit integer\n+001354c0: 2074 6861 7420 7265 7072 6573 656e 7473 that represents\n+001354d0: 2061 2063 6861 7261 6374 6572 2074 6861 a character tha\n+001354e0: 7420 636f 756c 6420 6e6f 7420 6265 2063 t could not be c\n+001354f0: 6f6e 7665 7274 6564 2074 6f20 616e 2041 onverted to an A\n+00135500: 5343 4949 2063 6861 722c 2069 2e65 2e20 SCII char, i.e. \n+00135510: 7768 656e 2063 6f6e 7665 7274 696e 6720 when converting \n+00135520: 616e 2058 4d4c 2055 6e69 636f 6465 2063 an XML Unicode c\n+00135530: 6861 7261 6374 6572 2020 2020 3c2f 7464 haracter ....\n+001356d0: 6d61 6372 6f20 7468 6174 2072 6570 7265 macro that repre\n+001356e0: 7365 6e74 7320 7468 6520 3c63 6f64 653e sents the \n+001356f0: 234c 4f4e 4736 343c 2f63 6f64 653e 2070 #LONG64 p\n+00135700: 7269 6e74 6620 252d 666f 726d 6174 2020 rintf %-format \n+00135710: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..\n+00135760: 3c63 6f64 653e 2353 4f41 505f 554c 4f4e #SOAP_ULON\n+00135770: 475f 464f 524d 4154 3c2f 636f 6465 3e20 G_FORMAT \n+00135780: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ....
    Warning
    It is impo\n+00135a00: 7274 616e 7420 7468 6174 2061 6e79 206f rtant that any o\n+00135a10: 6620 7468 6573 6520 6d61 6372 6f73 2077 f these macros w\n+00135a20: 6865 6e20 6465 6669 6e65 6420 7368 6f75 hen defined shou\n+00135a30: 6c64 2062 6520 636f 6e73 6973 7465 6e74 ld be consistent\n+00135a40: 6c79 2064 6566 696e 6564 2077 6865 6e20 ly defined when \n+00135a50: 636f 6d70 696c 696e 6720 736f 7572 6365 compiling source\n+00135a60: 2063 6f64 6520 6669 6c65 732c 2073 7563 code files, suc\n+00135a70: 6820 6173 203c 656d 3e3c 636f 6465 3e67 h as g\n+00135a80: 736f 6170 2f73 7464 736f 6170 322e 6370 soap/stdsoap2.cp\n+00135a90: 703c 2f63 6f64 653e 3c2f 656d 3e2c 203c p, <\n+00135aa0: 656d 3e3c 636f 6465 3e73 6f61 7043 2e63 em>soapC.c\n+00135ab0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 pp, \n+00135ac0: 3c65 6d3e 3c63 6f64 653e 736f 6170 436c soapCl\n+00135ad0: 6965 6e74 2e63 7070 3c2f 636f 6465 3e3c ient.cpp<\n+00135ae0: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n+00135af0: 736f 6170 5365 7276 6572 2e63 7070 3c2f soapServer.cpp, and \n+00135b10: 616c 6c20 6170 706c 6963 6174 696f 6e20 all application \n+00135b20: 736f 7572 6365 2063 6f64 6520 6669 6c65 source code file\n+00135b30: 7320 7468 6174 2069 6e63 6c75 6465 203c s that include <\n+00135b40: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+00135b50: 7464 736f 6170 322e 683c 2f63 6f64 653e tdsoap2.h\n+00135b60: 3c2f 656d 3e20 6f72 203c 656d 3e3c 636f or soapH.h. If the m\n+00135b90: 6163 726f 7320 6172 6520 6e6f 7420 636f acros are not co\n+00135ba0: 6e73 6973 7465 6e74 6c79 2064 6566 696e nsistently defin\n+00135bb0: 6564 2061 7420 636f 6d70 696c 6520 7469 ed at compile ti\n+00135bc0: 6d65 2074 6865 6e20 7468 6520 6170 706c me then the appl\n+00135bd0: 6963 6174 696f 6e20 7769 6c6c 206c 696b ication will lik\n+00135be0: 656c 7920 6372 6173 6820 6475 6520 746f ely crash due to\n+00135bf0: 2061 206d 6973 6d61 7463 6865 7320 696e a mismatches in\n+00135c00: 2074 6865 2064 6563 6c61 7261 7469 6f6e the declaration\n+00135c10: 2061 6e64 2075 7365 206f 6620 7468 6520 and use of the \n+00135c20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context that i\n+00135c90: 7320 6375 7374 6f6d 697a 6564 2062 7920 s customized by \n+00135ca0: 7468 6573 6520 666c 6167 732e 3c2f 6464 these flags.
    .

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

    ..Using the \n+00135d20: 736f 6170 6465 6673 2e68 2068 6561 6465 soapdefs.h heade\n+00135d30: 7220 6669 6c65 3c2f 6832 3e0a 3c70 3e54 r file.

    T\n+00135d40: 6865 203c 656d 3e3c 636f 6465 3e73 6f61 he soa\n+00135d50: 7064 6566 732e 683c 2f63 6f64 653e 3c2f pdefs.h header file \n+00135d70: 6973 2069 6e63 6c75 6465 6420 696e 203c is included in <\n+00135d80: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+00135d90: 7464 736f 6170 322e 683c 2f63 6f64 653e tdsoap2.h\n+00135da0: 3c2f 656d 3e20 7768 656e 2063 6f6d 7069 when compi\n+00135db0: 6c69 6e67 2077 6974 6820 636f 6d70 696c ling with compil\n+00135dc0: 652d 7469 6d65 2066 6c61 6720 3c63 6f64 e-time flag #WITH_SOAPDEFS\n+00135de0: 5f48 3c2f 636f 6465 3e3a 203c 2f70 3e3c _H:

    <\n+00135df0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+00135e00: 656e 7422 3e20 632b 2b20 2d44 2057 4954 ent\"> c++ -D WIT\n+00135e10: 485f 534f 4150 4445 4653 5f48 202d 6320 H_SOAPDEFS_H -c \n+00135e20: 7374 6473 6f61 7032 2e63 7070 0a3c 2f70 stdsoap2.cpp.

    The <\n+00135e40: 636f 6465 3e73 6f61 7064 6566 732e 683c code>soapdefs.h<\n+00135e50: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n+00135e60: 2061 6c6c 6f77 7320 7573 6572 7320 746f allows users to\n+00135e70: 2069 6e63 6c75 6465 2064 6566 696e 6974 include definit\n+00135e80: 696f 6e73 2061 6e64 2061 6464 2069 6e63 ions and add inc\n+00135e90: 6c75 6465 7320 7769 7468 6f75 7420 7265 ludes without re\n+00135ea0: 7175 6972 696e 6720 6368 616e 6765 7320 quiring changes \n+00135eb0: 746f 203c 656d 3e3c 636f 6465 3e67 736f to gso\n+00135ec0: 6170 2f73 7464 736f 6170 322e 683c 2f63 ap/stdsoap2.h. You c\n+00135ee0: 616e 2061 6c73 6f20 7370 6563 6966 7920 an also specify \n+00135ef0: 7468 6520 6865 6164 6572 2066 696c 6520 the header file \n+00135f00: 6e61 6d65 2074 6f20 696e 636c 7564 6520 name to include \n+00135f10: 6173 2061 206d 6163 726f 203c 636f 6465 as a macro SOAPDEFS_H to override t\n+00135f40: 6865 206e 616d 6520 3c65 6d3e 3c63 6f64 he name soapdefs.h:

    c++ -D SOAP\n+00135f90: 4445 4653 5f48 3d6d 7964 6566 732e 6820 DEFS_H=mydefs.h \n+00135fa0: 2d63 2073 7464 736f 6170 322e 6370 700a -c stdsoap2.cpp.\n+00135fb0: 3c2f 7072 653e 3c70 3e20 466f 7220 6578

    For ex\n+00135fc0: 616d 706c 652c 3c2f 703e 0a3c 6469 7620 ample,

    .
    // Cont\n+00136010: 656e 7473 206f 6620 6669 6c65 2026 7175 ents of file &qu\n+00136020: 6f74 3b73 6f61 7064 6566 732e 6826 7175 ot;soapdefs.h&qu\n+00136030: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n+00136040: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n+00136070: 6e63 6c75 6465 2026 6c74 3b6f 7374 7265 nclude <ostre\n+00136080: 616d 2667 743b 3c2f 7370 616e 3e20 3c2f am> .

    T\n+001360b0: 6865 2066 6f6c 6c6f 7769 6e67 2068 6561 he following hea\n+001360c0: 6465 7220 6669 6c65 2066 6f72 2073 6f61 der file for soa\n+001360d0: 7063 7070 3220 7265 6665 7273 2074 6f20 pcpp2 refers to \n+001360e0: 3c63 6f64 653e 7374 643a 3a6f 7374 7265 std::ostre\n+001360f0: 616d 3c2f 636f 6465 3e20 7769 7468 6f75 am withou\n+00136100: 7420 736f 6170 6370 7032 2074 6872 6f77 t soapcpp2 throw\n+00136110: 696e 6720 6572 726f 7273 2c20 6279 2075 ing errors, by u\n+00136120: 7369 6e67 203c 636f 6465 3e65 7874 6572 sing exter\n+00136130: 6e3c 2f63 6f64 653e 2074 6f20 6465 636c n to decl\n+00136140: 6172 6520 3c63 6f64 653e 636c 6173 7320 are class \n+00136150: 7374 643a 3a6f 7374 7265 616d 3c2f 636f std::ostream:

    .
    <\n+00136180: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00136190: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// std::o\n+001361b0: 7374 7265 616d 2063 616e 2623 3339 3b74 stream can't\n+001361c0: 2062 6520 7365 7269 616c 697a 6564 2c20 be serialized, \n+001361d0: 6275 7420 6e65 6564 2074 6f20 6265 2064 but need to be d\n+001361e0: 6563 6c61 7265 6420 746f 206d 616b 6520 eclared to make \n+001361f0: 6974 2076 6973 6962 6c65 2074 6f20 6753 it visible to gS\n+00136200: 4f41 5020 3c2f 7370 616e 3e3c 2f64 6976 OAP .
    extern\n+00136240: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c cl\n+00136260: 6173 7320 3c2f 7370 616e 3e73 7464 3a3a ass std::\n+00136270: 6f73 7472 6561 6d3b 3c2f 6469 763e 0a3c ostream;
    .<\n+00136280: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00136290: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    class ns\n+001362d0: 5f5f 6d79 436c 6173 7320 3c2f 6469 763e __myClass
    \n+001362e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { publi\n+00136310: 633c 2f73 7061 6e3e 3a3c 2f64 6976 3e0a c:
    .\n+00136320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    virt\n+00136350: 7561 6c3c 2f73 7061 6e3e 203c 7370 616e ual void\n+00136380: 2070 7269 6e74 2873 7464 3a3a 6f73 7472 print(std::ostr\n+00136390: 6561 6d20 2661 6d70 3b73 2920 3c73 7061 eam &s) const; \n+001363c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // we need\n+001363e0: 2073 7464 3a3a 6f73 7472 6561 6d20 6865 std::ostream he\n+001363f0: 7265 203c 2f73 7061 6e3e 3c2f 6469 763e re
    \n+00136400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... //
    \n+00136440: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    See also S\n+00136480: 6563 7469 6f6e 203c 6120 636c 6173 733d ection Transient data \n+001364c0: 7479 7065 733c 2f61 3e20 2c20 6e6f 6e2d types , non-\n+001364d0: 7365 7269 616c 697a 6162 6c65 2064 6174 serializable dat\n+001364e0: 6120 7479 7065 732e 3c2f 703e 0a3c 703e a types.

    .

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

    .Run-tim\n+00136550: 6520 666c 6167 733c 2f68 313e 0a3c 703e e flags

    .

    \n+00136560: 5468 6520 6753 4f41 5020 656e 6769 6e65 The gSOAP engine\n+00136570: 2073 7461 7465 2069 7320 7374 6f72 6564 state is stored\n+00136580: 2069 6e20 7468 6520 3c63 6f64 653e 3c61 in the soap contex\n+001365f0: 7420 7468 6174 2069 7320 696e 6974 6961 t that is initia\n+00136600: 6c69 7a65 6420 616e 6420 636f 6e74 726f lized and contro\n+00136610: 6c6c 6564 2062 7920 7661 7269 6f75 7320 lled by various \n+00136620: 6f70 7469 6f6e 616c 2072 756e 7469 6d65 optional runtime\n+00136630: 2066 6c61 6773 2e20 4d6f 7374 2066 6c61 flags. Most fla\n+00136640: 6773 2061 7265 2061 7070 6c69 6361 626c gs are applicabl\n+00136650: 6520 746f 2065 6974 6865 7220 7072 6f63 e to either proc\n+00136660: 6573 7369 6e67 2069 6e70 7574 206f 7220 essing input or \n+00136670: 746f 2070 726f 6365 7373 696e 6720 6f75 to processing ou\n+00136680: 7470 7574 2c20 6275 7420 736f 6d65 2061 tput, but some a\n+00136690: 7265 2061 7070 6c69 6361 626c 6520 746f re applicable to\n+001366a0: 2062 6f74 6820 696e 7075 7420 616e 6420 both input and \n+001366b0: 6f75 7470 7574 206d 6573 7361 6765 2061 output message a\n+001366c0: 6e64 2064 6f63 756d 656e 7420 7072 6f63 nd document proc\n+001366d0: 6573 7369 6e67 2e3c 2f70 3e0a 3c70 3e46 essing.

    .

    F\n+001366e0: 7572 7468 6572 6d6f 7265 2c20 7468 6573 urthermore, thes\n+001366f0: 6520 666c 6167 7320 6172 6520 6469 7669 e flags are divi\n+00136700: 6465 6420 696e 746f 2066 6f75 7220 6361 ded into four ca\n+00136710: 7465 676f 7269 6573 3a20 7472 616e 7370 tegories: transp\n+00136720: 6f72 7420 2849 4f29 2c20 636f 6e74 656e ort (IO), conten\n+00136730: 7420 656e 636f 6469 6e67 2028 454e 4329 t encoding (ENC)\n+00136740: 2c20 584d 4c20 7061 7273 696e 6720 616e , XML parsing an\n+00136750: 6420 6765 6e65 7261 7469 6f6e 2028 584d d generation (XM\n+00136760: 4c29 2c20 616e 6420 432f 432b 2b20 7573 L), and C/C++ us\n+00136770: 6167 6520 2843 292e 3c2f 703e 0a3c 703e age (C).

    .

    \n+00136780: 5468 6520 696e 7075 742d 6d6f 6465 2061 The input-mode a\n+00136790: 6e64 206f 7574 7075 742d 6d6f 6465 2066 nd output-mode f\n+001367a0: 6c61 6773 2066 6f72 2069 6e62 6f75 6e64 lags for inbound\n+001367b0: 2028 696e 2920 616e 6420 6f75 7462 6f75 (in) and outbou\n+001367c0: 6e64 2028 6f75 7429 206d 6573 7361 6765 nd (out) message\n+001367d0: 2070 726f 6365 7373 696e 6720 6172 653a processing are:\n+001367e0: 3c2f 703e 0a3c 7461 626c 6520 636c 6173

    .
    define \n+00134450: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 result \n+00134480: 203c 2f74 683e 3c2f 7472 3e0a 3c74 7220
    expands to (std::nothro\n+00134530: 7729 3c2f 636f 6465 3e20 746f 2070 7265 w) to pre\n+00134540: 7665 6e74 206d 656d 6f72 7920 616c 6c6f vent memory allo\n+00134550: 6361 7469 6f6e 2065 7863 6570 7469 6f6e cation exception\n+00134560: 7320 283c 636f 6465 3e23 534f 4150 5f45 s (#SOAP_E\n+00134570: 4f4d 3c2f 636f 6465 3e20 6973 2075 7365 OM is use\n+00134580: 6420 696e 7374 6561 6429 2c20 7468 6973 d instead), this\n+00134590: 206d 6163 726f 2063 616e 2062 6520 6368 macro can be ch\n+001345a0: 616e 6765 6420 2020 203c 2f74 643e 3c2f anged
    #S\n+00134600: 4f41 505f 4255 464c 454e 3c2f 636f 6465 OAP_BUFLEN the l\n+00134640: 656e 6774 6820 6f66 2074 6865 2069 6e74 ength of the int\n+00134650: 6572 6e61 6c20 6d65 7373 6167 6520 6275 ernal message bu\n+00134660: 6666 6572 2c20 696d 7061 6374 7320 636f ffer, impacts co\n+00134670: 6d6d 756e 6963 6174 696f 6e73 2070 6572 mmunications per\n+00134680: 666f 726d 616e 6365 2020 2020 3c2f 7464 formance
    \n+001346e0: 2353 4f41 505f 4844 524c 454e 3c2f 636f #SOAP_HDRLEN the\n+00134720: 206d 6178 696d 756d 206c 656e 6774 6820 maximum length \n+00134730: 6f66 2048 5454 5020 6865 6164 6572 7320 of HTTP headers \n+00134740: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_TA\n+001347a0: 474c 454e 3c2f 636f 6465 3e20 2020 3c2f GLEN the maximum\n+001347e0: 206c 656e 6774 6820 6f66 2058 4d4c 2074 length of XML t\n+001347f0: 6167 7320 616e 6420 5552 4c73 2020 2020 ags and URLs \n+00134800: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_TMPLEN\n+00134860: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #\n+00134940: 534f 4150 5f4d 4158 414c 4c4f 4353 495a SOAP_MAXALLOCSIZ\n+00134950: 453c 2f63 6f64 653e 2020 203c 2f74 643e E the maximum si\n+00134990: 7a65 206f 6620 6120 626c 6f63 6b20 6f66 ze of a block of\n+001349a0: 206d 656d 6f72 7920 7468 6174 203c 636f memory that malloc\n+001349c0: 2063 616e 2061 6c6c 6f63 6174 6520 2020 can allocate \n+001349d0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    the maxi\n+00134a70: 6d75 6d20 616c 6c6f 6361 7469 6f6e 2074 mum allocation t\n+00134a80: 6872 6573 686f 6c64 2074 6f20 7072 652d hreshold to pre-\n+00134a90: 616c 6c6f 6361 7465 2053 4f41 5020 6172 allocate SOAP ar\n+00134aa0: 7261 7973 2069 6e20 6d65 6d6f 7279 2020 rays in memory \n+00134ab0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    the max\n+00134b50: 696d 756d 2044 494d 4520 6174 7461 6368 imum DIME attach\n+00134b60: 6d65 6e74 2073 697a 6520 616c 6c6f 7765 ment size allowe\n+00134b70: 6420 746f 2072 6563 6569 7665 2020 2020 d to receive \n+00134b80: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_MAXEIN\n+00134be0: 5452 3c2f 636f 6465 3e20 2020 3c2f 7464 TR maximum numbe\n+00134c20: 7220 6f66 2045 494e 5452 2069 6e74 6572 r of EINTR inter\n+00134c30: 7275 7074 7320 746f 2069 676e 6f72 6520 rupts to ignore \n+00134c40: 7768 696c 6520 706f 6c6c 696e 6720 6120 while polling a \n+00134c50: 736f 636b 6574 2066 6f72 2070 656e 6469 socket for pendi\n+00134c60: 6e67 2061 6374 6976 6974 7920 2020 203c ng activity <\n+00134c70: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_MAXINF\n+00134cd0: 4c41 5445 5349 5a45 3c2f 636f 6465 3e20 LATESIZE \n+00134ce0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 trusted\n+00134d10: 2069 6e66 6c61 7465 6420 636f 6e74 656e inflated conten\n+00134d20: 7420 7369 7a65 2028 3120 4d42 2062 7920 t size (1 MB by \n+00134d30: 6465 6661 756c 7429 2020 2020 3c2f 7464 default)
    \n+00134d90: 2353 4f41 505f 4d41 584b 4545 5041 4c49 #SOAP_MAXKEEPALI\n+00134da0: 5645 3c2f 636f 6465 3e20 2020 3c2f 7464 VE maximum itera\n+00134de0: 7469 6f6e 7320 696e 2074 6865 203c 636f tions in the soap_serve\n+00134e70: 3c2f 636f 6465 3e20 6c6f 6f70 206f 6e20 loop on \n+00134e80: 4854 5450 206b 6565 702d 616c 6976 6520 HTTP keep-alive \n+00134e90: 636f 6e6e 6563 7469 6f6e 7320 2020 203c connections <\n+00134ea0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_MAXLEN\n+00134f00: 4754 483c 2f63 6f64 653e 2020 203c 2f74 GTH maximum stri\n+00134f40: 6e67 2063 6f6e 7465 6e74 206c 656e 6774 ng content lengt\n+00134f50: 6820 666f 7220 7374 7269 6e67 7320 6e6f h for strings no\n+00134f60: 7420 616c 7265 6164 7920 636f 6e73 7472 t already constr\n+00134f70: 6169 6e65 6420 6279 2058 4d4c 2073 6368 ained by XML sch\n+00134f80: 656d 6120 7661 6c69 6461 7469 6f6e 2063 ema validation c\n+00134f90: 6f6e 7374 7261 696e 7473 2020 2020 3c2f onstraints
    #SOAP_MAXLEVEL\n+00135000: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    maximum num\n+00135110: 6265 7220 6f66 2061 7272 6179 206f 7220 ber of array or \n+00135120: 636f 6e74 6169 6e65 7220 656c 656d 656e container elemen\n+00135130: 7473 2066 6f72 2063 6f6e 7461 696e 6572 ts for container\n+00135140: 7320 7468 6174 2061 7265 206e 6f74 2061 s that are not a\n+00135150: 6c72 6561 6479 2063 6f6e 7374 7261 696e lready constrain\n+00135160: 6564 2062 7920 584d 4c20 7363 6865 6d61 ed by XML schema\n+00135170: 2076 616c 6964 6174 696f 6e20 636f 6e73 validation cons\n+00135180: 7472 6169 6e74 7320 2020 203c 2f74 643e traints
    #\n+001351e0: 534f 4150 5f4d 494e 4445 464c 4154 4552 SOAP_MINDEFLATER\n+001351f0: 4154 494f 3c2f 636f 6465 3e20 2020 3c2f ATIO trusted def\n+00135230: 6c61 7469 6f6e 2072 6174 696f 2061 6674 lation ratio aft\n+00135240: 6572 203c 636f 6465 3e23 534f 4150 5f4d er #SOAP_M\n+00135250: 4158 494e 464c 4154 4553 495a 453c 2f63 AXINFLATESIZE is reached \n+00135270: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_PU\n+001352d0: 5245 5f56 4952 5455 414c 3c2f 636f 6465 RE_VIRTUAL set t\n+00135310: 6f20 3c63 6f64 653e 3d20 303c 2f63 6f64 o = 0 when #W\n+00135330: 4954 485f 5055 5245 5f56 4952 5455 414c ITH_PURE_VIRTUAL\n+00135340: 3c2f 636f 6465 3e20 6973 2064 6566 696e is defin\n+00135350: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    #SOAP_\n+001353b0: 5353 4c5f 5253 415f 4249 5453 3c2f 636f SSL_RSA_BITS len\n+001353f0: 6774 6820 6f66 2074 6865 2052 5341 206b gth of the RSA k\n+00135400: 6579 2028 3230 3438 2062 7920 6465 6661 ey (2048 by defa\n+00135410: 756c 7429 2020 2020 3c2f 7464 3e3c 2f74 ult)
    #SO\n+00135470: 4150 5f55 4e4b 4e4f 574e 5f43 4841 523c AP_UNKNOWN_CHAR<\n+00135480: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    \n+00135590: 2353 4f41 505f 554e 4b4e 4f57 4e5f 554e #SOAP_UNKNOWN_UN\n+001355a0: 4943 4f44 455f 4348 4152 3c2f 636f 6465 ICODE_CHAR integ\n+001355e0: 6572 2055 6e69 636f 6465 2076 616c 7565 er Unicode value\n+001355f0: 2072 6570 7265 7365 6e74 696e 6720 6120 representing a \n+00135600: 6368 6172 6163 7465 7220 7468 6174 2072 character that r\n+00135610: 6570 6c61 6365 7320 616e 2069 6e76 616c eplaces an inval\n+00135620: 6964 2055 6e69 636f 6465 2063 6f64 6520 id Unicode code \n+00135630: 706f 696e 7420 2020 203c 2f74 643e 3c2f point
    #S\n+00135690: 4f41 505f 4c4f 4e47 5f46 4f52 4d41 543c OAP_LONG_FORMAT<\n+001356a0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    macro t\n+001357b0: 6861 7420 7265 7072 6573 656e 7473 2074 hat represents t\n+001357c0: 6865 203c 636f 6465 3e23 554c 4f4e 4736 he #ULONG6\n+001357d0: 343c 2f63 6f64 653e 2070 7269 6e74 6620 4 printf \n+001357e0: 252d 666f 726d 6174 2020 2020 3c2f 7464 %-format
    #SOAP_INVALID_S\n+00135850: 4f43 4b45 543c 2f63 6f64 653e 2020 203c OCKET <\n+00135860: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>portable i\n+00135890: 6e76 616c 6964 2073 6f63 6b65 7420 7661 nvalid socket va\n+001358a0: 6c75 652c 2063 616e 2061 6c73 6f20 7573 lue, can also us\n+001358b0: 6520 3c63 6f64 653e 233c 6120 636c 6173 e #soap_valid\n+00135970: 5f73 6f63 6b65 7428 736f 636b 293c 2f61 _socket(sock) to chec\n+00135990: 6b20 6966 203c 636f 6465 3e73 6f63 6b3c k if sock<\n+001359a0: 2f63 6f64 653e 2069 7320 7661 6c69 6420 /code> is valid \n+001359b0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74
    ....<\n+00136900: 636f 6465 3e23 534f 4150 5f49 4f5f 464c code>#SOAP_IO_FL\n+00136910: 5553 483c 2f63 6f64 653e 2020 203c 2f74 USH <\n+00136950: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00136960: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00136970: 3e66 6c75 7368 206f 7574 7075 7420 696d >flush output im\n+00136980: 6d65 6469 6174 656c 7920 2020 203c 2f74 mediately ..\n+00136a00: 3c74 6420 636c 6173 733d 226d 6172 6b64 e\n+00136a50: 6e61 626c 6520 6f75 7470 7574 2062 7566 nable output buf\n+00136a60: 6665 7269 6e67 2c20 7468 6520 6465 6661 fering, the defa\n+00136a70: 756c 7420 6d6f 6465 2066 6f72 2073 6f63 ult mode for soc\n+00136a80: 6b65 7420 636f 6e6e 6563 7469 6f6e 7320 ket connections \n+00136a90: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+00136ac0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00136ad0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00136ae0: 3e3c 636f 6465 3e23 534f 4150 5f49 4f5f >#SOAP_IO_\n+00136af0: 5354 4f52 453c 2f63 6f64 653e 2020 203c STORE <\n+00136b00: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>....\n+00136cc0: 3c63 6f64 653e 2353 4f41 505f 494f 5f4c #SOAP_IO_L\n+00136cd0: 454e 4754 483c 2f63 6f64 653e 2020 203c ENGTH <\n+00136ce0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>.\n+00136da0: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...\n+00136f30: 696e 2b6f 7574 2020 203c 2f74 643e 3c74 in+out \n+00136f60: 7573 6520 5544 5020 2864 6174 6167 7261 use UDP (datagra\n+00136f70: 6d29 2074 7261 6e73 706f 7274 2c20 6d61 m) transport, ma\n+00136f80: 7869 6d75 6d20 6d65 7373 6167 6520 6c65 ximum message le\n+00136f90: 6e67 7468 2069 7320 3c63 6f64 653e 2353 ngth is #S\n+00136fa0: 4f41 505f 4255 464c 454e 3c2f 636f 6465 OAP_BUFLEN .\n+00136fc0: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...\n+00137150: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+00137230: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ..o\n+00137330: 7574 2020 203c 2f74 643e 3c74 6420 636c ut ..<\n+00137450: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137460: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137470: 3e3c 636f 6465 3e23 534f 4150 5f45 4e43 >#SOAP_ENC\n+00137480: 5f4d 544f 4d3c 2f63 6f64 653e 2020 203c _MTOM <\n+00137490: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>....\n+00137640: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00137740: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137750: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137760: 3e3c 636f 6465 3e23 534f 4150 5f58 4d4c >#SOAP_XML\n+00137770: 5f49 4e44 454e 543c 2f63 6f64 653e 2020 _INDENT \n+00137780: 203c 2f74 643e 3c74 6420 636c 6173 733d .\n+00137800: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...<\n+00137900: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00137910: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00137920: 3e3c 636f 6465 3e23 534f 4150 5f58 4d4c >#SOAP_XML\n+00137930: 5f44 4546 4155 4c54 4e53 3c2f 636f 6465 _DEFAULTNS ..<\n+00137ad0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..i\n+00137b60: 6e20 2020 3c2f 7464 3e3c 7464 2063 6c61 n ..\n+00137be0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00137d00: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..o\n+00137d90: 7574 2020 203c 2f74 643e 3c74 6420 636c ut \n+00137e10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....<\n+00137f50: 636f 6465 3e23 534f 4150 5f58 4d4c 5f4e code>#SOAP_XML_N\n+00137f60: 4f54 5950 453c 2f63 6f64 653e 2020 203c OTYPE <\n+00137f70: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>....<\n+00138110: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00138120: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00138130: 3e3c 636f 6465 3e23 534f 4150 5f43 5f55 >#SOAP_C_U\n+00138140: 5446 5354 5249 4e47 3c2f 636f 6465 3e20 TFSTRING \n+00138150: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ..<\n+00138250: 636f 6465 3e23 534f 4150 5f43 5f4d 4253 code>#SOAP_C_MBS\n+00138260: 5452 494e 473c 2f63 6f64 653e 2020 203c TRING <\n+00138270: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>..\n+001383a0: 3c63 6f64 653e 2353 4f41 505f 435f 4e49 #SOAP_C_NI\n+001383b0: 4c53 5452 494e 473c 2f63 6f64 653e 2020 LSTRING \n+001383c0: 203c 2f74 643e 3c74 6420 636c 6173 733d ..

    All flags a\n+00138470: 7265 2069 6e64 6570 656e 6465 6e74 2061 re independent a\n+00138480: 6e64 2063 616e 2062 6520 636f 6d62 696e nd can be combin\n+00138490: 6564 2075 7369 6e67 2061 2062 6974 7769 ed using a bitwi\n+001384a0: 7365 206f 7220 283c 636f 6465 3e7c 3c2f se or (|), except f\n+001384c0: 6f72 203c 636f 6465 3e23 534f 4150 5f49 or #SOAP_I\n+001384d0: 4f5f 464c 5553 483c 2f63 6f64 653e 2c20 O_FLUSH, \n+001384e0: 3c63 6f64 653e 2353 4f41 505f 494f 5f42 #SOAP_IO_B\n+001384f0: 5546 4645 523c 2f63 6f64 653e 2c20 3c63 UFFER, #SOAP_IO_STO\n+00138510: 5245 3c2f 636f 6465 3e2c 2061 6e64 203c RE, and <\n+00138520: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH\n+00138530: 554e 4b3c 2f63 6f64 653e 2077 6869 6368 UNK which\n+00138540: 2061 7265 2065 6e75 6d65 7261 7469 6f6e are enumeration\n+00138550: 7320 616e 6420 6f6e 6c79 206f 6e65 206f s and only one o\n+00138560: 6620 7468 6573 6520 492f 4f20 666c 6167 f these I/O flag\n+00138570: 7320 6361 6e20 6265 2075 7365 642e 2041 s can be used. A\n+00138580: 6c73 6f20 7468 6520 584d 4c20 7365 7269 lso the XML seri\n+00138590: 616c 697a 6174 696f 6e20 666c 6167 7320 alization flags \n+001385a0: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n+001385b0: 5452 4545 3c2f 636f 6465 3e20 616e 6420 TREE and \n+001385c0: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n+001385d0: 4752 4150 483c 2f63 6f64 653e 2073 686f GRAPH sho\n+001385e0: 756c 6420 6e6f 7420 6265 206d 6978 6564 uld not be mixed\n+001385f0: 2e3c 2f70 3e0a 3c70 3e54 6f20 616c 6c6f .

    .

    To allo\n+00138600: 6361 7465 2061 6e64 2069 6e69 7469 616c cate and initial\n+00138610: 697a 6520 6120 3c63 6f64 653e 3c61 2063 ize a soap\n+00138670: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n+00138680: 7769 7468 2069 6e70 7574 2061 6e64 206f with input and o\n+00138690: 7574 7075 7420 6d6f 6465 2066 6c61 6773 utput mode flags\n+001386a0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    ..
    s\n+00138820: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap * <\n+00138860: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00138870: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00138880: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00138890: 6761 3132 6138 3766 3637 3935 6236 3262 ga12a87f6795b62b\n+001388a0: 3035 3136 3465 6463 3339 3262 3261 6462 05164edc392b2adb\n+001388b0: 3164 223e 736f 6170 5f6e 6577 323c 2f61 1d\">soap_new2(soap_mode imod\n+00138970: 653c 2f61 3e2c 203c 6120 636c 6173 733d e, soap_m\n+001389d0: 6f64 653c 2f61 3e20 3c61 2063 6c61 7373 ode omode);.
    .<\n+00138bd0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    To init\n+00138bf0: 6961 6c69 7a65 2061 2073 7461 636b 2d61 ialize a stack-a\n+00138c00: 6c6c 6f63 6174 6564 203c 636f 6465 3e3c llocated <\n+00138c10: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00138c20: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00138c30: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n+00138c40: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n+00138c50: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n+00138c60: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n+00138c70: 7874 2077 6974 6820 696e 7075 7420 616e xt with input an\n+00138c80: 6420 6f75 7470 7574 206d 6f64 6520 666c d output mode fl\n+00138c90: 6167 733a 3c2f 703e 0a3c 6469 7620 636c ags:

    .
    <\n+00138cb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00138cc0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n+00138ce0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap\n+00138d40: 5f69 6e69 7431 3c2f 613e 283c 7370 616e _init1(struct <\n+00138d70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00138d80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00138d90: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00138da0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00138dd0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_mode iomode);
    \n+00138e40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    voi\n+00138e70: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d so\n+00138ed0: 6170 5f69 6e69 7432 3c2f 613e 283c 7370 ap_init2(struct\n+00138f00: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00138f30: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, soap_mode<\n+00138fc0: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> imo\n+00139010: 6465 3c2f 613e 2c20 3c61 2063 6c61 7373 de, soap_\n+00139070: 6d6f 6465 3c2f 613e 203c 6120 636c 6173 mode omode);.

    To s\n+00139290: 6574 2061 6e64 2063 6c65 6172 206d 6f64 et and clear mod\n+001392a0: 6520 666c 6167 7320 7573 653a 3c2f 703e e flags use:

    \n+001392b0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    void <\n+00139300: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00139310: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00139320: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00139330: 6761 3834 6635 3261 3637 6134 3130 3039 ga84f52a67a41009\n+00139340: 6232 3630 6666 3263 3033 3664 6637 6636 b260ff2c036df7f6\n+00139350: 6162 223e 736f 6170 5f73 6574 5f6d 6f64 ab\">soap_set_mod\n+00139360: 653c 2f61 3e28 3c73 7061 6e20 636c 6173 e(stru\n+00139380: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, s\n+00139440: 6f61 705f 6d6f 6465 3c2f 613e 2069 6f6d oap_mode iom\n+00139450: 6f64 6529 3b20 3c73 7061 6e20 636c 6173 ode); // s\n+00139470: 6574 2069 6e70 7574 2061 6e64 206f 7574 et input and out\n+00139480: 7075 7420 6d6f 6465 2066 6c61 6773 3c2f put mode flags
    .void soap_se\n+00139530: 745f 696d 6f64 653c 2f61 3e28 3c73 7061 t_imode(struct \n+00139560: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00139590: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001395c0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , soap_mode imod\n+00139670: 653c 2f61 3e29 3b20 3c73 7061 6e20 636c e); //\n+00139690: 2073 6574 2069 6e70 7574 206d 6f64 6520 set input mode \n+001396a0: 666c 6167 733c 2f73 7061 6e3e 3c2f 6469 flags.
    v\n+001396e0: 6f69 643c 2f73 7061 6e3e 203c 6120 636c oid \n+00139740: 736f 6170 5f73 6574 5f6f 6d6f 6465 3c2f soap_set_omode(struct<\n+00139770: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001397a0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001397d0: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, soap\n+00139830: 5f6d 6f64 653c 2f61 3e20 3c61 2063 6c61 _mode omode); <\n+00139890: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001398a0: 656e 7422 3e2f 2f20 7365 7420 6f75 7470 ent\">// set outp\n+001398b0: 7574 206d 6f64 6520 666c 6167 733c 2f73 ut mode flags
    .
    void soap_clr\n+00139960: 5f6d 6f64 653c 2f61 3e28 3c73 7061 6e20 _mode(\n+00139980: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+001399c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001399d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001399e0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001399f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_mode\n+00139a50: 2069 6f6d 6f64 6529 3b20 3c73 7061 6e20 iomode); \n+00139a70: 2f2f 2063 6c65 6172 2069 6e70 7574 2061 // clear input a\n+00139a80: 6e64 206f 7574 7075 7420 6d6f 6465 2066 nd output mode f\n+00139a90: 6c61 6773 3c2f 7370 616e 3e3c 2f64 6976 lags..
    void soap_clr\n+00139d50: 5f6f 6d6f 6465 3c2f 613e 283c 7370 616e _omode(struct <\n+00139d80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00139d90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00139da0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00139db0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00139de0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_mode omode\n+00139e90: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // \n+00139eb0: 636c 6561 7220 6f75 7470 7574 206d 6f64 clear output mod\n+00139ec0: 6520 666c 6167 733c 2f73 7061 6e3e 3c2f e flags.
    soap_clr_m\n+00139f90: 6f64 653c 2f61 3e3c 2f64 6976 3e3c 6469 ode
    void soap_clr_m\n+00139fc0: 6f64 6528 7374 7275 6374 2073 6f61 7020 ode(struct soap \n+00139fd0: 2a73 6f61 702c 2073 6f61 705f 6d6f 6465 *soap, soap_mode\n+00139fe0: 2069 6e70 7574 5f61 6e64 5f6f 7574 7075 input_and_outpu\n+00139ff0: 745f 6d6f 6465 293c 2f64 6976 3e3c 6469 t_mode)
    \n+0013a010: 436c 6561 7220 696e 7075 7420 616e 6420 Clear input and \n+0013a020: 6f75 7470 7574 2073 6f61 705f 6d6f 6465 output soap_mode\n+0013a030: 2066 6c61 6773 206f 6620 7468 6520 6769 flags of the gi\n+0013a040: 7665 6e20 736f 6170 2063 6f6e 7465 7874 ven soap context\n+0013a050: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .\n+0013a190: 436c 6561 7220 696e 7075 7420 736f 6170 Clear input soap\n+0013a1a0: 5f6d 6f64 6520 666c 6167 7320 6f66 2074 _mode flags of t\n+0013a1b0: 6865 2067 6976 656e 2073 6f61 7020 636f he given soap co\n+0013a1c0: 6e74 6578 742e 3c2f 6469 763e 3c2f 6469 ntext.
    .
    \n+0013a2b0: 766f 6964 2073 6f61 705f 636c 725f 6f6d void soap_clr_om\n+0013a2c0: 6f64 6528 7374 7275 6374 2073 6f61 7020 ode(struct soap \n+0013a2d0: 2a73 6f61 702c 2073 6f61 705f 6d6f 6465 *soap, soap_mode\n+0013a2e0: 206f 7574 7075 745f 6d6f 6465 293c 2f64 output_mode)
    Clear outp\n+0013a310: 7574 2073 6f61 705f 6d6f 6465 2066 6c61 ut soap_mode fla\n+0013a320: 6773 206f 6620 7468 6520 6769 7665 6e20 gs of the given \n+0013a330: 736f 6170 2063 6f6e 7465 7874 2e3c 2f64 soap context.
    .
    <\n+0013a3a0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+0013a3b0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_\n+0013a400: 7365 745f 696d 6f64 653c 2f61 3e3c 2f64 set_imode
    void soap\n+0013a430: 5f73 6574 5f69 6d6f 6465 2873 7472 7563 _set_imode(struc\n+0013a440: 7420 736f 6170 202a 736f 6170 2c20 736f t soap *soap, so\n+0013a450: 6170 5f6d 6f64 6520 696e 7075 745f 6d6f ap_mode input_mo\n+0013a460: 6465 293c 2f64 6976 3e3c 6469 7620 636c de)
    Set \n+0013a480: 696e 7075 7420 736f 6170 5f6d 6f64 6520 input soap_mode \n+0013a490: 666c 6167 7320 6f66 2074 6865 2067 6976 flags of the giv\n+0013a4a0: 656e 2073 6f61 7020 636f 6e74 6578 742e en soap context.\n+0013a4b0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    so\n+0013a570: 6170 5f73 6574 5f6f 6d6f 6465 3c2f 613e ap_set_omode\n+0013a580: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void s\n+0013a5a0: 6f61 705f 7365 745f 6f6d 6f64 6528 7374 oap_set_omode(st\n+0013a5b0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0013a5c0: 2073 6f61 705f 6d6f 6465 206f 7574 7075 soap_mode outpu\n+0013a5d0: 745f 6d6f 6465 293c 2f64 6976 3e3c 6469 t_mode)
    \n+0013a5f0: 5365 7420 6f75 7470 7574 2073 6f61 705f Set output soap_\n+0013a600: 6d6f 6465 2066 6c61 6773 206f 6620 7468 mode flags of th\n+0013a610: 6520 6769 7665 6e20 736f 6170 2063 6f6e e given soap con\n+0013a620: 7465 7874 2e3c 2f64 6976 3e3c 2f64 6976 text.
    .
    Note
    <\n+0013a670: 6464 3e54 6865 203c 636f 6465 3e23 534f dd>The #SO\n+0013a680: 4150 5f58 4d4c 5f54 5245 453c 2f63 6f64 AP_XML_TREE mode flag can\n+0013a6a0: 2062 6520 7573 6564 2074 6f20 696d 7072 be used to impr\n+0013a6b0: 6f76 6520 696e 7465 726f 7065 7261 6269 ove interoperabi\n+0013a6c0: 6c69 7479 2077 6974 6820 534f 4150 2069 lity with SOAP i\n+0013a6d0: 6d70 6c65 6d65 6e74 6174 696f 6e73 2074 mplementations t\n+0013a6e0: 6861 7420 6172 6520 6e6f 7420 6675 6c6c hat are not full\n+0013a6f0: 7920 534f 4150 2031 2e31 2f31 2e32 2052 y SOAP 1.1/1.2 R\n+0013a700: 5043 2065 6e63 6f64 696e 6720 636f 6d70 PC encoding comp\n+0013a710: 6c69 616e 7420 7769 7468 2072 6573 7065 liant with respe\n+0013a720: 6374 2074 6f20 7072 6f63 6573 7369 6e67 ct to processing\n+0013a730: 2069 642d 6872 6566 2f72 6566 2061 7474 id-href/ref att\n+0013a740: 7269 6275 7465 732e 2048 6f77 6576 6572 ributes. However\n+0013a750: 2c20 7472 6565 2073 6572 6961 6c69 7a61 , tree serializa\n+0013a760: 7469 6f6e 2077 696c 6c20 6475 706c 6963 tion will duplic\n+0013a770: 6174 6520 6461 7461 2077 6865 6e20 7468 ate data when th\n+0013a780: 6973 2064 6174 6120 6973 2063 6f2d 7265 is data is co-re\n+0013a790: 6665 7265 6e63 6564 2e20 4379 636c 6573 ferenced. Cycles\n+0013a7a0: 2061 7265 2064 6574 6563 7465 6420 616e are detected an\n+0013a7b0: 6420 6272 6f6b 656e 2074 6f20 6176 6f69 d broken to avoi\n+0013a7c0: 6420 696e 6669 6e69 7465 2073 6572 6961 d infinite seria\n+0013a7d0: 6c69 7a61 7469 6f6e 2e3c 2f64 643e 3c2f lization..

    In additi\n+0013a7f0: 6f6e 2074 6f20 7468 6520 636f 6e74 6578 on to the contex\n+0013a800: 7420 6d6f 6465 2066 6c61 6773 2c20 7468 t mode flags, th\n+0013a810: 6520 666f 6c6c 6f77 696e 6720 636f 6e74 e following cont\n+0013a820: 6578 7420 666c 6167 7320 6361 6e20 6265 ext flags can be\n+0013a830: 2075 7365 6420 746f 2073 6574 203c 636f used to set setsockopt level SOL_SOCKET options when \n+0013a880: 736f 636b 6574 7320 6172 6520 6372 6561 sockets are crea\n+0013a890: 7465 642c 2074 686f 7567 6820 736f 6d65 ted, though some\n+0013a8a0: 206f 7074 696f 6e73 206d 6179 206e 6f74 options may not\n+0013a8b0: 2062 6520 6170 706c 6963 6162 6c65 2074 be applicable t\n+0013a8c0: 6f20 796f 7572 206f 7065 7261 7469 6e67 o your operating\n+0013a8d0: 2073 7973 7465 6d3a 3c2f 703e 0a3c 7461 system:

    ..
    ...<\n+0013a9c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013a9d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013a9e0: 3e3c 636f 6465 3e3c 6120 636c 6173 733d >s\n+0013aaa0: 6f61 703a 3a63 6f6e 6e65 6374 5f66 6c61 oap::connect_fla\n+0013aab0: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n+0013aac0: 3c63 6f64 653e 534f 5f4e 4f53 4947 5049 SO_NOSIGPI\n+0013aad0: 5045 3c2f 636f 6465 3e20 2020 3c2f 7464 PE ..\n+0013ace0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...\n+0013aea0: 3c74 7220 636c 6173 733d 226d 6172 6b64 ........\n+0013b620: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n+0013b760: 3c74 6420 636c 6173 733d 226d 6172 6b64 ........

    For exa\n+0013bd90: 6d70 6c65 2c20 7768 656e 203c 636f 6465 mple, when soap::a\n+0013be60: 6363 6570 745f 666c 6167 733c 2f61 3e3c ccept_flags<\n+0013be70: 2f63 6f64 653e 2069 7320 7365 7420 746f /code> is set to\n+0013be80: 203c 636f 6465 3e28 534f 5f4e 4f53 4947 (SO_NOSIG\n+0013be90: 5049 5045 207c 2053 4f5f 4c49 4e47 4552 PIPE | SO_LINGER\n+0013bea0: 293c 2f63 6f64 653e 2074 6869 7320 6469 ) this di\n+0013beb0: 7361 626c 6573 2053 4947 5049 5045 2073 sables SIGPIPE s\n+0013bec0: 6967 6e61 6c73 2061 6e64 2073 6574 206c ignals and set l\n+0013bed0: 696e 6765 7220 7469 6d65 2076 616c 7565 inger time value\n+0013bee0: 2067 6976 656e 2062 7920 3c63 6f64 653e given by \n+0013bef0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::li\n+0013bfb0: 6e67 6572 5f74 696d 653c 2f61 3e3c 2f63 nger_time, which is z\n+0013bfd0: 6572 6f20 6279 2064 6566 6175 6c74 2e3c ero by default.<\n+0013bfe0: 2f70 3e0a 3c70 3e54 6865 203c 636f 6465 /p>.

    The soap::s\n+0013c0b0: 6f63 6b65 745f 666c 6167 733c 2f61 3e3c ocket_flags<\n+0013c0c0: 2f63 6f64 653e 2063 6f6e 7465 7874 2066 /code> context f\n+0013c0d0: 6c61 6720 6361 6e20 6265 2075 7365 6420 lag can be used \n+0013c0e0: 746f 2070 6173 7320 6f70 7469 6f6e 7320 to pass options \n+0013c0f0: 746f 2074 6865 203c 636f 6465 3e26 6c74 to the <\n+0013c100: 3b73 7973 2f73 6f63 6b65 742e 6826 6774 ;sys/socket.h>\n+0013c110: 3b3c 2f63 6f64 653e 203c 636f 6465 3e73 ; s\n+0013c120: 656e 643c 2f63 6f64 653e 2c20 3c63 6f64 end, sendto,\n+0013c140: 203c 636f 6465 3e72 6563 763c 2f63 6f64 recv, and re\n+0013c160: 6376 6672 6f6d 3c2f 636f 6465 3e20 6361 cvfrom ca\n+0013c170: 6c6c 7320 6d61 6465 2062 7920 7468 6520 lls made by the \n+0013c180: 656e 6769 6e65 2c20 7468 6f75 6768 2073 engine, though s\n+0013c190: 6f6d 6520 6f70 7469 6f6e 7320 6d61 7920 ome options may \n+0013c1a0: 6e6f 7420 6265 2061 7070 6c69 6361 626c not be applicabl\n+0013c1b0: 6520 746f 2079 6f75 7220 6f70 6572 6174 e to your operat\n+0013c1c0: 696e 6720 7379 7374 656d 3a3c 2f70 3e0a ing system:

    .\n+0013c1d0: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61
    mode flag \n+00136850: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 in/out \n+00136880: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 result \n+001368b0: 203c 2f74 683e 3c2f 7472 3e0a 3c74 7220
    out
    #SOAP_IO_BUFFE\n+001369f0: 523c 2f63 6f64 653e 2020 203c 2f74 643e R out
    out store the ent\n+00136b60: 6972 6520 6f75 7462 6f75 6e64 206d 6573 ire outbound mes\n+00136b70: 7361 6765 2074 6f20 6361 6c63 756c 6174 sage to calculat\n+00136b80: 6520 4854 5450 2063 6f6e 7465 6e74 206c e HTTP content l\n+00136b90: 656e 6774 6820 2020 203c 2f74 643e 3c2f ength
    #S\n+00136bf0: 4f41 505f 494f 5f43 4855 4e4b 3c2f 636f OAP_IO_CHUNK out\n+00136c30: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n+00136c60: 2048 5454 5020 6368 756e 6b69 6e67 2020 HTTP chunking \n+00136c70: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    out used with two\n+00136d40: 2d70 6861 7365 2073 6572 6961 6c69 7a61 -phase serializa\n+00136d50: 7469 6f6e 2c20 6669 7273 7420 7068 6173 tion, first phas\n+00136d60: 6520 7769 7468 2074 6869 7320 666c 6167 e with this flag\n+00136d70: 2074 6f20 6361 6c63 756c 6174 6520 4854 to calculate HT\n+00136d80: 5450 2063 6f6e 7465 6e74 206c 656e 6774 TP content lengt\n+00136d90: 6820 2020 203c 2f74 643e 3c2f 7472 3e0a h
    #SOAP_\n+00136df0: 494f 5f4b 4545 5041 4c49 5645 3c2f 636f IO_KEEPALIVE in+\n+00136e30: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out kee\n+00136e60: 7020 736f 636b 6574 2063 6f6e 6e65 6374 p socket connect\n+00136e70: 696f 6e73 2061 6c69 7665 2c20 7768 656e ions alive, when\n+00136e80: 2073 7570 706f 7274 6564 2062 7920 7468 supported by th\n+00136e90: 6520 4854 5450 2070 6565 7220 2020 203c e HTTP peer <\n+00136ea0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_IO_UDP<\n+00136f00: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP_\n+00137010: 454e 435f 504c 4149 4e3c 2f63 6f64 653e ENC_PLAIN\n+00137020: 2020 203c 2f74 643e 3c74 6420 636c 6173 in+out\n+00137050: 2020 203c 2f74 643e 3c74 6420 636c 6173 use pl\n+00137080: 6169 6e20 6d65 7373 6167 6573 2077 6974 ain messages wit\n+00137090: 686f 7574 2070 6172 7369 6e67 206f 7220 hout parsing or \n+001370a0: 656d 6974 7469 6e67 2048 5454 5020 6865 emitting HTTP he\n+001370b0: 6164 6572 7320 2020 203c 2f74 643e 3c2f aders
    #SO\n+00137110: 4150 5f45 4e43 5f58 4d4c 3c2f 636f 6465 AP_ENC_XML alias for #SOAP_ENC_PLAI\n+00137190: 4e3c 2f63 6f64 653e 2020 2020 3c2f 7464 N
    #SOAP_ENC_DIME<\n+00137200: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> use\n+00137260: 2044 494d 4520 656e 636f 6469 6e67 2c20 DIME encoding, \n+00137270: 6175 746f 6d61 7469 6320 7768 656e 2044 automatic when D\n+00137280: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+00137290: 6172 6520 7573 6564 2020 2020 3c2f 7464 are used
    \n+001372f0: 2353 4f41 505f 454e 435f 4d49 4d45 3c2f #SOAP_ENC_MIME use \n+00137360: 4d49 4d45 2065 6e63 6f64 696e 6720 696e MIME encoding in\n+00137370: 7374 6561 6420 6f66 2044 494d 452c 2061 stead of DIME, a\n+00137380: 6374 6976 6174 6564 2075 7369 6e67 203c ctivated using <\n+00137390: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_set_m\n+00137410: 696d 653c 2f61 3e3c 2f63 6f64 653e 2020 ime \n+00137420: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    out use MTOM XOP \n+001374f0: 6174 7461 6368 6d65 6e74 7320 696e 7374 attachments inst\n+00137500: 6561 6420 6f66 2044 494d 4520 616e 6420 ead of DIME and \n+00137510: 4d49 4d45 2020 2020 3c2f 7464 3e3c 2f74 MIME
    #SOA\n+00137570: 505f 454e 435f 5a4c 4942 3c2f 636f 6465 P_ENC_ZLIB out \n+001375b0: 203c 2f74 643e 3c74 6420 636c 6173 733d compress\n+001375e0: 206f 7574 7075 7420 7769 7468 205a 6c69 output with Zli\n+001375f0: 622c 2075 7369 6e67 2064 6566 6c61 7465 b, using deflate\n+00137600: 206f 7220 677a 6970 2066 6f72 6d61 7420 or gzip format \n+00137610: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_EN\n+00137670: 435f 5353 4c3c 2f63 6f64 653e 2020 203c C_SSL <\n+00137680: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>in+out <\n+001376b0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>use SSL/TL\n+001376e0: 532c 2061 7574 6f6d 6174 6963 2077 6865 S, automatic whe\n+001376f0: 6e20 636f 6e6e 6563 7469 6e67 2022 6874 n connecting \"ht\n+00137700: 7470 733a 2220 656e 6470 6f69 6e74 7320 tps:\" endpoints \n+00137710: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    out output inde\n+001377e0: 6e74 6564 2058 4d4c 2061 6e64 204a 534f nted XML and JSO\n+001377f0: 4e20 2020 203c 2f74 643e 3c2f 7472 3e0a N
    #SOAP_\n+00137850: 584d 4c5f 4341 4e4f 4e49 4341 4c3c 2f63 XML_CANONICAL ou\n+00137890: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t outpu\n+001378c0: 7420 6361 6e6f 6e69 6361 6c20 584d 4c20 t canonical XML \n+001378d0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    out \n+00137970: 203c 2f74 643e 3c74 6420 636c 6173 733d output X\n+001379a0: 4d4c 2077 6974 6820 6465 6661 756c 7420 ML with default \n+001379b0: 6e61 6d65 7370 6163 6520 6269 6e64 696e namespace bindin\n+001379c0: 6773 203c 636f 6465 3e78 6d6c 6e73 3d22 gs xmlns=\"\n+001379d0: 2e2e 2e22 3c2f 636f 6465 3e20 2020 203c ...\" <\n+001379e0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_XML_IG\n+00137a40: 4e4f 5245 4e53 3c2f 636f 6465 3e20 2020 NORENS \n+00137a50: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 in ignores XML n\n+00137ab0: 616d 6573 7061 6365 7320 696e 2058 4d4c amespaces in XML\n+00137ac0: 2069 6e70 7574 2020 2020 3c2f 7464 3e3c input
    #S\n+00137b20: 4f41 505f 584d 4c5f 5354 5249 4354 3c2f OAP_XML_STRICT apply\n+00137b90: 2073 7472 6963 7420 7661 6c69 6461 7469 strict validati\n+00137ba0: 6f6e 206f 6620 584d 4c20 696e 7075 7420 on of XML input \n+00137bb0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_XM\n+00137c10: 4c5f 5452 4545 3c2f 636f 6465 3e20 2020 L_TREE \n+00137c20: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 in+out \n+00137c50: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 out: seri\n+00137c80: 616c 697a 6520 6461 7461 2061 7320 584d alize data as XM\n+00137c90: 4c20 7472 6565 7320 286e 6f20 6d75 6c74 L trees (no mult\n+00137ca0: 692d 7265 662c 2064 7570 6c69 6361 7465 i-ref, duplicate\n+00137cb0: 2064 6174 6120 7768 656e 206e 6563 6573 data when neces\n+00137cc0: 7361 7279 293b 2069 6e3a 2069 676e 6f72 sary); in: ignor\n+00137cd0: 6520 6964 2061 7474 7269 6275 7465 7320 e id attributes \n+00137ce0: 2864 6f20 6e6f 7420 7265 736f 6c76 6520 (do not resolve \n+00137cf0: 6964 2d72 6566 2920 2020 203c 2f74 643e id-ref)
    #\n+00137d50: 534f 4150 5f58 4d4c 5f47 5241 5048 3c2f SOAP_XML_GRAPH seri\n+00137dc0: 616c 697a 6520 6170 706c 6963 6174 696f alize applicatio\n+00137dd0: 6e20 6461 7461 2061 7320 616e 2058 4d4c n data as an XML\n+00137de0: 2067 7261 7068 2077 6974 6820 6d75 6c74 graph with mult\n+00137df0: 692d 7265 6620 6964 2f72 6566 2061 7474 i-ref id/ref att\n+00137e00: 7269 6275 7465 7320 2020 203c 2f74 643e ributes
    \n+00137e60: 2353 4f41 505f 584d 4c5f 4e49 4c3c 2f63 #SOAP_XML_NIL ou\n+00137ea0: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t seria\n+00137ed0: 6c69 7a65 204e 554c 4c20 6461 7461 2061 lize NULL data a\n+00137ee0: 7320 7873 693a 6e69 6c20 6174 7472 6962 s xsi:nil attrib\n+00137ef0: 7574 6564 2065 6c65 6d65 6e74 7320 2020 uted elements \n+00137f00: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    out disable <\n+00137fd0: 636f 6465 3e78 7369 3a74 7970 653c 2f63 code>xsi:type attrib\n+00137ff0: 7574 6573 2020 2020 3c2f 7464 3e3c 2f74 utes
    #SO\n+00138050: 4150 5f43 5f4e 4f49 4f42 3c2f 636f 6465 AP_C_NOIOB in \n+00138090: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 do not fa\n+001380c0: 756c 7420 7769 7468 203c 636f 6465 3e23 ult with #\n+001380d0: 534f 4150 5f49 4f42 3c2f 636f 6465 3e20 SOAP_IOB \n+001380e0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    in+out \n+00138180: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 seriali\n+001381b0: 7a65 2038 2d62 6974 2063 6861 7261 6374 ze 8-bit charact\n+001381c0: 6572 2073 7472 696e 6773 2022 6173 2069 er strings \"as i\n+001381d0: 7322 2c20 6d65 616e 696e 6720 382d 6269 s\", meaning 8-bi\n+001381e0: 7420 7374 7269 6e67 7320 6861 7665 2055 t strings have U\n+001381f0: 5446 2d38 2063 6f6e 7465 6e74 2020 2020 TF-8 content \n+00138200: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    in+out <\n+001382a0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enable mul\n+001382d0: 7469 6279 7465 2063 6861 7261 6374 6572 tibyte character\n+001382e0: 2073 7570 706f 7274 2066 6f72 2038 2d62 support for 8-b\n+001382f0: 6974 2063 6861 7261 6374 6572 2073 7472 it character str\n+00138300: 696e 6773 2077 6974 6820 3c63 6f64 653e ings with \n+00138310: 7763 746f 6d62 3c2f 636f 6465 3e20 616e wctomb an\n+00138320: 6420 3c63 6f64 653e 6d62 746f 7763 3c2f d mbtowc using the \n+00138340: 6375 7272 656e 7420 6c6f 6361 6c65 2020 current locale \n+00138350: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    out serialize e\n+00138420: 6d70 7479 2073 7472 696e 6773 2061 7320 mpty strings as \n+00138430: 7873 693a 6e69 6c20 6174 7472 6962 7574 xsi:nil attribut\n+00138440: 6564 2065 6c65 6d65 6e74 7320 2020 3c2f ed elements
    cont\n+0013a940: 6578 7420 666c 6167 2077 6974 6820 7365 ext flag with se\n+0013a950: 7473 6f63 6b6f 7074 206f 7074 696f 6e20 tsockopt option \n+0013a960: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 result \n+0013a990: 2020 203c 2f74 683e 3c2f 7472 3e0a 3c74
    disables SIGP\n+0013ab10: 4950 4520 2020 203c 2f74 643e 3c2f 7472 IPE
    soap::connec\n+0013ac30: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = SO_DE\n+0013ac50: 4255 473c 2f63 6f64 653e 2020 203c 2f74 BUG turns on rec\n+0013ac90: 6f72 6469 6e67 206f 6620 6465 6275 6767 ording of debugg\n+0013aca0: 696e 6720 696e 666f 726d 6174 696f 6e20 ing information \n+0013acb0: 696e 2074 6865 2075 6e64 6572 6c79 696e in the underlyin\n+0013acc0: 6720 7072 6f74 6f63 6f6c 206d 6f64 756c g protocol modul\n+0013acd0: 6573 2020 2020 3c2f 7464 3e3c 2f74 723e es
    soap::connect_\n+0013adf0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n+0013ae00: 203d 203c 636f 6465 3e53 4f5f 4252 4f41 = SO_BROA\n+0013ae10: 4443 4153 543c 2f63 6f64 653e 2020 203c DCAST <\n+0013ae20: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>permits se\n+0013ae50: 6e64 696e 6720 6f66 2062 726f 6164 6361 nding of broadca\n+0013ae60: 7374 206d 6573 7361 6765 732c 2066 6f72 st messages, for\n+0013ae70: 2065 7861 6d70 6c65 2077 6974 6820 5544 example with UD\n+0013ae80: 502c 2077 6865 6e20 7065 726d 6974 7465 P, when permitte\n+0013ae90: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d
    soap::connect_\n+0013afb0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n+0013afc0: 203d 203c 636f 6465 3e53 4f5f 4c49 4e47 = SO_LING\n+0013afd0: 4552 3c2f 636f 6465 3e20 2020 3c2f 7464 ER sets client-s\n+0013b010: 6964 6520 6c69 6e67 6572 2074 696d 6520 ide linger time \n+0013b020: 746f 2074 6865 2076 616c 7565 206f 6620 to the value of \n+0013b030: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0013b0f0: 6170 3a3a 6c69 6e67 6572 5f74 696d 653c ap::linger_time<\n+0013b100: 2f61 3e3c 2f63 6f64 653e 2020 2020 3c2f /a>
    soap::\n+0013b220: 636f 6e6e 6563 745f 666c 6167 733c 2f61 connect_flags = SO_DONTROUTE en\n+0013b280: 6162 6c65 7320 726f 7574 696e 6720 6279 ables routing by\n+0013b290: 7061 7373 2066 6f72 206f 7574 676f 696e pass for outgoin\n+0013b2a0: 6720 6d65 7373 6167 6573 2020 2020 3c2f g messages
    soap:\n+0013b3c0: 3a61 6363 6570 745f 666c 6167 733c 2f61 :accept_flags = SO_NOSIGPIPE di\n+0013b420: 7361 626c 6573 2053 4947 5049 5045 2028 sables SIGPIPE (\n+0013b430: 6368 6563 6b20 796f 7572 204f 532c 2074 check your OS, t\n+0013b440: 6869 7320 6973 206e 6f74 2070 6f72 7461 his is not porta\n+0013b450: 626c 6529 2020 2020 3c2f 7464 3e3c 2f74 ble)
    soap::accept\n+0013b570: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = SO_DEB\n+0013b590: 5547 3c2f 636f 6465 3e20 2020 3c2f 7464 UG turns on reco\n+0013b5d0: 7264 696e 6720 6f66 2064 6562 7567 6769 rding of debuggi\n+0013b5e0: 6e67 2069 6e66 6f72 6d61 7469 6f6e 2069 ng information i\n+0013b5f0: 6e20 7468 6520 756e 6465 726c 7969 6e67 n the underlying\n+0013b600: 2070 726f 746f 636f 6c20 6d6f 6475 6c65 protocol module\n+0013b610: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    soap::accept_f\n+0013b730: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n+0013b740: 3d20 3c63 6f64 653e 534f 5f4c 494e 4745 = SO_LINGE\n+0013b750: 523c 2f63 6f64 653e 2020 203c 2f74 643e R sets server-si\n+0013b790: 6465 206c 696e 6765 7220 7469 6d65 2074 de linger time t\n+0013b7a0: 6f20 7468 6520 7661 6c75 6520 6f66 203c o the value of <\n+0013b7b0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0013b870: 703a 3a6c 696e 6765 725f 7469 6d65 3c2f p::linger_time
    soap::a\n+0013b9a0: 6363 6570 745f 666c 6167 733c 2f61 3e3c ccept_flags<\n+0013b9b0: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S\n+0013b9c0: 4f5f 444f 4e54 524f 5554 453c 2f63 6f64 O_DONTROUTE enab\n+0013ba00: 6c65 7320 726f 7574 696e 6720 6279 7061 les routing bypa\n+0013ba10: 7373 2066 6f72 206f 7574 676f 696e 6720 ss for outgoing \n+0013ba20: 6d65 7373 6167 6573 2020 2020 3c2f 7464 messages
    soap::b\n+0013bb40: 696e 645f 666c 6167 733c 2f61 3e3c 2f63 ind_flags = SO_\n+0013bb60: 5245 5553 4541 4444 523c 2f63 6f64 653e REUSEADDR\n+0013bb70: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n+0013bba0: 7320 6c6f 6361 6c20 6164 6472 6573 7320 s local address \n+0013bbb0: 7265 7573 6520 696d 6d65 6469 6174 656c reuse immediatel\n+0013bbc0: 792c 2075 7365 2077 6974 6820 6361 7574 y, use with caut\n+0013bbd0: 696f 6e20 2020 203c 2f74 643e 3c2f 7472 ion
    soap::bind_fl\n+0013bcf0: 6167 733c 2f61 3e3c 2f63 6f64 653e 203d ags =\n+0013bd00: 203c 636f 6465 3e53 4f5f 5245 5553 4550 SO_REUSEP\n+0013bd10: 4f52 543c 2f63 6f64 653e 2020 203c 2f74 ORT enables dupl\n+0013bd50: 6963 6174 6520 6164 6472 6573 7320 616e icate address an\n+0013bd60: 6420 706f 7274 2062 696e 6469 6e67 7320 d port bindings \n+0013bd70: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74
    ..c\n+0013c230: 6f6e 7465 7874 2066 6c61 6720 7769 7468 ontext flag with\n+0013c240: 2073 656e 742f 7265 6376 2066 6c61 6773 sent/recv flags\n+0013c250: 2020 203c 2f74 683e 3c74 6820 636c 6173 .<\n+0013c290: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013c2a0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+0013c2b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ...
    result\n+0013c280: 2020 2020 3c2f 7468 3e3c 2f74 723e 0a3c
    \n+0013c390: 736f 6170 3a3a 736f 636b 6574 5f66 6c61 soap::socket_fla\n+0013c3a0: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n+0013c3b0: 3c63 6f64 653e 4d53 475f 4e4f 5349 474e MSG_NOSIGN\n+0013c3c0: 414c 3c2f 636f 6465 3e20 2020 3c2f 7464 AL disables SIGP\n+0013c400: 4950 4520 2020 203c 2f74 643e 3c2f 7472 IPE
    soap::socket\n+0013c520: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = MSG_DO\n+0013c540: 4e54 524f 5554 453c 2f63 6f64 653e 2020 NTROUTE \n+0013c550: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n+0013c580: 726f 7574 696e 6720 6279 7061 7373 2066 routing bypass f\n+0013c590: 6f72 206f 7574 676f 696e 6720 6d65 7373 or outgoing mess\n+0013c5a0: 6167 6573 2020 203c 2f74 643e 3c2f 7472 ages
    .

    Fu\n+0013c5c0: 7274 6865 726d 6f72 652c 2074 6865 203c rthermore, the <\n+0013c5d0: 636f 6465 3e73 6574 736f 636b 6f70 743c code>setsockopt<\n+0013c5e0: 2f63 6f64 653e 206c 6576 656c 203c 636f /code> level SOL_SOCKET options SO_SNDBUF and SO\n+0013c630: 5f52 4356 4255 463c 2f63 6f64 653e 2061 _RCVBUF a\n+0013c640: 7265 2073 6574 2074 6865 2065 6e67 696e re set the engin\n+0013c650: 6520 7768 656e 203c 636f 6465 3e3c 6120 e when soap::sndbuf\n+0013c710: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+0013c720: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n+0013c7d0: 703a 3a72 6376 6275 663c 2f61 3e3c 2f63 p::rcvbuf are set to \n+0013c7f0: 6120 6e6f 6e7a 6572 6f20 7661 6c75 652e a nonzero value.\n+0013c800: 2054 6865 2064 6566 6175 6c74 2076 616c The default val\n+0013c810: 7565 2069 7320 3c63 6f64 653e 2353 4f41 ue is #SOA\n+0013c820: 505f 4255 464c 454e 3c2f 636f 6465 3e2c P_BUFLEN,\n+0013c830: 2077 6869 6368 2069 7320 7468 6520 7361 which is the sa\n+0013c840: 6d65 2073 697a 6520 7573 6564 2062 7920 me size used by \n+0013c850: 7468 6520 696e 7465 726e 616c 2062 7566 the internal buf\n+0013c860: 6665 7220 3c63 6f64 653e 3c61 2063 6c61 fer soap::buf<\n+0013c930: 2f63 6f64 653e 2074 6f20 7365 6e64 2061 /code> to send a\n+0013c940: 6e64 2072 6563 6569 7665 206d 6573 7361 nd receive messa\n+0013c950: 6765 732e 2041 207a 6572 6f20 7661 6c75 ges. A zero valu\n+0013c960: 6520 6f6d 6974 7320 7468 6520 696e 7465 e omits the inte\n+0013c970: 726e 616c 203c 636f 6465 3e73 6574 736f rnal setso\n+0013c980: 636b 6f70 743c 2f63 6f64 653e 2063 616c ckopt cal\n+0013c990: 6c20 746f 2073 6574 2074 6865 7365 206f l to set these o\n+0013c9a0: 7074 696f 6e73 2e20 5365 7474 696e 6720 ptions. Setting \n+0013c9b0: 7468 6573 6520 7661 6c75 6573 2074 6f20 these values to \n+0013c9c0: 7a65 726f 2061 6374 6976 6174 6573 2061 zero activates a\n+0013c9d0: 7574 6f2d 7475 6e69 6e67 2077 6974 6820 uto-tuning with \n+0013c9e0: 4c69 6e75 7820 322e 3420 616e 6420 6772 Linux 2.4 and gr\n+0013c9f0: 6561 7465 722e 3c2f 703e 0a3c 703e 5468 eater.

    .

    Th\n+0013ca00: 6520 3c63 6f64 653e 7365 7473 6f63 6b6f e setsocko\n+0013ca10: 7074 3c2f 636f 6465 3e20 6c65 7665 6c20 pt level \n+0013ca20: 3c63 6f64 653e 534f 4c5f 534f 434b 4554 SOL_SOCKET\n+0013ca30: 3c2f 636f 6465 3e20 6f70 7469 6f6e 203c option <\n+0013ca40: 636f 6465 3e53 4f5f 4b45 4550 414c 4956 code>SO_KEEPALIV\n+0013ca50: 453c 2f63 6f64 653e 2069 7320 7365 7420 E is set \n+0013ca60: 7768 656e 206b 6565 702d 616c 6976 6520 when keep-alive \n+0013ca70: 6973 2065 6e61 626c 6564 2077 6974 6820 is enabled with \n+0013ca80: 636f 6e74 6578 7420 666c 6167 203c 636f context flag #SOAP_IO_KEEP\n+0013caa0: 414c 4956 453c 2f63 6f64 653e 206f 7220 ALIVE or \n+0013cab0: 7768 656e 203c 636f 6465 3e3c 6120 636c when soap::tcp_kee\n+0013cb80: 705f 616c 6976 653c 2f61 3e3c 2f63 6f64 p_alive is nonzero. W\n+0013cba0: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap::tcp_keep\n+0013cc70: 5f61 6c69 7665 3c2f 613e 3c2f 636f 6465 _alive additional opt\n+0013cc90: 696f 6e73 2063 616e 2062 6520 7370 6563 ions can be spec\n+0013cca0: 6966 6965 6420 7769 7468 203c 636f 6465 ified with \n+0013cd50: 736f 6170 3a3a 7463 705f 6b65 6570 5f69 soap::tcp_keep_i\n+0013cd60: 646c 653c 2f61 3e3c 2f63 6f64 653e 2c20 dle, \n+0013cd70: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::tcp_\n+0013ce20: 6b65 6570 5f69 6e74 766c 3c2f 613e 3c2f keep_intvl, and s\n+0013cee0: 6f61 703a 3a74 6370 5f6b 6565 705f 636e oap::tcp_keep_cn\n+0013cef0: 743c 2f61 3e3c 2f63 6f64 653e 2e20 466f t. Fo\n+0013cf00: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

    .<\n+0013cf10: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0013cf20: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+0013cf50: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n+0013d020: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    soap-><\n+0013d070: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0013d080: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0013d090: 6874 6d6c 2361 6638 6638 3061 3762 6438 html#af8f80a7bd8\n+0013d0a0: 6330 3933 3335 6336 6662 3833 3661 3631 c09335c6fb836a61\n+0013d0b0: 3232 3331 6262 223e 7463 705f 6b65 6570 2231bb\">tcp_keep\n+0013d0c0: 5f61 6c69 7665 3c2f 613e 203d 2031 3b20 _alive = 1; \n+0013d0d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // setso\n+0013d0f0: 636b 6f70 7420 534f 5f4b 4545 5041 4c49 ckopt SO_KEEPALI\n+0013d100: 5645 3c2f 7370 616e 3e3c 2f64 6976 3e0a VE
    .\n+0013d110: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->t\n+0013d1a0: 6370 5f6b 6565 705f 6964 6c65 3c2f 613e cp_keep_idle\n+0013d1b0: 203d 2033 303b 2020 203c 7370 616e 2063 = 30; /\n+0013d1d0: 2f20 7469 6d65 2069 6e20 7365 636f 6e64 / time in second\n+0013d1e0: 7320 7468 6520 636f 6e6e 6563 7469 6f6e s the connection\n+0013d1f0: 206e 6565 6473 2074 6f20 7265 6d61 696e needs to remain\n+0013d200: 2069 646c 6520 6265 666f 7265 2054 4350 idle before TCP\n+0013d210: 2073 7461 7274 7320 7365 6e64 696e 6720 starts sending \n+0013d220: 6b65 6570 616c 6976 6520 7072 6f62 6573 keepalive probes\n+0013d230: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0013d250: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0013d280: 2667 743b 3c61 2063 6c61 7373 3d22 636f >tcp\n+0013d2d0: 5f6b 6565 705f 696e 7476 6c3c 2f61 3e20 _keep_intvl \n+0013d2e0: 3d20 3132 303b 203c 7370 616e 2063 6c61 = 120; // \n+0013d300: 7469 6d65 2069 6e20 7365 636f 6e64 7320 time in seconds \n+0013d310: 6265 7477 6565 6e20 696e 6469 7669 6475 between individu\n+0013d320: 616c 206b 6565 7061 6c69 7665 2070 726f al keepalive pro\n+0013d330: 6265 733c 2f73 7061 6e3e 3c2f 6469 763e bes
    \n+0013d340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap->\n+0013d3d0: 7463 705f 6b65 6570 5f63 6e74 3c2f 613e tcp_keep_cnt\n+0013d3e0: 203d 2035 3b20 2020 2020 3c73 7061 6e20 = 5; \n+0013d400: 2f2f 206d 6178 696d 756d 206e 756d 6265 // maximum numbe\n+0013d410: 7220 6f66 206b 6565 7061 6c69 7665 2070 r of keepalive p\n+0013d420: 726f 6265 7320 5443 5020 7368 6f75 6c64 robes TCP should\n+0013d430: 2073 656e 6420 6265 666f 7265 2064 726f send before dro\n+0013d440: 7070 696e 6720 7468 6520 636f 6e6e 6563 pping the connec\n+0013d450: 7469 6f6e 3c2f 7370 616e 3e3c 2f64 6976 tion.
    <\n+0013d4c0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+0013d4d0: 6170 2e68 746d 6c23 6138 3131 3034 3166 ap.html#a811041f\n+0013d4e0: 6161 6231 6366 3438 3165 3765 3635 3666 aab1cf481e7e656f\n+0013d4f0: 3831 6463 3838 3930 3122 3e73 6f61 703a 81dc88901\">soap:\n+0013d500: 3a74 6370 5f6b 6565 705f 636e 743c 2f61 :tcp_keep_cnt
    unsig\n+0013d530: 6e65 6420 696e 7420 7463 705f 6b65 6570 ned int tcp_keep\n+0013d540: 5f63 6e74 3c2f 6469 763e 3c64 6976 2063 _cnt
    Use\n+0013d560: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n+0013d570: 6520 746f 2073 6574 2054 4350 5f4b 4545 e to set TCP_KEE\n+0013d580: 5043 4e54 2073 6574 736f 636b 6f70 7420 PCNT setsockopt \n+0013d590: 2874 6865 2076 616c 7565 2069 7320 3020 (the value is 0 \n+0013d5a0: 6279 2064 6566 6175 6c74 293c 2f64 6976 by default)
    Definitio\n+0013d5d0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+0013d5e0: 683a 3335 3834 3c2f 6469 763e 3c2f 6469 h:3584
    .
    un\n+0013d6c0: 7369 676e 6564 2069 6e74 2074 6370 5f6b signed int tcp_k\n+0013d6d0: 6565 705f 696e 7476 6c3c 2f64 6976 3e3c eep_intvl
    <\n+0013d6e0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0013d6f0: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n+0013d700: 2076 616c 7565 2074 6f20 7365 7420 5443 value to set TC\n+0013d710: 505f 4b45 4550 494e 5456 4c20 7365 7473 P_KEEPINTVL sets\n+0013d720: 6f63 6b6f 7074 2028 7468 6520 7661 6c75 ockopt (the valu\n+0013d730: 6520 6973 2030 2062 7920 6465 6661 756c e is 0 by defaul\n+0013d740: 7429 3c2f 6469 763e 3c64 6976 2063 6c61 t)
    De\n+0013d760: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+0013d770: 6473 6f61 7032 2e68 3a33 3535 393c 2f64 dsoap2.h:3559
    .
    \n+0013d840: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    unsigned int\n+0013d860: 2074 6370 5f6b 6565 705f 6964 6c65 3c2f tcp_keep_idle
    User-defi\n+0013d890: 6e61 626c 6520 7661 6c75 6520 746f 2073 nable value to s\n+0013d8a0: 6574 2054 4350 5f4b 4545 5049 444c 4520 et TCP_KEEPIDLE \n+0013d8b0: 7365 7473 6f63 6b6f 7074 2028 7468 6520 setsockopt (the \n+0013d8c0: 7661 6c75 6520 6973 2030 2062 7920 6465 value is 0 by de\n+0013d8d0: 6661 756c 7429 3c2f 6469 763e 3c64 6976 fault)
    <\n+0013d8f0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:353\n+0013d910: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .
    soap::tcp\n+0013d9c0: 5f6b 6565 705f 616c 6976 653c 2f61 3e3c _keep_alive<\n+0013d9d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int tcp\n+0013d9f0: 5f6b 6565 705f 616c 6976 653c 2f64 6976 _keep_alive
    User-definab\n+0013da20: 6c65 2076 616c 7565 2074 6f20 7365 7420 le value to set \n+0013da30: 534f 5f4b 4545 5041 4c49 5645 2073 6574 SO_KEEPALIVE set\n+0013da40: 736f 636b 6f70 7420 2830 2062 7920 6465 sockopt (0 by de\n+0013da50: 6661 756c 7420 756e 6c65 7373 2074 6865 fault unless the\n+0013da60: 2023 534f 4150 5f49 4f5f 4b45 4550 414c #SOAP_IO_KEEPAL\n+0013da70: 4956 4520 6d6f 6465 202e 2e2e 3c2f 6469 IVE mode ...
    Definiti\n+0013daa0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0013dab0: 2e68 3a33 3530 393c 2f64 6976 3e3c 2f64 .h:3509
    .

    Fo\n+0013dae0: 7220 5544 5020 6d65 7373 6167 696e 672c r UDP messaging,\n+0013daf0: 2075 7365 203c 636f 6465 3e23 534f 4150 use #SOAP\n+0013db00: 5f49 4f5f 5544 503c 2f63 6f64 653e 2e20 _IO_UDP. \n+0013db10: 5365 6520 616c 736f 2053 6563 7469 6f6e See also Section\n+0013db20: 203c 6120 636c 6173 733d 2265 6c22 2068 SOAP/XML ov\n+0013db50: 6572 2055 4450 3c2f 613e 2e20 5468 6520 er UDP. The \n+0013db60: 636f 6e74 6578 7420 666c 6167 7320 7468 context flags th\n+0013db70: 6174 2063 616e 2062 6520 7365 7420 6174 at can be set at\n+0013db80: 2074 6865 2063 6c69 656e 7420 7369 6465 the client side\n+0013db90: 2066 6f72 2055 4450 206d 6573 7361 6769 for UDP messagi\n+0013dba0: 6e67 2061 7265 203c 636f 6465 3e3c 6120 ng are soap::ipv4\n+0013dc60: 5f6d 756c 7469 6361 7374 5f69 663c 2f61 _multicast_if, \n+0013dc80: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::i\n+0013dd30: 7076 345f 6d75 6c74 6963 6173 745f 7474 pv4_multicast_tt\n+0013dd40: 6c3c 2f61 3e3c 2f63 6f64 653e 2c20 616e l, an\n+0013dd50: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soa\n+0013ddf0: 703a 3a69 7076 365f 6d75 6c74 6963 6173 p::ipv6_multicas\n+0013de00: 745f 6966 3c2f 613e 3c2f 636f 6465 3e3a t_if:\n+0013de10: 3c2f 703e 0a3c 7461 626c 6520 636c 6173

    ....<\n+0013dec0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013ded0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+0013dee0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .\n+0013e150: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n+0013e290: 7365 7420 3c63 6f64 653e 7365 7473 6f63 set setsoc\n+0013e2a0: 6b6f 7074 3c2f 636f 6465 3e20 6c65 7665 kopt leve\n+0013e2b0: 6c20 3c63 6f64 653e 4950 5052 4f54 4f5f l IPPROTO_\n+0013e2c0: 4950 3c2f 636f 6465 3e20 746f 203c 636f IP to IP_MULTICAST_\n+0013e2e0: 5454 4c3c 2f63 6f64 653e 2077 6974 6820 TTL with \n+0013e2f0: 7661 6c75 6520 3c63 6f64 653e 3c61 2063 value soap::ipv4_\n+0013e3b0: 6d75 6c74 6963 6173 745f 7474 6c3c 2f61 multicast_ttl when no\n+0013e3d0: 6e7a 6572 6f20 2020 203c 2f74 643e 3c2f nzero ..\n+0013e610: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c .
    context flag\n+0013de80: 2020 203c 2f74 683e 3c74 6820 636c 6173 result\n+0013deb0: 2020 2020 3c2f 7468 3e3c 2f74 723e 0a3c
    soap::ipv4_mult\n+0013dfc0: 6963 6173 745f 6966 3c2f 613e 3c2f 636f icast_if set\n+0013e000: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop\n+0013e010: 743c 2f63 6f64 653e 206c 6576 656c 203c t level <\n+0013e020: 636f 6465 3e49 5050 524f 544f 5f49 503c code>IPPROTO_IP<\n+0013e030: 2f63 6f64 653e 2074 6f20 3c63 6f64 653e /code> to \n+0013e040: 4950 5f4d 554c 5449 4341 5354 5f49 463c IP_MULTICAST_IF<\n+0013e050: 2f63 6f64 653e 2077 6974 6820 7661 6c75 /code> with valu\n+0013e060: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::ipv4_mult\n+0013e120: 6963 6173 745f 6966 3c2f 613e 3c2f 636f icast_if when non-NUL\n+0013e140: 4c20 2020 203c 2f74 643e 3c2f 7472 3e0a L
    soap::ipv4_mu\n+0013e250: 6c74 6963 6173 745f 7474 6c3c 2f61 3e3c lticast_ttl<\n+0013e260: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    soap::ipv6_mul\n+0013e4d0: 7469 6361 7374 5f69 663c 2f61 3e3c 2f63 ticast_if se\n+0013e510: 7420 3c63 6f64 653e 736f 636b 6164 6472 t sockaddr\n+0013e520: 5f69 6e36 3a3a 7369 6e36 5f73 636f 7065 _in6::sin6_scope\n+0013e530: 5f69 643c 2f63 6f64 653e 2074 6f20 3c63 _id to soap::i\n+0013e5e0: 7076 365f 6d75 6c74 6963 6173 745f 6966 pv6_multicast_if\n+0013e5f0: 3c2f 613e 3c2f 636f 6465 3e20 7768 656e when\n+0013e600: 206e 6f6e 7a65 726f 2020 203c 2f74 643e nonzero
    .<\n+0013e620: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+0013e640: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+0013e650: 3c2f 703e 0a3c 6831 3e3c 6120 636c 6173

    .

    .Ru\n+0013e680: 6e2d 7469 6d65 2065 7272 6f72 2063 6f64 n-time error cod\n+0013e690: 6573 3c2f 6831 3e0a 3c70 3e53 7461 7475 es

    .

    Statu\n+0013e6a0: 7320 6572 726f 7220 636f 6465 7320 6172 s error codes ar\n+0013e6b0: 6520 696e 7465 6765 7220 7661 6c75 6573 e integer values\n+0013e6c0: 2c20 7768 6963 6820 6172 6520 7265 7475 , which are retu\n+0013e6d0: 726e 6564 2062 7920 7468 6520 6753 4f41 rned by the gSOA\n+0013e6e0: 5020 4150 4920 6675 6e63 7469 6f6e 732e P API functions.\n+0013e6f0: 2054 6865 2066 756c 6c20 6c69 7374 206f The full list o\n+0013e700: 6620 3c63 6f64 653e 3c61 2063 6c61 7373 f soap_st\n+0013e7c0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+0013e7d0: 6572 726f 7220 636f 6465 7320 6973 206c error codes is l\n+0013e7e0: 6973 7465 6420 6265 6c6f 773a 3c2f 703e isted below:

    \n+0013e7f0: 0a3c 7461 626c 6520 636c 6173 733d 226d ..<\n+0013e810: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013e820: 776e 5461 626c 6548 6561 6422 3e0a 3c74 wnTableHead\">.\n+0013e850: 4572 726f 7220 636f 6465 2020 203c 2f74 Error code ..<\n+0013e8c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013e8d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013e8e0: 3e3c 636f 6465 3e23 534f 4150 5f4f 4b3c >#SOAP_OK<\n+0013e8f0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+0013e920: 4e6f 2065 7272 6f72 2028 7a65 726f 2920 No error (zero) \n+0013e930: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+0013e960: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n+0013eb10: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013eb20: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013eb30: 3e3c 636f 6465 3e23 534f 4150 5f44 454c >#SOAP_DEL\n+0013eb40: 5f4d 4554 484f 443c 2f63 6f64 653e 2020 _METHOD \n+0013eb50: 203c 2f74 643e 3c74 6420 636c 6173 733d .\n+0013ed40: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0013ed60: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n+0013ee20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013ee30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013ee40: 3e3c 636f 6465 3e23 534f 4150 5f44 494d >#SOAP_DIM\n+0013ee50: 455f 4552 524f 523c 2f63 6f64 653e 2020 E_ERROR \n+0013ee60: 203c 2f74 643e 3c74 6420 636c 6173 733d ....\n+0013f090: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0013f100: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....\n+0013f370: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0013f410: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....<\n+0013f7d0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n+0013f860: 546f 6f20 6d61 6e79 206f 7065 6e20 736f Too many open so\n+0013f870: 636b 6574 7320 2020 203c 2f74 643e 3c2f ckets ......\n+0013fc60: 3c63 6f64 653e 2353 4f41 505f 4852 4546 #SOAP_HREF\n+0013fc70: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+0013fc80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013fc90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013fca0: 3e52 6566 6572 656e 6365 2074 6f20 6f62 >Reference to ob\n+0013fcb0: 6a65 6374 2069 6e20 584d 4c20 6964 656e ject in XML iden\n+0013fcc0: 7469 6669 6564 2062 7920 6974 7320 6964 tified by its id\n+0013fcd0: 2061 7474 7269 6275 7465 2069 7320 696e attribute is in\n+0013fce0: 636f 6d70 6174 6962 6c65 2077 6974 6820 compatible with \n+0013fcf0: 7468 6520 6f62 6a65 6374 2072 6566 6572 the object refer\n+0013fd00: 7265 6420 746f 2062 7920 7468 6520 7265 red to by the re\n+0013fd10: 6620 6f72 2068 7265 6620 6174 7472 6962 f or href attrib\n+0013fd20: 7574 6520 2861 7070 6c69 6361 626c 6520 ute (applicable \n+0013fd30: 746f 2053 4f41 5020 6d75 6c74 692d 7265 to SOAP multi-re\n+0013fd40: 6620 656e 636f 6469 6e67 2061 6e64 203c f encoding and <\n+0013fd50: 636f 6465 3e23 534f 4150 5f58 4d4c 5f47 code>#SOAP_XML_G\n+0013fd60: 5241 5048 3c2f 636f 6465 3e20 7365 7269 RAPH seri\n+0013fd70: 616c 697a 6174 696f 6e29 2020 2020 3c2f alization) ....\n+0013fed0: 416e 2048 5454 5020 7265 7175 6573 7420 An HTTP request \n+0013fee0: 7761 7320 7265 6365 6976 6564 2062 7920 was received by \n+0013fef0: 7468 6520 7365 7276 6963 6520 7468 6174 the service that\n+0013ff00: 2063 616e 6e6f 7420 6265 2068 616e 646c cannot be handl\n+0013ff10: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed \n+0013ff20: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+0013ffd0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...\n+001400c0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+001400e0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..<\n+00140190: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+001401a0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+001401b0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n+00140290: 3c63 6f64 653e 2353 4f41 505f 4d49 4d45 #SOAP_MIME\n+001402a0: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n+001402b0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ...\n+00140400: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00140420: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+00140550: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+00140680: 636f 6465 3e23 534f 4150 5f4d 5553 5455 code>#SOAP_MUSTU\n+00140690: 4e44 4552 5354 414e 443c 2f63 6f64 653e NDERSTAND\n+001406a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....N\n+00140890: 6f20 6461 7461 2069 6e20 7468 6520 4854 o data in the HT\n+001408a0: 5450 2062 6f64 7920 6f66 2074 6865 206d TP body of the m\n+001408b0: 6573 7361 6765 2072 6563 6569 7665 6420 essage received \n+001408c0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+001408f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n+001409c0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n+00140ad0: 3c63 6f64 653e 2353 4f41 505f 4e54 4c4d #SOAP_NTLM\n+00140ae0: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n+00140af0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 <\n+00140b50: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n+00140c50: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ......\n+00140fe0: 3c63 6f64 653e 2353 4f41 505f 5041 5454 #SOAP_PATT\n+00140ff0: 4552 4e3c 2f63 6f64 653e 2020 203c 2f74 ERN ..\n+00141110: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n+00141180: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141190: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001411a0: 3e58 4d4c 2061 7474 7269 6275 7465 2069 >XML attribute i\n+001411b0: 7320 7072 6f68 6962 6974 6564 2062 7574 s prohibited but\n+001411c0: 2070 7265 7365 6e74 2020 2020 3c2f 7464 present ..<\n+00141240: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141250: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141260: 3e41 6e20 4854 5450 2050 5554 2072 6571 >An HTTP PUT req\n+00141270: 7565 7374 2077 6173 2072 6563 6569 7665 uest was receive\n+00141280: 6420 6279 2074 6865 2073 6572 7669 6365 d by the service\n+00141290: 2062 7574 2074 6865 2050 5554 2072 6571 but the PUT req\n+001412a0: 7565 7374 2063 616c 6c62 6163 6b20 3c63 uest callback soap::fput\n+00141380: 3c2f 613e 3c2f 636f 6465 3e20 6973 206e is n\n+00141390: 6f74 2069 6d70 6c65 6d65 6e74 6564 2c20 ot implemented, \n+001413a0: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Function ca\n+001413e0: 6c6c 6261 636b 7320 666f 7220 6375 7374 llbacks for cust\n+001413f0: 6f6d 697a 6564 2049 2f4f 2061 6e64 2048 omized I/O and H\n+00141400: 5454 5020 6861 6e64 6c69 6e67 3c2f 613e TTP handling\n+00141410: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00141420: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00141430: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00141440: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..\n+001414e0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00141500: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n+001415b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001415c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001415d0: 3e3c 636f 6465 3e23 534f 4150 5f53 5652 >#SOAP_SVR\n+001415e0: 5f46 4155 4c54 3c2f 636f 6465 3e20 2020 _FAULT \n+001415f0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ....<\n+00141820: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...<\n+001418e0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+001418f0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00141900: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n+001419f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141a00: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141a10: 3e3c 636f 6465 3e23 534f 4150 5f55 4450 >#SOAP_UDP\n+00141a20: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n+00141a30: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ....<\n+00141c50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141c60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141c70: 3e3c 636f 6465 3e23 534f 4150 5f55 5446 >#SOAP_UTF\n+00141c80: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n+00141c90: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 \n+00141ce0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n+00141e60: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c .
    Description \n+0013e890: 2020 203c 2f74 683e 3c2f 7472 3e0a 3c74
    #SOAP_CL\n+0013e990: 495f 4641 554c 543c 2f63 6f64 653e 2020 I_FAULT \n+0013e9a0: 203c 2f74 643e 3c74 6420 636c 6173 733d The serv\n+0013e9d0: 6963 6520 7265 7475 726e 6564 2061 2053 ice returned a S\n+0013e9e0: 4f41 5020 312e 3120 636c 6965 6e74 2066 OAP 1.1 client f\n+0013e9f0: 6175 6c74 202f 2053 4f41 5020 312e 3220 ault / SOAP 1.2 \n+0013ea00: 7365 6e64 6572 2066 6175 6c74 2074 6f20 sender fault to \n+0013ea10: 7468 6520 636c 6965 6e74 2020 2020 3c2f the client
    #SOAP_DATAENCO\n+0013ea80: 4449 4e47 554e 4b4e 4f57 4e3c 2f63 6f64 DINGUNKNOWN SOAP\n+0013eac0: 2031 2e32 2044 6174 6145 6e63 6f64 696e 1.2 DataEncodin\n+0013ead0: 6755 6e6b 6e6f 776e 2066 6175 6c74 2020 gUnknown fault \n+0013eae0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    An HTTP \n+0013eb80: 4445 4c45 5445 2072 6571 7565 7374 2077 DELETE request w\n+0013eb90: 6173 2072 6563 6569 7665 6420 6279 2074 as received by t\n+0013eba0: 6865 2073 6572 7669 6365 2062 7574 2074 he service but t\n+0013ebb0: 6865 2044 454c 4554 4520 7265 7175 6573 he DELETE reques\n+0013ebc0: 7420 6361 6c6c 6261 636b 203c 636f 6465 t callback soap::fde\n+0013eca0: 6c3c 2f61 3e3c 2f63 6f64 653e 2069 7320 l is \n+0013ecb0: 6e6f 7420 696d 706c 656d 656e 7465 642c not implemented,\n+0013ecc0: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section Function c\n+0013ed00: 616c 6c62 6163 6b73 2066 6f72 2063 7573 allbacks for cus\n+0013ed10: 746f 6d69 7a65 6420 492f 4f20 616e 6420 tomized I/O and \n+0013ed20: 4854 5450 2068 616e 646c 696e 673c 2f61 HTTP handling
    #SOAP_D\n+0013ed90: 494d 455f 454e 443c 2f63 6f64 653e 2020 IME_END \n+0013eda0: 203c 2f74 643e 3c74 6420 636c 6173 733d End of D\n+0013edd0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+0013ede0: 7072 6f74 6f63 6f6c 2065 7272 6f72 2020 protocol error \n+0013edf0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    DIME for\n+0013ee90: 6d61 7474 696e 6720 6572 726f 7220 6f72 matting error or\n+0013eea0: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n+0013eeb0: 2073 697a 6520 6578 6365 6564 7320 3c63 size exceeds #SOAP_MAXDIM\n+0013eed0: 4553 495a 453c 2f63 6f64 653e 2020 2020 ESIZE \n+0013eee0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_DIME_H\n+0013ef40: 5245 463c 2f63 6f64 653e 2020 203c 2f74 REF DIME attachm\n+0013ef80: 656e 7420 6861 7320 6e6f 2068 7265 6620 ent has no href \n+0013ef90: 6672 6f6d 2053 4f41 5020 626f 6479 2061 from SOAP body a\n+0013efa0: 6e64 206e 6f20 4449 4d45 2063 616c 6c62 nd no DIME callb\n+0013efb0: 6163 6b73 2077 6572 6520 6465 6669 6e65 acks were define\n+0013efc0: 6420 746f 2073 6176 6520 7468 6520 6174 d to save the at\n+0013efd0: 7461 6368 6d65 6e74 2020 2020 3c2f 7464 tachment
    #SOAP_DIME_MISM\n+0013f040: 4154 4348 3c2f 636f 6465 3e20 2020 3c2f ATCH DIME versio\n+0013f080: 6e20 6572 726f 7220 2020 203c 2f74 643e n error
    #\n+0013f0e0: 534f 4150 5f44 5550 4c49 4341 5445 5f49 SOAP_DUPLICATE_I\n+0013f0f0: 443c 2f63 6f64 653e 2020 203c 2f74 643e D XML element ha\n+0013f130: 7320 6475 706c 6963 6174 6520 6964 2061 s duplicate id a\n+0013f140: 7474 7269 6275 7465 2076 616c 7565 2028 ttribute value (\n+0013f150: 6170 706c 6963 6162 6c65 2074 6f20 534f applicable to SO\n+0013f160: 4150 206d 756c 7469 2d72 6566 2065 6e63 AP multi-ref enc\n+0013f170: 6f64 696e 6720 616e 6420 3c63 6f64 653e oding and \n+0013f180: 2353 4f41 505f 584d 4c5f 4752 4150 483c #SOAP_XML_GRAPH<\n+0013f190: 2f63 6f64 653e 2073 6572 6961 6c69 7a61 /code> serializa\n+0013f1a0: 7469 6f6e 2920 2020 203c 2f74 643e 3c2f tion)
    #S\n+0013f200: 4f41 505f 454d 5054 593c 2f63 6f64 653e OAP_EMPTY\n+0013f210: 2020 203c 2f74 643e 3c74 6420 636c 6173 XML el\n+0013f240: 656d 656e 7420 6f72 2061 7474 7269 6275 ement or attribu\n+0013f250: 7465 2069 7320 656d 7074 7920 7768 656e te is empty when\n+0013f260: 2061 2076 616c 7565 2069 7320 7265 7175 a value is requ\n+0013f270: 6972 6564 2020 2020 3c2f 7464 3e3c 2f74 ired
    #SOA\n+0013f2d0: 505f 454f 463c 2f63 6f64 653e 2020 203c P_EOF <\n+0013f2e0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Unexpected\n+0013f310: 2065 6e64 206f 6620 6669 6c65 2c20 6e6f end of file, no\n+0013f320: 2069 6e70 7574 2c20 7472 616e 736d 6973 input, transmis\n+0013f330: 7369 6f6e 2069 6e74 6572 7275 7074 6564 sion interrupted\n+0013f340: 206f 7220 7469 6d65 6420 6f75 742c 2073 or timed out, s\n+0013f350: 616d 6520 6173 203c 636f 6465 3e45 4f46 ame as EOF\n+0013f360: 3c2f 636f 6465 3e20 2020 203c 2f74 643e
    \n+0013f3c0: 2353 4f41 505f 454f 4d3c 2f63 6f64 653e #SOAP_EOM\n+0013f3d0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Out of\n+0013f400: 206d 656d 6f72 7920 2020 203c 2f74 643e memory
    #\n+0013f460: 534f 4150 5f45 5252 3c2f 636f 6465 3e20 SOAP_ERR \n+0013f470: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Same as\n+0013f4a0: 203c 636f 6465 3e45 4f46 3c2f 636f 6465 EOF, but indicates\n+0013f4c0: 2061 6e20 756e 7370 6563 6966 6965 6420 an unspecified \n+0013f4d0: 6572 726f 7220 2020 203c 2f74 643e 3c2f error
    #S\n+0013f530: 4f41 505f 4641 554c 543c 2f63 6f64 653e OAP_FAULT\n+0013f540: 2020 203c 2f74 643e 3c74 6420 636c 6173 The fa\n+0013f570: 756c 7420 636f 6465 2074 6f20 6265 2072 ult code to be r\n+0013f580: 6574 7572 6e65 6420 6279 2061 2073 6572 eturned by a ser\n+0013f590: 7669 6365 206f 7065 7261 7469 6f6e 2077 vice operation w\n+0013f5a0: 6865 6e20 6361 6c6c 696e 6720 3c63 6f64 hen calling \n+0013f650: 736f 6170 5f73 656e 6465 725f 6661 756c soap_sender_faul\n+0013f660: 743c 2f61 3e3c 2f63 6f64 653e 2028 636c t (cl\n+0013f670: 6965 6e74 2069 7320 6174 2066 6175 6c74 ient is at fault\n+0013f680: 2920 6f72 203c 636f 6465 3e3c 6120 636c ) or soap_\n+0013f730: 7265 6365 6976 6572 5f66 6175 6c74 3c2f receiver_fault (serve\n+0013f750: 7220 6973 2061 7420 6661 756c 7429 2c20 r is at fault), \n+0013f760: 636c 6965 6e74 7320 7265 6365 6976 6520 clients receive \n+0013f770: 7468 6520 6661 756c 7420 6173 203c 636f the fault as #SOAP_CLI_FAU\n+0013f790: 4c54 3c2f 636f 6465 3e20 6f72 203c 636f LT or #SOAP_SVR_FAU\n+0013f7b0: 4c54 3c2f 636f 6465 3e20 7265 7370 6563 LT respec\n+0013f7c0: 7469 7665 6c79 2020 2020 3c2f 7464 3e3c tively
    #S\n+0013f820: 4f41 505f 4644 5f45 5843 4545 4445 443c OAP_FD_EXCEEDED<\n+0013f830: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #S\n+0013f8d0: 4f41 505f 4649 5845 443c 2f63 6f64 653e OAP_FIXED\n+0013f8e0: 2020 203c 2f74 643e 3c74 6420 636c 6173 XML el\n+0013f910: 656d 656e 7420 6f72 2061 7474 7269 6275 ement or attribu\n+0013f920: 7465 2076 616c 7565 2069 7320 6669 7865 te value is fixe\n+0013f930: 6420 616e 6420 7468 6520 7061 7273 6564 d and the parsed\n+0013f940: 2076 616c 7565 2064 6f65 7320 6e6f 7420 value does not \n+0013f950: 6d61 7463 6820 7468 6520 6669 7865 6420 match the fixed \n+0013f960: 7661 6c75 6520 2020 203c 2f74 643e 3c2f value
    #SO\n+0013f9c0: 4150 5f47 4554 5f4d 4554 484f 443c 2f63 AP_GET_METHOD An\n+0013fa00: 2048 5454 5020 4745 5420 7265 7175 6573 HTTP GET reques\n+0013fa10: 7420 7761 7320 7265 6365 6976 6564 2062 t was received b\n+0013fa20: 7920 7468 6520 7365 7276 6963 6520 6275 y the service bu\n+0013fa30: 7420 7468 6520 4745 5420 7265 7175 6573 t the GET reques\n+0013fa40: 7420 6361 6c6c 6261 636b 203c 636f 6465 t callback soap::fget is not \n+0013fb30: 696d 706c 656d 656e 7465 642c 2073 6565 implemented, see\n+0013fb40: 2053 6563 7469 6f6e 7320 3c61 2063 6c61 Sections Ho\n+0013fb70: 7720 746f 2069 6d70 6c65 6d65 6e74 2048 w to implement H\n+0013fb80: 5454 5020 4745 542c 2050 5554 2c20 616e TTP GET, PUT, an\n+0013fb90: 6420 5041 5443 4820 7365 7276 6963 6573 d PATCH services\n+0013fba0: 3c2f 613e 2061 6e64 203c 6120 636c 6173 and Function callb\n+0013fbe0: 6163 6b73 2066 6f72 2063 7573 746f 6d69 acks for customi\n+0013fbf0: 7a65 6420 492f 4f20 616e 6420 4854 5450 zed I/O and HTTP\n+0013fc00: 2068 616e 646c 696e 673c 2f61 3e20 2020 handling \n+0013fc10: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    #SOAP_HTTP_ERR\n+0013fde0: 4f52 3c2f 636f 6465 3e20 2020 3c2f 7464 OR An unspecifie\n+0013fe20: 6420 4854 5450 2065 7272 6f72 206f 6363 d HTTP error occ\n+0013fe30: 7572 7265 6420 2020 203c 2f74 643e 3c2f urred
    #S\n+0013fe90: 4f41 505f 4854 5450 5f4d 4554 484f 443c OAP_HTTP_METHOD<\n+0013fea0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP_\n+0013ff70: 494f 423c 2f63 6f64 653e 2020 203c 2f74 IOB SOAP array i\n+0013ffb0: 6e64 6578 206f 7574 206f 6620 626f 756e ndex out of boun\n+0013ffc0: 6473 2020 2020 3c2f 7464 3e3c 2f74 723e ds
    #SOAP\n+00140020: 5f4c 454e 4754 483c 2f63 6f64 653e 2020 _LENGTH \n+00140030: 203c 2f74 643e 3c74 6420 636c 6173 733d XML elem\n+00140060: 656e 7420 6f72 2061 7474 7269 6275 7465 ent or attribute\n+00140070: 206c 656e 6774 6820 7661 6c69 6461 7469 length validati\n+00140080: 6f6e 2065 7272 6f72 206f 7220 3c63 6f64 on error or #SOAP_MAXLENGT\n+001400a0: 483c 2f63 6f64 653e 2065 7863 6565 6465 H exceede\n+001400b0: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d
    #SOAP_L\n+00140110: 4556 454c 3c2f 636f 6465 3e20 2020 3c2f EVEL XML nesting\n+00140150: 2064 6570 7468 206c 6576 656c 2065 7863 depth level exc\n+00140160: 6565 6473 203c 636f 6465 3e23 534f 4150 eeds #SOAP\n+00140170: 5f4d 4158 4c45 5645 4c3c 2f63 6f64 653e _MAXLEVEL\n+00140180: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_M\n+001401e0: 494d 455f 454e 443c 2f63 6f64 653e 2020 IME_END \n+001401f0: 203c 2f74 643e 3c74 6420 636c 6173 733d End of M\n+00140220: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+00140230: 7072 6f74 6f63 6f6c 2065 7272 6f72 2020 protocol error \n+00140240: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    MIME atta\n+001402e0: 6368 6d65 6e74 2070 6172 7369 6e67 2065 chment parsing e\n+001402f0: 7272 6f72 2020 2020 3c2f 7464 3e3c 2f74 rror
    #SO\n+00140350: 4150 5f4d 494d 455f 4852 4546 3c2f 636f AP_MIME_HREF MIM\n+00140390: 4520 6174 7461 6368 6d65 6e74 2068 6173 E attachment has\n+001403a0: 206e 6f20 6872 6566 2066 726f 6d20 534f no href from SO\n+001403b0: 4150 2062 6f64 7920 616e 6420 6e6f 204d AP body and no M\n+001403c0: 494d 4520 6361 6c6c 6261 636b 7320 7765 IME callbacks we\n+001403d0: 7265 2064 6566 696e 6564 2074 6f20 7361 re defined to sa\n+001403e0: 7665 2074 6865 2061 7474 6163 686d 656e ve the attachmen\n+001403f0: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
    #SOAP_M\n+00140450: 4953 5349 4e47 5f49 443c 2f63 6f64 653e ISSING_ID\n+00140460: 2020 203c 2f74 643e 3c74 6420 636c 6173 An XML\n+00140490: 2065 6c65 6d65 6e74 2077 6974 6820 6964 element with id\n+001404a0: 2061 7474 7269 6275 7465 2069 7320 6d69 attribute is mi\n+001404b0: 7373 696e 6720 7468 6174 2073 686f 756c ssing that shoul\n+001404c0: 6420 6d61 7463 6820 7468 6520 656c 656d d match the elem\n+001404d0: 656e 7420 7769 7468 2068 7265 662f 7265 ent with href/re\n+001404e0: 6620 6174 7472 6962 7574 6520 2861 7070 f attribute (app\n+001404f0: 6c69 6361 626c 6520 746f 2053 4f41 5020 licable to SOAP \n+00140500: 6d75 6c74 692d 7265 6620 656e 636f 6469 multi-ref encodi\n+00140510: 6e67 2061 6e64 203c 636f 6465 3e23 534f ng and #SO\n+00140520: 4150 5f58 4d4c 5f47 5241 5048 3c2f 636f AP_XML_GRAPH serializatio\n+00140540: 6e29 2020 2020 3c2f 7464 3e3c 2f74 723e n)
    #SOAP\n+001405a0: 5f4d 4f45 3c2f 636f 6465 3e20 2020 3c2f _MOE Memory over\n+001405e0: 666c 6f77 206f 7220 6d65 6d6f 7279 2063 flow or memory c\n+001405f0: 6f72 7275 7074 696f 6e20 6572 726f 7220 orruption error \n+00140600: 2861 7070 6c69 6361 626c 6520 696e 203c (applicable in <\n+00140610: 636f 6465 3e23 4445 4255 473c 2f63 6f64 code>#DEBUG mode only) \n+00140630: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    An XML\n+001406d0: 2065 6c65 6d65 6e74 2069 7320 7072 6573 element is pres\n+001406e0: 656e 7420 7769 7468 2061 206d 7573 7455 ent with a mustU\n+001406f0: 6e64 6572 7374 616e 6420 6174 7472 6962 nderstand attrib\n+00140700: 7574 6520 7768 6963 6820 6d75 7374 2062 ute which must b\n+00140710: 6520 756e 6465 7273 746f 6f64 2062 7574 e understood but\n+00140720: 2069 7320 6e6f 7420 6465 7365 7269 616c is not deserial\n+00140730: 697a 6564 2020 2020 3c2f 7464 3e3c 2f74 ized
    #SO\n+00140790: 4150 5f4e 414d 4553 5041 4345 3c2f 636f AP_NAMESPACE XML\n+001407d0: 206e 616d 6573 7061 6365 206e 616d 6520 namespace name \n+001407e0: 6d69 736d 6174 6368 2076 616c 6964 6174 mismatch validat\n+001407f0: 696f 6e20 6572 726f 7220 2020 203c 2f74 ion error
    #SOAP_NO_DATA
    #SOAP_NO\n+00140920: 5f4d 4554 484f 443c 2f63 6f64 653e 2020 _METHOD \n+00140930: 203c 2f74 643e 3c74 6420 636c 6173 733d The serv\n+00140960: 6963 6520 7265 7175 6573 7420 6469 7370 ice request disp\n+00140970: 6174 6368 6572 2064 6964 206e 6f74 2066 atcher did not f\n+00140980: 696e 6420 6120 6d61 7463 6869 6e67 2073 ind a matching s\n+00140990: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n+001409a0: 2066 6f72 2061 2073 6572 7669 6365 2072 for a service r\n+001409b0: 6571 7565 7374 2020 2020 3c2f 7464 3e3c equest
    #S\n+00140a10: 4f41 505f 4e4f 5f54 4147 3c2f 636f 6465 OAP_NO_TAG No XM\n+00140a50: 4c20 656c 656d 656e 7420 7461 6720 7761 L element tag wa\n+00140a60: 7320 666f 756e 6420 7768 656e 206f 6e65 s found when one\n+00140a70: 2077 6173 2065 7870 6563 7465 6420 2020 was expected \n+00140a80: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    An NTLM a\n+00140b20: 7574 6865 6e74 6963 6174 696f 6e20 6861 uthentication ha\n+00140b30: 6e64 7368 616b 6520 6572 726f 7220 6f63 ndshake error oc\n+00140b40: 6375 7272 6564 2020 2020 3c2f 7464 3e3c curred
    #S\n+00140ba0: 4f41 505f 4e55 4c4c 3c2f 636f 6465 3e20 OAP_NULL \n+00140bb0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 XML ele\n+00140be0: 6d65 6e74 2068 6173 2061 6e20 3c63 6f64 ment has an xsi:nil\n+00140c00: 2061 7474 7269 6275 7465 2077 6865 6e20 attribute when \n+00140c10: 7468 6520 656c 656d 656e 7420 6973 206e the element is n\n+00140c20: 6f74 206e 696c 6c61 626c 652c 2063 6175 ot nillable, cau\n+00140c30: 7369 6e67 2061 2076 616c 6964 6174 696f sing a validatio\n+00140c40: 6e20 6572 726f 7220 2020 203c 2f74 643e n error
    \n+00140ca0: 2353 4f41 505f 4f43 4355 5253 3c2f 636f #SOAP_OCCURS XML\n+00140ce0: 2065 6c65 6d65 6e74 206d 696e 4f63 6375 element minOccu\n+00140cf0: 7273 206f 7220 6d61 784f 6363 7572 7320 rs or maxOccurs \n+00140d00: 7661 6c69 6461 7469 6f6e 2065 7272 6f72 validation error\n+00140d10: 206f 7220 3c63 6f64 653e 2353 4f41 505f or #SOAP_\n+00140d20: 4d41 584f 4343 5552 533c 2f63 6f64 653e MAXOCCURS\n+00140d30: 2065 7863 6565 6465 6420 2020 203c 2f74 exceeded
    #SOAP_PATCH_MET\n+00140da0: 484f 443c 2f63 6f64 653e 2020 203c 2f74 HOD An HTTP PATC\n+00140de0: 4820 7265 7175 6573 7420 7761 7320 7265 H request was re\n+00140df0: 6365 6976 6564 2062 7920 7468 6520 7365 ceived by the se\n+00140e00: 7276 6963 6520 6275 7420 7468 6520 5041 rvice but the PA\n+00140e10: 5443 4820 7265 7175 6573 7420 6361 6c6c TCH request call\n+00140e20: 6261 636b 203c 636f 6465 3e3c 6120 636c back soap::fpatch is not \n+00140f10: 696d 706c 656d 656e 7465 642c 2073 6565 implemented, see\n+00140f20: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Function callb\n+00140f60: 6163 6b73 2066 6f72 2063 7573 746f 6d69 acks for customi\n+00140f70: 7a65 6420 492f 4f20 616e 6420 4854 5450 zed I/O and HTTP\n+00140f80: 2068 616e 646c 696e 673c 2f61 3e20 2020 handling \n+00140f90: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    XML element \n+00141030: 6f72 2061 7474 7269 6275 7465 2076 616c or attribute val\n+00141040: 7565 2070 6174 7465 726e 206d 6973 6d61 ue pattern misma\n+00141050: 7463 6820 2020 203c 2f74 643e 3c2f 7472 tch
    #SOAP\n+001410b0: 5f50 4c55 4749 4e5f 4552 524f 523c 2f63 _PLUGIN_ERROR Fa\n+001410f0: 696c 6564 2074 6f20 7265 6769 7374 6572 iled to register\n+00141100: 2070 6c75 6769 6e20 2020 203c 2f74 643e plugin
    \n+00141160: 2353 4f41 505f 5052 4f48 4942 4954 4544 #SOAP_PROHIBITED\n+00141170: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    \n+00141220: 2353 4f41 505f 5055 545f 4d45 5448 4f44 #SOAP_PUT_METHOD\n+00141230: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SOAP_R\n+00141470: 4551 5549 5245 443c 2f63 6f64 653e 2020 EQUIRED \n+00141480: 203c 2f74 643e 3c74 6420 636c 6173 733d XML attr\n+001414b0: 6962 7574 6520 6973 2072 6571 7569 7265 ibute is require\n+001414c0: 6420 6275 7420 6e6f 7420 7072 6573 656e d but not presen\n+001414d0: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
    #SOAP_S\n+00141530: 534c 5f45 5252 4f52 3c2f 636f 6465 3e20 SL_ERROR \n+00141540: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 An SSL \n+00141570: 6572 726f 7220 6f63 6375 7272 6564 2020 error occurred \n+00141580: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    The servi\n+00141620: 6365 2072 6574 7572 6e65 6420 6120 534f ce returned a SO\n+00141630: 4150 2031 2e31 2073 6572 7665 7220 6661 AP 1.1 server fa\n+00141640: 756c 7420 6f72 2053 4f41 5020 312e 3220 ult or SOAP 1.2 \n+00141650: 7265 6365 6976 6572 2066 6175 6c74 2074 receiver fault t\n+00141660: 6f20 7468 6520 636c 6965 6e74 2020 2020 o the client \n+00141670: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_SYNTAX\n+001416d0: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n+001416e0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 An XML sy\n+00141710: 6e74 6178 2065 7272 6f72 206f 6363 7572 ntax error occur\n+00141720: 7265 6420 7768 696c 6520 7061 7273 696e red while parsin\n+00141730: 6720 7468 6520 696e 7075 7420 2020 203c g the input <\n+00141740: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_TAG_MI\n+001417a0: 534d 4154 4348 3c2f 636f 6465 3e20 2020 SMATCH \n+001417b0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 XML eleme\n+001417e0: 6e74 2074 6167 2070 6172 7365 6420 646f nt tag parsed do\n+001417f0: 6573 206e 6f74 206d 6174 6368 2061 6e79 es not match any\n+00141800: 7468 696e 6720 7468 6174 2069 7320 6578 thing that is ex\n+00141810: 7065 6374 6564 2020 2020 3c2f 7464 3e3c pected
    #S\n+00141870: 4f41 505f 5443 505f 4552 524f 523c 2f63 OAP_TCP_ERROR A \n+001418b0: 5443 502f 4950 2063 6f6e 6e65 6374 696f TCP/IP connectio\n+001418c0: 6e20 6572 726f 7220 6f63 6375 7272 6564 n error occurred\n+001418d0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_T\n+00141930: 5950 453c 2f63 6f64 653e 2020 203c 2f74 YPE XML element \n+00141970: 6f72 2061 7474 7269 6275 7465 2068 6173 or attribute has\n+00141980: 2061 206d 6973 6d61 7463 6869 6e67 2074 a mismatching t\n+00141990: 7970 6520 6f72 2076 616c 7565 2074 6861 ype or value tha\n+001419a0: 7420 6973 2063 6175 7369 6e67 2061 2076 t is causing a v\n+001419b0: 616c 6964 6174 696f 6e20 6572 726f 7220 alidation error \n+001419c0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    A UDP/IP \n+00141a60: 636f 6e6e 6563 7469 6f6e 2065 7272 6f72 connection error\n+00141a70: 206f 6363 7572 7265 6420 6f72 2074 6865 occurred or the\n+00141a80: 206d 6573 7361 6765 2074 6f6f 206c 6172 message too lar\n+00141a90: 6765 2074 6f20 7374 6f72 6520 696e 2061 ge to store in a\n+00141aa0: 2055 4450 2070 6163 6b65 7420 2020 203c UDP packet <\n+00141ab0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_USER_E\n+00141b10: 5252 4f52 3c2f 636f 6465 3e20 2020 3c2f RROR soa\n+00141c00: 703a 3a75 7365 723c 2f61 3e20 6e6f 7420 p::user not \n+00141c10: 7365 7420 746f 206e 6f6e 2d4e 554c 4c20 set to non-NULL \n+00141c20: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    An UTF-8 \n+00141cc0: 6465 636f 6469 6e67 2065 7272 6f72 206f decoding error o\n+00141cd0: 6363 7572 7265 6420 2020 203c 2f74 643e ccurred
    \n+00141d30: 2353 4f41 505f 5645 5253 494f 4e4d 4953 #SOAP_VERSIONMIS\n+00141d40: 4d41 5443 483c 2f63 6f64 653e 2020 203c MATCH <\n+00141d50: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>SOAP versi\n+00141d80: 6f6e 206d 6973 6d61 7463 6820 6f72 206e on mismatch or n\n+00141d90: 6f20 534f 4150 206d 6573 7361 6765 2069 o SOAP message i\n+00141da0: 7320 7265 6365 6976 6564 2020 2020 3c2f s received
    #SOAP_ZLIB_ERR\n+00141e10: 4f52 3c2f 636f 6465 3e20 2020 3c2f 7464 OR A zlib error \n+00141e50: 6f63 6375 7272 6564 2020 203c 2f74 643e occurred
    .<\n+00141e70: 703e 4120 7374 6174 7573 2063 6f64 6520 p>A status code \n+00141e80: 6f66 203c 636f 6465 3e23 534f 4150 5f4f of #SOAP_O\n+00141e90: 4b3c 2f63 6f64 653e 2028 7a65 726f 2920 K (zero) \n+00141ea0: 6973 2072 6574 7572 6e65 6420 6279 2061 is returned by a\n+00141eb0: 2067 534f 4150 2041 5049 2066 756e 6374 gSOAP API funct\n+00141ec0: 696f 6e20 7768 656e 2074 6865 2066 756e ion when the fun\n+00141ed0: 6374 696f 6e20 6361 6c6c 2077 6173 2073 ction call was s\n+00141ee0: 7563 6365 7373 6675 6c2c 206f 7468 6572 uccessful, other\n+00141ef0: 7769 7365 2061 206e 6f6e 2d7a 6572 6f20 wise a non-zero \n+00141f00: 6572 726f 7220 636f 6465 2069 7320 7265 error code is re\n+00141f10: 7475 726e 6564 2e20 5468 6520 7374 6174 turned. The stat\n+00141f20: 7573 2065 7272 6f72 2063 6f64 6520 6973 us error code is\n+00141f30: 2061 6c73 6f20 7374 6f72 6564 2069 6e20 also stored in \n+00141f40: 7468 6520 6375 7272 656e 7420 3c63 6f64 the current so\n+00141fa0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap
    co\n+00141fb0: 6e74 6578 7420 6173 203c 636f 6465 3e3c ntext as <\n+00141fc0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00141fd0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00141fe0: 6d6c 2361 6238 3566 3564 3432 3730 3239 ml#ab85f5d427029\n+00141ff0: 3633 6431 3365 6135 3430 6264 3938 3736 63d13ea540bd9876\n+00142000: 6536 6432 2220 7469 746c 653d 2254 6865 e6d2\" title=\"The\n+00142010: 2073 6f61 7020 636f 6e74 6578 7420 736f soap context so\n+00142020: 6170 5f73 7461 7475 7320 2869 6e74 2920 ap_status (int) \n+00142030: 6572 726f 7220 636f 6465 206f 6620 7468 error code of th\n+00142040: 6520 6c61 7374 206f 7065 7261 7469 6f6e e last operation\n+00142050: 206f 7220 2353 4f41 505f 4f4b 2028 7a65 or #SOAP_OK (ze\n+00142060: 726f 2922 3e73 6f61 703a 3a65 7272 6f72 ro)\">soap::error\n+00142070: 3c2f 613e 3c2f 636f 6465 3e2e 2046 6f72 . For\n+00142080: 2049 4f20 616e 6420 736f 636b 6574 2d72 IO and socket-r\n+00142090: 656c 6174 6564 2065 7272 6f72 732c 2061 elated errors, a\n+001420a0: 6c73 6f20 7468 6520 3c63 6f64 653e 3c61 lso the so\n+00142130: 6170 3a3a 6572 726e 756d 3c2f 613e 3c2f ap::errnum variable i\n+00142150: 7320 7365 7420 746f 2074 6865 203c 636f s set to the errno \n+00142170: 7661 6c75 6520 6f66 2074 6865 2073 7973 value of the sys\n+00142180: 7465 6d20 6572 726f 7220 666f 7220 6578 tem error for ex\n+00142190: 616d 706c 6520 7768 656e 2061 203c 636f ample when a #SOAP_EOF error occurr\n+001421c0: 6564 2e3c 2f70 3e0a 3c70 3e54 6f20 6469 ed.

    .

    To di\n+001421d0: 7370 6c61 7920 7468 6520 6572 726f 722c splay the error,\n+001421e0: 2075 7365 203c 636f 6465 3e3c 6120 636c use soap_print_faul\n+00142280: 7428 7374 7275 6374 2073 6f61 7020 2a73 t(struct soap *s\n+00142290: 6f61 702c 2046 494c 4520 2a66 6429 3c2f oap, FILE *fd) where \n+001422b0: 7468 6520 6375 7272 656e 7420 7661 6c75 the current valu\n+001422c0: 6520 6f66 203c 636f 6465 3e3c 6120 636c e of soap::error\n+00142380: 3c2f 636f 6465 3e20 6973 2075 7365 6420 is used \n+00142390: 6279 2074 6865 2066 756e 6374 696f 6e20 by the function \n+001423a0: 746f 2070 7269 6e74 2074 6865 2065 7272 to print the err\n+001423b0: 6f72 2074 6f20 7468 6520 7370 6563 6966 or to the specif\n+001423c0: 6965 6420 3c63 6f64 653e 6664 3c2f 636f ied fd file. Altern\n+001423e0: 6174 6976 656c 792c 2069 6e20 432b 2b20 atively, in C++ \n+001423f0: 796f 7520 6361 6e20 7573 6520 3c63 6f64 you can use s\n+00142490: 6f61 705f 7374 7265 616d 5f66 6175 6c74 oap_stream_fault\n+001424a0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+001424b0: 6170 2c20 7374 643a 3a6f 7374 7265 616d ap, std::ostream\n+001424c0: 2661 6d70 3b20 6f73 293c 2f61 3e3c 2f63 & os) to print th\n+001424e0: 6520 6572 726f 7220 6f6e 2074 6865 2073 e error on the s\n+001424f0: 7065 6369 6669 6564 203c 636f 6465 3e6f pecified o\n+00142500: 733c 2f63 6f64 653e 206f 7574 7075 7420 s output \n+00142510: 7374 7265 616d 2e3c 2f70 3e0a 3c70 3e54 stream.

    .

    T\n+00142520: 6f20 6469 7370 6c61 7920 7468 6520 6c6f o display the lo\n+00142530: 6361 7469 6f6e 206f 6620 616e 2058 4d4c cation of an XML\n+00142540: 2070 6172 7369 6e67 2061 6e64 2076 616c parsing and val\n+00142550: 6964 6174 696f 6e20 6572 726f 722c 2075 idation error, u\n+00142560: 7365 203c 636f 6465 3e3c 6120 636c 6173 se soap_prin\n+00142610: 745f 6661 756c 745f 6c6f 6361 7469 6f6e t_fault_location\n+00142620: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00142630: 6170 2c20 4649 4c45 202a 6664 293c 2f61 ap, FILE *fd) or \n+001426f0: 736f 6170 5f73 7472 6561 6d5f 6661 756c soap_stream_faul\n+00142700: 745f 6c6f 6361 7469 6f6e 2873 7472 7563 t_location(struc\n+00142710: 7420 736f 6170 202a 736f 6170 2c20 7374 t soap *soap, st\n+00142720: 643a 3a6f 7374 7265 616d 2661 6d70 3b20 d::ostream& \n+00142730: 6f73 293c 2f61 3e3c 2f63 6f64 653e 2074 os) t\n+00142740: 6f20 7072 696e 7420 7061 7274 206f 6620 o print part of \n+00142750: 7468 6520 584d 4c20 7769 7468 2074 6865 the XML with the\n+00142760: 2065 7272 6f72 206c 6f63 6174 696f 6e20 error location \n+00142770: 6d61 726b 6564 2069 6e20 7468 6520 584d marked in the XM\n+00142780: 4c20 6f75 7470 7574 2e3c 2f70 3e0a 3c70 L output.

    .To save the err\n+001427a0: 6f72 2069 6e20 6120 7374 7269 6e67 2062 or in a string b\n+001427b0: 7566 6665 7220 3c63 6f64 653e 6275 665b uffer buf[\n+001427c0: 302e 2e2e 6c65 6e2d 315d 3c2f 636f 6465 0...len-1], use soap_s\n+00142870: 7072 696e 745f 6661 756c 7428 7374 7275 print_fault(stru\n+00142880: 6374 2073 6f61 702a 2c20 6368 6172 202a ct soap*, char *\n+00142890: 6275 662c 2073 697a 655f 7420 6c65 6e29 buf, size_t len)\n+001428a0: 3c2f 613e 3c2f 636f 6465 3e2c 2077 6865 , whe\n+001428b0: 7265 203c 636f 6465 3e62 7566 3c2f 636f re buf is populated\n+001428d0: 2077 6974 6820 7468 6520 6661 756c 7420 with the fault \n+001428e0: 6d65 7373 6167 6520 7465 726d 696e 6174 message terminat\n+001428f0: 696e 6720 7769 7468 2061 203c 636f 6465 ing with a \\0.

    .\n+00142910: 3c70 3e54 6f20 6465 7465 726d 696e 6520

    To determine \n+00142920: 7468 6520 7479 7065 206f 6620 6572 726f the type of erro\n+00142930: 7220 7468 6174 206f 6363 7572 7265 642c r that occurred,\n+00142940: 2075 7365 3a3c 2f70 3e3c 756c 3e0a 3c6c use:

    .

    An HT\n+001435f0: 5450 2073 7461 7475 7320 636f 6465 2069 TP status code i\n+00143600: 7320 7265 7475 726e 6564 2077 6865 6e20 s returned when \n+00143610: 7468 6520 636c 6965 6e74 2066 6169 6c73 the client fails\n+00143620: 2074 6f20 636f 6e6e 6563 7420 746f 2061 to connect to a\n+00143630: 6e20 4854 5450 2073 6572 7665 7220 616e n HTTP server an\n+00143640: 6420 7468 6520 4854 5450 2073 6572 7665 d the HTTP serve\n+00143650: 7220 7265 7370 6f6e 7365 2077 6974 6820 r response with \n+00143660: 616e 2065 7272 6f72 2e20 5468 6520 6c69 an error. The li\n+00143670: 7374 206f 6620 4854 5450 2073 7461 7475 st of HTTP statu\n+00143680: 7320 636f 6465 7320 6973 2067 6976 656e s codes is given\n+00143690: 2062 656c 6f77 3a3c 2f70 3e0a 3c74 6162 below:

    ...Code \n+00143700: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 Descrip\n+00143730: 7469 6f6e 2020 2020 3c2f 7468 3e3c 2f74 tion ..200 OK (no error)\n+001437c0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+001437d0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+001437e0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+001437f0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .201 \n+00143840: 4372 6561 7465 6420 2020 203c 2f74 643e Created \n+00143850: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..202 <\n+001438a0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Accepted \n+001438d0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00143900: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143910: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143920: 3e32 3033 2020 203c 2f74 643e 3c74 6420 >203 No\n+00143950: 6e2d 4175 7468 6f72 6974 6174 6976 6520 n-Authoritative \n+00143960: 496e 666f 726d 6174 696f 6e20 2020 203c Information <\n+00143970: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..204\n+001439c0: 2020 203c 2f74 643e 3c74 6420 636c 6173 No Con\n+001439f0: 7465 6e74 2020 2020 3c2f 7464 3e3c 2f74 tent ..205 Reset Conten\n+00143a80: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t .\n+00143a90: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00143ab0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .206 \n+00143b00: 5061 7274 6961 6c20 436f 6e74 656e 7420 Partial Content \n+00143b10: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+00143b40: 3c74 6420 636c 6173 733d 226d 6172 6b64 300 M\n+00143b90: 756c 7469 706c 6520 4368 6f69 6365 7320 ultiple Choices \n+00143ba0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+00143bd0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143be0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143bf0: 3e33 3031 2020 203c 2f74 643e 3c74 6420 >301 Mo\n+00143c20: 7665 6420 5065 726d 616e 656e 746c 7920 ved Permanently \n+00143c30: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+00143c60: 3c74 6420 636c 6173 733d 226d 6172 6b64 302 F\n+00143cb0: 6f75 6e64 2020 2020 3c2f 7464 3e3c 2f74 ound ..303 See Other \n+00143d40: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..3\n+00143d90: 3034 2020 203c 2f74 643e 3c74 6420 636c 04 Not \n+00143dc0: 4d6f 6469 6669 6564 2020 2020 3c2f 7464 Modified ..305 \n+00143e20: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Use Proxy\n+00143e50: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00143e60: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00143e70: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00143e80: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .307 \n+00143ed0: 5465 6d70 6f72 6172 7920 5265 6469 7265 Temporary Redire\n+00143ee0: 6374 2020 2020 3c2f 7464 3e3c 2f74 723e ct \n+00143ef0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..400 <\n+00143f40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143f50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143f60: 3e42 6164 2052 6571 7565 7374 2020 2020 >Bad Request \n+00143f70: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..4\n+00143fc0: 3031 2020 203c 2f74 643e 3c74 6420 636c 01 Unau\n+00143ff0: 7468 6f72 697a 6564 2020 2020 3c2f 7464 thorized ..402 \n+00144050: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Payment R\n+00144080: 6571 7569 7265 6420 2020 203c 2f74 643e equired \n+00144090: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..403 \n+001440e0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Forbidden\n+00144110: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00144120: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00144130: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00144140: 3c74 6420 636c 6173 733d 226d 6172 6b64 404 N\n+00144190: 6f74 2046 6f75 6e64 2020 2020 3c2f 7464 ot Found ..405 \n+001441f0: 203c 2f74 643e 3c74 6420 636c 6173 733d Method N\n+00144220: 6f74 2041 6c6c 6f77 6564 2020 2020 3c2f ot Allowed ..406 \n+00144280: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Not Acc\n+001442b0: 6570 7461 626c 6520 2020 203c 2f74 643e eptable \n+001442c0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..407 \n+00144310: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Proxy Aut\n+00144340: 6865 6e74 6963 6174 696f 6e20 5265 7175 hentication Requ\n+00144350: 6972 6564 2020 2020 3c2f 7464 3e3c 2f74 ired ..408 Request Time-\n+001443e0: 6f75 7420 2020 203c 2f74 643e 3c2f 7472 out ..409 Conflict <\n+00144470: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..410\n+001444c0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Gone \n+001444f0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00144520: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144530: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144540: 3e34 3131 2020 203c 2f74 643e 3c74 6420 >411 Le\n+00144570: 6e67 7468 2052 6571 7569 7265 6420 2020 ngth Required \n+00144580: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..4\n+001445d0: 3132 2020 203c 2f74 643e 3c74 6420 636c 12 Prec\n+00144600: 6f6e 6469 7469 6f6e 2046 6169 6c65 6420 ondition Failed \n+00144610: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+00144640: 3c74 6420 636c 6173 733d 226d 6172 6b64 413 R\n+00144690: 6571 7565 7374 2045 6e74 6974 7920 546f equest Entity To\n+001446a0: 6f20 4c61 7267 6520 2020 203c 2f74 643e o Large \n+001446b0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..414 <\n+00144700: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Request-UR\n+00144730: 4920 546f 6f20 4c61 7267 6520 2020 203c I Too Large <\n+00144740: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..41\n+00144790: 3520 2020 3c2f 7464 3e3c 7464 2063 6c61 5 Unsup\n+001447c0: 706f 7274 6564 204d 6564 6961 2054 7970 ported Media Typ\n+001447d0: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n+001447e0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00144800: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .416 \n+00144850: 5265 7175 6573 7465 6420 7261 6e67 6520 Requested range \n+00144860: 6e6f 7420 7361 7469 7366 6961 626c 6520 not satisfiable \n+00144870: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+001448a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 417 E\n+001448f0: 7870 6563 7461 7469 6f6e 2046 6169 6c65 xpectation Faile\n+00144900: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d .\n+00144910: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00144930: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .500 \n+00144980: 496e 7465 726e 616c 2053 6572 7665 7220 Internal Server \n+00144990: 4572 726f 7220 2020 203c 2f74 643e 3c2f Error ..501 Not Impleme\n+00144a20: 6e74 6564 2020 2020 3c2f 7464 3e3c 2f74 nted ..502 Bad Gateway \n+00144ab0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00144ae0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144af0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144b00: 3e35 3033 2020 203c 2f74 643e 3c74 6420 >503 Se\n+00144b30: 7276 6963 6520 556e 6176 6169 6c61 626c rvice Unavailabl\n+00144b40: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n+00144b50: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00144b70: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .504 \n+00144bc0: 4761 7465 7761 7920 5469 6d65 2d6f 7574 Gateway Time-out\n+00144bd0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00144be0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00144bf0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00144c00: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .505 \n+00144c50: 4854 5450 2056 6572 7369 6f6e 206e 6f74 HTTP Version not\n+00144c60: 2073 7570 706f 7274 6564 2020 203c 2f74 supported .\n+00144c80: 0a3c 703e 4854 5450 2073 7461 7475 7320 .

    HTTP status \n+00144c90: 636f 6465 2032 3030 2069 7320 6e6f 7420 code 200 is not \n+00144ca0: 666c 6167 6765 6420 6173 2061 6e20 6572 flagged as an er\n+00144cb0: 726f 7220 6279 2074 6865 2065 6e67 696e ror by the engin\n+00144cc0: 652e 2053 7461 7475 7320 636f 6465 7320 e. Status codes \n+00144cd0: 3230 3120 616e 6420 3230 3220 6172 6520 201 and 202 are \n+00144ce0: 696e 666f 726d 6174 6976 6520 616e 6420 informative and \n+00144cf0: 7368 6f75 6c64 206e 6f74 2062 6520 636f should not be co\n+00144d00: 6e73 6964 6572 6564 2065 7272 6f72 7320 nsidered errors \n+00144d10: 6279 2074 6865 2061 7070 6c69 6361 7469 by the applicati\n+00144d20: 6f6e 206c 6f67 6963 2e3c 2f70 3e0a 3c70 on logic.

    .Server-side imp\n+00144d40: 6c65 6d65 6e74 6174 696f 6e73 206f 6620 lementations of \n+00144d50: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n+00144d60: 6e73 2073 686f 756c 6420 7265 7475 726e ns should return\n+00144d70: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+00144d80: 2f63 6f64 653e 2077 6865 6e20 7468 6520 /code> when the \n+00144d90: 6f70 6572 6174 696f 6e20 7761 7320 7375 operation was su\n+00144da0: 6363 6573 7366 756c 2c20 7768 6963 6820 ccessful, which \n+00144db0: 7265 7475 726e 7320 6120 2232 3030 204f returns a \"200 O\n+00144dc0: 4b22 2048 5454 5020 6865 6164 6572 2077 K\" HTTP header w\n+00144dd0: 6974 6820 7468 6520 584d 4c20 7265 7370 ith the XML resp\n+00144de0: 6f6e 7365 206d 6573 7361 6765 2e20 5365 onse message. Se\n+00144df0: 7276 6572 2d73 6964 6520 696d 706c 656d rver-side implem\n+00144e00: 656e 7461 7469 6f6e 7320 6f66 2073 6572 entations of ser\n+00144e10: 7669 6365 206f 7065 7261 7469 6f6e 7320 vice operations \n+00144e20: 696e 2067 534f 4150 206d 6179 2064 6972 in gSOAP may dir\n+00144e30: 6563 746c 7920 7265 7475 726e 2061 6e20 ectly return an \n+00144e40: 4854 5450 2073 7461 7475 7320 636f 6465 HTTP status code\n+00144e50: 2077 6865 6e20 616e 2048 5454 502d 7265 when an HTTP-re\n+00144e60: 6c61 7465 6420 6572 726f 7220 7368 6f75 lated error shou\n+00144e70: 6c64 2062 6520 7265 7475 726e 6564 2e20 ld be returned. \n+00144e80: 466f 7220 6578 616d 706c 652c 203c 636f For example, return 404 returns \"40\n+00144eb0: 3420 4e6f 7420 466f 756e 6422 2074 6f20 4 Not Found\" to \n+00144ec0: 7468 6520 636c 6965 6e74 2061 6e64 2074 the client and t\n+00144ed0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he s\n+00144f80: 6f61 703a 3a65 7272 6f72 3c2f 613e 3c2f oap::error variable i\n+00144fa0: 7320 7365 7420 746f 2034 3034 2061 7420 s set to 404 at \n+00144fb0: 7468 6520 636c 6965 6e74 2073 6964 652e the client side.\n+00144fc0: 3c2f 703e 0a3c 703e 546f 2072 6574 7572

    .

    To retur\n+00144fd0: 6e20 6120 534f 4150 2046 6175 6c74 2066 n a SOAP Fault f\n+00144fe0: 726f 6d20 6120 7365 7276 6572 2d73 6964 rom a server-sid\n+00144ff0: 6520 696d 706c 656d 656e 7461 7469 6f6e e implementation\n+00145000: 206f 6620 6120 7365 7276 6963 6520 6f70 of a service op\n+00145010: 6572 6174 696f 6e2c 2075 7365 206f 6e65 eration, use one\n+00145020: 206f 6620 7468 6520 666f 6c6c 6f77 696e of the followin\n+00145030: 6720 6675 6e63 7469 6f6e 7320 746f 2070 g functions to p\n+00145040: 6f70 756c 6174 6520 7468 6520 534f 4150 opulate the SOAP\n+00145050: 2046 6175 6c74 206d 6573 7361 6765 3a3c Fault message:<\n+00145060: 2f70 3e3c 756c 3e0a 3c6c 693e 3c63 6f64 /p>

    .

    A rec\n+00145940: 6569 7665 7220 6572 726f 7220 696e 6469 eiver error indi\n+00145950: 6361 7465 7320 7468 6174 2074 6865 2073 cates that the s\n+00145960: 6572 7669 6365 2063 6f75 6c64 206e 6f74 ervice could not\n+00145970: 2068 616e 646c 6520 7468 6520 636c 6965 handle the clie\n+00145980: 6e74 2072 6571 7565 7374 2c20 6275 7420 nt request, but \n+00145990: 6974 2063 616e 2070 6f73 7369 626c 7920 it can possibly \n+001459a0: 7265 636f 7665 7220 6672 6f6d 2074 6865 recover from the\n+001459b0: 2065 7272 6f72 206c 6174 6572 2c20 666f error later, fo\n+001459c0: 7220 6578 616d 706c 6520 7768 656e 2072 r example when r\n+001459d0: 6573 6f75 7263 6573 2061 7265 2074 656d esources are tem\n+001459e0: 706f 7261 7269 6c79 2075 6e61 7661 696c porarily unavail\n+001459f0: 6162 6c65 2e20 4120 7365 6e64 6572 2065 able. A sender e\n+00145a00: 7272 6f72 2069 6e64 6963 6174 6573 2074 rror indicates t\n+00145a10: 6861 7420 7468 6520 636c 6965 6e74 2072 hat the client r\n+00145a20: 6571 7565 7374 2069 7320 6661 756c 7479 equest is faulty\n+00145a30: 2061 6e64 2073 2072 656a 6563 7465 6420 and s rejected \n+00145a40: 6279 2074 6865 2073 6572 7669 6365 2e3c by the service.<\n+00145a50: 2f70 3e0a 3c70 3e53 6565 2053 6563 7469 /p>.

    See Secti\n+00145a60: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on SOAP Fa\n+00145a90: 756c 7420 7072 6f63 6573 7369 6e67 3c2f ult processing for more deta\n+00145ab0: 696c 7320 6f6e 2068 6f77 2074 6f20 7573 ils on how to us\n+00145ac0: 6520 7468 6573 6520 6675 6e63 7469 6f6e e these function\n+00145ad0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

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

    .<\n+00145b30: 2f61 3e0a 4d65 6d6f 7279 206d 616e 6167 /a>.Memory manag\n+00145b40: 656d 656e 743c 2f68 313e 0a3c 703e 4d65 ement

    .

    Me\n+00145b50: 6d6f 7279 206d 616e 6167 656d 656e 7420 mory management \n+00145b60: 7769 7468 2067 534f 4150 2069 7320 6175 with gSOAP is au\n+00145b70: 746f 6d61 7469 632e 2054 6865 2065 6e67 tomatic. The eng\n+00145b80: 696e 6520 636f 6e74 6578 7420 6d61 6e61 ine context mana\n+00145b90: 6765 7320 616c 6c20 6d65 6d6f 7279 2061 ges all memory a\n+00145ba0: 6c6c 6f63 6174 6564 2074 6f20 7365 7269 llocated to seri\n+00145bb0: 616c 697a 6520 6461 7461 2061 6e64 2066 alize data and f\n+00145bc0: 6f72 2074 656d 706f 7261 7279 2073 746f or temporary sto\n+00145bd0: 7261 6765 2e20 4465 7365 7269 616c 697a rage. Deserializ\n+00145be0: 6564 2064 6174 6120 6973 2061 6c6c 6f63 ed data is alloc\n+00145bf0: 6174 6564 2069 6e20 6d61 6e61 6765 6420 ated in managed \n+00145c00: 6d65 6d6f 7279 2061 6e64 2064 6174 6120 memory and data \n+00145c10: 7374 7275 6374 7572 6573 2063 616e 2062 structures can b\n+00145c20: 6520 616c 6c6f 6361 7465 6420 696e 206d e allocated in m\n+00145c30: 616e 6167 6564 206d 656d 6f72 7920 6279 anaged memory by\n+00145c40: 2074 6865 2075 7365 7220 7768 656e 2064 the user when d\n+00145c50: 6573 6972 6564 2075 7369 6e67 203c 636f esired using soap_new_T functions g\n+00145c80: 656e 6572 6174 6564 2062 7920 736f 6170 enerated by soap\n+00145c90: 6370 7032 2066 6f72 2065 6163 6820 7365 cpp2 for each se\n+00145ca0: 7269 616c 697a 6162 6c65 2074 7970 6520 rializable type \n+00145cb0: 3c63 6f64 653e 543c 2f63 6f64 653e 2e20 T. \n+00145cc0: 416c 6c20 6d65 6d6f 7279 206d 616e 6167 All memory manag\n+00145cd0: 6564 2062 7920 6120 636f 6e74 6578 7420 ed by a context \n+00145ce0: 6973 2064 6561 6c6c 6f63 6174 6564 2077 is deallocated w\n+00145cf0: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_de\n+00145db0: 7374 726f 793c 2f61 3e3c 2f63 6f64 653e stroy\n+00145dc0: 2074 6f20 6465 7374 726f 7920 6d61 6e61 to destroy mana\n+00145dd0: 6765 6420 432b 2b20 6f62 6a65 6374 7320 ged C++ objects \n+00145de0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and so\n+00145eb0: 6170 5f65 6e64 3c2f 613e 3c2f 636f 6465 ap_end to delete all \n+00145ed0: 6f74 6865 7220 6d61 6e61 6765 6420 6461 other managed da\n+00145ee0: 7461 2e20 5768 656e 2061 2063 6f6e 7465 ta. When a conte\n+00145ef0: 7874 2069 7320 6669 6e61 6c69 7a65 6420 xt is finalized \n+00145f00: 6f72 2066 7265 6564 2077 6974 6820 3c63 or freed with soap_don\n+00145fe0: 6528 7374 7275 6374 2073 6f61 702a 293c e(struct soap*)<\n+00145ff0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+00146000: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_free(s\n+001460b0: 7472 7563 7420 736f 6170 2a29 3c2f 613e truct soap*)\n+001460c0: 3c2f 636f 6465 3e20 7468 656e 206d 616e then man\n+001460d0: 6167 6564 206d 656d 6f72 7920 6973 206e aged memory is n\n+001460e0: 6f74 2072 656c 6561 7365 642c 2073 6f20 ot released, so \n+001460f0: 6974 2069 7320 696d 706f 7274 616e 7420 it is important \n+00146100: 746f 2063 616c 6c20 7468 6520 6465 616c to call the deal\n+00146110: 6c6f 6361 7469 6f6e 2066 756e 6374 696f location functio\n+00146120: 6e73 2066 6972 7374 2e20 5468 6973 2077 ns first. This w\n+00146130: 6173 2064 6f6e 6520 746f 2061 6c6c 6f77 as done to allow\n+00146140: 206d 616e 6167 6564 2064 6174 6120 746f managed data to\n+00146150: 206f 7574 6c69 7665 2074 6865 2063 6f6e outlive the con\n+00146160: 7465 7874 2c20 7375 6368 2061 7320 6465 text, such as de\n+00146170: 7365 7269 616c 697a 6564 206f 626a 6563 serialized objec\n+00146180: 7473 2c20 6275 7420 7468 6973 2069 7320 ts, but this is \n+00146190: 7261 7265 6c79 2069 6620 6576 6572 2075 rarely if ever u\n+001461a0: 7365 6420 6265 6361 7573 6520 6465 6c65 sed because dele\n+001461b0: 7469 6e67 2074 6865 206f 7574 6c69 7665 ting the outlive\n+001461c0: 6420 6461 7461 2065 7870 6c69 6369 746c d data explicitl\n+001461d0: 7920 6973 2070 726f 6e65 2074 6f20 6d69 y is prone to mi\n+001461e0: 7374 616b 6573 2e3c 2f70 3e0a 3c70 3e49 stakes.

    .

    I\n+001461f0: 6620 796f 7520 7761 6e74 2074 6f20 6c65 f you want to le\n+00146200: 7420 6465 7365 7269 616c 697a 6564 2064 t deserialized d\n+00146210: 6174 6120 6f75 746c 6976 6520 6120 3c63 ata outlive a \n+00146270: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+00146280: 636f 6e74 6578 7420 7468 6174 2079 6f75 context that you\n+00146290: 2061 7265 2061 626f 7574 2074 6f20 6672 are about to fr\n+001462a0: 6565 2c20 7468 656e 2079 6f75 2063 616e ee, then you can\n+001462b0: 2064 656c 6567 6174 6520 6d61 6e61 6765 delegate manage\n+001462c0: 6d65 6e74 206f 6620 7468 6520 6461 7461 ment of the data\n+001462d0: 2074 6f20 616e 6f74 6865 7220 3c63 6f64 to another so\n+00146330: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n+00146340: 6e74 6578 7420 7769 7468 203c 636f 6465 ntext with soap_delega\n+00146420: 7465 5f64 656c 6574 696f 6e28 7374 7275 te_deletion(stru\n+00146430: 6374 2073 6f61 7020 2a73 6f61 705f 6672 ct soap *soap_fr\n+00146440: 6f6d 2c20 7374 7275 6374 2073 6f61 7020 om, struct soap \n+00146450: 2a73 6f61 705f 746f 293c 2f61 3e3c 2f63 *soap_to). This moves\n+00146470: 2061 6c6c 2064 6573 6572 6961 6c69 7a65 all deserialize\n+00146480: 6420 616e 6420 7465 6d70 6f72 6172 7920 d and temporary \n+00146490: 6461 7461 2074 6f20 7468 6520 6f74 6865 data to the othe\n+001464a0: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap context soap_to\n+00146520: 2c20 7768 6963 6820 7769 6c6c 2064 656c , which will del\n+00146530: 6574 6520 6974 7320 6461 7461 2061 6e64 ete its data and\n+00146540: 2061 6c6c 2074 6865 2064 656c 6567 6174 all the delegat\n+00146550: 6564 2064 6174 6120 6974 2069 7320 7265 ed data it is re\n+00146560: 7370 6f6e 7369 626c 6520 666f 7220 7768 sponsible for wh\n+00146570: 656e 2079 6f75 2063 616c 6c20 3c63 6f64 en you call soap_destroy and soap_end<\n+00146720: 2f61 3e3c 2f63 6f64 653e 2e20 5468 6973 /a>. This\n+00146730: 2063 616e 2062 6520 7061 7274 6963 756c can be particul\n+00146740: 6172 6c79 2075 7365 6675 6c20 666f 7220 arly useful for \n+00146750: 6d61 6b69 6e67 2063 6c69 656e 7420 6361 making client ca\n+00146760: 6c6c 7320 696e 7369 6465 2061 2073 6572 lls inside a ser\n+00146770: 7665 7220 6f70 6572 6174 696f 6e2c 2069 ver operation, i\n+00146780: 2e65 2e20 6120 6d69 7865 6420 7365 7276 .e. a mixed serv\n+00146790: 6572 2061 6e64 2063 6c69 656e 742e 2054 er and client. T\n+001467a0: 6865 2063 6c69 656e 7420 6361 6c6c 2069 he client call i\n+001467b0: 6e73 6964 6520 7468 6520 7365 7276 6572 nside the server\n+001467c0: 206f 7065 7261 7469 6f6e 2072 6571 7569 operation requi\n+001467d0: 7265 7320 6120 6e65 7720 3c63 6f64 653e res a new \n+001467e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+00146830: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n+00146840: 6578 742c 2065 2e67 2e20 636f 7069 6564 ext, e.g. copied\n+00146850: 2066 726f 6d20 7468 6520 7365 7276 6572 from the server\n+00146860: 2773 2077 6974 6820 3c63 6f64 653e 3c61 's with soap_co\n+00146920: 7079 3c2f 613e 3c2f 636f 6465 3e2e 2042 py. B\n+00146930: 6566 6f72 6520 6465 7374 726f 7969 6e67 efore destroying\n+00146940: 2074 6865 2063 6c69 656e 7420 636f 6e74 the client cont\n+00146950: 6578 7420 7769 7468 203c 636f 6465 3e3c ext with <\n+00146960: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00146970: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00146980: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+00146990: 3537 3130 3863 6134 3638 3131 3836 6535 57108ca4681186e5\n+001469a0: 3862 3562 3138 3963 3335 3238 6631 3061 8b5b189c3528f10a\n+001469b0: 2220 7469 746c 653d 2246 696e 616c 697a \" title=\"Finaliz\n+001469c0: 6520 616e 6420 6672 6565 2074 6865 2067 e and free the g\n+001469d0: 6976 656e 2073 6f61 7020 636f 6e74 6578 iven soap contex\n+001469e0: 7420 6672 6f6d 2075 6e6d 616e 6167 6564 t from unmanaged\n+001469f0: 2068 6561 7020 6d65 6d6f 7279 2e22 3e73 heap memory.\">s\n+00146a00: 6f61 705f 6672 6565 3c2f 613e 3c2f 636f oap_free, the data ca\n+00146a20: 6e20 6265 2064 656c 6567 6174 6564 2074 n be delegated t\n+00146a30: 6f20 7468 6520 7365 7276 6572 2773 2063 o the server's c\n+00146a40: 6f6e 7465 7874 2077 6974 6820 3c63 6f64 ontext with soap_deleg\n+00146b20: 6174 655f 6465 6c65 7469 6f6e 3c2f 613e ate_deletion\n+00146b30: 3c2f 636f 6465 3e2e 2053 6565 2066 6f72 . See for\n+00146b40: 2065 7861 6d70 6c65 203c 656d 3e3c 636f example gsoap/samples\n+00146b60: 2f6d 6173 6875 702f 6d61 7368 7570 7365 /mashup/mashupse\n+00146b70: 7276 6572 2e63 3c2f 636f 6465 3e3c 2f65 rver.c in the gSOAP \n+00146b90: 736f 7572 6365 2063 6f64 6520 7061 636b source code pack\n+00146ba0: 6167 652e 3c2f 703e 0a3c 703e 5468 6520 age.

    .

    The \n+00146bb0: 6675 6e63 7469 6f6e 7320 7265 6c61 7465 functions relate\n+00146bc0: 6420 746f 206d 656d 6f72 7920 6d61 6e61 d to memory mana\n+00146bd0: 6765 6d65 6e74 2062 7920 7468 6520 636f gement by the co\n+00146be0: 6e74 6578 7420 6172 653a 3c2f 703e 0a3c ntext are:

    .<\n+00146bf0: 756c 3e0a 3c6c 693e 3c63 6f64 653e 766f ul>.
  • vo\n+00146c00: 6964 202a 203c 6120 636c 6173 733d 2265 id * soap_mall\n+00146cb0: 6f63 2873 7472 7563 7420 736f 6170 202a oc(struct soap *\n+00146cc0: 736f 6170 2c20 7369 7a65 5f74 206e 293c soap, size_t n)<\n+00146cd0: 2f61 3e3c 2f63 6f64 653e 2072 6574 7572 /a> retur\n+00146ce0: 6e20 706f 696e 7465 7220 746f 203c 636f n pointer to n byte\n+00146d00: 7320 6f66 206d 616e 6167 6564 206d 656d s of managed mem\n+00146d10: 6f72 792e 3c2f 6c69 3e0a 3c6c 693e 3c63 ory.
  • .
  • char * soap_strd\n+00146db0: 7570 2873 7472 7563 7420 736f 6170 202a up(struct soap *\n+00146dc0: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+00146dd0: 202a 7329 3c2f 613e 3c2f 636f 6465 3e20 *s) \n+00146de0: 7265 7475 726e 2070 6f69 6e74 6572 2074 return pointer t\n+00146df0: 6f20 6475 706c 6963 6174 6520 6f66 2073 o duplicate of s\n+00146e00: 7472 696e 6720 3c63 6f64 653e 733c 2f63 tring s in managed \n+00146e20: 6d65 6d6f 7279 2e3c 2f6c 693e 0a3c 6c69 memory.
  • .char * s\n+00146ec0: 6f61 705f 7773 7472 6475 7028 7374 7275 oap_wstrdup(stru\n+00146ed0: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+00146ee0: 6f6e 7374 2077 6368 6172 5f74 202a 7329 onst wchar_t *s)\n+00146ef0: 3c2f 613e 3c2f 636f 6465 3e20 7265 7475 retu\n+00146f00: 726e 2070 6f69 6e74 6572 2074 6f20 6475 rn pointer to du\n+00146f10: 706c 6963 6174 6520 6f66 2073 7472 696e plicate of strin\n+00146f20: 6720 3c63 6f64 653e 733c 2f63 6f64 653e g s\n+00146f30: 2069 6e20 6d61 6e61 6765 6420 6d65 6d6f in managed memo\n+00146f40: 7279 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f ry..
  • T * soap_new_\n+00146f60: 5428 7374 7275 6374 2073 6f61 7020 2a73 T(struct soap *s\n+00146f70: 6f61 7029 3c2f 636f 6465 3e20 616c 6c6f oap) allo\n+00146f80: 6361 7465 7320 616e 6420 6465 6661 756c cates and defaul\n+00146f90: 742d 696e 6974 6961 6c69 7a65 7320 6461 t-initializes da\n+00146fa0: 7461 206f 6620 7479 7065 203c 636f 6465 ta of type T, C++ o\n+00146fc0: 6e6c 792e 3c2f 6c69 3e0a 3c6c 693e 3c63 nly.
  • .
  • T * soap_new\n+00146fe0: 5f54 2873 7472 7563 7420 736f 6170 202a _T(struct soap *\n+00146ff0: 736f 6170 2c20 696e 7420 6e29 3c2f 636f soap, int n) allocates an\n+00147010: 6420 6465 6661 756c 742d 696e 6974 6961 d default-initia\n+00147020: 6c69 7a65 7320 616e 6420 6172 7261 7920 lizes and array \n+00147030: 6f66 2074 7970 6520 3c63 6f64 653e 543c of type T<\n+00147040: 2f63 6f64 653e 2c20 7768 6572 6520 3c63 /code>, where n = -\n+00147060: 3120 616c 6c6f 6361 7465 7320 6120 7369 1 allocates a si\n+00147070: 6e67 6c65 206e 6f6e 2d61 7272 6179 2076 ngle non-array v\n+00147080: 616c 7565 2e3c 2f6c 693e 0a3c 6c69 3e3c alue.
  • .
  • <\n+00147090: 636f 6465 3e54 202a 2073 6f61 705f 6e65 code>T * soap_ne\n+001470a0: 775f 7365 745f 5428 7374 7275 6374 2073 w_set_T(struct s\n+001470b0: 6f61 7020 2a73 6f61 702c 206d 312c 202e oap *soap, m1, .\n+001470c0: 2e2e 2c20 6d6e 293c 2f63 6f64 653e 2061 .., mn) a\n+001470d0: 6c6c 6f63 6174 6573 2061 2073 7472 7563 llocates a struc\n+001470e0: 7420 6f72 2063 6c61 7373 203c 636f 6465 t or class T and in\n+00147100: 6974 6961 6c69 7a65 7320 6974 7320 6d65 itializes its me\n+00147110: 6d62 6572 7320 7769 7468 2074 6865 2076 mbers with the v\n+00147120: 616c 7565 7320 3c63 6f64 653e 6d31 3c2f alues m1 to m\n+00147140: 6e3c 2f63 6f64 653e 2e3c 2f6c 693e 0a3c n.
  • .<\n+00147150: 6c69 3e3c 636f 6465 3e54 202a 2073 6f61 li>T * soa\n+00147160: 705f 6e65 775f 7265 715f 5428 7374 7275 p_new_req_T(stru\n+00147170: 6374 2073 6f61 7020 2a73 6f61 702c 206d ct soap *soap, m\n+00147180: 312c 202e 2e2e 2c20 6d6e 293c 2f63 6f64 1, ..., mn) allocates a s\n+001471a0: 7472 7563 7420 6f72 2063 6c61 7373 203c truct or class <\n+001471b0: 636f 6465 3e54 3c2f 636f 6465 3e20 616e code>T an\n+001471c0: 6420 696e 6974 6961 6c69 7a65 7320 6974 d initializes it\n+001471d0: 7320 7265 7175 6972 6564 206d 656d 6265 s required membe\n+001471e0: 7273 2077 6974 6820 7468 6520 7661 6c75 rs with the valu\n+001471f0: 6573 203c 636f 6465 3e6d 313c 2f63 6f64 es m1 to mn, required \n+00147220: 6d65 616e 7320 6e6f 6e2d 6f70 7469 6f6e means non-option\n+00147230: 616c 206d 656d 6265 7220 6173 2072 6571 al member as req\n+00147240: 7569 7265 6420 6279 2058 4d4c 2076 616c uired by XML val\n+00147250: 6964 6174 696f 6e20 7768 656e 2074 6869 idation when thi\n+00147260: 7320 6461 7461 2069 7320 7365 7269 616c s data is serial\n+00147270: 697a 6564 2069 6e20 584d 4c2e 3c2f 6c69 ized in XML..
  • void\n+00147290: 203c 6120 636c 6173 733d 2265 6c22 2068 \n+00147340: 736f 6170 5f64 6573 7472 6f79 2873 7472 soap_destroy(str\n+00147350: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+00147360: 2f61 3e3c 2f63 6f64 653e 2064 656c 6574 /a> delet\n+00147370: 6573 2061 6c6c 2063 6f6e 7465 7874 2d6d es all context-m\n+00147380: 616e 6167 6564 2043 2b2b 206f 626a 6563 anaged C++ objec\n+00147390: 7473 2061 6e64 206d 7573 7420 6265 2063 ts and must be c\n+001473a0: 616c 6c65 6420 6265 666f 7265 203c 636f alled before soap_end<\n+00147480: 2f61 3e3c 2f63 6f64 653e 2e3c 2f6c 693e /a>.
  • \n+00147490: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
  • void \n+001474a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_end(str\n+00147570: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+00147580: 2f61 3e3c 2f63 6f64 653e 2064 656c 6574 /a> delet\n+00147590: 6573 2074 656d 706f 7261 7279 2064 6174 es temporary dat\n+001475a0: 6120 616e 6420 616c 6c20 6465 7365 7269 a and all deseri\n+001475b0: 616c 697a 6564 2064 6174 6120 6578 6365 alized data exce\n+001475c0: 7074 2043 2b2b 206f 626a 6563 7473 2c20 pt C++ objects, \n+001475d0: 7365 6520 6162 6f76 652e 3c2f 6c69 3e0a see above.
  • .\n+001475e0: 3c6c 693e 3c63 6f64 653e 766f 6964 203c
  • void <\n+001475f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00147600: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00147610: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+00147620: 6365 3136 3233 3962 3437 6164 6363 6639 ce16239b47adccf9\n+00147630: 6534 6463 3330 3763 6562 6536 6133 3233 e4dc307cebe6a323\n+00147640: 2220 7469 746c 653d 2244 656c 6574 6520 \" title=\"Delete \n+00147650: 7465 6d70 6f72 6172 7920 6461 7461 2e22 temporary data.\"\n+00147660: 3e73 6f61 705f 6672 6565 5f74 656d 7028 >soap_free_temp(\n+00147670: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00147680: 7029 3c2f 613e 3c2f 636f 6465 3e20 6465 p) de\n+00147690: 6c65 7465 7320 7465 6d70 6f72 6172 7920 letes temporary \n+001476a0: 6461 7461 2062 7574 206c 6561 7665 7320 data but leaves \n+001476b0: 6465 7365 7269 616c 697a 6564 2063 6f6e deserialized con\n+001476c0: 7465 7874 2d6d 616e 6167 6564 2064 6174 text-managed dat\n+001476d0: 6120 696e 7461 6374 2e3c 2f6c 693e 0a3c a intact.
  • .<\n+001476e0: 6c69 3e3c 636f 6465 3e76 6f69 6420 3c61 li>void soap_dealloc(s\n+001477c0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+001477d0: 2c20 766f 6964 202a 7029 3c2f 613e 3c2f , void *p) deallocate\n+001477f0: 7320 636f 6e74 6578 742d 6d61 6e61 6765 s context-manage\n+00147800: 6420 6f62 6a65 6374 7320 6f72 2064 6174 d objects or dat\n+00147810: 6120 6174 206c 6f63 6174 696f 6e20 3c63 a at location p in \n+00147830: 6d65 6d6f 7279 2e3c 2f6c 693e 0a3c 6c69 memory..int s\n+00147910: 6f61 705f 756e 6c69 6e6b 2873 7472 7563 oap_unlink(struc\n+00147920: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n+00147930: 6e73 7420 766f 6964 202a 7029 3c2f 613e nst void *p)\n+00147940: 3c2f 636f 6465 3e20 756e 6c69 6e6b 206f unlink o\n+00147950: 626a 6563 7420 6f72 2064 6174 6120 6174 bject or data at\n+00147960: 206c 6f63 6174 696f 6e20 3c63 6f64 653e location \n+00147970: 703c 2f63 6f64 653e 2066 726f 6d20 6d61 p from ma\n+00147980: 6e61 6765 6d65 6e74 2062 7920 7468 6520 nagement by the \n+00147990: 636f 6e74 6578 742c 2074 6869 7320 6f62 context, this ob\n+001479a0: 6a65 6374 206f 7220 6461 7461 206d 7573 ject or data mus\n+001479b0: 7420 6265 2064 6561 6c6c 6f63 6174 6564 t be deallocated\n+001479c0: 2062 7920 7468 6520 7573 6572 2e3c 2f6c by the user..
  • voi\n+001479e0: 6420 3c61 2063 6c61 7373 3d22 656c 2220 d soap_done(\n+00147ab0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00147ac0: 7029 3c2f 613e 3c2f 636f 6465 3e20 6669 p) fi\n+00147ad0: 6e61 6c69 7a65 7320 7468 6520 636f 6e74 nalizes the cont\n+00147ae0: 6578 7420 6275 7420 646f 6573 206e 6f74 ext but does not\n+00147af0: 2064 656c 6574 6520 616e 7920 6d61 6e61 delete any mana\n+00147b00: 6765 6420 6f62 6a65 6374 7320 6f72 2064 ged objects or d\n+00147b10: 6174 612e 3c2f 6c69 3e0a 3c6c 693e 3c63 ata.
  • .
  • void soap_fr\n+00147bd0: 6565 2873 7472 7563 7420 736f 6170 202a ee(struct soap *\n+00147be0: 736f 6170 293c 2f61 3e3c 2f63 6f64 653e soap)\n+00147bf0: 2066 696e 616c 697a 6573 2061 6e64 2066 finalizes and f\n+00147c00: 7265 6573 2074 6865 2063 6f6e 7465 7874 rees the context\n+00147c10: 2028 636f 6e74 6578 7473 2061 6c6c 6f63 (contexts alloc\n+00147c20: 6174 6564 2077 6974 6820 3c63 6f64 653e ated with \n+00147c30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_new<\n+00147cc0: 2f61 3e3c 2f63 6f64 653e 206f 7220 3c63 /a> or s\n+00147d80: 6f61 705f 636f 7079 3c2f 613e 3c2f 636f oap_copy) but does no\n+00147da0: 7420 6465 6c65 7465 2061 6e79 206d 616e t delete any man\n+00147db0: 6167 6564 206f 626a 6563 7473 206f 7220 aged objects or \n+00147dc0: 6461 7461 2e3c 2f6c 693e 0a3c 6c69 3e3c data.
  • .
  • <\n+00147dd0: 636f 6465 3e76 6f69 6420 3c61 2063 6c61 code>void so\n+00147ea0: 6170 5f64 656c 6567 6174 655f 6465 6c65 ap_delegate_dele\n+00147eb0: 7469 6f6e 2873 7472 7563 7420 736f 6170 tion(struct soap\n+00147ec0: 202a 736f 6170 5f66 726f 6d2c 2073 7472 *soap_from, str\n+00147ed0: 7563 7420 736f 6170 202a 736f 6170 5f74 uct soap *soap_t\n+00147ee0: 6f29 3c2f 613e 3c2f 636f 6465 3e20 6d6f o) mo\n+00147ef0: 7665 7320 616c 6c20 432b 2b20 6f62 6a65 ves all C++ obje\n+00147f00: 6374 732c 2064 6174 612c 2061 6e64 2074 cts, data, and t\n+00147f10: 656d 706f 7261 7279 2064 6174 6120 6d61 emporary data ma\n+00147f20: 6e61 6765 6420 6279 2074 6865 203c 636f naged by the soap_from context to a\n+00147f50: 6e6f 7468 6572 2063 6f6e 7465 7874 203c nother context <\n+00147f60: 636f 6465 3e73 6f61 705f 746f 3c2f 636f code>soap_to, which manag\n+00147f80: 6573 2074 6865 2064 6174 6120 756e 7469 es the data unti\n+00147f90: 6c20 6465 6c65 7465 6420 7769 7468 203c l deleted with <\n+00147fa0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_destroy\n+00148060: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+00148070: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_e\n+00148140: 6e64 3c2f 613e 3c2f 636f 6465 3e2e 3c2f nd...

    To \n+00148160: 6865 6c70 2075 6e64 6572 7374 616e 6420 help understand \n+00148170: 7468 6520 6469 6666 6572 656e 6365 7320 the differences \n+00148180: 6265 7477 6565 6e20 6d61 6e61 6765 6420 between managed \n+00148190: 6f62 6a65 6374 732c 206d 616e 6167 6564 objects, managed\n+001481a0: 2064 6174 612c 2061 6e64 206d 616e 6167 data, and manag\n+001481b0: 6564 2074 656d 706f 7261 7279 2064 6174 ed temporary dat\n+001481c0: 613a 2074 656d 706f 7261 7279 2064 6174 a: temporary dat\n+001481d0: 6120 6973 2063 7265 6174 6564 2062 7920 a is created by \n+001481e0: 7468 6520 656e 6769 6e65 2074 6f20 6b65 the engine to ke\n+001481f0: 6570 2074 7261 636b 206f 6620 7468 696e ep track of thin\n+00148200: 6773 2c20 7375 6368 2061 7320 6861 7368 gs, such as hash\n+00148210: 2074 6162 6c65 7320 746f 206b 6565 7020 tables to keep \n+00148220: 706f 696e 7465 7220 7265 6665 7265 6e63 pointer referenc\n+00148230: 6520 696e 666f 726d 6174 696f 6e20 666f e information fo\n+00148240: 7220 7365 7269 616c 697a 6174 696f 6e20 r serialization \n+00148250: 616e 6420 6861 7368 2074 6162 6c65 7320 and hash tables \n+00148260: 746f 206b 6565 7020 584d 4c20 6964 2f68 to keep XML id/h\n+00148270: 7265 6620 696e 666f 726d 6174 696f 6e20 ref information \n+00148280: 666f 7220 6d75 6c74 692d 7265 6665 7265 for multi-refere\n+00148290: 6e63 6520 6f62 6a65 6374 2064 6573 6572 nce object deser\n+001482a0: 6961 6c69 7a61 7469 6f6e 2e20 4465 7365 ialization. Dese\n+001482b0: 7269 616c 697a 6564 2064 6174 6120 6973 rialized data is\n+001482c0: 2061 6c6c 6f63 6174 6564 2062 7920 7468 allocated by th\n+001482d0: 6520 636f 6e74 6578 7420 696e 206d 616e e context in man\n+001482e0: 6167 6564 206d 656d 6f72 7920 7768 656e aged memory when\n+001482f0: 2063 6f6e 7374 7275 6374 696e 6720 6461 constructing da\n+00148300: 7461 2073 7472 7563 7475 7265 7320 6279 ta structures by\n+00148310: 2064 6573 6572 6961 6c69 7a69 6e67 2058 deserializing X\n+00148320: 4d4c 2061 6e64 204a 534f 4e20 6d65 7373 ML and JSON mess\n+00148330: 6167 6573 2e20 4461 7461 2069 7320 7374 ages. Data is st\n+00148340: 6f72 6564 2069 6e20 6d65 6d6f 7279 206d ored in memory m\n+00148350: 616e 6167 6564 2062 7920 7468 6520 636f anaged by the co\n+00148360: 6e74 6578 7420 7573 696e 6720 6361 6c6c ntext using call\n+00148370: 7320 746f 203c 636f 6465 3e3c 6120 636c s to soa\n+00148420: 705f 6d61 6c6c 6f63 3c2f 613e 3c2f 636f p_malloc to allocate \n+00148440: 6865 6170 2073 7061 6365 2077 6974 6820 heap space with \n+00148450: 3c63 6f64 653e 6d61 6c6c 6f63 3c2f 636f malloc. A tiny bit \n+00148470: 6d6f 7265 2073 7061 6365 2069 7320 616c more space is al\n+00148480: 6c6f 6361 7465 6420 746f 206b 6565 7020 located to keep \n+00148490: 7472 6163 6b20 6f66 2074 6865 2061 6c6c track of the all\n+001484a0: 6f63 6174 696f 6e73 2061 6e64 2074 6f20 ocations and to \n+001484b0: 6164 6420 6120 2263 616e 6172 7922 2077 add a \"canary\" w\n+001484c0: 6f72 6420 746f 2064 6574 6563 7420 6865 ord to detect he\n+001484d0: 6170 206d 656d 6f72 7920 6f76 6572 666c ap memory overfl\n+001484e0: 6f77 732e 2048 6561 7020 6d65 6d6f 7279 ows. Heap memory\n+001484f0: 206f 7665 7266 6c6f 7773 2061 7265 2064 overflows are d\n+00148500: 6574 6563 7465 6420 7768 656e 2063 6f6e etected when con\n+00148510: 7465 7874 2d6d 616e 6167 6564 2064 6174 text-managed dat\n+00148520: 6120 6973 2064 6561 6c6c 6f63 6174 6564 a is deallocated\n+00148530: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with \n+00148600: 736f 6170 5f65 6e64 3c2f 613e 3c2f 636f soap_end. C++ objects\n+00148620: 2061 7265 2061 6c6c 6f63 6174 6564 2077 are allocated w\n+00148630: 6974 6820 3c63 6f64 653e 6e65 773c 2f63 ith new instead of \n+00148650: 3c63 6f64 653e 6d61 6c6c 6f63 3c2f 636f malloc and are trac\n+00148670: 6b65 6420 6173 2077 656c 6c2e 2054 6865 ked as well. The\n+00148680: 7365 206f 626a 6563 7473 2061 7265 2064 se objects are d\n+00148690: 6561 6c6c 6f63 6174 6564 2077 6974 6820 eallocated with \n+001486a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_destro\n+00148760: 793c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 y..

    When the gS\n+00148780: 4f41 5020 6170 706c 6963 6174 696f 6e20 OAP application \n+00148790: 6973 2063 6f6d 7069 6c65 6420 7769 7468 is compiled with\n+001487a0: 203c 623e 3c63 6f64 653e 2d44 4445 4255 -DDEBU\n+001487b0: 473c 2f63 6f64 653e 3c2f 623e 2075 7369 G usi\n+001487c0: 6e67 2074 6865 2063 6f6d 7069 6c65 2d74 ng the compile-t\n+001487d0: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n+001487e0: 4445 4255 473c 2f63 6f64 653e 2c20 7468 DEBUG, th\n+001487f0: 6520 656e 6769 6e65 2072 6570 6f72 7473 e engine reports\n+00148800: 206d 656d 6f72 7920 6c65 616b 7320 7768 memory leaks wh\n+00148810: 6963 6820 6172 6520 6465 7465 6374 6564 ich are detected\n+00148820: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by so\n+001488f0: 6170 5f64 6f6e 653c 2f61 3e3c 2f63 6f64 ap_done and soa\n+001489b0: 705f 6672 6565 3c2f 613e 3c2f 636f 6465 p_free. To improve th\n+001489d0: 6520 6163 6375 7261 6379 206f 6620 6465 e accuracy of de\n+001489e0: 7465 6374 696f 6e2c 206e 6f20 6d65 6d6f tection, no memo\n+001489f0: 7279 2069 7320 6163 7475 616c 6c79 2066 ry is actually f\n+00148a00: 7265 6564 2075 6e74 696c 203c 636f 6465 reed until soap_done or soap_free\n+00148ba0: 3c2f 636f 6465 3e20 6172 6520 6361 6c6c are call\n+00148bb0: 6564 2074 6f20 6465 7465 6374 206d 656d ed to detect mem\n+00148bc0: 6f72 7920 6973 7375 6573 2c20 736f 2061 ory issues, so a\n+00148bd0: 6e79 2063 616c 6c73 2074 6f20 3c63 6f64 ny calls to soap_destroy and soap_end<\n+00148d80: 2f61 3e3c 2f63 6f64 653e 2061 7265 2061 /a> are a\n+00148d90: 6374 7561 6c6c 7920 6465 6665 7272 6564 ctually deferred\n+00148da0: 2074 6f20 6265 2065 7865 6375 7465 6420 to be executed \n+00148db0: 7768 656e 2074 6865 2063 6f6e 7465 7874 when the context\n+00148dc0: 2066 696e 616c 697a 6573 2e3c 2f70 3e0a finalizes.

    .\n+00148dd0: 3c70 3e57 6869 6c65 206d 656d 6f72 7920

    While memory \n+00148de0: 6d61 6e61 6765 6d65 6e74 2069 6e20 6753 management in gS\n+00148df0: 4f41 5020 6973 2061 7574 6f6d 6174 6963 OAP is automatic\n+00148e00: 2c20 6974 2064 6f65 7320 6e6f 7420 656e , it does not en\n+00148e10: 666f 7263 6520 6974 7320 6f77 6e20 6d65 force its own me\n+00148e20: 6d6f 7279 206d 616e 6167 656d 656e 7420 mory management \n+00148e30: 706f 6c69 6379 206f 6e20 7468 6520 7573 policy on the us\n+00148e40: 6572 2e20 546f 206d 6f76 6520 6d61 6e61 er. To move mana\n+00148e50: 6765 6420 6f62 6a65 6374 7320 616e 6420 ged objects and \n+00148e60: 6461 7461 2069 6e74 6f20 756e 6d61 6e61 data into unmana\n+00148e70: 6765 6420 6865 6170 2073 7061 6365 2c20 ged heap space, \n+00148e80: 7468 6520 3c63 6f64 653e 736f 6170 5f64 the soap_d\n+00148e90: 7570 5f54 3c2f 636f 6465 3e20 6465 6570 up_T deep\n+00148ea0: 2063 6f70 7920 6675 6e63 7469 6f6e 7320 copy functions \n+00148eb0: 6765 6e65 7261 7465 6420 6279 203c 623e generated by \n+00148ec0: 3c63 6f64 653e 736f 6170 6370 7032 202d soapcpp2 -\n+00148ed0: 4563 3c2f 636f 6465 3e3c 2f62 3e20 6f70 Ec op\n+00148ee0: 7469 6f6e 203c 623e 3c63 6f64 653e 2d45 tion -E\n+00148ef0: 633c 2f63 6f64 653e 3c2f 623e 2063 616e c can\n+00148f00: 2062 6520 7573 6564 2e20 546f 2064 656c be used. To del\n+00148f10: 6574 6520 6465 6570 2063 6f70 6965 732c ete deep copies,\n+00148f20: 2074 6865 203c 636f 6465 3e73 6f61 705f the soap_\n+00148f30: 6465 6c5f 543c 2f63 6f64 653e 2064 6565 del_T dee\n+00148f40: 7020 6465 6c65 7469 6f6e 2066 756e 6374 p deletion funct\n+00148f50: 696f 6e73 2067 656e 6572 6174 6564 2062 ions generated b\n+00148f60: 7920 3c62 3e3c 636f 6465 3e73 6f61 7063 y soapc\n+00148f70: 7070 3220 2d45 643c 2f63 6f64 653e 3c2f pp2 -Ed option -Ed can be used. A\n+00148fb0: 6674 6572 2063 6f70 7969 6e67 2074 6865 fter copying the\n+00148fc0: 2075 7375 616c 203c 636f 6465 3e3c 6120 usual soap\n+00149080: 5f64 6573 7472 6f79 3c2f 613e 3c2f 636f _destroy and soap_end functions \n+00149180: 7265 6d6f 7665 2074 6865 206d 616e 6167 remove the manag\n+00149190: 6564 206f 7269 6769 6e61 6c73 2e20 5365 ed originals. Se\n+001491a0: 6520 616c 736f 2053 6563 7469 6f6e 203c e also Section <\n+001491b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001491c0: 663d 2269 6e64 6578 2e68 746d 6c23 6465 f=\"index.html#de\n+001491d0: 6570 223e 4765 6e65 7261 7469 6e67 2064 ep\">Generating d\n+001491e0: 6565 7020 636f 7079 2061 6e64 2064 656c eep copy and del\n+001491f0: 6574 696f 6e20 6675 6e63 7469 6f6e 733c etion functions<\n+00149200: 2f61 3e2e 3c2f 703e 0a3c 703e 4675 7274 /a>.

    .

    Furt\n+00149210: 6865 726d 6f72 652c 2074 6865 206d 656d hermore, the mem\n+00149220: 6f72 7920 616c 6c6f 6361 7469 6f6e 2066 ory allocation f\n+00149230: 756e 6374 696f 6e73 203c 636f 6465 3e6d unctions m\n+00149240: 616c 6c6f 633c 2f63 6f64 653e 2061 6e64 alloc and\n+00149250: 203c 636f 6465 3e6e 6577 3c2f 636f 6465 new used by the en\n+00149270: 6769 6e65 2069 6e74 6572 6e61 6c6c 7920 gine internally \n+00149280: 6361 6e20 6265 2072 6570 6c61 6365 6420 can be replaced \n+00149290: 7769 7468 206f 7468 6572 2061 6c6c 6f63 with other alloc\n+001492a0: 6174 6f72 7320 6279 2064 6566 696e 696e ators by definin\n+001492b0: 6720 3c63 6f64 653e 534f 4150 5f4d 414c g SOAP_MAL\n+001492c0: 4c4f 433c 2f63 6f64 653e 2061 6e64 203c LOC and <\n+001492d0: 636f 6465 3e53 4f41 505f 4652 4545 3c2f code>SOAP_FREE to replace\n+001492f0: 203c 636f 6465 3e6d 616c 6c6f 633c 2f63 malloc and f\n+00149310: 7265 653c 2f63 6f64 653e 2c20 616e 6420 ree, and \n+00149320: 6465 6669 6e65 203c 636f 6465 3e53 4f41 define SOA\n+00149330: 505f 4e45 573c 2f63 6f64 653e 2c20 3c63 P_NEW, SOAP_NEW_ARR\n+00149350: 4159 3c2f 636f 6465 3e2c 203c 636f 6465 AY, SOAP_PLACEMENT_\n+00149370: 4e45 573c 2f63 6f64 653e 2c20 616e 6420 NEW, and \n+00149380: 3c63 6f64 653e 534f 4150 5f44 454c 4554 SOAP_DELET\n+00149390: 453c 2f63 6f64 653e 2c20 3c63 6f64 653e E, \n+001493a0: 534f 4150 5f44 454c 4554 455f 4152 5241 SOAP_DELETE_ARRA\n+001493b0: 593c 2f63 6f64 653e 2074 6f20 7265 706c Y to repl\n+001493c0: 6163 6520 3c63 6f64 653e 6e65 773c 2f63 ace new and d\n+001493e0: 656c 6574 653c 2f63 6f64 653e 2075 7365 elete use\n+001493f0: 6420 6279 2074 6865 2065 6e67 696e 6520 d by the engine \n+00149400: 746f 2061 6c6c 6f63 6174 6520 6d61 6e61 to allocate mana\n+00149410: 6765 6420 6d65 6d6f 7279 2e20 4f6e 6520 ged memory. One \n+00149420: 6361 6e20 666f 7220 6578 616d 706c 6520 can for example \n+00149430: 7573 6520 6120 6761 7262 6167 6520 636f use a garbage co\n+00149440: 6c6c 6563 746f 7220 7769 7468 2067 534f llector with gSO\n+00149450: 4150 2062 7920 6465 6669 6e69 6e67 2073 AP by defining s\n+00149460: 7569 7461 626c 6520 7265 706c 6163 656d uitable replacem\n+00149470: 656e 7473 2e3c 2f70 3e0a 3c70 3e4d 6f72 ents.

    .

    Mor\n+00149480: 6520 696e 666f 726d 6174 696f 6e20 6f6e e information on\n+00149490: 206d 656d 6f72 7920 6d61 6e61 6765 6d65 memory manageme\n+001494a0: 6e74 2063 616e 2062 6520 666f 756e 6420 nt can be found \n+001494b0: 696e 2074 6865 203c 6120 6872 6566 3d22 in the C and C++ XML\n+001494f0: 2044 6174 6120 4269 6e64 696e 6773 3c2f Data Bindings documentation\n+00149510: 2074 6861 7420 6861 7320 7365 7061 7261 that has separa\n+00149520: 7465 2073 6563 7469 6f6e 7320 6f6e 206d te sections on m\n+00149530: 656d 6f72 7920 6d61 6e61 6765 6d65 6e74 emory management\n+00149540: 2069 6e20 4320 616e 6420 696e 2043 2b2b in C and in C++\n+00149550: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n+00149590: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Intra-cl\n+001495c0: 6173 7320 6d65 6d6f 7279 206d 616e 6167 ass memory manag\n+001495d0: 656d 656e 743c 2f68 313e 0a3c 703e 5768 ement

    .

    Wh\n+001495e0: 656e 2061 2063 6c61 7373 203c 636f 6465 en a class T has a \n+00149600: 3c63 6f64 653e 7374 7275 6374 2073 6f61 struct soa\n+00149610: 7020 2a20 543a 3a73 6f61 703c 2f63 6f64 p * T::soap member declar\n+00149630: 6564 2069 6e20 616e 2069 6e74 6572 6661 ed in an interfa\n+00149640: 6365 2068 6561 6465 7220 6669 6c65 2066 ce header file f\n+00149650: 6f72 2073 6f61 7063 7070 322c 2074 6865 or soapcpp2, the\n+00149660: 6e20 7468 6973 206d 656d 6265 7220 7769 n this member wi\n+00149670: 6c6c 2062 6520 7365 7420 746f 2070 6f69 ll be set to poi\n+00149680: 6e74 2074 6f20 7468 6520 6375 7272 656e nt to the curren\n+00149690: 7420 636f 6e74 6578 7420 6279 2074 6865 t context by the\n+001496a0: 2064 6573 6572 6961 6c69 7a65 7273 2061 deserializers a\n+001496b0: 6e64 2062 7920 7468 6520 3c63 6f64 653e nd by the \n+001496c0: 736f 6170 5f64 6566 6175 6c74 3c2f 636f soap_default method of th\n+001496e0: 6520 636c 6173 7320 616e 6420 6279 2074 e class and by t\n+001496f0: 6865 203c 636f 6465 3e73 6f61 705f 6465 he soap_de\n+00149700: 6661 756c 745f 543c 2f63 6f64 653e 2061 fault_T a\n+00149710: 6e64 203c 636f 6465 3e73 6f61 705f 6e65 nd soap_ne\n+00149720: 775f 543c 2f63 6f64 653e 2066 756e 6374 w_T funct\n+00149730: 696f 6e73 2066 6f72 2074 6869 7320 636c ions for this cl\n+00149740: 6173 7320 6e61 6d65 6420 3c63 6f64 653e ass named \n+00149750: 543c 2f63 6f64 653e 2e20 5468 6973 2073 T. This s\n+00149760: 696d 706c 6966 6965 7320 6d65 6d6f 7279 implifies memory\n+00149770: 206d 616e 6167 656d 656e 7420 6279 2063 management by c\n+00149780: 6c61 7373 206d 6574 686f 6473 2074 6861 lass methods tha\n+00149790: 7420 616c 6c6f 6361 7465 2064 6174 6120 t allocate data \n+001497a0: 6173 736f 6369 6174 6564 2077 6974 6820 associated with \n+001497b0: 7468 6520 636c 6173 7320 696e 7374 616e the class instan\n+001497c0: 6365 2074 6861 7420 6d75 7374 2062 6520 ce that must be \n+001497d0: 6d61 6e61 6765 6420 6279 2074 6865 2063 managed by the c\n+001497e0: 6f6e 7465 7874 2e3c 2f70 3e0a 3c70 3e43 ontext.

    .

    C\n+001497f0: 6f6e 7369 6465 7220 666f 7220 6578 616d onsider for exam\n+00149800: 706c 6520 7468 6520 666f 6c6c 6f77 696e ple the followin\n+00149810: 6720 636c 6173 7320 6465 636c 6172 6174 g class declarat\n+00149820: 696f 6e3a 3c2f 703e 0a3c 6469 7620 636c ion:

    .
    <\n+00149840: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00149850: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >class Class
    \n+00149880: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { publi\n+001498b0: 633c 2f73 7061 6e3e 3a3c 2f64 6976 3e0a c:
    .\n+001498c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    Class();.
    ~Clas\n+00149900: 7328 293b 3c2f 6469 763e 0a3c 6469 7620 s();
    ..<\n+001499d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001499e0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n+00149a00: 6861 723c 2f73 7061 6e3e 202a 6e61 6d65 har *name\n+00149a10: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+00149a30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00149a40: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void setName(const \n+00149a80: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *s); .
    char *g\n+00149af0: 6574 4e61 6d65 2829 3b3c 2f64 6976 3e0a etName();
    .\n+00149b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

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

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

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

    .

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

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

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

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

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

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

    .

    .Debugging

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

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

    .

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

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

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

    .

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

    .

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

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

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

    .

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

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

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

    .

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

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

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

    .

    .Limitations.

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

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

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

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

    .

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

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

    .

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

    .

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

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

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

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

    .

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

    .

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

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

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

    .

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

    .

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

    .

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

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

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

    .\n-0014e5f0: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61 ..p\n-0014e650: 726f 7065 7274 7920 2020 3c2f 7468 3e3c roperty <\n-0014e660: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n-0014e670: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n-0014e680: 3e76 616c 7565 2020 2020 3c2f 7468 3e3c >value <\n-0014e690: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......\n-0014e880: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......\n-0014ead0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-0014eb10: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014eb20: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014eb30: 3e3c 636f 6465 3e6c 6974 6572 616c 3c2f >literal (default),\n-0014eb50: 203c 636f 6465 3e65 6e63 6f64 6564 3c2f encoded for SOAP e\n-0014eb70: 6e63 6f64 696e 672c 206f 7220 6120 6375 ncoding, or a cu\n-0014eb80: 7374 6f6d 2055 5249 2020 2020 3c2f 7464 stom URI .......<\n-0014ee10: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-0014ee20: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-0014ee30: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n-0014ee70: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-0014ef10: 636f 6465 3e74 7261 6e73 706f 7274 3c2f code>transport U\n-0014ef50: 5249 2064 6563 6c61 7261 7469 6f6e 206f RI declaration o\n-0014ef60: 6620 7468 6520 7472 616e 7370 6f72 742c f the transport,\n-0014ef70: 2075 7375 616c 6c79 203c 636f 6465 3e3c usually <\n-0014ef80: 6120 6872 6566 3d22 6874 7470 3a2f 2f73 a href=\"http://s\n-0014ef90: 6368 656d 6173 2e78 6d6c 736f 6170 2e6f chemas.xmlsoap.o\n-0014efa0: 7267 2f73 6f61 702f 6874 7470 223e 6874 rg/soap/http\">ht\n-0014efb0: 7470 3a2f 2f73 6368 656d 6173 2e78 6d6c tp://schemas.xml\n-0014efc0: 736f 6170 2e6f 7267 2f73 6f61 702f 6874 soap.org/soap/ht\n-0014efd0: 7470 3c2f 613e 3c2f 636f 6465 3e20 2020 tp \n-0014efe0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n-0014f030: 3c63 6f64 653e 6465 6669 6e69 7469 6f6e definition\n-0014f040: 733c 2f63 6f64 653e 2020 203c 2f74 643e s \n-0014f050: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-0014f100: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014f110: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014f120: 3e6e 616d 6520 6f66 2074 6865 2057 5344 >name of the WSD\n-0014f130: 4c20 6465 6669 6e69 7469 6f6e 732f 706f L definitions/po\n-0014f140: 7274 5479 7065 2f40 6e61 6d65 2028 5753 rtType/@name (WS\n-0014f150: 444c 322e 3020 696e 7465 7266 6163 652f DL2.0 interface/\n-0014f160: 406e 616d 6529 2020 2020 3c2f 7464 3e3c @name) <\n-0014f170: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....<\n-0014f290: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014f2a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014f2b0: 3e3c 636f 6465 3e69 6e74 6572 6661 6365 >interface\n-0014f2c0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-0014f2d0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014f2e0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014f2f0: 3e61 6e20 616c 6961 7320 666f 7220 7468 >an alias for th\n-0014f300: 6520 3c63 6f64 653e 7479 7065 3c2f 636f e type property (interface follows SOA\n-0014f340: 5020 312e 3220 6e61 6d69 6e67 2063 6f6e P 1.2 naming con\n-0014f350: 7665 6e74 696f 6e73 2920 2020 203c 2f74 ventions) ........

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

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

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

    .

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

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

    .
    na\n-0014e6e0: 6d65 3c2f 636f 6465 3e20 2020 3c2f 7464 me name of the s\n-0014e720: 6572 7669 6365 2c20 6f70 7469 6f6e 616c ervice, optional\n-0014e730: 6c79 2066 6f6c 6c6f 7765 6420 6279 2074 ly followed by t\n-0014e740: 6578 7420 6465 7363 7269 6269 6e67 2074 ext describing t\n-0014e750: 6865 2073 6572 7669 6365 2020 2020 3c2f he service
    namespace URI\n-0014e7f0: 206f 6620 7468 6520 5753 444c 2074 6172 of the WSDL tar\n-0014e800: 6765 744e 616d 6573 7061 6365 2020 2020 getNamespace \n-0014e810: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    documentatio\n-0014e870: 6e3c 2f63 6f64 653e 2020 203c 2f74 643e n text describin\n-0014e8b0: 6720 7468 6520 7365 7276 6963 6520 2873 g the service (s\n-0014e8c0: 6565 2061 6c73 6f20 7468 6520 3c63 6f64 ee also the name pr\n-0014e8e0: 6f70 6572 7479 292c 206d 756c 7469 706c operty), multipl\n-0014e8f0: 6520 7065 726d 6974 7465 6420 2020 203c e permitted <\n-0014e900: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    doc \n-0014e960: 203c 2f74 643e 3c74 6420 636c 6173 733d an alias\n-0014e990: 2066 6f72 2074 6865 203c 636f 6465 3e64 for the d\n-0014e9a0: 6f63 756d 656e 7461 7469 6f6e 3c2f 636f ocumentation property \n-0014e9c0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    style\n-0014ea20: 2020 203c 2f74 643e 3c74 6420 636c 6173 \n-0014ea50: 646f 6375 6d65 6e74 3c2f 636f 6465 3e20 document \n-0014ea60: 2864 6566 6175 6c74 2920 534f 4150 206d (default) SOAP m\n-0014ea70: 6573 7361 6769 6e67 2073 7479 6c65 206f essaging style o\n-0014ea80: 7220 3c63 6f64 653e 7270 633c 2f63 6f64 r rpc for SOAP RPC \n-0014eaa0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    encoding\n-0014eb00: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    \n-0014ebe0: 7072 6f74 6f63 6f6c 3c2f 636f 6465 3e20 protocol \n-0014ebf0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 specifi\n-0014ec20: 6573 2053 4f41 5020 6f72 2052 4553 542c es SOAP or REST,\n-0014ec30: 2073 6565 2062 656c 6f77 2020 2020 3c2f see below
    port \n-0014eca0: 203c 2f74 643e 3c74 6420 636c 6173 733d URL of t\n-0014ecd0: 6865 2073 6572 7669 6365 2065 6e64 706f he service endpo\n-0014ece0: 696e 742c 2075 7375 616c 6c79 2061 6e20 int, usually an \n-0014ecf0: 6874 7470 206f 7220 6874 7470 7320 6164 http or https ad\n-0014ed00: 6472 6573 732c 2074 6f20 7573 6520 696e dress, to use in\n-0014ed10: 2074 6865 2057 5344 4c20 6465 6669 6e69 the WSDL defini\n-0014ed20: 7469 6f6e 732f 7365 7276 6963 652f 706f tions/service/po\n-0014ed30: 7274 2f61 6464 7265 7373 2f40 6c6f 6361 rt/address/@loca\n-0014ed40: 7469 6f6e 2020 2020 3c2f 7464 3e3c 2f74 tion
    loca\n-0014eda0: 7469 6f6e 3c2f 636f 6465 3e20 2020 3c2f tion an alias fo\n-0014ede0: 7220 7468 6520 3c63 6f64 653e 706f 7274 r the port\n-0014edf0: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property\n-0014ee00: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    endpoin\n-0014ee60: 743c 2f63 6f64 653e 2020 203c 2f74 643e t an alias for t\n-0014eea0: 6865 203c 636f 6465 3e70 6f72 743c 2f63 he port property \n-0014eec0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    name of the WS\n-0014f080: 444c 2064 6566 696e 6974 696f 6e73 2f40 DL definitions/@\n-0014f090: 6e61 6d65 2020 2020 3c2f 7464 3e3c 2f74 name
    type\n-0014f0f0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    p\n-0014f1c0: 6f72 7454 7970 653c 2f63 6f64 653e 2020 ortType \n-0014f1d0: 203c 2f74 643e 3c74 6420 636c 6173 733d an alias\n-0014f200: 2066 6f72 2074 6865 203c 636f 6465 3e74 for the t\n-0014f210: 7970 653c 2f63 6f64 653e 2070 726f 7065 ype prope\n-0014f220: 7274 7920 283c 636f 6465 3e70 6f72 7454 rty (portT\n-0014f230: 7970 653c 2f63 6f64 653e 2066 6f6c 6c6f ype follo\n-0014f240: 7773 2053 4f41 5020 312e 3120 6e61 6d69 ws SOAP 1.1 nami\n-0014f250: 6e67 2063 6f6e 7665 6e74 696f 6e73 2920 ng conventions) \n-0014f260: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    binding\n-0014f3c0: 2020 203c 2f74 643e 3c74 6420 636c 6173 name o\n-0014f3f0: 6620 7468 6520 5753 444c 2064 6566 696e f the WSDL defin\n-0014f400: 6974 696f 6e73 2f62 696e 6469 6e67 2f40 itions/binding/@\n-0014f410: 6e61 6d65 2020 2020 3c2f 7464 3e3c 2f74 name
    port\n-0014f470: 4e61 6d65 3c2f 636f 6465 3e20 2020 3c2f Name name of the\n-0014f4b0: 2057 5344 4c20 6465 6669 6e69 7469 6f6e WSDL definition\n-0014f4c0: 732f 7365 7276 6963 652f 706f 7274 2f40 s/service/port/@\n-0014f4d0: 6e61 6d65 2020 2020 3c2f 7464 3e3c 2f74 name
    exe\n-0014f530: 6375 7461 626c 653c 2f63 6f64 653e 2020 cutable \n-0014f540: 203c 2f74 643e 3c74 6420 636c 6173 733d name of \n-0014f570: 7468 6520 2265 7865 6375 7461 626c 6522 the \"executable\"\n-0014f580: 2074 6f20 7573 6520 696e 2074 6865 2057 to use in the W\n-0014f590: 5344 4c20 6465 6669 6e69 7469 6f6e 732f SDL definitions/\n-0014f5a0: 7365 7276 6963 652f 706f 7274 2f61 6464 service/port/add\n-0014f5b0: 7265 7373 2f40 6c6f 6361 7469 6f6e 2020 ress/@location \n-0014f5c0: 203c 2f74 643e 3c2f 7472 3e0a 3c2f 7461
    ....<\n-0014f9a0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.....\n-0014fb30: 3c74 7220 636c 6173 733d 226d 6172 6b64 .....o\n-0014fd20: 6e65 2d77 6179 2053 4f41 5020 312e 3220 ne-way SOAP 1.2 \n-0014fd30: 7769 7468 2048 5454 5020 4745 5420 2020 with HTTP GET \n-0014fd40: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-0014fd90: 636f 6465 3e48 5454 503c 2f63 6f64 653e code>HTTP\n-0014fda0: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....\n-0014ff10: 3c63 6f64 653e 4745 543c 2f63 6f64 653e GET\n-0014ff20: 2020 203c 2f74 643e 3c74 6420 636c 6173 ..<\n-0014ffa0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0014ffb0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0014ffc0: 3e3c 636f 6465 3e50 5554 3c2f 636f 6465 >PUT ..<\n-00150050: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00150060: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00150070: 3e3c 636f 6465 3e44 454c 4554 453c 2f63 >DELETE .
    protocol v\n-0014f8a0: 616c 7565 2020 203c 2f74 683e 3c74 6820 alue de\n-0014f8d0: 7363 7269 7074 696f 6e20 2020 203c 2f74 scription
    SOAP <\n-0014f940: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>SOAP trans\n-0014f970: 706f 7274 2c20 7375 7070 6f72 7469 6e67 port, supporting\n-0014f980: 2062 6f74 6820 534f 4150 2031 2e31 2061 both SOAP 1.1 a\n-0014f990: 6e64 2031 2e32 2020 2020 3c2f 7464 3e3c nd 1.2
    S\n-0014f9f0: 4f41 5031 2e31 3c2f 636f 6465 3e20 2020 OAP1.1 \n-0014fa00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 SOAP 1.1 \n-0014fa30: 7472 616e 7370 6f72 7420 2873 616d 6520 transport (same \n-0014fa40: 6173 203c 636f 6465 3e73 6f61 7063 7070 as soapcpp\n-0014fa50: 3220 2d31 3c2f 636f 6465 3e29 2020 2020 2 -1) \n-0014fa60: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    SOAP1.2 SOAP\n-0014faf0: 2031 2e32 2074 7261 6e73 706f 7274 2028 1.2 transport (\n-0014fb00: 7361 6d65 2061 7320 3c63 6f64 653e 736f same as so\n-0014fb10: 6170 6370 7032 202d 323c 2f63 6f64 653e apcpp2 -2\n-0014fb20: 2920 2020 203c 2f74 643e 3c2f 7472 3e0a )
    SOAP-G\n-0014fb80: 4554 3c2f 636f 6465 3e20 2020 3c2f 7464 ET one-way SOAP \n-0014fbc0: 312e 3120 6f72 2031 2e32 2077 6974 6820 1.1 or 1.2 with \n-0014fbd0: 4854 5450 2047 4554 2020 2020 3c2f 7464 HTTP GET
    \n-0014fc30: 534f 4150 312e 312d 4745 543c 2f63 6f64 SOAP1.1-GET one-\n-0014fc70: 7761 7920 534f 4150 2031 2e31 2077 6974 way SOAP 1.1 wit\n-0014fc80: 6820 4854 5450 2047 4554 2020 2020 3c2f h HTTP GET
    SOAP1.2-GET
    an ali\n-0014fdd0: 6173 2066 6f72 203c 636f 6465 3e50 4f53 as for POS\n-0014fde0: 543c 2f63 6f64 653e 2028 7361 6d65 2061 T (same a\n-0014fdf0: 7320 3c63 6f64 653e 736f 6170 6370 7032 s soapcpp2\n-0014fe00: 202d 303c 2f63 6f64 653e 2920 2020 203c -0) <\n-0014fe10: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    POST \n-0014fe70: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 non-SOA\n-0014fea0: 5020 5245 5354 2070 726f 746f 636f 6c20 P REST protocol \n-0014feb0: 7769 7468 2048 5454 5020 504f 5354 2020 with HTTP POST \n-0014fec0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    non-SO\n-0014ff50: 4150 2052 4553 5420 7072 6f74 6f63 6f6c AP REST protocol\n-0014ff60: 2077 6974 6820 4854 5450 2047 4554 2020 with HTTP GET \n-0014ff70: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    non-S\n-00150000: 4f41 5020 5245 5354 2070 726f 746f 636f OAP REST protoco\n-00150010: 6c20 7769 7468 2048 5454 5020 5055 5420 l with HTTP PUT \n-00150020: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    no\n-001500b0: 6e2d 534f 4150 2052 4553 5420 7072 6f74 n-SOAP REST prot\n-001500c0: 6f63 6f6c 2077 6974 6820 4854 5450 2044 ocol with HTTP D\n-001500d0: 454c 4554 4520 2020 3c2f 7464 3e3c 2f74 ELETE
    .

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

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

    .

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

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

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

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

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

    .

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

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

    .

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

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

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

    ...method \n-00150890: 7072 6f70 6572 7479 2020 203c 2f74 683e property \n-001508a0: 3c74 6820 636c 6173 733d 226d 6172 6b64 value \n-001508d0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..m\n-00150920: 6574 686f 642d 646f 6375 6d65 6e74 6174 ethod-documentat\n-00150930: 696f 6e3c 2f63 6f64 653e 2020 203c 2f74 ion text describ\n-00150970: 696e 6720 7468 6520 7365 7276 6963 6520 ing the service \n-00150980: 6f70 6572 6174 696f 6e20 2020 203c 2f74 operation ..method
    \n-001509f0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 same as\n-00150a20: 2061 626f 7665 2c20 7368 6f72 7468 616e above, shorthan\n-00150a30: 6420 666f 726d 2020 2020 3c2f 7464 3e3c d form <\n-00150a40: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..me\n-00150a90: 7468 6f64 2d61 6374 696f 6e3c 2f63 6f64 thod-action \"\" or U\n-00150ae0: 5249 2053 4f41 5041 6374 696f 6e20 4854 RI SOAPAction HT\n-00150af0: 5450 2068 6561 6465 722c 206f 7220 5552 TP header, or UR\n-00150b00: 4c20 7175 6572 7920 7374 7269 6e67 2066 L query string f\n-00150b10: 6f72 2052 4553 5420 7072 6f74 6f63 6f6c or REST protocol\n-00150b20: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s .\n-00150b30: 3c74 7220 636c 6173 733d 226d 6172 6b64 .method\n-00150b80: 2d69 6e70 7574 2d61 6374 696f 6e3c 2f63 -input-action \"\" or\n-00150bd0: 2055 5249 2053 4f41 5041 6374 696f 6e20 URI SOAPAction \n-00150be0: 4854 5450 2068 6561 6465 7220 6f66 2073 HTTP header of s\n-00150bf0: 6572 7669 6365 2072 6571 7565 7374 206d ervice request m\n-00150c00: 6573 7361 6765 7320 2020 203c 2f74 643e essages \n-00150c10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..m\n-00150c60: 6574 686f 642d 6f75 7470 7574 2d61 6374 ethod-output-act\n-00150c70: 696f 6e3c 2f63 6f64 653e 2020 203c 2f74 ion \"\" or URI SOAPA\n-00150cc0: 6374 696f 6e20 4854 5450 2068 6561 6465 ction HTTP heade\n-00150cd0: 7220 6f66 2073 6572 7669 6365 2072 6573 r of service res\n-00150ce0: 706f 6e73 6520 6d65 7373 6167 6573 2020 ponse messages \n-00150cf0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00150d20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00150d30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00150d40: 3e3c 636f 6465 3e6d 6574 686f 642d 6661 >method-fa\n-00150d50: 756c 742d 6163 7469 6f6e 3c2f 636f 6465 ult-action \"\" or UR\n-00150da0: 4920 534f 4150 4163 7469 6f6e 2048 5454 I SOAPAction HTT\n-00150db0: 5020 6865 6164 6572 206f 6620 7365 7276 P header of serv\n-00150dc0: 6963 6520 6661 756c 7420 6d65 7373 6167 ice fault messag\n-00150dd0: 6573 2020 2020 3c2f 7464 3e3c 2f74 723e es \n-00150de0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..method\n-00150e30: 2d68 6561 6465 722d 7061 7274 3c2f 636f -header-part mem\n-00150e70: 6265 7220 6e61 6d65 206f 6620 7468 6520 ber name of the \n-00150e80: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22
    SOAP_ENV__Heade\n-00150ef0: 723c 2f61 3e3c 2f63 6f64 653e 2073 7472 r str\n-00150f00: 7563 7420 7573 6564 2069 6e20 534f 4150 uct used in SOAP\n-00150f10: 2048 6561 6465 7220 2020 203c 2f74 643e Header \n-00150f20: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-00150f70: 6d65 7468 6f64 2d69 6e70 7574 2d68 6561 method-input-hea\n-00150f80: 6465 722d 7061 7274 3c2f 636f 6465 3e20 der-part \n-00150f90: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 member \n-00150fc0: 6e61 6d65 206f 6620 7468 6520 3c63 6f64 name of the SOA\n-00151030: 505f 454e 565f 5f48 6561 6465 723c 2f61 P_ENV__Header struct \n-00151050: 7573 6564 2069 6e20 534f 4150 2048 6561 used in SOAP Hea\n-00151060: 6465 7273 206f 6620 7265 7175 6573 7473 ders of requests\n-00151070: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n-00151080: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00151090: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-001510a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 method-o\n-001510d0: 7574 7075 742d 6865 6164 6572 2d70 6172 utput-header-par\n-001510e0: 743c 2f63 6f64 653e 2020 203c 2f74 643e t \n-001510f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 member name of\n-00151120: 2074 6865 203c 636f 6465 3e3c 6120 636c the SOAP_ENV__\n-00151190: 4865 6164 6572 3c2f 613e 3c2f 636f 6465 Header struct used in\n-001511b0: 2053 4f41 5020 4865 6164 6572 7320 6f66 SOAP Headers of\n-001511c0: 2072 6573 706f 6e73 6573 2020 2020 3c2f responses ..method-fault<\n-00151230: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-00151260: 7479 7065 206e 616d 6520 6f66 2061 2073 type name of a s\n-00151270: 7472 7563 7420 6f72 2063 6c61 7373 206d truct or class m\n-00151280: 656d 6265 7220 7573 6564 2069 6e20 3c63 ember used in SOAP_ENV__De\n-001512a0: 7461 696c 733c 2f63 6f64 653e 2073 7472 tails str\n-001512b0: 7563 7420 2020 203c 2f74 643e 3c2f 7472 uct ..metho\n-00151310: 642d 6d69 6d65 2d74 7970 653c 2f63 6f64 d-mime-type REST\n-00151350: 2063 6f6e 7465 6e74 2074 7970 6520 6f72 content type or\n-00151360: 2053 4f41 5020 4d49 4d45 2061 7474 6163 SOAP MIME attac\n-00151370: 686d 656e 7420 636f 6e74 656e 7420 7479 hment content ty\n-00151380: 7065 2873 2920 2020 203c 2f74 643e 3c2f pe(s) ..me\n-001513e0: 7468 6f64 2d69 6e70 7574 2d6d 696d 652d thod-input-mime-\n-001513f0: 7479 7065 3c2f 636f 6465 3e20 2020 3c2f type REST conten\n-00151430: 7420 7479 7065 206f 7220 534f 4150 204d t type or SOAP M\n-00151440: 494d 4520 6174 7461 6368 6d65 6e74 2063 IME attachment c\n-00151450: 6f6e 7465 6e74 2074 7970 6528 7329 206f ontent type(s) o\n-00151460: 6620 7265 7175 6573 7420 6d65 7373 6167 f request messag\n-00151470: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e .\n-00151480: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-001514a0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .method-\n-001514d0: 6f75 7470 7574 2d6d 696d 652d 7479 7065 output-mime-type\n-001514e0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-001514f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00151500: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00151510: 3e52 4553 5420 636f 6e74 656e 7420 7479 >REST content ty\n-00151520: 7065 206f 7220 534f 4150 204d 494d 4520 pe or SOAP MIME \n-00151530: 6174 7461 6368 6d65 6e74 2063 6f6e 7465 attachment conte\n-00151540: 6e74 2074 7970 6528 7329 206f 6620 7265 nt type(s) of re\n-00151550: 7370 6f6e 7365 206d 6573 7361 6765 2020 sponse message \n-00151560: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00151590: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001515a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001515b0: 3e3c 636f 6465 3e6d 6574 686f 642d 7374 >method-st\n-001515c0: 796c 653c 2f63 6f64 653e 2020 203c 2f74 yle docume\n-00151600: 6e74 3c2f 636f 6465 3e20 6f72 203c 636f nt or rpc \n-00151620: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n-00151670: 636f 6465 3e6d 6574 686f 642d 656e 636f code>method-enco\n-00151680: 6469 6e67 3c2f 636f 6465 3e20 2020 3c2f ding liter\n-001516c0: 616c 3c2f 636f 6465 3e2c 203c 636f 6465 al, encoded,\n-001516e0: 206f 7220 6120 6375 7374 6f6d 2055 5249 or a custom URI\n-001516f0: 2066 6f72 2065 6e63 6f64 696e 6753 7479 for encodingSty\n-00151700: 6c65 206f 6620 6d65 7373 6167 6573 2020 le of messages \n-00151710: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n-00151740: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00151750: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00151760: 3e3c 636f 6465 3e6d 6574 686f 642d 7265 >method-re\n-00151770: 7370 6f6e 7365 2d65 6e63 6f64 696e 673c sponse-encoding<\n-00151780: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-001517b0: 3c63 6f64 653e 6c69 7465 7261 6c3c 2f63 literal, enco\n-001517d0: 6465 643c 2f63 6f64 653e 2c20 6f72 2061 ded, or a\n-001517e0: 2063 7573 746f 6d20 5552 4920 666f 7220 custom URI for \n-001517f0: 656e 636f 6469 6e67 5374 796c 6520 6f66 encodingStyle of\n-00151800: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag\n-00151810: 6573 2020 2020 3c2f 7464 3e3c 2f74 723e es \n-00151820: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..method\n-00151870: 2d70 726f 746f 636f 6c3c 2f63 6f64 653e -protocol\n-00151880: 2020 203c 2f74 643e 3c74 6420 636c 6173 SOAP o\n-001518b0: 7220 5245 5354 2c20 7365 6520 3c61 2063 r REST, see Service\n-001518f0: 2064 6972 6563 7469 7665 733c 2f61 3e20 directives \n-00151900: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 ..

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

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

    .

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

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

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

    .

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

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

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

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

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

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

    .

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

    .

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

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

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

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

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

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

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

    .

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

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

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

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

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

    .

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

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

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

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

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

    .
    <\n-001536b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001536c0: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><s\n-001536e0: 696d 706c 6554 7970 653c 2f73 7061 6e3e impleType\n-001536f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=&\n-00153730: 7175 6f74 3b56 6f77 656c 7326 7175 6f74 quot;Vowels"\n-00153740: 3b3c 2f73 7061 6e3e 2667 743b 3c2f 6469 ;>.
    <annotation<\n-00153790: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n-001537a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <documentati\n-001537e0: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 7370 on>The letters A, E, I, O, U, and someti\n-00153910: 6d65 733c 2f73 7061 6e3e 203c 7370 616e mes Y</document\n-00153960: 6174 696f 6e3c 2f73 7061 6e3e 2667 743b ation>\n-00153970: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </\n-00153990: 3c73 7061 6e20 636c 6173 733d 226b 6579 annota\n-001539b0: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b3c tion><\n-001539c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <restrict\n-00153a00: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion base="x\n-00153a50: 7364 3a73 7472 696e 6726 7175 6f74 3b3c sd:string"<\n-00153a60: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n-00153a70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <enumeration\n-00153ab0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c va\n-00153ad0: 6c75 653c 2f73 7061 6e3e 3d3c 7370 616e lue="A&q\n-00153b00: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/>\n-00153b10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-00153b30: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;enume\n-00153b50: 7261 7469 6f6e 3c2f 7370 616e 3e20 3c73 ration value\n-00153b80: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-00153ba0: 6f74 3b45 2671 756f 743b 3c2f 7370 616e ot;E"/>
    . \n-00153bd0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <enumeration value<\n-00153c20: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="I"\n-00153c50: 3c2f 7370 616e 3e2f 2667 743b 3c2f 6469 />.
    <enumerati\n-00153ca0: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on \n-00153cc0: 7661 6c75 653c 2f73 7061 6e3e 3d3c 7370 value="O\n-00153cf0: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g\n-00153d00: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    &\n-00153d20: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;enu\n-00153d40: 6d65 7261 7469 6f6e 3c2f 7370 616e 3e20 meration \n-00153d50: 3c73 7061 6e20 636c 6173 733d 226b 6579 value=&\n-00153d90: 7175 6f74 3b55 2671 756f 743b 3c2f 7370 quot;U"/>
    .<\n-00153db0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00153dc0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <enumeration valu\n-00153e10: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="Y&quo\n-00153e40: 743b 3c2f 7370 616e 3e26 6774 3b3c 2f64 t;>.
    <\n-00153e70: 3c73 7061 6e20 636c 6173 733d 226b 6579 annota\n-00153e90: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b3c tion><\n-00153ea0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00153ec0: 266c 743b 3c73 7061 6e20 636c 6173 733d <do\n-00153ee0: 6375 6d65 6e74 6174 696f 6e3c 2f73 7061 cumentation>A vowel\n-00153f30: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , s\n-00153f50: 6f6d 6574 696d 6573 3c2f 7370 616e 3e26 ometimes&\n-00153f60: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/do\n-00153f80: 6375 6d65 6e74 6174 696f 6e3c 2f73 7061 cumentation>
    . \n-00153fb0: 2020 2020 2026 6c74 3b2f 3c73 7061 6e20 </annotation>
    .\n-00153ff0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <enumeration<\n-00154030: 2f73 7061 6e3e 2f26 6774 3b3c 2f64 6976 /span>/>.
    </restriction\n-00154080: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    </simpleType>
    .<\n-001540e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

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

    .

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

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

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

    .

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

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

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

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

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

    .

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

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

    .

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

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

    .

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

    .

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

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

    .

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

    .

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

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

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

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

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

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

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

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

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

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

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

    .

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

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

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

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

    This only\n+0014a090: 2066 7265 6573 203c 636f 6465 3e6e 616d frees nam\n+0014a0a0: 653c 2f63 6f64 653e 2069 6620 7468 6520 e if the \n+0014a0b0: 3c63 6f64 653e 736f 6170 3c2f 636f 6465 soap context pointe\n+0014a0d0: 7220 6d65 6d62 6572 2069 7320 4e55 4c4c r member is NULL\n+0014a0e0: 2c20 6d65 616e 696e 6720 7468 6174 2061 , meaning that a\n+0014a0f0: 206d 616e 6167 6564 2073 7472 696e 6720 managed string \n+0014a100: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name will be delete\n+0014a120: 6420 6173 2075 7375 616c 2077 6974 6820 d as usual with \n+0014a130: 7468 6520 6465 7365 7269 616c 697a 6564 the deserialized\n+0014a140: 2063 6c61 7373 2075 7369 6e67 203c 636f class using soap_destroy and soap_end\n+0014a2f0: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 703e .

    \n+0014a300: 0a3c 703e 5468 6520 6f74 6865 7220 6d65 .

    The other me\n+0014a310: 7468 6f64 7320 6172 6520 616c 736f 206d thods are also m\n+0014a320: 6164 6520 636f 676e 697a 616e 7420 6f66 ade cognizant of\n+0014a330: 2074 6865 2070 7265 7365 6e63 6520 6f66 the presence of\n+0014a340: 2061 2063 6f6e 7465 7874 3a3c 2f70 3e0a a context:

    .\n+0014a350: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    void Cl\n+0014a3a0: 6173 733a 3a73 6574 4e61 6d65 283c 7370 ass::setName(const \n+0014a3d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *s)
    .\n+0014a400: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (soap)
    ..
    else\n+0014a580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    nam\n+0014a5a0: 6520 3d20 7374 7264 7570 2873 293b 3c2f e = strdup(s);.
    }
    .<\n+0014a5d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0014a5e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n+0014a620: 6172 3c2f 7370 616e 3e20 2a67 6574 4e61 ar *getNa\n+0014a630: 6d65 2829 3c2f 6469 763e 0a3c 6469 7620 me()
    .
    {.
    return\n+0014a690: 206e 616d 653b 3c2f 6469 763e 0a3c 6469 name;
    .}\n+0014a6b0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Another approac\n+0014a6e0: 6820 6973 2074 6f20 7573 6520 3c63 6f64 h is to use soap_unlin\n+0014a7c0: 6b3c 2f61 3e3c 2f63 6f64 653e 2074 6f20 k
    to \n+0014a7d0: 756e 6c69 6e6b 2064 6174 6120 6d61 6e61 unlink data mana\n+0014a7e0: 6765 6420 6279 2074 6865 2063 6f6e 7465 ged by the conte\n+0014a7f0: 7874 2061 6e64 206d 616b 6520 616c 6c20 xt and make all \n+0014a800: 616c 6c6f 6361 7469 6f6e 7320 6578 706c allocations expl\n+0014a810: 6963 6974 6c79 3a3c 2f70 3e0a 3c64 6976 icitly:

    .
    Class::~Clas\n+0014a850: 7328 2920 3c2f 6469 763e 0a3c 6469 7620 s()
    .
    {.
    if (na\n+0014a8b0: 6d65 293c 2f64 6976 3e0a 3c64 6976 2063 me)
    .
    {<\n+0014a8d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_unlink\n+0014a950: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0014a980: 2c20 6e61 6d65 293b 203c 7370 616e 2063 , name); /\n+0014a9a0: 2f20 756e 6c69 6e6b 7320 7468 6520 6e61 / unlinks the na\n+0014a9b0: 6d65 2069 6620 736f 6170 2069 7320 6e6f me if soap is no\n+0014a9c0: 6e2d 4e55 4c4c 3c2f 7370 616e 3e3c 2f64 n-NULL.
    free(n\n+0014a9f0: 616d 6529 3b3c 2f64 6976 3e0a 3c64 6976 ame);
    . \n+0014aa10: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    }.
    vo\n+0014aa60: 6964 3c2f 7370 616e 3e20 436c 6173 733a id Class:\n+0014aa70: 3a73 6574 4e61 6d65 283c 7370 616e 2063 :setName(c\n+0014aa90: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *s)
    .{<\n+0014aae0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    name =\n+0014ab00: 2073 7472 6475 7028 7329 3b3c 2f64 6976 strdup(s);.
    }
    .const\n+0014ab60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+0014ab80: 2f73 7061 6e3e 202a 6765 744e 616d 6528 /span> *getName(\n+0014ab90: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    \n+0014abe0: 7265 7475 726e 3c2f 7370 616e 3e20 6e61 return na\n+0014abf0: 6d65 3b3c 2f64 6976 3e0a 3c64 6976 2063 me;
    .
    }.
    in\n+0014acf0: 7420 736f 6170 5f75 6e6c 696e 6b28 7374 t soap_unlink(st\n+0014ad00: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0014ad10: 2063 6f6e 7374 2076 6f69 6420 2a70 7472 const void *ptr\n+0014ad20: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Unlink\n+0014ad40: 2061 2062 6c6f 636b 206f 6620 6865 6170 a block of heap\n+0014ad50: 206d 656d 6f72 7920 6d61 6e61 6765 6420 memory managed \n+0014ad60: 6279 2074 6865 2073 7065 6369 6669 6564 by the specified\n+0014ad70: 2073 6f61 7020 636f 6e74 6578 742c 2074 soap context, t\n+0014ad80: 6f20 7265 6c65 6173 6520 7468 6520 6d65 o release the me\n+0014ad90: 6d6f 7279 2065 7870 6c69 6369 746c 792e mory explicitly.\n+0014ada0: 2e2e 3c2f 6469 763e 3c2f 6469 763e 0a3c ..
    .<\n+0014adb0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The soap_unli\n+0014aea0: 6e6b 3c2f 613e 3c2f 636f 6465 3e20 6361 nk ca\n+0014aeb0: 6c6c 2075 6e6c 696e 6b73 2064 6174 6120 ll unlinks data \n+0014aec0: 616e 6420 6f62 6a65 6374 7320 6672 6f6d and objects from\n+0014aed0: 206d 616e 6167 6564 206d 656d 6f72 792e managed memory.\n+0014aee0: 2049 6e20 7468 6973 2077 6179 203c 636f In this way soap_destroy and soap_end\n+0014b090: 3c2f 613e 3c2f 636f 6465 3e20 6361 6e20 can \n+0014b0a0: 6265 2063 616c 6c65 6420 6c61 7465 7220 be called later \n+0014b0b0: 6576 656e 2077 6865 6e20 7468 6973 2063 even when this c\n+0014b0c0: 6c61 7373 2077 6173 2064 6573 6572 6961 lass was deseria\n+0014b0d0: 6c69 7a65 642e 3c2f 703e 0a3c 703e f09f lized.

    .

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

    \n+0014b110: 0a3c 6831 3e3c 6120 636c 6173 733d 2261 .

    .Debug\n+0014b140: 6769 6e67 3c2f 6831 3e0a 3c70 3e54 6f20 ging

    .

    To \n+0014b150: 6163 7469 7661 7465 2064 6562 7567 6769 activate debuggi\n+0014b160: 6e67 2061 6e64 206d 6573 7361 6765 206c ng and message l\n+0014b170: 6f67 6769 6e67 2063 6f6d 7069 6c65 2074 ogging compile t\n+0014b180: 6865 2073 6f75 7263 6520 636f 6465 2077 he source code w\n+0014b190: 6974 6820 636f 6d70 696c 652d 7469 6d65 ith compile-time\n+0014b1a0: 2066 6c61 6720 3c63 6f64 653e 2344 4542 flag #DEB\n+0014b1b0: 5547 3c2f 636f 6465 3e2e 204f 7220 7768 UG. Or wh\n+0014b1c0: 656e 2075 7369 6e67 203c 623e 3c63 6f64 en using -lgsoap\n+0014b1e0: 3c2f 623e 206f 7220 3c62 3e3c 636f 6465 or -lgsoap++ then reins\n+0014b210: 7461 6c6c 2067 534f 4150 2077 6974 6820 tall gSOAP with \n+0014b220: 3c62 3e3c 636f 6465 3e2e 2f63 6f6e 6669 ./confi\n+0014b230: 6775 7265 202d 2d65 6e61 626c 652d 6465 gure --enable-de\n+0014b240: 6275 673c 2f63 6f64 653e 3c2f 623e 2061 bug a\n+0014b250: 6e64 203c 623e 3c63 6f64 653e 6d61 6b65 nd make\n+0014b260: 3c2f 636f 6465 3e3c 2f62 3e2e 3c2f 703e .

    \n+0014b270: 0a3c 703e 5768 656e 2079 6f75 7220 6753 .

    When your gS\n+0014b280: 4f41 5020 636c 6965 6e74 206f 7220 7365 OAP client or se\n+0014b290: 7276 6572 2061 7070 6c69 6361 7469 6f6e rver application\n+0014b2a0: 7320 7275 6e2c 2074 6865 7920 7769 6c6c s run, they will\n+0014b2b0: 206c 6f67 2074 6865 6972 2061 6374 6976 log their activ\n+0014b2c0: 6974 7920 696e 2074 6872 6565 2073 6570 ity in three sep\n+0014b2d0: 6172 6174 6520 6669 6c65 733a 3c2f 703e arate files:

    \n+0014b2e0: 0a3c 756c 3e0a 3c6c 693e 3c65 6d3e 3c63 .
    value \n-00153190: 3c2f 7468 3e3c 2f74 723e 0a3c 7472 2063
    type-documen\n-001531f0: 7461 7469 6f6e 3c2f 636f 6465 3e20 2020 tation \n-00153200: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 text desc\n-00153230: 7269 6269 6e67 2074 6865 2073 6368 656d ribing the schem\n-00153240: 6120 7479 7065 2020 2020 3c2f 7464 3e3c a type
    t\n-001532a0: 7970 653c 2f63 6f64 653e 2020 203c 2f74 ype an alias for\n-001532e0: 2074 6865 203c 636f 6465 3e74 7970 652d the type-\n-001532f0: 646f 6375 6d65 6e74 6174 696f 6e3c 2f63 documentation property \n-00153310: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162
    ....<\n+0014e6e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014e6f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014e700: 3e3c 636f 6465 3e6e 616d 653c 2f63 6f64 >name ......<\n+0014e990: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014e9a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014e9b0: 3e61 6e20 616c 6961 7320 666f 7220 7468 >an alias for th\n+0014e9c0: 6520 3c63 6f64 653e 646f 6375 6d65 6e74 e document\n+0014e9d0: 6174 696f 6e3c 2f63 6f64 653e 2070 726f ation pro\n+0014e9e0: 7065 7274 7920 2020 203c 2f74 643e 3c2f perty .....\n+0014ebc0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0014ebe0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+0014ec20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+0014ecd0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014ece0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014ecf0: 3e55 524c 206f 6620 7468 6520 7365 7276 >URL of the serv\n+0014ed00: 6963 6520 656e 6470 6f69 6e74 2c20 7573 ice endpoint, us\n+0014ed10: 7561 6c6c 7920 616e 2068 7474 7020 6f72 ually an http or\n+0014ed20: 2068 7474 7073 2061 6464 7265 7373 2c20 https address, \n+0014ed30: 746f 2075 7365 2069 6e20 7468 6520 5753 to use in the WS\n+0014ed40: 444c 2064 6566 696e 6974 696f 6e73 2f73 DL definitions/s\n+0014ed50: 6572 7669 6365 2f70 6f72 742f 6164 6472 ervice/port/addr\n+0014ed60: 6573 732f 406c 6f63 6174 696f 6e20 2020 ess/@location \n+0014ed70: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+0014edc0: 636f 6465 3e6c 6f63 6174 696f 6e3c 2f63 code>location ..<\n+0014eef0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..<\n+0014f010: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....<\n+0014f110: 636f 6465 3e74 7970 653c 2f63 6f64 653e code>type\n+0014f120: 2020 203c 2f74 643e 3c74 6420 636c 6173 ..\n+0014f1c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n+0014f200: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014f210: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014f220: 3e61 6e20 616c 6961 7320 666f 7220 7468 >an alias for th\n+0014f230: 6520 3c63 6f64 653e 7479 7065 3c2f 636f e type property (portType follows SOAP\n+0014f270: 2031 2e31 206e 616d 696e 6720 636f 6e76 1.1 naming conv\n+0014f280: 656e 7469 6f6e 7329 2020 2020 3c2f 7464 entions) ..\n+0014f390: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+0014f490: 636f 6465 3e70 6f72 744e 616d 653c 2f63 code>portName ..\n+0014f550: 3c63 6f64 653e 6578 6563 7574 6162 6c65 executable\n+0014f560: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+0014f570: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014f580: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014f590: 3e6e 616d 6520 6f66 2074 6865 2022 6578 >name of the \"ex\n+0014f5a0: 6563 7574 6162 6c65 2220 746f 2075 7365 ecutable\" to use\n+0014f5b0: 2069 6e20 7468 6520 5753 444c 2064 6566 in the WSDL def\n+0014f5c0: 696e 6974 696f 6e73 2f73 6572 7669 6365 initions/service\n+0014f5d0: 2f70 6f72 742f 6164 6472 6573 732f 406c /port/address/@l\n+0014f5e0: 6f63 6174 696f 6e20 2020 3c2f 7464 3e3c ocation <\n+0014f5f0: 2f74 723e 0a3c 2f74 6162 6c65 3e0a 3c70 /tr>.
    property\n+0014e680: 2020 203c 2f74 683e 3c74 6820 636c 6173 value \n+0014e6b0: 2020 203c 2f74 683e 3c2f 7472 3e0a 3c74
    name\n+0014e740: 206f 6620 7468 6520 7365 7276 6963 652c of the service,\n+0014e750: 206f 7074 696f 6e61 6c6c 7920 666f 6c6c optionally foll\n+0014e760: 6f77 6564 2062 7920 7465 7874 2064 6573 owed by text des\n+0014e770: 6372 6962 696e 6720 7468 6520 7365 7276 cribing the serv\n+0014e780: 6963 6520 2020 203c 2f74 643e 3c2f 7472 ice
    name\n+0014e7e0: 7370 6163 653c 2f63 6f64 653e 2020 203c space <\n+0014e7f0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>URI of the\n+0014e820: 2057 5344 4c20 7461 7267 6574 4e61 6d65 WSDL targetName\n+0014e830: 7370 6163 6520 2020 203c 2f74 643e 3c2f space
    doc\n+0014e890: 756d 656e 7461 7469 6f6e 3c2f 636f 6465 umentation text \n+0014e8d0: 6465 7363 7269 6269 6e67 2074 6865 2073 describing the s\n+0014e8e0: 6572 7669 6365 2028 7365 6520 616c 736f ervice (see also\n+0014e8f0: 2074 6865 203c 636f 6465 3e6e 616d 653c the name<\n+0014e900: 2f63 6f64 653e 2070 726f 7065 7274 7929 /code> property)\n+0014e910: 2c20 6d75 6c74 6970 6c65 2070 6572 6d69 , multiple permi\n+0014e920: 7474 6564 2020 2020 3c2f 7464 3e3c 2f74 tted
    doc\n+0014e980: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    sty\n+0014ea40: 6c65 3c2f 636f 6465 3e20 2020 3c2f 7464 le documen\n+0014ea80: 743c 2f63 6f64 653e 2028 6465 6661 756c t (defaul\n+0014ea90: 7429 2053 4f41 5020 6d65 7373 6167 696e t) SOAP messagin\n+0014eaa0: 6720 7374 796c 6520 6f72 203c 636f 6465 g style or rpc for \n+0014eac0: 534f 4150 2052 5043 2020 2020 3c2f 7464 SOAP RPC
    encoding\n+0014eb30: 2020 203c 2f74 643e 3c74 6420 636c 6173 \n+0014eb60: 6c69 7465 7261 6c3c 2f63 6f64 653e 2028 literal (\n+0014eb70: 6465 6661 756c 7429 2c20 3c63 6f64 653e default), \n+0014eb80: 656e 636f 6465 643c 2f63 6f64 653e 2066 encoded f\n+0014eb90: 6f72 2053 4f41 5020 656e 636f 6469 6e67 or SOAP encoding\n+0014eba0: 2c20 6f72 2061 2063 7573 746f 6d20 5552 , or a custom UR\n+0014ebb0: 4920 2020 203c 2f74 643e 3c2f 7472 3e0a I
    protoco\n+0014ec10: 6c3c 2f63 6f64 653e 2020 203c 2f74 643e l specifies SOAP\n+0014ec50: 206f 7220 5245 5354 2c20 7365 6520 6265 or REST, see be\n+0014ec60: 6c6f 7720 2020 203c 2f74 643e 3c2f 7472 low
    port\n+0014ecc0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    an\n+0014ee00: 2061 6c69 6173 2066 6f72 2074 6865 203c alias for the <\n+0014ee10: 636f 6465 3e70 6f72 743c 2f63 6f64 653e code>port\n+0014ee20: 2070 726f 7065 7274 7920 2020 203c 2f74 property
    endpoint an al\n+0014eec0: 6961 7320 666f 7220 7468 6520 3c63 6f64 ias for the port pr\n+0014eee0: 6f70 6572 7479 2020 2020 3c2f 7464 3e3c operty
    tr\n+0014ef40: 616e 7370 6f72 743c 2f63 6f64 653e 2020 ansport \n+0014ef50: 203c 2f74 643e 3c74 6420 636c 6173 733d URI decl\n+0014ef80: 6172 6174 696f 6e20 6f66 2074 6865 2074 aration of the t\n+0014ef90: 7261 6e73 706f 7274 2c20 7573 7561 6c6c ransport, usuall\n+0014efa0: 7920 3c63 6f64 653e 3c61 2068 7265 663d y http://sc\n+0014efe0: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or\n+0014eff0: 672f 736f 6170 2f68 7474 703c 2f61 3e3c g/soap/http<\n+0014f000: 2f63 6f64 653e 2020 2020 3c2f 7464 3e3c /code>
    d\n+0014f060: 6566 696e 6974 696f 6e73 3c2f 636f 6465 efinitions name \n+0014f0a0: 6f66 2074 6865 2057 5344 4c20 6465 6669 of the WSDL defi\n+0014f0b0: 6e69 7469 6f6e 732f 406e 616d 6520 2020 nitions/@name \n+0014f0c0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    name o\n+0014f150: 6620 7468 6520 5753 444c 2064 6566 696e f the WSDL defin\n+0014f160: 6974 696f 6e73 2f70 6f72 7454 7970 652f itions/portType/\n+0014f170: 406e 616d 6520 2857 5344 4c32 2e30 2069 @name (WSDL2.0 i\n+0014f180: 6e74 6572 6661 6365 2f40 6e61 6d65 2920 nterface/@name) \n+0014f190: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    portType\n+0014f1f0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    \n+0014f2e0: 696e 7465 7266 6163 653c 2f63 6f64 653e interface\n+0014f2f0: 2020 203c 2f74 643e 3c74 6420 636c 6173 an ali\n+0014f320: 6173 2066 6f72 2074 6865 203c 636f 6465 as for the type pro\n+0014f340: 7065 7274 7920 283c 636f 6465 3e69 6e74 perty (int\n+0014f350: 6572 6661 6365 3c2f 636f 6465 3e20 666f erface fo\n+0014f360: 6c6c 6f77 7320 534f 4150 2031 2e32 206e llows SOAP 1.2 n\n+0014f370: 616d 696e 6720 636f 6e76 656e 7469 6f6e aming convention\n+0014f380: 7329 2020 2020 3c2f 7464 3e3c 2f74 723e s)
    bindi\n+0014f3e0: 6e67 3c2f 636f 6465 3e20 2020 3c2f 7464 ng name of the W\n+0014f420: 5344 4c20 6465 6669 6e69 7469 6f6e 732f SDL definitions/\n+0014f430: 6269 6e64 696e 672f 406e 616d 6520 2020 binding/@name \n+0014f440: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    na\n+0014f4d0: 6d65 206f 6620 7468 6520 5753 444c 2064 me of the WSDL d\n+0014f4e0: 6566 696e 6974 696f 6e73 2f73 6572 7669 efinitions/servi\n+0014f4f0: 6365 2f70 6f72 742f 406e 616d 6520 2020 ce/port/@name \n+0014f500: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    .The service name a\n+0014f620: 6e64 203c 636f 6465 3e6e 616d 6573 7061 nd namespa\n+0014f630: 6365 3c2f 636f 6465 3e20 7072 6f70 6572 ce proper\n+0014f640: 7469 6573 2061 7265 2072 6571 7569 7265 ties are require\n+0014f650: 6420 696e 206f 7264 6572 2074 6f20 6765 d in order to ge\n+0014f660: 6e65 7261 7465 2061 2076 616c 6964 2057 nerate a valid W\n+0014f670: 5344 4c20 7769 7468 2073 6f61 7063 7070 SDL with soapcpp\n+0014f680: 322e 2054 6865 206f 7468 6572 2070 726f 2. The other pro\n+0014f690: 7065 7274 6965 7320 6172 6520 6f70 7469 perties are opti\n+0014f6a0: 6f6e 616c 2e3c 2f70 3e0a 3c70 3e54 6865 onal.

    .

    The\n+0014f6b0: 203c 636f 6465 3e73 7479 6c65 3c2f 636f style and en\n+0014f6d0: 636f 6469 6e67 3c2f 636f 6465 3e20 7072 coding pr\n+0014f6e0: 6f70 6572 7479 2064 6566 6175 6c74 7320 operty defaults \n+0014f6f0: 6172 6520 6368 616e 6765 6420 7769 7468 are changed with\n+0014f700: 203c 623e 3c63 6f64 653e 736f 6170 6370 soapcp\n+0014f710: 7032 202d 653c 2f63 6f64 653e 3c2f 623e p2 -e\n+0014f720: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -e t\n+0014f740: 6f20 3c63 6f64 653e 7270 633c 2f63 6f64 o rpc and enc\n+0014f760: 6f64 6564 3c2f 636f 6465 3e2e 3c2f 703e oded.

    \n+0014f770: 0a3c 703e 596f 7520 6361 6e20 6f76 6572 .

    You can over\n+0014f780: 7269 6465 2074 6865 203c 636f 6465 3e70 ride the p\n+0014f790: 6f72 743c 2f63 6f64 653e 2065 6e64 706f ort endpo\n+0014f7a0: 696e 7420 5552 4c20 6174 2072 756e 7469 int URL at runti\n+0014f7b0: 6d65 2069 6e20 7468 6520 6175 746f 2d67 me in the auto-g\n+0014f7c0: 656e 6572 6174 6564 203c 636f 6465 3e73 enerated s\n+0014f7d0: 6f61 705f 6361 6c6c 5f70 7265 6669 785f oap_call_prefix_\n+0014f7e0: 5f66 756e 633c 2f63 6f64 653e 2073 6572 _func ser\n+0014f7f0: 7669 6365 2063 616c 6c20 2843 2f43 2b2b vice call (C/C++\n+0014f800: 2063 6c69 656e 7420 7369 6465 2920 616e client side) an\n+0014f810: 6420 696e 2074 6865 2043 2b2b 2070 726f d in the C++ pro\n+0014f820: 7879 2063 6c61 7373 2073 6572 7669 6365 xy class service\n+0014f830: 2063 616c 6c2e 3c2f 703e 0a3c 703e 5072 call.

    .

    Pr\n+0014f840: 6f74 6f63 6f6c 2070 726f 7065 7274 7920 otocol property \n+0014f850: 7661 6c75 6573 2061 7265 3a3c 2f70 3e0a values are:

    .\n+0014f860: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61 ..p\n+0014f8c0: 726f 746f 636f 6c20 7661 6c75 6520 2020 rotocol value \n+0014f8d0: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 \n+0014f910: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..S\n+0014f990: 4f41 5020 7472 616e 7370 6f72 742c 2073 OAP transport, s\n+0014f9a0: 7570 706f 7274 696e 6720 626f 7468 2053 upporting both S\n+0014f9b0: 4f41 5020 312e 3120 616e 6420 312e 3220 OAP 1.1 and 1.2 \n+0014f9c0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+0014f9f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+0014fa50: 534f 4150 2031 2e31 2074 7261 6e73 706f SOAP 1.1 transpo\n+0014fa60: 7274 2028 7361 6d65 2061 7320 3c63 6f64 rt (same as soapcpp2 -1) .....\n+0014fc10: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0014fc30: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n+0014fd70: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n+0014fea0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+0014fef0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+0014ffa0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ......

    The protocol property is SOAP \n+00150150: 6279 2064 6566 6175 6c74 2e20 5468 6520 by default. The \n+00150160: 6465 6661 756c 7420 6973 2063 6861 6e67 default is chang\n+00150170: 6564 2077 6974 6820 3c62 3e3c 636f 6465 ed with soapcpp2 -1 option <\n+001501a0: 623e 3c63 6f64 653e 2d31 3c2f 636f 6465 b>-1 to SOAP 1.\n+001501c0: 312c 203c 623e 3c63 6f64 653e 736f 6170 1, soap\n+001501d0: 6370 7032 202d 323c 2f63 6f64 653e 3c2f cpp2 -2 option -2\n+00150200: 2074 6f20 534f 4150 2031 2e32 2c20 616e to SOAP 1.2, an\n+00150210: 6420 6e6f 6e2d 534f 4150 2052 4553 5420 d non-SOAP REST \n+00150220: 7769 7468 203c 623e 3c63 6f64 653e 736f with so\n+00150230: 6170 6370 7032 202d 303c 2f63 6f64 653e apcpp2 -0\n+00150240: 3c2f 623e 206f 7074 696f 6e20 3c62 3e3c option <\n+00150250: 636f 6465 3e2d 303c 2f63 6f64 653e 3c2f code>-0

    .

    The GET p\n+00150280: 726f 746f 636f 6c73 2066 6f72 2053 4f41 rotocols for SOA\n+00150290: 5020 616e 6420 5245 5354 2072 6571 7569 P and REST requi\n+001502a0: 7265 2074 6861 7420 7468 6520 7365 7276 re that the serv\n+001502b0: 6963 6520 6f70 6572 6174 696f 6e73 206f ice operations o\n+001502c0: 6e6c 7920 7573 6520 7072 696d 6974 6976 nly use primitiv\n+001502d0: 6520 7479 7065 7320 7769 7468 2074 6865 e types with the\n+001502e0: 6972 2069 6e70 7574 2070 6172 616d 6574 ir input paramet\n+001502f0: 6572 732c 2062 6563 6175 7365 2074 6865 ers, because the\n+00150300: 7365 2070 6172 616d 6574 6572 7320 6172 se parameters ar\n+00150310: 6520 656e 636f 6465 6420 7769 7468 2074 e encoded with t\n+00150320: 6865 2055 524c 2061 7320 5552 4c20 7175 he URL as URL qu\n+00150330: 6572 7920 7661 6c75 6573 2e3c 2f70 3e0a ery values.

    .\n+00150340: 3c70 3e54 6f20 6c65 7420 6469 7265 6374

    To let direct\n+00150350: 6976 6573 2074 616b 6520 6566 6665 6374 ives take effect\n+00150360: 2077 6974 6820 7365 7276 6963 6520 6f70 with service op\n+00150370: 6572 6174 696f 6e73 2c20 796f 7520 7368 erations, you sh\n+00150380: 6f75 6c64 2062 696e 6420 7468 6520 7365 ould bind the se\n+00150390: 7276 6963 6520 6f70 6572 6174 696f 6e73 rvice operations\n+001503a0: 2074 6f20 7468 6520 5753 444c 206e 616d to the WSDL nam\n+001503b0: 6573 7061 6365 206f 6620 6120 7365 7276 espace of a serv\n+001503c0: 6963 6520 6279 2075 7369 6e67 2074 6865 ice by using the\n+001503d0: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi\n+001503e0: 7820 6173 2070 6172 7420 6f66 2074 6865 x as part of the\n+001503f0: 2069 6465 6e74 6966 6965 7220 6e61 6d65 identifier name\n+00150400: 206f 6620 7468 6520 6675 6e63 7469 6f6e of the function\n+00150410: 2074 6861 7420 6465 6669 6e65 7320 7468 that defines th\n+00150420: 6520 7365 7276 6963 6520 6f70 6572 6174 e service operat\n+00150430: 696f 6e3a 3c2f 703e 0a3c 6469 7620 636c ion:

    .
    <\n+00150450: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00150460: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int prefix__fu\n+00150490: 6e63 2861 7267 312c 2061 7267 322c 202e nc(arg1, arg2, .\n+001504a0: 2e2e 2c20 6172 676e 2c20 7265 7375 6c74 .., argn, result\n+001504b0: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .<\n+001504c0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001504d0: 3c70 3e77 6865 7265 203c 636f 6465 3e70

    where p\n+001504e0: 7265 6669 783c 2f63 6f64 653e 2063 616e refix can\n+001504f0: 206e 6f77 2062 6520 7573 6564 2074 6f20 now be used to \n+00150500: 6c65 7420 6469 7265 6374 6976 6573 2074 let directives t\n+00150510: 616b 6520 6566 6665 6374 206f 6e20 7468 ake effect on th\n+00150520: 6973 2073 6572 7669 6365 206f 7065 7261 is service opera\n+00150530: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

    .

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

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

    .Ser\n+001505a0: 7669 6365 206d 6574 686f 6420 6469 7265 vice method dire\n+001505b0: 6374 6976 6573 3c2f 6833 3e0a 3c70 3e53 ctives

    .

    S\n+001505c0: 6572 7669 6365 2070 726f 7065 7274 6965 ervice propertie\n+001505d0: 7320 6172 6520 6170 706c 6963 6162 6c65 s are applicable\n+001505e0: 2074 6f20 6120 7365 7276 6963 6520 616e to a service an\n+001505f0: 6420 746f 2061 6c6c 206f 6620 6974 7320 d to all of its \n+00150600: 6f70 6572 6174 696f 6e73 2e20 5365 7276 operations. Serv\n+00150610: 6963 6520 6d65 7468 6f64 2064 6972 6563 ice method direc\n+00150620: 7469 7665 7320 6172 6520 7370 6563 6966 tives are specif\n+00150630: 6963 616c 6c79 2061 7070 6c69 6361 626c ically applicabl\n+00150640: 6520 746f 2061 2073 6572 7669 6365 206f e to a service o\n+00150650: 7065 7261 7469 6f6e 2e3c 2f70 3e0a 3c70 peration.

    .A service metho\n+00150670: 6420 6469 7265 6374 6976 6520 6973 206f d directive is o\n+00150680: 6620 7468 6520 666f 726d 3a3c 2f70 3e0a f the form:

    .\n+00150690: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n+001506d0: 6773 6f61 7020 266c 743b 7072 6566 6978 gsoap <prefix\n+001506e0: 2667 743b 2073 6572 7669 6365 206d 6574 > service met\n+001506f0: 686f 642d 266c 743b 7072 6f70 6572 7479 hod-<property\n+00150700: 2667 743b 3a20 266c 743b 6d65 7468 6f64 >: <method\n+00150710: 2667 743b 2026 6c74 3b76 616c 7565 2667 > <value&g\n+00150720: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n+00150730: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    where \n+00150750: 3c63 6f64 653e 266c 743b 7072 6566 6978 <prefix\n+00150760: 2667 743b 3c2f 636f 6465 3e20 6973 2074 > is t\n+00150770: 6865 2058 4d4c 206e 616d 6573 7061 6365 he XML namespace\n+00150780: 2070 7265 6669 7820 6f66 2061 2073 6572 prefix of a ser\n+00150790: 7669 6365 2062 696e 6469 6e67 2061 6e64 vice binding and\n+001507a0: 203c 636f 6465 3e26 6c74 3b6d 6574 686f <metho\n+001507b0: 6426 6774 3b3c 2f63 6f64 653e 2069 7320 d> is \n+001507c0: 7468 6520 756e 7175 616c 6966 6965 6420 the unqualified \n+001507d0: 6e61 6d65 206f 6620 6120 7365 7276 6963 name of a servic\n+001507e0: 6520 6f70 6572 6174 696f 6e2e 2054 6865 e operation. The\n+001507f0: 203c 636f 6465 3e26 6c74 3b70 726f 7065 <prope\n+00150800: 7274 7926 6774 3b3c 2f63 6f64 653e 2061 rty> a\n+00150810: 6e64 203c 636f 6465 3e26 6c74 3b76 616c nd <val\n+00150820: 7565 2667 743b 3c2f 636f 6465 3e20 6669 ue> fi\n+00150830: 656c 6473 2061 7265 206f 6e65 206f 6620 elds are one of \n+00150840: 7468 6520 666f 6c6c 6f77 696e 673a 3c2f the following:.

    descripti\n+0014f900: 6f6e 2020 2020 3c2f 7468 3e3c 2f74 723e on
    SOAP
    SOAP1.1<\n+0014fa20: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    SOA\n+0014fae0: 5031 2e32 3c2f 636f 6465 3e20 2020 3c2f P1.2 SOAP 1.2 tr\n+0014fb20: 616e 7370 6f72 7420 2873 616d 6520 6173 ansport (same as\n+0014fb30: 203c 636f 6465 3e73 6f61 7063 7070 3220 soapcpp2 \n+0014fb40: 2d32 3c2f 636f 6465 3e29 2020 2020 3c2f -2)
    SOAP-GET one-\n+0014fbe0: 7761 7920 534f 4150 2031 2e31 206f 7220 way SOAP 1.1 or \n+0014fbf0: 312e 3220 7769 7468 2048 5454 5020 4745 1.2 with HTTP GE\n+0014fc00: 5420 2020 203c 2f74 643e 3c2f 7472 3e0a T
    SOAP1.1\n+0014fc60: 2d47 4554 3c2f 636f 6465 3e20 2020 3c2f -GET one-way SOA\n+0014fca0: 5020 312e 3120 7769 7468 2048 5454 5020 P 1.1 with HTTP \n+0014fcb0: 4745 5420 2020 203c 2f74 643e 3c2f 7472 GET
    SOAP\n+0014fd10: 312e 322d 4745 543c 2f63 6f64 653e 2020 1.2-GET \n+0014fd20: 203c 2f74 643e 3c74 6420 636c 6173 733d one-way \n+0014fd50: 534f 4150 2031 2e32 2077 6974 6820 4854 SOAP 1.2 with HT\n+0014fd60: 5450 2047 4554 2020 2020 3c2f 7464 3e3c TP GET
    HT\n+0014fdc0: 5450 3c2f 636f 6465 3e20 2020 3c2f 7464 TP an alias for \n+0014fe00: 3c63 6f64 653e 504f 5354 3c2f 636f 6465 POST (same as soapcpp2 -0)
    POS\n+0014fe90: 543c 2f63 6f64 653e 2020 203c 2f74 643e T non-SOAP REST \n+0014fed0: 7072 6f74 6f63 6f6c 2077 6974 6820 4854 protocol with HT\n+0014fee0: 5450 2050 4f53 5420 2020 203c 2f74 643e TP POST
    G\n+0014ff40: 4554 3c2f 636f 6465 3e20 2020 3c2f 7464 ET non-SOAP REST\n+0014ff80: 2070 726f 746f 636f 6c20 7769 7468 2048 protocol with H\n+0014ff90: 5454 5020 4745 5420 2020 203c 2f74 643e TTP GET
    \n+0014fff0: 5055 543c 2f63 6f64 653e 2020 203c 2f74 PUT non-SOAP RES\n+00150030: 5420 7072 6f74 6f63 6f6c 2077 6974 6820 T protocol with \n+00150040: 4854 5450 2050 5554 2020 2020 3c2f 7464 HTTP PUT
    \n+001500a0: 4445 4c45 5445 3c2f 636f 6465 3e20 2020 DELETE \n+001500b0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 non-SOAP \n+001500e0: 5245 5354 2070 726f 746f 636f 6c20 7769 REST protocol wi\n+001500f0: 7468 2048 5454 5020 4445 4c45 5445 2020 th HTTP DELETE \n+00150100: 203c 2f74 643e 3c2f 7472 3e0a 3c2f 7461
    \n+00150870: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+00150890: 3c74 6820 636c 6173 733d 226d 6172 6b64 .<\n+00150900: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00150910: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00150920: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+001509c0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+00150a20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00150a90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00150aa0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00150ab0: 3e3c 636f 6465 3e6d 6574 686f 642d 6163 >method-ac\n+00150ac0: 7469 6f6e 3c2f 636f 6465 3e20 2020 3c2f tion ...<\n+00150c40: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00150c50: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00150c60: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00150d20: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .....<\n+00150f50: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00150f60: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00150f70: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+00150fc0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ........<\n+001513e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001513f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00151400: 3e3c 636f 6465 3e6d 6574 686f 642d 696e >method-in\n+00151410: 7075 742d 6d69 6d65 2d74 7970 653c 2f63 put-mime-type ..\n+00151590: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n+00151650: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n+00151740: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n+00151930: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c .
    method propert\n+001508c0: 7920 2020 3c2f 7468 3e3c 7468 2063 6c61 y value\n+001508f0: 2020 2020 3c2f 7468 3e3c 2f74 723e 0a3c
    method-d\n+00150950: 6f63 756d 656e 7461 7469 6f6e 3c2f 636f ocumentation tex\n+00150990: 7420 6465 7363 7269 6269 6e67 2074 6865 t describing the\n+001509a0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+001509b0: 6f6e 2020 2020 3c2f 7464 3e3c 2f74 723e on
    metho\n+00150a10: 643c 2f63 6f64 653e 2020 203c 2f74 643e d same as above,\n+00150a50: 2073 686f 7274 6861 6e64 2066 6f72 6d20 shorthand form \n+00150a60: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    \"\" or URI SOAP\n+00150b10: 4163 7469 6f6e 2048 5454 5020 6865 6164 Action HTTP head\n+00150b20: 6572 2c20 6f72 2055 524c 2071 7565 7279 er, or URL query\n+00150b30: 2073 7472 696e 6720 666f 7220 5245 5354 string for REST\n+00150b40: 2070 726f 746f 636f 6c73 2020 2020 3c2f protocols
    method-input-\n+00150bb0: 6163 7469 6f6e 3c2f 636f 6465 3e20 2020 action \n+00150bc0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 \"\"<\n+00150bf0: 2f63 6f64 653e 206f 7220 5552 4920 534f /code> or URI SO\n+00150c00: 4150 4163 7469 6f6e 2048 5454 5020 6865 APAction HTTP he\n+00150c10: 6164 6572 206f 6620 7365 7276 6963 6520 ader of service \n+00150c20: 7265 7175 6573 7420 6d65 7373 6167 6573 request messages\n+00150c30: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    method-o\n+00150c90: 7574 7075 742d 6163 7469 6f6e 3c2f 636f utput-action \"\" or \n+00150ce0: 5552 4920 534f 4150 4163 7469 6f6e 2048 URI SOAPAction H\n+00150cf0: 5454 5020 6865 6164 6572 206f 6620 7365 TTP header of se\n+00150d00: 7276 6963 6520 7265 7370 6f6e 7365 206d rvice response m\n+00150d10: 6573 7361 6765 7320 2020 203c 2f74 643e essages
    \n+00150d70: 6d65 7468 6f64 2d66 6175 6c74 2d61 6374 method-fault-act\n+00150d80: 696f 6e3c 2f63 6f64 653e 2020 203c 2f74 ion \"\" or URI SOAPA\n+00150dd0: 6374 696f 6e20 4854 5450 2068 6561 6465 ction HTTP heade\n+00150de0: 7220 6f66 2073 6572 7669 6365 2066 6175 r of service fau\n+00150df0: 6c74 206d 6573 7361 6765 7320 2020 203c lt messages <\n+00150e00: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    method-header\n+00150e60: 2d70 6172 743c 2f63 6f64 653e 2020 203c -part <\n+00150e70: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>member nam\n+00150ea0: 6520 6f66 2074 6865 203c 636f 6465 3e3c e of the <\n+00150eb0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00150ec0: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n+00150ed0: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he\n+00150ee0: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html\" title\n+00150ef0: 3d22 534f 4150 2048 6561 6465 7220 7374 =\"SOAP Header st\n+00150f00: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.\">SOAP_E\n+00150f10: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header struct use\n+00150f30: 6420 696e 2053 4f41 5020 4865 6164 6572 d in SOAP Header\n+00150f40: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    method-\n+00150fa0: 696e 7075 742d 6865 6164 6572 2d70 6172 input-header-par\n+00150fb0: 743c 2f63 6f64 653e 2020 203c 2f74 643e t member name of\n+00150ff0: 2074 6865 203c 636f 6465 3e3c 6120 636c the SOAP_ENV__\n+00151060: 4865 6164 6572 3c2f 613e 3c2f 636f 6465 Header struct used in\n+00151080: 2053 4f41 5020 4865 6164 6572 7320 6f66 SOAP Headers of\n+00151090: 2072 6571 7565 7374 7320 2020 203c 2f74 requests
    method-output-h\n+00151100: 6561 6465 722d 7061 7274 3c2f 636f 6465 eader-part membe\n+00151140: 7220 6e61 6d65 206f 6620 7468 6520 3c63 r name of the S\n+001511b0: 4f41 505f 454e 565f 5f48 6561 6465 723c OAP_ENV__Header<\n+001511c0: 2f61 3e3c 2f63 6f64 653e 2073 7472 7563 /a> struc\n+001511d0: 7420 7573 6564 2069 6e20 534f 4150 2048 t used in SOAP H\n+001511e0: 6561 6465 7273 206f 6620 7265 7370 6f6e eaders of respon\n+001511f0: 7365 7320 2020 203c 2f74 643e 3c2f 7472 ses
    meth\n+00151250: 6f64 2d66 6175 6c74 3c2f 636f 6465 3e20 od-fault \n+00151260: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 type na\n+00151290: 6d65 206f 6620 6120 7374 7275 6374 206f me of a struct o\n+001512a0: 7220 636c 6173 7320 6d65 6d62 6572 2075 r class member u\n+001512b0: 7365 6420 696e 203c 636f 6465 3e53 4f41 sed in SOA\n+001512c0: 505f 454e 565f 5f44 6574 6169 6c73 3c2f P_ENV__Details struct \n+001512e0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    method-mime-\n+00151340: 7479 7065 3c2f 636f 6465 3e20 2020 3c2f type REST conten\n+00151380: 7420 7479 7065 206f 7220 534f 4150 204d t type or SOAP M\n+00151390: 494d 4520 6174 7461 6368 6d65 6e74 2063 IME attachment c\n+001513a0: 6f6e 7465 6e74 2074 7970 6528 7329 2020 ontent type(s) \n+001513b0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    RE\n+00151450: 5354 2063 6f6e 7465 6e74 2074 7970 6520 ST content type \n+00151460: 6f72 2053 4f41 5020 4d49 4d45 2061 7474 or SOAP MIME att\n+00151470: 6163 686d 656e 7420 636f 6e74 656e 7420 achment content \n+00151480: 7479 7065 2873 2920 6f66 2072 6571 7565 type(s) of reque\n+00151490: 7374 206d 6573 7361 6765 2020 2020 3c2f st message
    method-output-\n+00151500: 6d69 6d65 2d74 7970 653c 2f63 6f64 653e mime-type\n+00151510: 2020 203c 2f74 643e 3c74 6420 636c 6173 REST c\n+00151540: 6f6e 7465 6e74 2074 7970 6520 6f72 2053 ontent type or S\n+00151550: 4f41 5020 4d49 4d45 2061 7474 6163 686d OAP MIME attachm\n+00151560: 656e 7420 636f 6e74 656e 7420 7479 7065 ent content type\n+00151570: 2873 2920 6f66 2072 6573 706f 6e73 6520 (s) of response \n+00151580: 6d65 7373 6167 6520 2020 203c 2f74 643e message
    \n+001515e0: 6d65 7468 6f64 2d73 7479 6c65 3c2f 636f method-style document or rpc<\n+00151640: 2f63 6f64 653e 2020 2020 3c2f 7464 3e3c /code>
    me\n+001516a0: 7468 6f64 2d65 6e63 6f64 696e 673c 2f63 thod-encoding literal, encode\n+00151700: 643c 2f63 6f64 653e 2c20 6f72 2061 2063 d, or a c\n+00151710: 7573 746f 6d20 5552 4920 666f 7220 656e ustom URI for en\n+00151720: 636f 6469 6e67 5374 796c 6520 6f66 206d codingStyle of m\n+00151730: 6573 7361 6765 7320 2020 203c 2f74 643e essages
    \n+00151790: 6d65 7468 6f64 2d72 6573 706f 6e73 652d method-response-\n+001517a0: 656e 636f 6469 6e67 3c2f 636f 6465 3e20 encoding \n+001517b0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 l\n+001517e0: 6974 6572 616c 3c2f 636f 6465 3e2c 203c iteral, <\n+001517f0: 636f 6465 3e65 6e63 6f64 6564 3c2f 636f code>encoded, or a custom\n+00151810: 2055 5249 2066 6f72 2065 6e63 6f64 696e URI for encodin\n+00151820: 6753 7479 6c65 206f 6620 7265 7370 6f6e gStyle of respon\n+00151830: 7365 206d 6573 7361 6765 7320 2020 203c se messages <\n+00151840: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    method-protoc\n+001518a0: 6f6c 3c2f 636f 6465 3e20 2020 3c2f 7464 ol SOAP or REST,\n+001518e0: 2073 6565 203c 6120 636c 6173 733d 2265 see Service direct\n+00151920: 6976 6573 3c2f 613e 2020 203c 2f74 643e ives
    .<\n+00151940: 703e 5468 6520 3c63 6f64 653e 6d65 7468 p>The meth\n+00151950: 6f64 2d68 6561 6465 722d 7061 7274 3c2f od-header-part properties\n+00151970: 2063 616e 2062 6520 7265 7065 6174 6564 can be repeated\n+00151980: 2066 6f72 2061 2073 6572 7669 6365 206f for a service o\n+00151990: 7065 7261 7469 6f6e 2074 6f20 6465 636c peration to decl\n+001519a0: 6172 6520 6d75 6c74 6970 6c65 2053 4f41 are multiple SOA\n+001519b0: 5020 4865 6164 6572 2070 6172 7473 2074 P Header parts t\n+001519c0: 6861 7420 7468 6520 7365 7276 6963 6520 hat the service \n+001519d0: 6f70 6572 6174 696f 6e20 7265 7175 6972 operation requir\n+001519e0: 6573 2e20 596f 7520 6361 6e20 7573 6520 es. You can use \n+001519f0: 3c63 6f64 653e 6d65 7468 6f64 2d69 6e70 method-inp\n+00151a00: 7574 2d68 6561 6465 722d 7061 7274 3c2f ut-header-part and \n+00151a20: 6d65 7468 6f64 2d6f 7574 7075 742d 6865 method-output-he\n+00151a30: 6164 6572 2d70 6172 743c 2f63 6f64 653e ader-part\n+00151a40: 2074 6f20 6469 6666 6572 656e 7469 6174 to differentiat\n+00151a50: 6520 6265 7477 6565 6e20 7265 7175 6573 e between reques\n+00151a60: 7420 616e 6420 7265 7370 6f6e 7365 206d t and response m\n+00151a70: 6573 7361 6765 732e 3c2f 703e 0a3c 703e essages.

    .

    \n+00151a80: 5468 6520 3c63 6f64 653e 6d65 7468 6f64 The method\n+00151a90: 2d66 6175 6c74 3c2f 636f 6465 3e20 7072 -fault pr\n+00151aa0: 6f70 6572 7479 2063 616e 2062 6520 7265 operty can be re\n+00151ab0: 7065 6174 6564 2066 6f72 2061 2073 6572 peated for a ser\n+00151ac0: 7669 6365 206f 7065 7261 7469 6f6e 2074 vice operation t\n+00151ad0: 6f20 6465 636c 6172 6520 6d75 6c74 6970 o declare multip\n+00151ae0: 6c65 2066 6175 6c74 7320 7468 6174 2074 le faults that t\n+00151af0: 6865 2073 6572 7669 6365 206f 7065 7261 he service opera\n+00151b00: 7469 6f6e 206d 6179 2072 6574 7572 6e2e tion may return.\n+00151b10: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The method-action<\n+00151b30: 2f63 6f64 653e 2070 726f 7065 7274 7920 /code> property \n+00151b40: 7365 7276 6573 2074 776f 2070 7572 706f serves two purpo\n+00151b50: 7365 733a 3c2f 703e 0a3c 6f6c 2074 7970 ses:

    .
      .
    1. To se\n+00151b70: 7420 7468 6520 534f 4150 4163 7469 6f6e t the SOAPAction\n+00151b80: 2068 6561 6465 7220 666f 7220 534f 4150 header for SOAP\n+00151b90: 2070 726f 746f 636f 6c73 2c20 692e 652e protocols, i.e.\n+00151ba0: 2073 6574 7320 7468 6520 6465 6669 6e69 sets the defini\n+00151bb0: 7469 6f6e 732f 6269 6e64 696e 672f 6f70 tions/binding/op\n+00151bc0: 6572 6174 696f 6e2f 534f 4150 3a6f 7065 eration/SOAP:ope\n+00151bd0: 7261 7469 6f6e 2f40 736f 6170 4163 7469 ration/@soapActi\n+00151be0: 6f6e 2e3c 2f6c 693e 0a3c 6c69 3e54 6f20 on.
    2. .
    3. To \n+00151bf0: 7365 7420 7468 6520 5552 4c20 7175 6572 set the URL quer\n+00151c00: 7920 7374 7269 6e67 2066 6f72 2065 6e64 y string for end\n+00151c10: 706f 696e 7473 2077 6974 6820 5245 5354 points with REST\n+00151c20: 2070 726f 746f 636f 6c73 2c20 692e 652e protocols, i.e.\n+00151c30: 2073 6574 7320 7468 6520 6465 6669 6e69 sets the defini\n+00151c40: 7469 6f6e 732f 6269 6e64 696e 672f 6f70 tions/binding/op\n+00151c50: 6572 6174 696f 6e2f 4854 5450 3a6f 7065 eration/HTTP:ope\n+00151c60: 7261 7469 6f6e 2f40 6c6f 6361 7469 6f6e ration/@location\n+00151c70: 2c20 7768 6963 6820 7370 6563 6966 6965 , which specifie\n+00151c80: 7320 6120 5552 4c20 7175 6572 7920 7374 s a URL query st\n+00151c90: 7269 6e67 2028 7374 6172 7473 2077 6974 ring (starts wit\n+00151ca0: 6820 6120 3c63 6f64 653e 3f3c 2f63 6f64 h a ?) to complete \n+00151cc0: 7468 6520 7365 7276 6963 6520 656e 6470 the service endp\n+00151cd0: 6f69 6e74 2055 524c 206f 7220 6578 7465 oint URL or exte\n+00151ce0: 6e64 7320 7468 6520 656e 6470 6f69 6e74 nds the endpoint\n+00151cf0: 2055 524c 2077 6974 6820 6120 6c6f 6361 URL with a loca\n+00151d00: 6c20 7061 7468 2028 7374 6172 7473 2077 l path (starts w\n+00151d10: 6974 6820 6120 3c63 6f64 653e 2f3c 2f63 ith a /).
    4. ..

      Use m\n+00151d40: 6574 686f 642d 696e 7075 742d 6163 7469 ethod-input-acti\n+00151d50: 6f6e 3c2f 636f 6465 3e20 616e 6420 3c63 on and method-outpu\n+00151d70: 742d 6163 7469 6f6e 3c2f 636f 6465 3e20 t-action \n+00151d80: 746f 2064 6966 6665 7265 6e74 6961 7465 to differentiate\n+00151d90: 2074 6865 2053 4f41 5041 6374 696f 6e20 the SOAPAction \n+00151da0: 6265 7477 6565 6e20 534f 4150 2072 6571 between SOAP req\n+00151db0: 7565 7374 2061 6e64 2072 6573 706f 6e73 uest and respons\n+00151dc0: 6520 6d65 7373 6167 6573 2e3c 2f70 3e0a e messages.

      .\n+00151dd0: 3c70 3e59 6f75 2063 616e 2061 6c77 6179

      You can alway\n+00151de0: 7320 6f76 6572 7269 6465 2074 6865 2070 s override the p\n+00151df0: 6f72 7420 656e 6470 6f69 6e74 2055 524c ort endpoint URL\n+00151e00: 2061 6e64 2061 6374 696f 6e20 7661 6c75 and action valu\n+00151e10: 6573 2061 7420 7275 6e74 696d 6520 696e es at runtime in\n+00151e20: 2074 6865 2061 7574 6f2d 6765 6e65 7261 the auto-genera\n+00151e30: 7465 6420 3c63 6f64 653e 736f 6170 5f63 ted soap_c\n+00151e40: 616c 6c5f 7072 6566 6978 5f5f 6675 6e63 all_prefix__func\n+00151e50: 3c2f 636f 6465 3e20 7365 7276 6963 6520 service \n+00151e60: 6361 6c6c 2028 432f 432b 2b20 636c 6965 call (C/C++ clie\n+00151e70: 6e74 2073 6964 6529 2061 6e64 2069 6e20 nt side) and in \n+00151e80: 7468 6520 6175 746f 2d67 656e 6572 6174 the auto-generat\n+00151e90: 6564 2043 2b2b 2070 726f 7879 2063 6c61 ed C++ proxy cla\n+00151ea0: 7373 2073 6572 7669 6365 2063 616c 6c73 ss service calls\n+00151eb0: 2e20 4120 7275 6e74 696d 6520 4e55 4c4c . A runtime NULL\n+00151ec0: 2065 6e64 706f 696e 7420 5552 4c20 616e endpoint URL an\n+00151ed0: 642f 6f72 2061 6374 696f 6e20 7573 6573 d/or action uses\n+00151ee0: 2074 6865 2064 6566 6175 6c74 7320 7365 the defaults se\n+00151ef0: 7420 6279 2074 6865 7365 2064 6972 6563 t by these direc\n+00151f00: 7469 7665 732e 3c2f 703e 0a3c 703e 5468 tives.

      .

      Th\n+00151f10: 6520 3c63 6f64 653e 6d65 7468 6f64 2d6d e method-m\n+00151f20: 696d 652d 7479 7065 3c2f 636f 6465 3e20 ime-type \n+00151f30: 7072 6f70 6572 7479 2073 6572 7665 7320 property serves \n+00151f40: 7477 6f20 7075 7270 6f73 6573 3a3c 2f70 two purposes:.

        .\n+00151f60: 3c6c 693e 546f 2073 6574 2074 6865 2074
      1. To set the t\n+00151f70: 7970 6520 6f66 204d 494d 452f 4d54 4f4d ype of MIME/MTOM\n+00151f80: 2061 7474 6163 686d 656e 7473 2075 7365 attachments use\n+00151f90: 6420 7769 7468 2053 4f41 5020 7072 6f74 d with SOAP prot\n+00151fa0: 6f63 6f6c 732e 204d 756c 7469 706c 6520 ocols. Multiple \n+00151fb0: 6174 7461 6368 6d65 6e74 2074 7970 6573 attachment types\n+00151fc0: 2063 616e 2062 6520 6465 636c 6172 6564 can be declared\n+00151fd0: 2066 6f72 2061 2053 4f41 5020 7365 7276 for a SOAP serv\n+00151fe0: 6963 6520 6f70 6572 6174 696f 6e2c 2069 ice operation, i\n+00151ff0: 2e65 2e20 6164 6473 2064 6566 696e 6974 .e. adds definit\n+00152000: 696f 6e73 2f62 696e 6469 6e67 2f6f 7065 ions/binding/ope\n+00152010: 7261 7469 6f6e 2f69 6e70 7574 2f4d 494d ration/input/MIM\n+00152020: 453a 6d75 6c74 6970 6172 7452 656c 6174 E:multipartRelat\n+00152030: 6564 2f4d 494d 453a 7061 7274 2f4d 494d ed/MIME:part/MIM\n+00152040: 453a 636f 6e74 656e 742f 4074 7970 6520 E:content/@type \n+00152050: 666f 7220 6561 6368 2074 7970 6520 7370 for each type sp\n+00152060: 6563 6966 6965 642e 3c2f 6c69 3e0a 3c6c ecified.
      2. .To set the MIM\n+00152080: 4520 7479 7065 206f 6620 6120 5245 5354 E type of a REST\n+00152090: 206f 7065 7261 7469 6f6e 2e20 5468 6973 operation. This\n+001520a0: 2072 6570 6c61 6365 7320 584d 4c20 6465 replaces XML de\n+001520b0: 636c 6172 6564 2069 6e20 5753 444c 2062 clared in WSDL b\n+001520c0: 7920 6465 6669 6e69 7469 6f6e 732f 6269 y definitions/bi\n+001520d0: 6e64 696e 672f 6f70 6572 6174 696f 6e2f nding/operation/\n+001520e0: 2869 6e70 7574 7c6f 7574 7075 7429 2f4d (input|output)/M\n+001520f0: 494d 453a 6d69 6d65 586d 6c20 7769 7468 IME:mimeXml with\n+00152100: 204d 494d 453a 636f 6e74 656e 742f 4074 MIME:content/@t\n+00152110: 7970 652e 2055 7365 203c 636f 6465 3e61 ype. Use a\n+00152120: 7070 6c69 6361 7469 6f6e 2f78 2d77 7777 pplication/x-www\n+00152130: 2d66 6f72 6d2d 7572 6c65 6e63 6f64 6564 -form-urlencoded\n+00152140: 3c2f 636f 6465 3e20 7769 7468 2052 4553 with RES\n+00152150: 5420 504f 5354 2061 6e64 2050 5554 2070 T POST and PUT p\n+00152160: 726f 746f 636f 6c73 2074 6f20 7365 6e64 rotocols to send\n+00152170: 2065 6e63 6f64 6564 2066 6f72 6d20 6461 encoded form da\n+00152180: 7461 2061 7574 6f6d 6174 6963 616c 6c79 ta automatically\n+00152190: 2069 6e73 7465 6164 206f 6620 584d 4c2e instead of XML.\n+001521a0: 204f 6e6c 7920 7072 696d 6974 6976 6520 Only primitive \n+001521b0: 7479 7065 2076 616c 7565 7320 6361 6e20 type values can \n+001521c0: 6265 2074 7261 6e73 6d69 7474 6564 2077 be transmitted w\n+001521d0: 6974 6820 666f 726d 2064 6174 612c 2073 ith form data, s\n+001521e0: 7563 6820 6173 206e 756d 6265 7273 2061 uch as numbers a\n+001521f0: 6e64 2073 7472 696e 6773 2c20 692e 652e nd strings, i.e.\n+00152200: 206f 6e6c 7920 7479 7065 7320 7468 6174 only types that\n+00152210: 2061 7265 206c 6567 616c 2074 6f20 7573 are legal to us\n+00152220: 6520 6173 2061 7474 7269 6275 7465 7320 e as attributes \n+00152230: 6d65 6d62 6572 732e 3c2f 6c69 3e0a 3c2f members...

        Use method-input-mi\n+00152260: 6d65 2d74 7970 653c 2f63 6f64 653e 2061 me-type a\n+00152270: 6e64 203c 636f 6465 3e6d 6574 686f 642d nd method-\n+00152280: 6f75 7470 7574 2d6d 696d 652d 7479 7065 output-mime-type\n+00152290: 3c2f 636f 6465 3e20 746f 2064 6966 6665 to diffe\n+001522a0: 7265 6e74 6961 7465 2074 6865 2061 7474 rentiate the att\n+001522b0: 6163 686d 656e 7420 7479 7065 7320 6265 achment types be\n+001522c0: 7477 6565 6e20 7265 7175 6573 7420 616e tween request an\n+001522d0: 6420 7265 7370 6f6e 7365 206d 6573 7361 d response messa\n+001522e0: 6765 732e 3c2f 703e 0a3c 703e f09f 949d ges.

        .

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

        .<\n+00152320: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.Sche\n+00152350: 6d61 2064 6972 6563 7469 7665 733c 2f68 ma directives.

        A schema d\n+00152370: 6972 6563 7469 7665 2069 7320 6f66 2074 irective is of t\n+00152380: 6865 2066 6f72 6d3a 3c2f 703e 0a3c 6469 he form:

        .
        //gso\n+001523d0: 6170 2026 6c74 3b70 7265 6669 7826 6774 ap <prefix>\n+001523e0: 3b20 7363 6865 6d61 2026 6c74 3b70 726f ; schema <pro\n+001523f0: 7065 7274 7926 6774 3b3a 2026 6c74 3b76 perty>: <v\n+00152400: 616c 7565 2667 743b 3c2f 7370 616e 3e3c alue><\n+00152410: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

        \n+00152430: 7768 6572 6520 3c63 6f64 653e 266c 743b where <\n+00152440: 7072 6566 6978 2667 743b 3c2f 636f 6465 prefix> is the XML nam\n+00152460: 6573 7061 6365 2070 7265 6669 7820 6f66 espace prefix of\n+00152470: 2061 2073 6368 656d 612e 2054 6865 203c a schema. The <\n+00152480: 636f 6465 3e26 6c74 3b70 726f 7065 7274 code><propert\n+00152490: 7926 6774 3b3c 2f63 6f64 653e 2061 6e64 y> and\n+001524a0: 203c 636f 6465 3e26 6c74 3b76 616c 7565 <value\n+001524b0: 2667 743b 3c2f 636f 6465 3e20 6669 656c > fiel\n+001524c0: 6473 2061 7265 206f 6e65 206f 6620 7468 ds are one of th\n+001524d0: 6520 666f 6c6c 6f77 696e 673a 3c2f 703e e following:

        \n+001524e0: 0a3c 7461 626c 6520 636c 6173 733d 226d ..<\n+00152500: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00152510: 776e 5461 626c 6548 6561 6422 3e0a 3c74 wnTableHead\">.\n+00152540: 7072 6f70 6572 7479 2020 203c 2f74 683e property \n+00152550: 3c74 6820 636c 6173 733d 226d 6172 6b64 \n+00152580: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n+00152630: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ......\n+00152890: 3c63 6f64 653e 666f 726d 3c2f 636f 6465 form .\n+00152940: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00152960: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...<\n+00152a70: 636f 6465 3e61 7474 7269 6275 7465 466f code>attributeFo\n+00152a80: 726d 3c2f 636f 6465 3e20 2020 3c2f 7464 rm...
        value
        n\n+001525d0: 616d 6573 7061 6365 3c2f 636f 6465 3e20 amespace \n+001525e0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 URI of \n+00152610: 7468 6520 5853 4420 7461 7267 6574 4e61 the XSD targetNa\n+00152620: 6d65 7370 6163 6520 2020 203c 2f74 643e mespace
        \n+00152680: 6e61 6d65 7370 6163 6532 3c2f 636f 6465 namespace2 alter\n+001526c0: 6e61 7465 2055 5249 2070 6174 7465 726e nate URI pattern\n+001526d0: 2066 6f72 2074 6865 2058 5344 206e 616d for the XSD nam\n+001526e0: 6573 7061 6365 2028 692e 652e 2055 5249 espace (i.e. URI\n+001526f0: 2069 7320 616c 736f 2061 6363 6570 7465 is also accepte\n+00152700: 6420 6279 2074 6865 2058 4d4c 2070 6172 d by the XML par\n+00152710: 7365 7229 2020 2020 3c2f 7464 3e3c 2f74 ser)
        impo\n+00152770: 7274 3c2f 636f 6465 3e20 2020 3c2f 7464 rt URI of an imp\n+001527b0: 6f72 7465 6420 6e61 6d65 7370 6163 652c orted namespace,\n+001527c0: 2061 7320 616e 2061 6c74 6572 6e61 7469 as an alternati\n+001527d0: 7665 206f 7220 696e 2061 6464 6974 696f ve or in additio\n+001527e0: 6e20 746f 203c 636f 6465 3e6e 616d 6573 n to names\n+001527f0: 7061 6365 3c2f 636f 6465 3e2c 2061 6464 pace, add\n+00152800: 7320 3c63 6f64 653e 7873 643a 696d 706f s xsd:impo\n+00152810: 7274 3c2f 636f 6465 3e20 746f 2074 6865 rt to the\n+00152820: 2067 656e 6572 6174 6564 2057 5344 4c20 generated WSDL \n+00152830: 616e 6420 5853 4420 6669 6c65 7320 2020 and XSD files \n+00152840: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
        unqualified (default) or\n+001528f0: 203c 636f 6465 3e71 7561 6c69 6669 6564 qualified\n+00152900: 3c2f 636f 6465 3e20 6c6f 6361 6c20 656c local el\n+00152910: 656d 656e 7420 616e 6420 6174 7472 6962 ement and attrib\n+00152920: 7574 6520 666f 726d 2064 6566 6175 6c74 ute form default\n+00152930: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
        element\n+00152990: 466f 726d 3c2f 636f 6465 3e20 2020 3c2f Form unqua\n+001529d0: 6c69 6669 6564 3c2f 636f 6465 3e20 2864 lified (d\n+001529e0: 6566 6175 6c74 2920 6f72 203c 636f 6465 efault) or qualified local element \n+00152a10: 666f 726d 2064 6566 6175 6c74 2020 2020 form default \n+00152a20: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
        unquali\n+00152ac0: 6669 6564 3c2f 636f 6465 3e20 2864 6566 fied (def\n+00152ad0: 6175 6c74 2920 6f72 203c 636f 6465 3e71 ault) or q\n+00152ae0: 7561 6c69 6669 6564 3c2f 636f 6465 3e20 ualified \n+00152af0: 6c6f 6361 6c20 6174 7472 6962 7574 6520 local attribute \n+00152b00: 666f 726d 2064 6566 6175 6c74 2020 2020 form default \n+00152b10: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
        typed\n+00152b70: 2020 203c 2f74 643e 3c74 6420 636c 6173 \n+00152ba0: 6e6f 3c2f 636f 6465 3e20 2864 6566 6175 no (defau\n+00152bb0: 6c74 2920 6f72 203c 636f 6465 3e79 6573 lt) or yes\n+00152bc0: 3c2f 636f 6465 3e20 666f 7220 7365 7269 for seri\n+00152bd0: 616c 697a 6572 7320 746f 2061 6464 203c alizers to add <\n+00152be0: 636f 6465 3e78 7369 3a74 7970 653c 2f63 code>xsi:type attributes \n+00152c00: 746f 2058 4d4c 2020 203c 2f74 643e 3c2f to XML
        .

        \n+00152c20: 5468 6520 3c63 6f64 653e 6e61 6d65 7370 The namesp\n+00152c30: 6163 6532 3c2f 636f 6465 3e20 5552 4920 ace2 URI \n+00152c40: 6973 2061 2070 6174 7465 726e 2077 6974 is a pattern wit\n+00152c50: 6820 3c63 6f64 653e 2a3c 2f63 6f64 653e h *\n+00152c60: 206d 6174 6368 696e 6720 616e 7920 7365 matching any se\n+00152c70: 7175 656e 6365 206f 6620 6368 6172 6163 quence of charac\n+00152c80: 7465 7273 2061 6e64 203c 636f 6465 3e2d ters and -\n+00152c90: 3c2f 636f 6465 3e20 6d61 7463 6869 6e67 matching\n+00152ca0: 2061 6e79 2063 6861 7261 6374 6572 2e20 any character. \n+00152cb0: 5468 6973 2070 6174 7465 726e 2069 6e73 This pattern ins\n+00152cc0: 7472 7563 7473 2074 6865 2058 4d4c 2070 tructs the XML p\n+00152cd0: 6172 7365 7220 616e 6420 7661 6c69 6461 arser and valida\n+00152ce0: 746f 7220 746f 2061 6c73 6f20 6163 6365 tor to also acce\n+00152cf0: 7074 2074 6865 2055 5249 2070 6174 7465 pt the URI patte\n+00152d00: 726e 2061 7320 6120 7661 6c69 6420 6e61 rn as a valid na\n+00152d10: 6d65 7370 6163 6520 666f 7220 7468 6520 mespace for the \n+00152d20: 7370 6563 6966 6965 6420 3c63 6f64 653e specified \n+00152d30: 266c 743b 7072 6566 6978 2667 743b 3c2f <prefix>.

        .

        Th\n+00152d50: 6520 3c63 6f64 653e 7479 7065 643c 2f63 e typed property is\n+00152d70: 203c 636f 6465 3e6e 6f3c 2f63 6f64 653e no\n+00152d80: 2062 7920 6465 6661 756c 7420 616e 6420 by default and \n+00152d90: 6361 6e20 6265 2063 6861 6e67 6564 2074 can be changed t\n+00152da0: 6f20 3c63 6f64 653e 7965 733c 2f63 6f64 o yes with soapcpp2 -t option <\n+00152de0: 623e 3c63 6f64 653e 2d74 3c2f 636f 6465 b>-t.

        .

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

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

        .Sc\n+00152e60: 6865 6d61 2074 7970 6520 6469 7265 6374 hema type direct\n+00152e70: 6976 6573 3c2f 6833 3e0a 3c70 3e41 2073 ives

        .

        A s\n+00152e80: 6368 656d 6120 7479 7065 2064 6972 6563 chema type direc\n+00152e90: 7469 7665 2069 7320 6f66 2074 6865 2066 tive is of the f\n+00152ea0: 6f72 6d3a 3c2f 703e 0a3c 6469 7620 636c orm:

        .
        <\n+00152ec0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00152ed0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap &\n+00152ef0: 6c74 3b70 7265 6669 7826 6774 3b20 7363 lt;prefix> sc\n+00152f00: 6865 6d61 2074 7970 652d 266c 743b 7072 hema type-<pr\n+00152f10: 6f70 6572 7479 2667 743b 3a20 266c 743b operty>: <\n+00152f20: 6e61 6d65 2667 743b 2026 6c74 3b76 616c name> <val\n+00152f30: 7565 2667 743b 3c2f 7370 616e 3e3c 2f64 ue>.
        //gs\n+00152f70: 6f61 7020 266c 743b 7072 6566 6978 2667 oap <prefix&g\n+00152f80: 743b 2073 6368 656d 6120 7479 7065 2d26 t; schema type-&\n+00152f90: 6c74 3b70 726f 7065 7274 7926 6774 3b3a lt;property>:\n+00152fa0: 2026 6c74 3b6e 616d 6526 6774 3b3a 3a26 <name>::&\n+00152fb0: 6c74 3b6d 656d 6265 7226 6774 3b20 266c lt;member> &l\n+00152fc0: 743b 7661 6c75 6526 6774 3b3c 2f73 7061 t;value>
        .
        <\n+00152fe0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00152ff0: 3c70 3e77 6865 7265 203c 636f 6465 3e26

        where &\n+00153000: 6c74 3b70 7265 6669 7826 6774 3b3c 2f63 lt;prefix> is the XML \n+00153020: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+00153030: 206f 6620 6120 7363 6865 6d61 2061 6e64 of a schema and\n+00153040: 203c 636f 6465 3e26 6c74 3b6e 616d 6526 <name&\n+00153050: 6774 3b3c 2f63 6f64 653e 2069 7320 616e gt; is an\n+00153060: 2075 6e71 7561 6c69 6669 6564 206e 616d unqualified nam\n+00153070: 6520 6f66 2061 2043 2f43 2b2b 2074 7970 e of a C/C++ typ\n+00153080: 652c 2061 6e64 2074 6865 206f 7074 696f e, and the optio\n+00153090: 6e61 6c20 3c63 6f64 653e 266c 743b 6d65 nal <me\n+001530a0: 6d62 6572 2667 743b 3c2f 636f 6465 3e20 mber> \n+001530b0: 6973 2061 2063 6c61 7373 2f73 7472 7563 is a class/struc\n+001530c0: 7420 6d65 6d62 6572 7320 6f72 2065 6e75 t members or enu\n+001530d0: 6d20 636f 6e73 7461 6e74 2e3c 2f70 3e0a m constant.

        .\n+001530e0: 3c70 3e59 6f75 2063 616e 2064 6573 6372

        You can descr\n+001530f0: 6962 6520 6120 7479 7065 2077 6974 6820 ibe a type with \n+00153100: 6f6e 6520 6f66 2074 6865 2066 6f6c 6c6f one of the follo\n+00153110: 7769 6e67 3a3c 2f70 3e0a 3c74 6162 6c65 wing:

        ...type pr\n+00153180: 6f70 6572 7479 2020 203c 2f74 683e 3c74 operty \n+001531b0: 7661 6c75 6520 2020 203c 2f74 683e 3c2f value ..typ\n+00153210: 652d 646f 6375 6d65 6e74 6174 696f 6e3c e-documentation<\n+00153220: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+00153250: 7465 7874 2064 6573 6372 6962 696e 6720 text describing \n+00153260: 7468 6520 7363 6865 6d61 2074 7970 6520 the schema type \n+00153270: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+001532a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 type an \n+00153300: 616c 6961 7320 666f 7220 7468 6520 3c63 alias for the type-documen\n+00153320: 7461 7469 6f6e 3c2f 636f 6465 3e20 7072 tation pr\n+00153330: 6f70 6572 7479 2020 203c 2f74 643e 3c2f operty ..

        \n+00153350: 466f 7220 6578 616d 706c 652c 2079 6f75 For example, you\n+00153360: 2063 616e 2061 6464 2061 2064 6573 6372 can add a descr\n+00153370: 6970 7469 6f6e 2074 6f20 616e 2065 6e75 iption to an enu\n+00153380: 6d65 7261 7469 6f6e 3a3c 2f70 3e0a 3c64 meration:

        .
        //gs\n+001533d0: 6f61 7020 6e73 2073 6368 656d 6120 7479 oap ns schema ty\n+001533e0: 7065 3a20 566f 7765 6c73 2054 6865 206c pe: Vowels The l\n+001533f0: 6574 7465 7273 2041 2c20 452c 2049 2c20 etters A, E, I, \n+00153400: 4f2c 2055 2c20 616e 6420 736f 6d65 7469 O, U, and someti\n+00153410: 6d65 7320 593c 2f73 7061 6e3e 3c2f 6469 mes Y.
        //gso\n+00153450: 6170 206e 7320 7363 6865 6d61 2074 7970 ap ns schema typ\n+00153460: 653a 2056 6f77 656c 733a 3a59 2041 2076 e: Vowels::Y A v\n+00153470: 6f77 656c 2c20 736f 6d65 7469 6d65 733c owel, sometimes<\n+00153480: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
        .<\n+001534a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001534b0: 6f72 6422 3e65 6e75 6d20 636c 6173 733c ord\">enum class<\n+001534c0: 2f73 7061 6e3e 206e 735f 5f56 6f77 656c /span> ns__Vowel\n+001534d0: 7320 3a20 6368 6172 207b 2041 203d 203c s : char { A = <\n+001534e0: 7370 616e 2063 6c61 7373 3d22 6368 6172 span class=\"char\n+001534f0: 6c69 7465 7261 6c22 3e26 2333 393b 4126 literal\">'A&\n+00153500: 2333 393b 3c2f 7370 616e 3e2c 2045 203d #39;, E =\n+00153510: 203c 7370 616e 2063 6c61 7373 3d22 6368 '\n+00153530: 4526 2333 393b 3c2f 7370 616e 3e2c 2049 E', I\n+00153540: 203d 203c 7370 616e 2063 6c61 7373 3d22 = \n+00153560: 393b 4926 2333 393b 3c2f 7370 616e 3e2c 9;I',\n+00153570: 204f 203d 203c 7370 616e 2063 6c61 7373 O = &\n+00153590: 2333 393b 4f26 2333 393b 3c2f 7370 616e #39;O', U = 'U', Y = 'Y' };
        .<\n+00153610: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

        This do\n+00153630: 6375 6d65 6e74 6564 2065 6e75 6d65 7261 cumented enumera\n+00153640: 7469 6f6e 206d 6170 7320 746f 2061 2073 tion maps to a s\n+00153650: 696d 706c 6554 7970 6520 7265 7374 7269 impleType restri\n+00153660: 6374 696f 6e20 6f66 203c 656d 3e3c 636f ction of xsd:string in the\n+00153690: 2073 6f61 7063 7070 322d 6765 6e65 7261 soapcpp2-genera\n+001536a0: 7465 6420 7363 6865 6d61 3a3c 2f70 3e0a ted schema:

        .\n+001536b0: 3c64 6976 2063 6c61 7373 3d22 616c 7422
        <simpleTy\n+00153710: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe \n+00153730: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="Vo\n+00153760: 7765 6c73 2671 756f 743b 3c2f 7370 616e wels">
        . \n+00153790: 266c 743b 3c73 7061 6e20 636c 6173 733d <an\n+001537b0: 6e6f 7461 7469 6f6e 3c2f 7370 616e 3e26 notation&\n+001537c0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
        .
        \n+001537e0: 266c 743b 3c73 7061 6e20 636c 6173 733d <do\n+00153800: 6375 6d65 6e74 6174 696f 6e3c 2f73 7061 cumentation>The<\n+00153830: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> let\n+00153850: 7465 7273 3c2f 7370 616e 3e20 3c73 7061 ters A, E, I, O, U, and sometimes Y</documentation>
        .\n+001539a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
        </annotation>
        .<\n+001539f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00153a00: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <restriction base="xsd:stri\n+00153a80: 6e67 2671 756f 743b 3c2f 7370 616e 3e26 ng"&\n+00153a90: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
        .
        \n+00153ab0: 266c 743b 3c73 7061 6e20 636c 6173 733d <en\n+00153ad0: 756d 6572 6174 696f 6e3c 2f73 7061 6e3e umeration\n+00153ae0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 value=\n+00153b20: 2671 756f 743b 4126 7175 6f74 3b3c 2f73 "A"/>
        .\n+00153b40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
        <enumeration<\n+00153b80: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val\n+00153ba0: 7565 3c2f 7370 616e 3e3d 3c73 7061 6e20 ue="E&qu\n+00153bd0: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n+00153be0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
        <\n+00153c00: 3c73 7061 6e20 636c 6173 733d 226b 6579 enumer\n+00153c20: 6174 696f 6e3c 2f73 7061 6e3e 203c 7370 ation value=\n+00153c50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00153c70: 743b 4926 7175 6f74 3b3c 2f73 7061 6e3e t;I"\n+00153c80: 2f26 6774 3b3c 2f64 6976 3e0a 3c64 6976 />
        . \n+00153ca0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+00153cc0: 656e 756d 6572 6174 696f 6e3c 2f73 7061 enumeration value="O"<\n+00153d20: 2f73 7061 6e3e 2f26 6774 3b3c 2f64 6976 /span>/>.
        <enumeratio\n+00153d70: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n v\n+00153d90: 616c 7565 3c2f 7370 616e 3e3d 3c73 7061 alue="U&\n+00153dc0: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/>\n+00153dd0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
        .
        &l\n+00153df0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;enum\n+00153e10: 6572 6174 696f 6e3c 2f73 7061 6e3e 203c eration <\n+00153e20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00153e30: 6f72 6422 3e76 616c 7565 3c2f 7370 616e ord\">value=&q\n+00153e60: 756f 743b 5926 7175 6f74 3b3c 2f73 7061 uot;Y">
        . \n+00153e90: 2020 2020 2026 6c74 3b3c 7370 616e 2063 <annotation>
        .<\n+00153ed0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00153ee0: 3e20 2020 2020 2020 2026 6c74 3b3c 7370 > <documenta\n+00153f10: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b3c tion><\n+00153f20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00153f30: 6f72 6422 3e41 3c2f 7370 616e 3e20 3c73 ord\">A vowel\n+00153f60: 2c20 3c73 7061 6e20 636c 6173 733d 226b , sometime\n+00153f80: 733c 2f73 7061 6e3e 266c 743b 2f3c 7370 s</documenta\n+00153fb0: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b3c tion><\n+00153fc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
        &l\n+00153fe0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ann\n+00154000: 6f74 6174 696f 6e3c 2f73 7061 6e3e 2667 otation&g\n+00154010: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
        .
        &\n+00154030: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;enu\n+00154050: 6d65 7261 7469 6f6e 3c2f 7370 616e 3e2f meration/\n+00154060: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
        .
        &\n+00154080: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/re\n+001540a0: 7374 7269 6374 696f 6e3c 2f73 7061 6e3e striction\n+001540b0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
        .
        <\n+001540d0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/simp\n+001540f0: 6c65 5479 7065 3c2f 7370 616e 3e26 6774 leType>\n+00154100: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
        .
    \n+00154120: 3c2f 6469 763e 3c70 3ef0 9f94 9d20 3c61
  • .... Back t\n+00154140: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n+00154150: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    \n+00154160: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Example.

    The use of\n+001541a0: 2064 6972 6563 7469 7665 7320 6973 2062 directives is b\n+001541b0: 6573 7420 696c 6c75 7374 7261 7465 6420 est illustrated \n+001541c0: 7769 7468 2061 6e20 6578 616d 706c 652e with an example.\n+001541d0: 2054 6865 2065 7861 6d70 6c65 2075 7365 The example use\n+001541e0: 7320 6120 6879 706f 7468 6574 6963 616c s a hypothetical\n+001541f0: 2073 746f 636b 2071 756f 7465 2073 6572 stock quote ser\n+00154200: 7669 6365 2061 6e64 2065 7863 6861 6e67 vice and exchang\n+00154210: 6520 7261 7465 2073 6572 7669 6365 2c20 e rate service, \n+00154220: 6163 7475 616c 2073 6572 7669 6365 7320 actual services \n+00154230: 7375 6368 2061 7320 7468 6573 6520 6172 such as these ar\n+00154240: 6520 6176 6169 6c61 626c 6520 666f 7220 e available for \n+00154250: 6672 6565 206f 6e20 7468 6520 7765 622e free on the web.\n+00154260: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns1 s\n+001542b0: 6572 7669 6365 206e 616d 6573 7061 6365 ervice namespace\n+001542c0: 3a20 2075 726e 3a47 6574 5175 6f74 6520 : urn:GetQuote \n+001542d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001542f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns1__getQuo\n+00154320: 7465 283c 7370 616e 2063 6c61 7373 3d22 te(cha\n+00154340: 723c 2f73 7061 6e3e 202a 7379 6d62 6f6c r *symbol\n+00154350: 2c20 3c73 7061 6e20 636c 6173 733d 226b , floa\n+00154370: 743c 2f73 7061 6e3e 2026 616d 703b 7265 t &re\n+00154380: 7375 6c74 293b 203c 2f64 6976 3e0a 3c64 sult);
    .\n+001543a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61

    .
    \n+001543d0: 2f2f 6773 6f61 7020 6e73 3220 7365 7276 //gsoap ns2 serv\n+001543e0: 6963 6520 6e61 6d65 7370 6163 653a 2020 ice namespace: \n+001543f0: 7572 6e3a 4375 7272 656e 6379 4578 6368 urn:CurrencyExch\n+00154400: 616e 6765 203c 2f73 7061 6e3e 3c2f 6469 ange .
    i\n+00154440: 6e74 3c2f 7370 616e 3e20 6e73 325f 5f67 nt ns2__g\n+00154450: 6574 5261 7465 283c 7370 616e 2063 6c61 etRate(char *co\n+00154480: 756e 7472 7931 2c20 3c73 7061 6e20 636c untry1, char *c\n+001544b0: 6f75 6e74 7279 322c 203c 7370 616e 2063 ountry2, float \n+001544e0: 2661 6d70 3b72 6573 756c 7429 3b20 3c2f &result); .
    .<\n+00154510: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00154520: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+00154540: 7333 2073 6572 7669 6365 206e 616d 653a s3 service name:\n+00154550: 2020 2020 2020 2071 756f 7465 7820 3c2f quotex
    .//gsoap ns3 \n+001545a0: 7365 7276 6963 6520 7374 796c 653a 2020 service style: \n+001545b0: 2020 2020 7270 6320 3c2f 7370 616e 3e3c rpc <\n+001545c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+001545f0: 6773 6f61 7020 6e73 3320 7365 7276 6963 gsoap ns3 servic\n+00154600: 6520 656e 636f 6469 6e67 3a20 2020 656e e encoding: en\n+00154610: 636f 6465 6420 3c2f 7370 616e 3e3c 2f64 coded .
    //gs\n+00154650: 6f61 7020 6e73 3320 7365 7276 6963 6520 oap ns3 service \n+00154660: 706f 7274 3a20 2020 2020 2020 6874 7470 port: http\n+00154670: 3a2f 2f77 7777 2e6d 7964 6f6d 6169 6e2e ://www.mydomain.\n+00154680: 636f 6d2f 7175 6f74 6578 2e63 6769 203c com/quotex.cgi <\n+00154690: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001546b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001546c0: 656e 7422 3e2f 2f67 736f 6170 206e 7333 ent\">//gsoap ns3\n+001546d0: 2073 6572 7669 6365 206e 616d 6573 7061 service namespa\n+001546e0: 6365 3a20 2075 726e 3a71 756f 7465 7820 ce: urn:quotex \n+001546f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00154710: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns3__getQuo\n+00154740: 7465 283c 7370 616e 2063 6c61 7373 3d22 te(cha\n+00154760: 723c 2f73 7061 6e3e 202a 7379 6d62 6f6c r *symbol\n+00154770: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n+00154790: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country\n+001547a0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , floa\n+001547c0: 743c 2f73 7061 6e3e 2026 616d 703b 7265 t &re\n+001547d0: 7375 6c74 293b 3c2f 6469 763e 0a3c 2f64 sult);
    .

    The <\n+00154800: 636f 6465 3e71 756f 7465 782e 683c 2f63 code>quotex.h exampl\n+00154820: 6520 6973 2061 206e 6577 2057 6562 2053 e is a new Web S\n+00154830: 6572 7669 6365 2063 7265 6174 6564 2062 ervice created b\n+00154840: 7920 636f 6d62 696e 696e 6720 7477 6f20 y combining two \n+00154850: 6578 6973 7469 6e67 2057 6562 2053 6572 existing Web Ser\n+00154860: 7669 6365 733a 2061 2053 746f 636b 2051 vices: a Stock Q\n+00154870: 756f 7465 2073 6572 7669 6365 2061 6e64 uote service and\n+00154880: 2061 2043 7572 7265 6e63 7920 4578 6368 a Currency Exch\n+00154890: 616e 6765 2073 6572 7669 6365 2e3c 2f70 ange service..

    The namespa\n+001548b0: 6365 2070 7265 6669 7820 3c63 6f64 653e ce prefix \n+001548c0: 6e73 333c 2f63 6f64 653e 2069 7320 7573 ns3 is us\n+001548d0: 6564 2066 6f72 2074 6865 206e 6577 203c ed for the new <\n+001548e0: 636f 6465 3e71 756f 7465 783c 2f63 6f64 code>quotex Web Service w\n+00154900: 6974 6820 6e61 6d65 7370 6163 6520 5552 ith namespace UR\n+00154910: 4920 3c65 6d3e 3c63 6f64 653e 7572 6e3a I urn:\n+00154920: 7175 6f74 6578 3c2f 636f 6465 3e3c 2f65 quotex, service name\n+00154940: 203c 636f 6465 3e71 756f 7465 783c 2f63 quotex, and endpoi\n+00154960: 6e74 2070 6f72 7420 3c65 6d3e 3c63 6f64 nt port h\n+001549a0: 7474 703a 2f2f 7777 772e 6d79 646f 6d61 ttp://www.mydoma\n+001549b0: 696e 2e63 6f6d 2f71 756f 7465 782e 6367 in.com/quotex.cg\n+001549c0: 693c 2f61 3e3c 2f63 6f64 653e 3c2f 656d i.

    .

    Since \n+001549e0: 7468 6520 6e65 7720 5765 6220 5365 7276 the new Web Serv\n+001549f0: 6963 6520 696e 766f 6b65 7320 7468 6520 ice invokes the \n+00154a00: 3c63 6f64 653e 6e73 315f 5f67 6574 5175 ns1__getQu\n+00154a10: 6f74 653c 2f63 6f64 653e 2061 6e64 203c ote and <\n+00154a20: 636f 6465 3e6e 7332 5f5f 6765 7452 6174 code>ns2__getRat\n+00154a30: 653c 2f63 6f64 653e 2073 6572 7669 6365 e service\n+00154a40: 206f 7065 7261 7469 6f6e 732c 2074 6865 operations, the\n+00154a50: 2073 6572 7669 6365 206e 616d 6573 7061 service namespa\n+00154a60: 6365 7320 616e 6420 6f74 6865 7220 6465 ces and other de\n+00154a70: 7461 696c 7320 7375 6368 2061 7320 7374 tails such as st\n+00154a80: 796c 6520 616e 6420 656e 636f 6469 6e67 yle and encoding\n+00154a90: 206f 6620 7468 6573 6520 6d65 7468 6f64 of these method\n+00154aa0: 7320 6172 6520 6769 7665 6e20 6279 2064 s are given by d\n+00154ab0: 6972 6563 7469 7665 732e 2041 6674 6572 irectives. After\n+00154ac0: 2069 6e76 6f6b 696e 6720 7468 6520 736f invoking the so\n+00154ad0: 6170 6370 7032 2074 6f6f 6c20 6f6e 2074 apcpp2 tool on t\n+00154ae0: 6865 203c 656d 3e3c 636f 6465 3e71 756f he quo\n+00154af0: 7465 782e 683c 2f63 6f64 653e 3c2f 656d tex.h header file: <\n+00154b10: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     soapcp\n+00154b30: 7032 2071 756f 7465 782e 680a 3c2f 7072  p2 quotex.h.

    the WSDL o\n+00154b50: 6620 7468 6520 6e65 7720 3c63 6f64 653e f the new \n+00154b60: 7175 6f74 6578 3c2f 636f 6465 3e20 5765 quotex We\n+00154b70: 6220 5365 7276 6963 6520 6973 2073 6176 b Service is sav\n+00154b80: 6564 2061 7320 3c65 6d3e 3c63 6f64 653e ed as \n+00154b90: 7175 6f74 6578 2e77 7364 6c3c 2f63 6f64 quotex.wsdl. Since t\n+00154bb0: 6865 2073 6572 7669 6365 206e 616d 652c he service name,\n+00154bc0: 2065 6e64 706f 696e 7420 706f 7274 2c20 endpoint port, \n+00154bd0: 616e 6420 6e61 6d65 7370 6163 6520 5552 and namespace UR\n+00154be0: 4920 7765 7265 2070 726f 7669 6465 6420 I were provided \n+00154bf0: 696e 2074 6865 2068 6561 6465 7220 6669 in the header fi\n+00154c00: 6c65 2c20 7468 6520 6765 6e65 7261 7465 le, the generate\n+00154c10: 6420 5753 444c 2066 696c 6520 6361 6e20 d WSDL file can \n+00154c20: 6265 2070 7562 6c69 7368 6564 2074 6f67 be published tog\n+00154c30: 6574 6865 7220 7769 7468 2074 6865 2063 ether with the c\n+00154c40: 6f6d 7069 6c65 6420 5765 6220 5365 7276 ompiled Web Serv\n+00154c50: 6963 6520 696e 7374 616c 6c65 6420 6173 ice installed as\n+00154c60: 2061 2043 4749 2061 7070 6c69 6361 7469 a CGI applicati\n+00154c70: 6f6e 2e3c 2f70 3e0a 3c70 3e54 6865 206e on.

    .

    The n\n+00154c80: 616d 6573 7061 6365 206d 6170 7069 6e67 amespace mapping\n+00154c90: 2074 6162 6c65 2066 6f72 2074 6865 203c table for the <\n+00154ca0: 656d 3e3c 636f 6465 3e71 756f 7465 782e em>quotex.\n+00154cb0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n+00154cc0: 5765 6220 5365 7276 6963 6520 696d 706c Web Service impl\n+00154cd0: 656d 656e 7461 7469 6f6e 2069 7320 7361 ementation is sa\n+00154ce0: 7665 6420 6173 203c 656d 3e3c 636f 6465 ved as quotex.nsmap. This \n+00154d10: 6669 6c65 2063 616e 2062 6520 6469 7265 file can be dire\n+00154d20: 6374 6c79 2069 6e63 6c75 6465 6420 696e ctly included in\n+00154d30: 203c 656d 3e3c 636f 6465 3e71 756f 7465 quote\n+00154d40: 782e 6370 703c 2f63 6f64 653e 3c2f 656d x.cpp instead of spe\n+00154d60: 6369 6669 6564 2062 7920 6861 6e64 2069 cified by hand i\n+00154d70: 6e20 7468 6520 736f 7572 6365 206f 6620 n the source of \n+00154d80: 3c65 6d3e 3c63 6f64 653e 7175 6f74 6578 quotex\n+00154d90: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n+00154da0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n+00154de0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Transient \n+00154e10: 6461 7461 2074 7970 6573 3c2f 6832 3e0a data types

    .\n+00154e20: 3c70 3e54 6865 7265 2061 7265 2073 6974

    There are sit\n+00154e30: 7561 7469 6f6e 7320 7768 656e 2063 6572 uations when cer\n+00154e40: 7461 696e 2074 7970 6573 2068 6176 6520 tain types have \n+00154e50: 746f 2062 6520 7573 6564 2069 6e20 616e to be used in an\n+00154e60: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+00154e70: 7220 6669 6c65 2c20 6275 7420 7468 6520 r file, but the \n+00154e80: 7479 7065 7320 6172 6520 6e6f 7420 7365 types are not se\n+00154e90: 7269 616c 697a 6162 6c65 2061 6e64 2074 rializable and t\n+00154ea0: 6865 7265 666f 7265 2068 6176 6520 746f herefore have to\n+00154eb0: 2062 6520 2269 6e76 6973 6962 6c65 2220 be \"invisible\" \n+00154ec0: 746f 2074 6865 2073 6f61 7063 7070 3220 to the soapcpp2 \n+00154ed0: 746f 6f6c 2e20 5468 6573 6520 7479 7065 tool. These type\n+00154ee0: 7320 6172 6520 6361 6c6c 6564 2074 7261 s are called tra\n+00154ef0: 6e73 6965 6e74 2e3c 2f70 3e0a 3c70 3e54 nsient.

    .

    T\n+00154f00: 6869 7320 6665 6174 7572 6520 6973 2075 his feature is u\n+00154f10: 7365 6675 6c20 7768 656e 2061 206c 6962 seful when a lib\n+00154f20: 7261 7279 2074 7970 6520 6973 2075 7365 rary type is use\n+00154f30: 6420 696e 2074 6865 2069 6e74 6572 6661 d in the interfa\n+00154f40: 6365 2068 6561 6465 7220 6669 6c65 2061 ce header file a\n+00154f50: 7320 7061 7274 206f 6620 6120 7374 7275 s part of a stru\n+00154f60: 6374 206f 7220 636c 6173 732c 2066 6f72 ct or class, for\n+00154f70: 2065 7861 6d70 6c65 2074 6865 203c 636f example the FILE t\n+00154f90: 7970 6520 6f72 203c 636f 6465 3e73 7464 ype or std\n+00154fa0: 3a3a 6f73 7472 6561 6d3c 2f63 6f64 653e ::ostream\n+00154fb0: 2074 6861 7420 6172 6520 636c 6561 726c that are clearl\n+00154fc0: 7920 6e6f 7420 7365 7269 616c 697a 6162 y not serializab\n+00154fd0: 6c65 2e20 4966 2074 6865 7365 2074 7970 le. If these typ\n+00154fe0: 6573 2061 7265 2069 6e74 726f 6475 6365 es are introduce\n+00154ff0: 6420 696e 2061 6e20 696e 7465 7266 6163 d in an interfac\n+00155000: 6520 6865 6164 6572 2066 696c 6520 7468 e header file th\n+00155010: 656e 2074 6865 7365 2074 7970 6573 206d en these types m\n+00155020: 7573 7420 6265 2064 6563 6c61 7265 6420 ust be declared \n+00155030: 7472 616e 7369 656e 742e 204f 7468 6572 transient. Other\n+00155040: 7769 7365 2c20 736f 6170 6370 7032 2077 wise, soapcpp2 w\n+00155050: 696c 6c20 7468 726f 7720 616e 2065 7272 ill throw an err\n+00155060: 6f72 2e3c 2f70 3e0a 3c70 3e54 6f20 6465 or.

    .

    To de\n+00155070: 636c 6172 6520 6120 7472 616e 7369 656e clare a transien\n+00155080: 7420 7479 7065 2075 7365 203c 636f 6465 t type use extern. \n+001550a0: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

    \n+001550b0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    e\n+001550f0: 7874 6572 6e3c 2f73 7061 6e3e 203c 7370 xtern class \n+00155120: 4649 4c45 3b3c 2f64 6976 3e0a 3c2f 6469 FILE;
    .

    Even thoug\n+00155150: 6820 3c63 6f64 653e 4649 4c45 3c2f 636f h FILE is not a cla\n+00155170: 7373 2c20 7468 6973 2064 6563 6c61 7261 ss, this declara\n+00155180: 7469 6f6e 206d 6572 656c 7920 696e 7472 tion merely intr\n+00155190: 6f64 7563 6573 2074 6865 203c 636f 6465 oduces the FILE typ\n+001551b0: 6520 6e61 6d65 2077 6974 686f 7574 2073 e name without s\n+001551c0: 7065 6369 6679 696e 6720 6974 7320 6465 pecifying its de\n+001551d0: 7461 696c 732e 3c2f 703e 0a3c 703e 496e tails.

    .

    In\n+001551e0: 2043 2077 6520 6361 6e20 7374 696c 6c20 C we can still \n+001551f0: 7573 6520 7468 6520 636c 6173 7320 6b65 use the class ke\n+00155200: 7977 6f72 642c 2062 6563 6175 7365 206e yword, because n\n+00155210: 6f20 636f 6465 2069 7320 6765 6e65 7261 o code is genera\n+00155220: 7465 6420 6279 2073 6f61 7063 7070 3220 ted by soapcpp2 \n+00155230: 666f 7220 7468 6973 2074 7261 6e73 6965 for this transie\n+00155240: 6e74 2074 7970 652e 3c2f 703e 0a3c 703e nt type.

    .

    \n+00155250: 5765 2063 616e 2074 6865 6e20 7573 6520 We can then use \n+00155260: 7468 6973 2074 7970 6520 656c 7365 7768 this type elsewh\n+00155270: 6572 652c 2066 6f72 2065 7861 6d70 6c65 ere, for example\n+00155280: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    struct ns__record.
    {
    . \n+00155310: 2020 2046 494c 4520 2a66 643b 3c2f 6469 FILE *fd;.
    c\n+00155350: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *name;
    .<\n+00155390: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001553a0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    \n+001553b0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n+001556e0: 703e 496e 206f 7468 6572 2063 6173 6573 p>In other cases\n+001556f0: 2077 6520 646f 2077 616e 7420 746f 2064 we do want to d\n+00155700: 6563 6c61 7265 2061 2074 7970 6520 7468 eclare a type th\n+00155710: 6174 2073 6f61 7063 7070 3220 7368 6f75 at soapcpp2 shou\n+00155720: 6c64 2063 6f70 7920 696e 746f 203c 656d ld copy into soapStub.\n+00155740: 683c 2f63 6f64 653e 3c2f 656d 3e20 666f h
    fo\n+00155750: 7220 7468 6520 6170 706c 6963 6174 696f r the applicatio\n+00155760: 6e20 736f 7572 6365 2063 6f64 652c 2062 n source code, b\n+00155770: 7574 2077 6869 6368 2073 686f 756c 6420 ut which should \n+00155780: 6e6f 7420 6265 2073 6572 6961 6c69 7a61 not be serializa\n+00155790: 626c 652e 2057 6520 6361 6e20 7573 6520 ble. We can use \n+001557a0: 3c63 6f64 653e 6578 7465 726e 3c2f 636f extern for this or \n+001557c0: 7075 7420 7468 6520 6465 636c 6172 6174 put the declarat\n+001557d0: 696f 6e20 696e 203c 636f 6465 3e5b 3c2f ion in [ and \n+001557f0: 5d3c 2f63 6f64 653e 2062 7261 636b 6574 ] bracket\n+00155800: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    [\n+00155830: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    class n\n+00155870: 735f 5f6d 7942 6173 6520 3c73 7061 6e20 s__myBase \n+00155890: 2f2f 2062 6173 6520 636c 6173 7320 6e65 // base class ne\n+001558a0: 6564 206e 6f74 2062 6520 7365 7269 616c ed not be serial\n+001558b0: 697a 6162 6c65 3c2f 7370 616e 3e3c 2f64 izable.
    {
    .\n+001558e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... \n+00155910: 2f2f 206d 656d 6265 7273 3c2f 7370 616e // members
    .
    }; <\n+00155940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ]
    \n+00155960: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    class <\n+00155990: 2f73 7061 6e3e 6e73 5f5f 6d79 4465 7269 /span>ns__myDeri\n+001559a0: 7665 6420 3a20 6e73 5f5f 6d79 4261 7365 ved : ns__myBase\n+001559b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    ... \n+00155a00: 2f2f 206d 656d 6265 7273 3c2f 7370 616e // members
    .
    }; .

    We\n+00155a50: 2063 616e 2075 7365 203c 636f 6465 3e5b can use [\n+00155a60: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and ] brack\n+00155a80: 6574 7320 666f 7220 7061 7274 7320 6f66 ets for parts of\n+00155a90: 2074 6865 2063 6f64 652c 2066 6f72 2065 the code, for e\n+00155aa0: 7861 6d70 6c65 2074 6f20 6d61 6b65 2073 xample to make s\n+00155ab0: 6576 6572 616c 2063 6c61 7373 206d 656d everal class mem\n+00155ac0: 6265 7273 2074 7261 6e73 6965 6e74 3a3c bers transient:<\n+00155ad0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    [ typedef int\n+00155b40: 3c2f 7370 616e 3e20 7472 616e 7369 656e transien\n+00155b50: 7449 6e74 3b20 5d20 3c2f 6469 763e 0a3c tInt; ]
    .<\n+00155b60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00155b70: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >class ns__myClass \n+00155ba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00155bc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+00155bf0: 6e74 3c2f 7370 616e 3e20 613b 203c 7370 nt a; // will be se\n+00155c20: 7269 616c 697a 6564 203c 2f73 7061 6e3e rialized \n+00155c30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    [ .
    int b; \n+00155c90: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // transie\n+00155cb0: 6e74 206d 656d 6265 7220 3c2f 7370 616e nt member
    .
    char s[256]; \n+00155d20: 2f2f 2074 7261 6e73 6965 6e74 206d 656d // transient mem\n+00155d30: 6265 7220 3c2f 7370 616e 3e3c 2f64 6976 ber .
    ]
    .\n+00155d60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    extern\n+00155d90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c float d\n+00155dc0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // trans\n+00155de0: 6965 6e74 2074 7970 6520 666c 6f61 7420 ient type float \n+00155df0: 616e 6420 6d65 6d62 6572 3c2f 7370 616e and member
    .
    char *t; // w\n+00155e60: 696c 6c20 6265 2073 6572 6961 6c69 7a65 ill be serialize\n+00155e70: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n+00155e80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    transientInt\n+00155ea0: 202a 6e3b 203c 7370 616e 2063 6c61 7373 *n; // tr\n+00155ec0: 616e 7369 656e 7420 7479 7065 2069 6e74 ansient type int\n+00155ed0: 2061 6e64 206d 656d 6265 7220 3c2f 7370 and member
    .
    [ \n+00155f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    virtual \n+00155f40: 3c73 7061 6e20 636c 6173 733d 226b 6579 void method(char buf[1024]); <\n+00155fa0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00155fb0: 656e 7422 3e2f 2f20 646f 6573 206e 6f74 ent\">// does not\n+00155fc0: 2063 7265 6174 6520 6120 6368 6172 5b31 create a char[1\n+00155fd0: 3032 345d 2073 6572 6961 6c69 7a65 7220 024] serializer \n+00155fe0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00156000: 2020 5d20 203c 2f64 6976 3e0a 3c64 6976 ]
    .};\n+00156020: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    In this example\n+00156050: 2c20 3c63 6f64 653e 6e73 5f5f 6d79 436c , ns__myCl\n+00156060: 6173 733c 2f63 6f64 653e 2068 6173 2074 ass has t\n+00156070: 6872 6565 2074 7261 6e73 6965 6e74 206d hree transient m\n+00156080: 656d 6265 7273 3a20 3c63 6f64 653e 623c embers: b<\n+00156090: 2f63 6f64 653e 2c20 3c63 6f64 653e 733c /code>, s<\n+001560a0: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and n which\n+001560c0: 2077 696c 6c20 6e6f 7420 6265 2073 6572 will not be ser\n+001560d0: 6961 6c69 7a65 642e 204d 656d 6265 7220 ialized. Member \n+001560e0: 3c63 6f64 653e 6e3c 2f63 6f64 653e 2069 n i\n+001560f0: 7320 7472 616e 7369 656e 7420 6265 6361 s transient beca\n+00156100: 7573 6520 7468 6520 7479 7065 2069 7320 use the type is \n+00156110: 6465 636c 6172 6564 2077 6974 6869 6e20 declared within \n+00156120: 6120 7472 616e 7369 656e 7420 626c 6f63 a transient bloc\n+00156130: 6b2e 2050 6f69 6e74 6572 732c 2072 6566 k. Pointers, ref\n+00156140: 6572 656e 6365 732c 2061 6e64 2061 7272 erences, and arr\n+00156150: 6179 7320 6f66 2074 7261 6e73 6965 6e74 ays of transient\n+00156160: 2074 7970 6573 2061 7265 2074 7261 6e73 types are trans\n+00156170: 6965 6e74 2e20 5468 6520 7369 6e67 6c65 ient. The single\n+00156180: 2063 6c61 7373 206d 6574 686f 6420 6973 class method is\n+00156190: 2065 6e63 6170 7375 6c61 7465 6420 7769 encapsulated wi\n+001561a0: 7468 696e 203c 636f 6465 3e5b 3c2f 636f thin [ and ]<\n+001561c0: 2f63 6f64 653e 2074 6f20 7072 6576 656e /code> to preven\n+001561d0: 7420 736f 6170 6370 7032 2066 726f 6d20 t soapcpp2 from \n+001561e0: 6372 6561 7469 6e67 2073 6572 6961 6c69 creating seriali\n+001561f0: 7a65 7273 2066 6f72 2074 6865 203c 636f zers for the char[1024] type.

    .<\n+00156220: 703e 5765 2061 6c73 6f20 7573 6520 3c63 p>We also use [
    and\n+00156240: 203c 636f 6465 3e5d 3c2f 636f 6465 3e20 ] \n+00156250: 6272 6163 6b65 7473 2074 6f20 696e 7472 brackets to intr\n+00156260: 6f64 7563 6520 6120 7472 616e 7369 656e oduce a transien\n+00156270: 7420 696e 7465 6765 7220 7479 7065 203c t integer type <\n+00156280: 636f 6465 3e74 7261 6e73 6965 6e74 496e code>transientIn\n+00156290: 743c 2f63 6f64 653e 2075 7369 6e67 2061 t
    using a\n+001562a0: 2074 7970 6564 6566 2e20 5765 2063 616e typedef. We can\n+001562b0: 6e6f 7420 7573 6520 3c63 6f64 653e 6578 not use ex\n+001562c0: 7465 726e 3c2f 636f 6465 3e20 7769 7468 tern with\n+001562d0: 203c 636f 6465 3e74 7970 6564 6566 3c2f typedef because th\n+001562f0: 6973 2063 6f6e 7374 7275 6374 2069 7320 is construct is \n+00156300: 7265 7365 7276 6564 2066 6f72 2063 7573 reserved for cus\n+00156310: 746f 6d20 7365 7269 616c 697a 6572 732e tom serializers.\n+00156320: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+00156360: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00156370: 2069 643d 2276 6f6c 6174 696c 6522 3e3c id=\"volatile\"><\n+00156380: 2f61 3e0a 5365 7269 616c 697a 6174 696f /a>.Serializatio\n+00156390: 6e20 2261 7320 6973 2220 6f66 2076 6f6c n \"as is\" of vol\n+001563a0: 6174 696c 6520 6461 7461 2074 7970 6573 atile data types\n+001563b0: 3c2f 6832 3e0a 3c70 3e54 7970 6573 2064

    .

    Types d\n+001563c0: 6563 6c61 7265 6420 3c63 6f64 653e 766f eclared vo\n+001563d0: 6c61 7469 6c65 3c2f 636f 6465 3e20 696e latile in\n+001563e0: 2061 6e20 696e 7465 7266 6163 6520 6865 an interface he\n+001563f0: 6164 6572 2066 696c 6520 6172 6520 7365 ader file are se\n+00156400: 7269 616c 697a 6162 6c65 2062 7574 206e rializable but n\n+00156410: 6f74 2063 6f70 6965 6420 6279 2073 6f61 ot copied by soa\n+00156420: 7063 7070 3220 746f 203c 656d 3e3c 636f pcpp2 to soapStub.h. These\n+00156450: 2074 7970 6573 2061 7265 2074 7970 6963 types are typic\n+00156460: 616c 6c79 206c 6962 7261 7279 2074 7970 ally library typ\n+00156470: 6573 2074 6861 7420 6172 6520 696e 636c es that are incl\n+00156480: 7564 6564 2069 6e20 7468 6520 736f 7572 uded in the sour\n+00156490: 6365 2063 6f64 6520 616e 6420 7368 6f75 ce code and shou\n+001564a0: 6c64 206e 6f74 2062 6520 7265 6465 6669 ld not be redefi\n+001564b0: 6e65 6420 696e 2074 6865 2061 7070 6c69 ned in the appli\n+001564c0: 6361 7469 6f6e 2073 6f75 7263 6520 636f cation source co\n+001564d0: 6465 2e20 5765 2077 616e 7420 746f 2073 de. We want to s\n+001564e0: 6572 6961 6c69 7a65 2074 6865 7365 206c erialize these l\n+001564f0: 6962 7261 7279 2074 7970 6573 2022 6173 ibrary types \"as\n+00156500: 2069 7322 2077 6974 686f 7574 2072 6564 is\" without red\n+00156510: 6566 696e 696e 6720 7468 656d 2e3c 2f70 efining them..

    Consider fo\n+00156530: 7220 6578 616d 706c 6520 3c63 6f64 653e r example \n+00156540: 7374 7275 6374 2074 6d3c 2f63 6f64 653e struct tm\n+00156550: 2c20 6465 636c 6172 6564 2069 6e20 3c65 , declared in time.h. The \n+00156580: 7374 7275 6374 7572 6520 6d61 7920 6163 structure may ac\n+00156590: 7475 616c 6c79 2076 6172 7920 6265 7477 tually vary betw\n+001565a0: 6565 6e20 706c 6174 666f 726d 732c 2062 een platforms, b\n+001565b0: 7574 2074 6865 203c 636f 6465 3e74 6d3c ut the tm<\n+001565c0: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure\n+001565d0: 2069 6e63 6c75 6465 7320 6174 206c 6561 includes at lea\n+001565e0: 7374 2074 6865 2066 6f6c 6c6f 7769 6e67 st the following\n+001565f0: 206d 656d 6265 7273 2061 7320 6465 636c members as decl\n+00156600: 6172 6564 2069 6e20 7468 6520 666f 6c6c ared in the foll\n+00156610: 6f77 696e 6720 696e 7465 7266 6163 6520 owing interface \n+00156620: 6865 6164 6572 2066 696c 6520 666f 7220 header file for \n+00156630: 736f 6170 6370 7032 3a3c 2f70 3e0a 3c64 soapcpp2:

    .
    #include <ti\n+00156690: 6d65 2e68 2667 743b 3c2f 7370 616e 3e3c me.h><\n+001566a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    vo\n+001566d0: 6c61 7469 6c65 3c2f 7370 616e 3e20 3c73 latile struct tm
    .{<\n+00156720: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n+00156760: 2074 6d5f 7365 633b 2020 2020 2020 2020 tm_sec; \n+00156770: 203c 7370 616e 2063 6c61 7373 3d22 636f /* second\n+00156790: 7320 2830 202d 2036 3029 202a 2f3c 2f73 s (0 - 60) */
    . \n+001567c0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+001567e0: 2f73 7061 6e3e 2074 6d5f 6d69 6e3b 2020 /span> tm_min; \n+001567f0: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n+00156810: 6d69 6e75 7465 7320 2830 202d 2035 3929 minutes (0 - 59)\n+00156820: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    int tm_\n+00156870: 686f 7572 3b20 2020 2020 2020 203c 7370 hour; /* hours (0 -\n+001568a0: 2032 3329 202a 2f3c 2f73 7061 6e3e 203c 23) */ <\n+001568b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n+001568f0: 2074 6d5f 6d64 6179 3b20 2020 2020 2020 tm_mday; \n+00156900: 203c 7370 616e 2063 6c61 7373 3d22 636f /* day of\n+00156920: 206d 6f6e 7468 2028 3120 2d20 3331 2920 month (1 - 31) \n+00156930: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n+00156940: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_m\n+00156980: 6f6e 3b20 2020 2020 2020 2020 3c73 7061 on; /* month of ye\n+001569b0: 6172 2028 3020 2d20 3131 2920 2a2f 3c2f ar (0 - 11) */
    . \n+001569e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+00156a00: 3c2f 7370 616e 3e20 746d 5f79 6561 723b tm_year;\n+00156a10: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n+00156a30: 2079 6561 7220 2d20 3139 3030 202a 2f3c year - 1900 */<\n+00156a40: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n+00156a60: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+00156a80: 743c 2f73 7061 6e3e 2074 6d5f 7764 6179 t tm_wday\n+00156a90: 3b20 2020 2020 2020 203c 7370 616e 2063 ; /\n+00156ab0: 2a20 6461 7920 6f66 2077 6565 6b20 2853 * day of week (S\n+00156ac0: 756e 6461 7920 3d20 3029 202a 2f3c 2f73 unday = 0) */
    . \n+00156af0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+00156b10: 2f73 7061 6e3e 2074 6d5f 7964 6179 3b20 /span> tm_yday; \n+00156b20: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n+00156b40: 6461 7920 6f66 2079 6561 7220 2830 202d day of year (0 -\n+00156b50: 2033 3635 2920 2a2f 3c2f 7370 616e 3e20 365) */ \n+00156b60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int tm_isdst; \n+00156bb0: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* is su\n+00156bd0: 6d6d 6572 2074 696d 6520 696e 2065 6666 mmer time in eff\n+00156be0: 6563 743f 202a 2f3c 2f73 7061 6e3e 203c ect? */ <\n+00156bf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *tm_zone; \n+00156c40: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* abbr\n+00156c60: 6576 6961 7469 6f6e 206f 6620 7469 6d65 eviation of time\n+00156c70: 7a6f 6e65 206e 616d 6520 2a2f 3c2f 7370 zone name */
    .
    \n+00156ca0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 long<\n+00156cc0: 2f73 7061 6e3e 2074 6d5f 676d 746f 6666 /span> tm_gmtoff\n+00156cd0: 3b20 2020 2020 203c 7370 616e 2063 6c61 ; /* \n+00156cf0: 6f66 6673 6574 2066 726f 6d20 5554 4320 offset from UTC \n+00156d00: 696e 2073 6563 6f6e 6473 202a 2f3c 2f73 in seconds */
    .};\n+00156d30: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    By declaring st\n+00156d60: 7275 6374 203c 636f 6465 3e74 6d3c 2f63 ruct tm volatile, s\n+00156d80: 6f61 7063 7070 3220 646f 6573 206e 6f74 oapcpp2 does not\n+00156d90: 2072 6564 6566 696e 6520 6974 2069 6e20 redefine it in \n+00156da0: 7468 6520 6f75 7470 7574 2073 6f75 7263 the output sourc\n+00156db0: 6520 636f 6465 2e20 5468 6520 3c63 6f64 e code. The #include <t\n+00156dd0: 696d 652e 6826 6774 3b3c 2f63 6f64 653e ime.h>\n+00156de0: 2069 7320 636f 7069 6564 2074 6f20 7468 is copied to th\n+00156df0: 6520 736f 7572 6365 2063 6f64 6520 6f75 e source code ou\n+00156e00: 7470 7574 2e20 5765 2063 616e 206e 6f77 tput. We can now\n+00156e10: 2073 6572 6961 6c69 7a65 2074 6865 203c serialize the <\n+00156e20: 636f 6465 3e74 6d3c 2f63 6f64 653e 2073 code>tm s\n+00156e30: 7472 7563 7475 7265 2e20 5468 6520 666f tructure. The fo\n+00156e40: 6c6c 6f77 696e 6720 6578 616d 706c 6520 llowing example \n+00156e50: 7365 7269 616c 697a 6573 2074 6865 206c serializes the l\n+00156e60: 6f63 616c 2074 696d 6520 7374 6f72 6564 ocal time stored\n+00156e70: 2069 6e20 6120 3c63 6f64 653e 746d 3c2f in a tm structure \n+00156e90: 746f 2073 7464 6f75 743a 3c2f 703e 0a3c to stdout:

    .<\n+00156ea0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00156eb0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+00156ee0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n+00156fb0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    time\n+00156fd0: 5f74 2054 203d 2074 696d 6528 4e55 4c4c _t T = time(NULL\n+00156fe0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    struct \n+00157020: 746d 202a 7420 3d20 6c6f 6361 6c74 696d tm *t = localtim\n+00157030: 6528 2661 6d70 3b54 293b 203c 2f64 6976 e(&T); .
    soap_write_t\n+00157060: 6d28 3c61 2063 6c61 7373 3d22 636f 6465 m(soap, t);
    .\n+001570b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro\n+00157110: 793c 2f61 3e28 3c61 2063 6c61 7373 3d22 y(soa\n+00157140: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .<\n+00157150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00157160: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_end(soap);

    .soap_free\n+00157270: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001572a0: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .
    <\n+001572b0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001572c0: 3c70 3e49 7420 6973 2061 6c73 6f20 706f

    It is also po\n+001572d0: 7373 6962 6c65 2074 6f20 7365 7269 616c ssible to serial\n+001572e0: 697a 6520 7468 6520 3c63 6f64 653e 746d ize the tm\n+001572f0: 3c2f 636f 6465 3e20 6d65 6d62 6572 7320 members \n+00157300: 6173 2058 4d4c 2061 7474 7269 6275 7465 as XML attribute\n+00157310: 7320 6279 2064 6563 6c61 7269 6e67 2074 s by declaring t\n+00157320: 6865 206d 656d 6265 7273 2061 7320 6174 he members as at\n+00157330: 7472 6962 7574 6573 2077 6974 6820 7468 tributes with th\n+00157340: 6520 3c63 6f64 653e 403c 2f63 6f64 653e e @\n+00157350: 2071 7561 6c69 6669 6572 2c20 7365 6520 qualifier, see \n+00157360: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section How to declar\n+001573a0: 6520 584d 4c20 6174 7472 6962 7574 6573 e XML attributes\n+001573b0: 3c2f 613e 202e 3c2f 703e 0a3c 703e 4966 .

    .

    If\n+001573c0: 2079 6f75 2077 616e 7420 746f 2070 726f you want to pro\n+001573d0: 6475 6365 2061 2073 6368 656d 6120 6669 duce a schema fi\n+001573e0: 6c65 2c20 7361 7920 3c65 6d3e 3c63 6f64 le, say time.xsd, that def\n+00157410: 696e 6573 2061 6e20 584d 4c20 7363 6865 ines an XML sche\n+00157420: 6d61 2061 6e64 206e 616d 6573 7061 6365 ma and namespace\n+00157430: 2066 6f72 2074 6865 203c 636f 6465 3e74 for the t\n+00157440: 6d3c 2f63 6f64 653e 2073 7472 7563 742c m struct,\n+00157450: 2079 6f75 2063 616e 2061 6464 2061 203c you can add a <\n+00157460: 636f 6465 3e74 7970 6564 6566 3c2f 636f code>typedef declaration \n+00157480: 746f 2074 6865 2068 6561 6465 7220 6669 to the header fi\n+00157490: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

    .
    \n+001574c0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n+001574e0: 7564 6520 266c 743b 7469 6d65 2e68 2667 ude <time.h&g\n+001574f0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n+00157500: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    volatile\n+00157530: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c st\n+00157550: 7275 6374 203c 2f73 7061 6e3e 746d 3c2f ruct tm.
    {
    .<\n+00157580: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00157590: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n+001575b0: 2f20 7365 6520 6162 6f76 653c 2f73 7061 / see above
    .
    };.
    type\n+00157610: 6465 663c 2f73 7061 6e3e 203c 7370 616e def struct t\n+00157640: 6d20 7469 6d65 5f5f 7374 7275 6374 5f74 m time__struct_t\n+00157650: 6d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c m;
    .
    <\n+00157660: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00157670: 3c70 3e6f 7220 7369 6d70 6c79 2075 7365

    or simply use\n+00157680: 2063 6f6c 6f6e 206e 6f74 6174 696f 6e20 colon notation \n+00157690: 7369 6e63 6520 7765 206b 6565 7020 7468 since we keep th\n+001576a0: 6520 3c63 6f64 653e 746d 3c2f 636f 6465 e tm name:

    .
    #\n+00157700: 696e 636c 7564 6520 266c 743b 7469 6d65 include <time\n+00157710: 2e68 2667 743b 3c2f 7370 616e 3e3c 2f64 .h>.
    vola\n+00157750: 7469 6c65 3c2f 7370 616e 3e20 3c73 7061 tile struct \n+00157780: 7469 6d65 3a74 6d20 3c2f 6469 763e 0a3c time:tm
    .<\n+00157790: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001577a0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n+001577c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001577d0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int tm_sec; \n+001577f0: 2020 2020 3c73 7061 6e20 636c 6173 733d /* sec\n+00157810: 6f6e 6473 2028 3020 2d20 3630 2920 2a2f onds (0 - 60) */\n+00157820: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+00157830: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00157840: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+00157860: 6e74 3c2f 7370 616e 3e20 746d 5f6d 696e nt tm_min\n+00157870: 3b20 2020 2020 2020 2020 3c73 7061 6e20 ; \n+00157890: 2f2a 206d 696e 7574 6573 2028 3020 2d20 /* minutes (0 - \n+001578a0: 3539 2920 2a2f 3c2f 7370 616e 3e20 3c2f 59) */ .
    int \n+001578f0: 746d 5f68 6f75 723b 2020 2020 2020 2020 tm_hour; \n+00157900: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* hours (\n+00157920: 3020 2d20 3233 2920 2a2f 3c2f 7370 616e 0 - 23) */
    .
    <\n+00157950: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00157960: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int tm_mday; \n+00157980: 2020 2020 3c73 7061 6e20 636c 6173 733d /* day\n+001579a0: 206f 6620 6d6f 6e74 6820 2831 202d 2033 of month (1 - 3\n+001579b0: 3129 202a 2f3c 2f73 7061 6e3e 203c 2f64 1) */ .
    int t\n+00157a00: 6d5f 6d6f 6e3b 2020 2020 2020 2020 203c m_mon; <\n+00157a10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00157a20: 656e 7422 3e2f 2a20 6d6f 6e74 6820 6f66 ent\">/* month of\n+00157a30: 2079 6561 7220 2830 202d 2031 3129 202a year (0 - 11) *\n+00157a40: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n+00157a50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00157a80: 696e 743c 2f73 7061 6e3e 2074 6d5f 7965 int tm_ye\n+00157a90: 6172 3b20 2020 2020 2020 203c 7370 616e ar; /* year - 1900 \n+00157ac0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n+00157ad0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_w\n+00157b10: 6461 793b 2020 2020 2020 2020 3c73 7061 day; /* day of week\n+00157b40: 2028 5375 6e64 6179 203d 2030 2920 2a2f (Sunday = 0) */\n+00157b50: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+00157b60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00157b70: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+00157b90: 6e74 3c2f 7370 616e 3e20 746d 5f79 6461 nt tm_yda\n+00157ba0: 793b 2020 2020 2020 2020 3c73 7061 6e20 y; \n+00157bc0: 2f2a 2064 6179 206f 6620 7965 6172 2028 /* day of year (\n+00157bd0: 3020 2d20 3336 3529 202a 2f3c 2f73 7061 0 - 365) */
    .
    \n+00157c00: 3c73 7061 6e20 636c 6173 733d 226b 6579 int tm_isdst; \n+00157c30: 2020 2020 203c 7370 616e 2063 6c61 7373 /* is\n+00157c50: 2073 756d 6d65 7220 7469 6d65 2069 6e20 summer time in \n+00157c60: 6566 6665 6374 3f20 2a2f 3c2f 7370 616e effect? */
    .
    <\n+00157c90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00157ca0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *tm_zone; \n+00157cc0: 2020 2020 3c73 7061 6e20 636c 6173 733d /* abb\n+00157ce0: 7265 7669 6174 696f 6e20 6f66 2074 696d reviation of tim\n+00157cf0: 657a 6f6e 6520 6e61 6d65 202a 2f3c 2f73 ezone name */
    . \n+00157d20: 2020 3c73 7061 6e20 636c 6173 733d 226b long\n+00157d40: 3c2f 7370 616e 3e20 746d 5f67 6d74 6f66 tm_gmtof\n+00157d50: 663b 2020 2020 203c 7370 616e 2063 6c61 f; /* \n+00157d70: 6f66 6673 6574 2066 726f 6d20 5554 4320 offset from UTC \n+00157d80: 696e 2073 6563 6f6e 6473 202a 2f3c 2f73 in seconds */
    .};\n+00157db0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    We used the typ\n+00157de0: 6564 6566 206e 616d 6520 3c63 6f64 653e edef name \n+00157df0: 7469 6d65 5f5f 7374 7275 6374 5f74 6d3c time__struct_tm<\n+00157e00: 2f63 6f64 653e 2072 6174 6865 7220 7468 /code> rather th\n+00157e10: 616e 203c 636f 6465 3e74 696d 655f 5f74 an time__t\n+00157e20: 6d3c 2f63 6f64 653e 2c20 6265 6361 7573 m, becaus\n+00157e30: 6520 6120 7363 6865 6d61 206e 616d 6520 e a schema name \n+00157e40: 636c 6173 6820 7769 6c6c 206f 6363 7572 clash will occur\n+00157e50: 2066 6f72 2074 6865 2066 6972 7374 2065 for the first e\n+00157e60: 7861 6d70 6c65 2061 626f 7665 2074 6861 xample above tha\n+00157e70: 7420 6861 7320 3c63 6f64 653e 746d 3c2f t has tm already de\n+00157e90: 636c 6172 6564 2061 7320 7365 7269 616c clared as serial\n+00157ea0: 697a 6162 6c65 2074 7970 6520 696e 2074 izable type in t\n+00157eb0: 6865 2073 6368 656d 6120 6f66 2074 6865 he schema of the\n+00157ec0: 2067 656e 6572 6174 6564 2057 5344 4c2e generated WSDL.\n+00157ed0: 2054 6865 2073 6563 6f6e 6420 6578 616d The second exam\n+00157ee0: 706c 6520 7769 7468 2074 6865 2063 6f6c ple with the col\n+00157ef0: 6f6e 206e 6f74 6174 696f 6e20 6176 6f69 on notation avoi\n+00157f00: 6473 2074 6869 7320 616c 746f 6765 7468 ds this altogeth\n+00157f10: 6572 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 er.

    .

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

    .\n+00157f70: 3c2f 613e 0a48 6f77 2074 6f20 6465 636c .How to decl\n+00157f80: 6172 6520 6375 7374 6f6d 2073 6572 6961 are custom seria\n+00157f90: 6c69 7a65 7273 2061 6e64 2064 6573 6572 lizers and deser\n+00157fa0: 6961 6c69 7a65 7273 3c2f 6832 3e0a 3c70 ializers.You can impleme\n+00157fc0: 6e74 2079 6f75 7220 6f77 6e20 6375 7374 nt your own cust\n+00157fd0: 6f6d 2073 6572 6961 6c69 7a65 7273 2066 om serializers f\n+00157fe0: 6f72 2064 6174 6120 7479 7065 732e 2041 or data types. A\n+00157ff0: 2063 7573 746f 6d20 7365 7269 616c 697a custom serializ\n+00158000: 6572 2069 7320 6465 636c 6172 6564 2069 er is declared i\n+00158010: 6e20 616e 2069 6e74 6572 6661 6365 2068 n an interface h\n+00158020: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s\n+00158030: 6f61 7063 7070 3220 7573 696e 6720 7468 oapcpp2 using th\n+00158040: 6520 7061 6972 206f 6620 6b65 7977 6f72 e pair of keywor\n+00158050: 6473 203c 636f 6465 3e65 7874 6572 6e20 ds extern \n+00158060: 7479 7065 6465 663c 2f63 6f64 653e 2e20 typedef. \n+00158070: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

    \n+00158080: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    e\n+001580c0: 7874 6572 6e3c 2f73 7061 6e3e 203c 7370 xtern typedef char\n+00158110: 3c2f 7370 616e 3e20 2a4d 7944 6174 613b *MyData;\n+00158120: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+00158150: 7374 7275 6374 203c 2f73 7061 6e3e 5361 struct Sa\n+00158160: 6d70 6c65 203c 2f64 6976 3e0a 3c64 6976 mple
    .{<\n+00158180: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    MyDa\n+001581a0: 7461 2073 3b20 3c73 7061 6e20 636c 6173 ta s; // u\n+001581c0: 7365 2063 7573 746f 6d20 7365 7269 616c se custom serial\n+001581d0: 697a 6572 2066 6f72 2074 6869 7320 6d65 izer for this me\n+001581e0: 6d62 6572 203c 2f73 7061 6e3e 3c2f 6469 mber .
    char *\n+00158230: 743b 2020 3c73 7061 6e20 636c 6173 733d t; // use\n+00158250: 2061 7574 6f2d 6765 6e65 7261 7465 6420 auto-generated \n+00158260: 7365 7269 616c 697a 6572 3c2f 7370 616e serializer
    .
    };.

    The\n+001582b0: 6e20 7072 6f76 6964 6520 7468 6520 666f n provide the fo\n+001582c0: 6c6c 6f77 696e 6720 6675 6e63 7469 6f6e llowing function\n+001582d0: 7320 666f 7220 6561 6368 203c 636f 6465 s for each extern typedef<\n+001582f0: 2f63 6f64 653e 2064 6563 6c61 7265 7320 /code> declares \n+00158300: 7479 7065 203c 636f 6465 3e54 3c2f 636f type T:

    .
    <\n+00158330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00158340: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int soap_seria\n+00158370: 6c69 7a65 5f54 283c 7370 616e 2063 6c61 lize_T(str\n+00158390: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, const \n+00158420: 5420 2a61 293b 3c2f 6469 763e 0a3c 6469 T *a);
    .<\n+00158440: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00158450: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void soap_defaul\n+00158470: 745f 5428 3c73 7061 6e20 636c 6173 733d t_T(struct\n+00158490: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001584c0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001584f0: 736f 6170 3c2f 613e 2c20 5420 2a61 293b soap, T *a);\n+00158500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int so\n+00158540: 6170 5f6f 7574 5f54 283c 7370 616e 2063 ap_out_T(s\n+00158560: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+001585d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001585e0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+00158610: 3c2f 7370 616e 3e20 2a74 6167 2c20 3c73 *tag, int id<\n+00158660: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, co\n-00158680: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n-001586b0: 202a 7479 7065 293b 3c2f 6469 763e 0a3c *type);
    .<\n-001586c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001586d0: 3e54 202a 736f 6170 5f69 6e5f 5428 3c73 >T *soap_in_T(struct soap *soap, const<\n-00158780: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ta\n-001587b0: 672c 2054 202a 612c 203c 7370 616e 2063 g, T *a, c\n-001587d0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *type);
    .\n-00158810: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

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

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

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

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

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

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

    .

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

    .

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

    .

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

    .

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

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

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

    .

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

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

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

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

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

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

    .

    .fposthdr

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

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

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

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

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

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

    .

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

    .

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

    .

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

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

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

    ..fget.

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

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

    .

    .fput

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

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

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

    .

    .fpatch

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

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

    .

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

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

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

    This callback\n-0015de50: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n-0015de60: 6520 7365 7276 6963 6520 6469 7370 6174 e service dispat\n-0015de70: 6368 6572 2077 6865 6e20 616e 2048 5454 cher when an HTT\n-0015de80: 5020 4445 4c45 5445 2072 6571 7565 7374 P DELETE request\n-0015de90: 2069 7320 7065 6e64 696e 672e 2052 6564 is pending. Red\n-0015dea0: 6566 696e 6520 7468 6973 2063 616c 6c62 efine this callb\n-0015deb0: 6163 6b20 746f 2072 6573 706f 6e64 2074 ack to respond t\n-0015dec0: 6f20 4854 5450 2044 454c 4554 4520 7265 o HTTP DELETE re\n-0015ded0: 7175 6573 7473 2c20 7365 6520 7468 6520 quests, see the \n-0015dee0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_pos\n-0015df70: 743c 2f61 3e3c 2f63 6f64 653e 2048 5454 t HTT\n-0015df80: 5020 504f 5354 2070 6c75 6769 6e20 666f P POST plugin fo\n-0015df90: 7220 6d6f 7265 2064 6574 6169 6c73 2e20 r more details. \n-0015dfa0: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-0015dfb0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n-0015dfc0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n-0015e080: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-0015e090: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n-0015e0a0: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n-0015e0b0: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n-0015e0c0: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fdel<\n-0015e1a0: 2f63 6f64 653e 2069 7320 7468 6520 696e /code> is the in\n-0015e1b0: 7465 726e 616c 2073 7461 7469 6320 6675 ternal static fu\n-0015e1c0: 6e63 7469 6f6e 203c 636f 6465 3e68 7474 nction htt\n-0015e1d0: 705f 6465 6c3c 2f63 6f64 653e 2074 6861 p_del tha\n-0015e1e0: 7420 7265 7475 726e 7320 7468 6520 3c63 t returns the #SOAP_DEL_ME\n-0015e200: 5448 4f44 3c2f 636f 6465 3e20 6572 726f THOD erro\n-0015e210: 722e 3c2f 703e 0a3c 6833 3e3c 6120 636c r.

    .

    <\n-0015e240: 2f61 3e0a 666f 7074 3c2f 6833 3e0a 3c70 /a>.fopt

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

    .\n-0015e350: 3c70 3e43 616c 6c65 6420 6279 2074 6865

    Called by the\n-0015e360: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n-0015e370: 6865 7220 7768 656e 2061 6e20 4854 5450 her when an HTTP\n-0015e380: 204f 5054 494f 4e20 7265 7175 6573 7420 OPTION request \n-0015e390: 6973 2070 656e 6469 6e67 2e20 5265 6465 is pending. Rede\n-0015e3a0: 6669 6e65 2074 6869 7320 6361 6c6c 6261 fine this callba\n-0015e3b0: 636b 2074 6f20 7265 7370 6f6e 6420 746f ck to respond to\n-0015e3c0: 2048 5454 5020 4f50 5449 4f4e 2072 6571 HTTP OPTION req\n-0015e3d0: 7565 7374 732c 2073 6565 2074 6865 203c uests, see the <\n-0015e3e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>http_post\n-0015e470: 3c2f 613e 3c2f 636f 6465 3e20 4854 5450 HTTP\n-0015e480: 2050 4f53 5420 706c 7567 696e 2066 6f72 POST plugin for\n-0015e490: 206d 6f72 6520 6465 7461 696c 732e 2052 more details. R\n-0015e4a0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n-0015e4b0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n-0015e4c0: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n-0015e580: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n-0015e590: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n-0015e5a0: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n-0015e5b0: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n-0015e5c0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to \n-0015e690: 736f 6170 3a3a 666f 7074 3c2f 613e 3c2f soap::fopt is the int\n-0015e6b0: 6572 6e61 6c20 7374 6174 6963 2066 756e ernal static fun\n-0015e6c0: 6374 696f 6e20 3c63 6f64 653e 6874 7470 ction http\n-0015e6d0: 5f32 3030 3c2f 636f 6465 3e20 7468 6174 _200 that\n-0015e6e0: 2072 6574 7572 6e73 2048 5454 5020 3230 returns HTTP 20\n-0015e6f0: 3020 4f4b 2e3c 2f70 3e0a 3c68 333e 3c61 0 OK.

    .

    .fhead.

    int (\n-0015e740: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fhead)(struct soap \n-0015e820: 2a73 6f61 7029 3c2f 636f 6465 3e3c 2f70 *soap).

    This callba\n-0015e840: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-0015e850: 7468 6520 7365 7276 6963 6520 6469 7370 the service disp\n-0015e860: 6174 6368 6572 2077 6865 6e20 616e 2048 atcher when an H\n-0015e870: 5454 5020 4845 4144 2072 6571 7565 7374 TTP HEAD request\n-0015e880: 2069 7320 7065 6e64 696e 672e 2052 6564 is pending. Red\n-0015e890: 6566 696e 6520 7468 6973 2063 616c 6c62 efine this callb\n-0015e8a0: 6163 6b20 746f 2072 6573 706f 6e64 2074 ack to respond t\n-0015e8b0: 6f20 4854 5450 2048 4541 4420 7265 7175 o HTTP HEAD requ\n-0015e8c0: 6573 7473 206d 6f72 6520 7370 6563 6966 ests more specif\n-0015e8d0: 6963 616c 6c79 2e20 5265 7475 726e 7320 ically. Returns \n-0015e8e0: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n-0015e9d0: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n-0015e9e0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-0015e9f0: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::fhea\n-0015ead0: 643c 2f61 3e3c 2f63 6f64 653e 2069 7320 d is \n-0015eae0: 7468 6520 696e 7465 726e 616c 2073 7461 the internal sta\n-0015eaf0: 7469 6320 6675 6e63 7469 6f6e 203c 636f tic function http_200 that returns \n-0015eb20: 4854 5450 2032 3030 204f 4b2e 3c2f 703e HTTP 200 OK.

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

    .ff\n-0015eb60: 6f72 6d3c 2f68 333e 0a3c 703e 3c63 6f64 orm

    .

    int (soa\n-0015ec40: 703a 3a66 666f 726d 3c2f 613e 2928 7374 p::fform)(st\n-0015ec50: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n-0015ec60: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n-0015ec70: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-0015ec80: 6361 6c6c 6564 2062 7920 7468 6520 4854 called by the HT\n-0015ec90: 5450 2046 4f52 4d20 6861 6e64 6c65 7220 TP FORM handler \n-0015eca0: 706c 7567 696e 2074 6f20 7061 7273 6520 plugin to parse \n-0015ecb0: 4854 4d4c 2066 6f72 6d73 2072 6563 6569 HTML forms recei\n-0015ecc0: 7665 6420 7769 7468 2048 5454 5020 504f ved with HTTP PO\n-0015ecd0: 5354 2061 6e64 2050 5554 2072 6571 7565 ST and PUT reque\n-0015ece0: 7374 732c 2073 6565 2074 6865 203c 636f sts, see the ;:http_form HTTP FORM \n-0015ed10: 706c 7567 696e 2066 6f72 206d 6f72 6520 plugin for more \n-0015ed20: 6465 7461 696c 732e 2054 6865 2048 5454 details. The HTT\n-0015ed30: 5020 626f 6479 2077 6974 6820 7468 6520 P body with the \n-0015ed40: 666f 726d 2064 6174 6120 7368 6f75 6c64 form data should\n-0015ed50: 2062 6520 7061 7273 6564 2062 7920 7468 be parsed by th\n-0015ed60: 6973 2063 616c 6c62 6163 6b2c 206f 7468 is callback, oth\n-0015ed70: 6572 7769 7365 2048 5454 5020 6b65 6570 erwise HTTP keep\n-0015ed80: 2d61 6c69 7665 206d 6573 7361 6765 7320 -alive messages \n-0015ed90: 7769 6c6c 2065 6e64 2075 7020 6f75 7420 will end up out \n-0015eda0: 6f66 2073 796e 6320 6173 2061 2072 6573 of sync as a res\n-0015edb0: 756c 7420 6f66 2074 6865 2063 7572 7265 ult of the curre\n-0015edc0: 6e74 2070 6f73 6974 696f 6e20 6e6f 7420 nt position not \n-0015edd0: 6265 696e 6720 6164 7661 6e63 6564 2074 being advanced t\n-0015ede0: 6f20 7468 6520 656e 6420 6f66 2074 6865 o the end of the\n-0015edf0: 2048 5454 5020 626f 6479 2e20 5265 7475 HTTP body. Retu\n-0015ee00: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n-0015ee10: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n-0015ee20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n-0015eee0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n-0015eef0: 7429 2065 7272 6f72 2063 6f64 652e 204e t) error code. N\n-0015ef00: 6f20 6275 696c 742d 696e 2066 756e 6374 o built-in funct\n-0015ef10: 696f 6e20 6973 2061 7373 6967 6e65 6420 ion is assigned \n-0015ef20: 746f 203c 636f 6465 3e3c 6120 636c 6173 to s\n-0015eff0: 6f61 703a 3a66 666f 726d 3c2f 613e 3c2f oap::fform.

    .

    <\n-0015f010: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-0015f020: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id=\"autotoc_md4\n-0015f030: 3022 3e3c 2f61 3e0a 6668 6561 6465 723c 0\">.fheader<\n-0015f040: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-0015f050: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n-0015f120: 6865 6164 6572 3c2f 613e 2928 7374 7275 header)(stru\n-0015f130: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)

    .

    Thi\n-0015f150: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n-0015f160: 6c6c 6564 2069 6d6d 6564 6961 7465 6c79 lled immediately\n-0015f170: 2061 6674 6572 2070 6172 7369 6e67 2061 after parsing a\n-0015f180: 2053 4f41 5020 4865 6164 6572 2069 6e74 SOAP Header int\n-0015f190: 6f20 7468 6520 3c63 6f64 653e 3c61 2063 o the soap::header\n-0015f260: 3c2f 613e 3c2f 636f 6465 3e20 7374 7275 stru\n-0015f270: 6374 7572 652e 2054 6865 2053 4f41 5020 cture. The SOAP \n-0015f280: 4865 6164 6572 2073 7472 7563 7475 7265 Header structure\n-0015f290: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-0015f350: 6f61 703a 3a68 6561 6465 723c 2f61 3e3c oap::header<\n-0015f360: 2f63 6f64 653e 2063 616e 2062 6520 696e /code> can be in\n-0015f370: 7370 6563 7465 6420 6279 2074 6869 7320 spected by this \n-0015f380: 6675 6e63 7469 6f6e 2061 6e64 2076 6572 function and ver\n-0015f390: 6966 6965 6420 6f72 2072 656a 6563 7465 ified or rejecte\n-0015f3a0: 6420 6265 666f 7265 2074 6865 2072 6573 d before the res\n-0015f3b0: 7420 6f66 2074 6865 206d 6573 7361 6765 t of the message\n-0015f3c0: 2077 6974 6820 7468 6520 534f 4150 2042 with the SOAP B\n-0015f3d0: 6f64 7920 6973 2063 6f6e 7375 6d65 642e ody is consumed.\n-0015f3e0: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n-0015f3f0: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n-0015f400: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n-0015f4c0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n-0015f4e0: 6465 2e20 4e6f 2062 7569 6c74 2d69 6e20 de. No built-in \n-0015f4f0: 6675 6e63 7469 6f6e 2069 7320 6173 7369 function is assi\n-0015f500: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fheade\n-0015f5e0: 723c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 r..

    .f\n-0015f620: 6967 6e6f 7265 3c2f 6833 3e0a 3c70 3e3c ignore

    .

    <\n-0015f630: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n-0015f700: 736f 6170 3a3a 6669 676e 6f72 653c 2f61 soap::fignore)(struct soap *\n-0015f720: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n-0015f730: 202a 7461 6729 3c2f 636f 6465 3e3c 2f70 *tag).

    This callba\n-0015f750: 636b 2069 7320 6361 6c6c 6564 2077 6865 ck is called whe\n-0015f760: 6e20 616e 2075 6e72 6563 6f67 6e69 7a65 n an unrecognize\n-0015f770: 6420 584d 4c20 656c 656d 656e 7420 7761 d XML element wa\n-0015f780: 7320 656e 636f 756e 7465 7265 6420 6f6e s encountered on\n-0015f790: 2074 6865 2069 6e70 7574 2074 6861 7420 the input that \n-0015f7a0: 636f 756c 6420 6265 2069 676e 6f72 6564 could be ignored\n-0015f7b0: 2064 6570 656e 6469 6e67 206f 6e20 736f depending on so\n-0015f7c0: 6d65 2073 7065 6369 6669 6564 206c 6f67 me specified log\n-0015f7d0: 6963 2e20 5468 6520 3c63 6f64 653e 7461 ic. The ta\n-0015f7e0: 673c 2f63 6f64 653e 2070 6172 616d 6574 g paramet\n-0015f7f0: 6572 2069 7320 7468 6520 6f66 6665 6e64 er is the offend\n-0015f800: 696e 6720 584d 4c20 656c 656d 656e 7420 ing XML element \n-0015f810: 7461 6720 6e61 6d65 2073 7472 696e 672e tag name string.\n-0015f820: 2054 6865 2063 616c 6c62 6163 6b20 7368 The callback sh\n-0015f830: 6f75 6c64 2072 6574 7572 6e20 3c63 6f64 ould return #SOAP_OK to ignore the \n-0015f860: 656c 656d 656e 7420 6f72 2072 6574 7572 element or retur\n-0015f870: 6e20 616e 203c 636f 6465 3e3c 6120 636c n an soap\n-0015f930: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status error code su\n-0015f950: 6368 2061 7320 3c63 6f64 653e 2353 4f41 ch as #SOA\n-0015f960: 505f 5441 475f 4d49 534d 4154 4348 3c2f P_TAG_MISMATCH to trigger\n-0015f980: 2061 2076 616c 6964 6174 696f 6e20 6572 a validation er\n-0015f990: 726f 722e 2054 6869 7320 6361 6c6c 6261 ror. This callba\n-0015f9a0: 636b 2061 6c73 6f20 6f76 6572 7269 6465 ck also override\n-0015f9b0: 7320 3c63 6f64 653e 6d75 7374 556e 6465 s mustUnde\n-0015f9c0: 7273 7461 6e64 3c2f 636f 6465 3e20 6174 rstand at\n-0015f9d0: 7472 6962 7574 6573 206f 6e20 756e 7265 tributes on unre\n-0015f9e0: 636f 676e 697a 6564 2053 4f41 5020 4865 cognized SOAP He\n-0015f9f0: 6164 6572 2065 6c65 6d65 6e74 7320 7468 ader elements th\n-0015fa00: 6174 206e 6f72 6d61 6c6c 7920 7261 6973 at normally rais\n-0015fa10: 6520 6661 756c 7473 2e20 4974 2069 7320 e faults. It is \n-0015fa20: 7374 726f 6e67 6c79 2072 6563 6f6d 6d65 strongly recomme\n-0015fa30: 6e64 6564 2074 6861 7420 7468 6520 6361 nded that the ca\n-0015fa40: 6c6c 6261 636b 2072 6574 7572 6e73 203c llback returns <\n-0015fa50: 636f 6465 3e23 534f 4150 5f4d 5553 5455 code>#SOAP_MUSTU\n-0015fa60: 4e44 4552 5354 414e 443c 2f63 6f64 653e NDERSTAND\n-0015fa70: 2077 6865 6e20 3c63 6f64 653e 3c61 2063 when soap::mustUn\n-0015fb40: 6465 7273 7461 6e64 3c2f 613e 3c2f 636f derstand != 0. Returns <\n-0015fb70: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n-0015fb90: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n-0015fc50: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n-0015fc60: 726f 7220 636f 6465 2e20 4e6f 2062 7569 ror code. No bui\n-0015fc70: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i\n-0015fc80: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to soap::\n-0015fd60: 6669 676e 6f72 653c 2f61 3e3c 2f63 6f64 fignore.

    .

    \n-0015fda0: 3c2f 613e 0a66 7376 616c 6964 6174 653c .fsvalidate<\n-0015fdb0: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-0015fdc0: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n-0015fe60: 7376 616c 6964 6174 653c 2f61 3e29 2873 svalidate)(s\n-0015fe70: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0015fe80: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa\n-0015fe90: 7474 6572 6e2c 2063 6f6e 7374 2063 6861 ttern, const cha\n-0015fea0: 7220 2a73 7472 696e 6729 3c2f 636f 6465 r *string)

    .

    This ca\n-0015fec0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n-0015fed0: 2074 6f20 7661 6c69 6461 7465 2061 2073 to validate a s\n-0015fee0: 7472 696e 6720 6167 6169 6e73 7420 616e tring against an\n-0015fef0: 2058 4d4c 2072 6567 6578 2070 6174 7465 XML regex patte\n-0015ff00: 726e 2e20 5061 7474 6572 6e73 2075 7365 rn. Patterns use\n-0015ff10: 2058 4d4c 2073 6368 656d 6120 7265 6765 XML schema rege\n-0015ff20: 7820 7379 6e74 6178 2e20 5468 6973 2063 x syntax. This c\n-0015ff30: 616c 6c62 6163 6b20 616c 6c6f 7773 2075 allback allows u\n-0015ff40: 7365 722d 6465 6669 6e65 6420 7061 7474 ser-defined patt\n-0015ff50: 6572 6e20 7661 6c69 6461 7469 6f6e 2074 ern validation t\n-0015ff60: 6861 7420 6973 206e 6f72 6d61 6c6c 7920 hat is normally \n-0015ff70: 6469 7361 626c 6564 2e20 5265 7475 726e disabled. Return\n-0015ff80: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-0015ff90: 3c2f 636f 6465 3e20 7768 656e 2074 6865 when the\n-0015ffa0: 2073 7472 696e 6720 6d61 7463 6865 7320 string matches \n-0015ffb0: 7468 6520 7061 7474 6572 6e20 6f72 203c the pattern or <\n-0015ffc0: 636f 6465 3e23 534f 4150 5f54 5950 453c code>#SOAP_TYPE<\n-0015ffd0: 2f63 6f64 653e 2077 6865 6e20 7468 6520 /code> when the \n-0015ffe0: 7374 7269 6e67 2064 6f65 7320 6e6f 7420 string does not \n-0015fff0: 6d61 7463 682e 204e 6f20 6275 696c 742d match. No built-\n-00160000: 696e 2066 756e 6374 696f 6e20 6973 2061 in function is a\n-00160010: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fsv\n-001600c0: 616c 6964 6174 653c 2f61 3e3c 2f63 6f64 alidate.

    .

    \n-00160100: 3c2f 613e 0a66 7776 616c 6964 6174 653c .fwvalidate<\n-00160110: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-00160120: 7420 283c 6120 636c 6173 733d 2265 6c22 t (so\n-001601c0: 6170 3a3a 6677 7661 6c69 6461 7465 3c2f ap::fwvalidate)(struct soap \n-001601e0: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n-001601f0: 7220 2a70 6174 7465 726e 2c20 636f 6e73 r *pattern, cons\n-00160200: 7420 7763 6861 725f 7420 2a73 7472 696e t wchar_t *strin\n-00160210: 6729 3c2f 636f 6465 3e20 5468 6973 2063 g) This c\n-00160220: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-00160230: 6420 746f 2076 616c 6964 6174 6520 6120 d to validate a \n-00160240: 7769 6465 2073 7472 696e 6720 6167 6169 wide string agai\n-00160250: 6e73 7420 616e 2058 4d4c 2072 6567 6578 nst an XML regex\n-00160260: 2070 6174 7465 726e 2e20 5061 7474 6572 pattern. Patter\n-00160270: 6e73 2075 7365 2058 4d4c 2073 6368 656d ns use XML schem\n-00160280: 6120 7265 6765 7820 7379 6e74 6178 2e20 a regex syntax. \n-00160290: 5468 6973 2063 616c 6c62 6163 6b20 616c This callback al\n-001602a0: 6c6f 7773 2075 7365 722d 6465 6669 6e65 lows user-define\n-001602b0: 6420 7061 7474 6572 6e20 7661 6c69 6461 d pattern valida\n-001602c0: 7469 6f6e 2074 6861 7420 6973 206e 6f72 tion that is nor\n-001602d0: 6d61 6c6c 7920 6469 7361 626c 6564 2e20 mally disabled. \n-001602e0: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-001602f0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 7768 OAP_OK wh\n-00160300: 656e 2074 6865 2073 7472 696e 6720 6d61 en the string ma\n-00160310: 7463 6865 7320 7468 6520 7061 7474 6572 tches the patter\n-00160320: 6e20 6f72 203c 636f 6465 3e23 534f 4150 n or #SOAP\n-00160330: 5f54 5950 453c 2f63 6f64 653e 2077 6865 _TYPE whe\n-00160340: 6e20 7468 6520 7374 7269 6e67 2064 6f65 n the string doe\n-00160350: 7320 6e6f 7420 6d61 7463 682e 204e 6f20 s not match. No \n-00160360: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n-00160370: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n-00160380: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fwvalida\n-00160430: 7465 3c2f 613e 3c2f 636f 6465 3e2e 3c2f te..

    .\n-00160470: 6673 6574 6572 726f 723c 2f68 333e 0a3c fseterror

    .<\n-00160480: 703e 3c63 6f64 653e 766f 6964 2028 3c61 p>void (\n-00160530: 736f 6170 3a3a 6673 6574 6572 726f 723c soap::fseterror<\n-00160540: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n-00160550: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-00160560: 6172 202a 2a63 6f64 652c 2063 6f6e 7374 ar **code, const\n-00160570: 2063 6861 7220 2a2a 7374 7269 6e67 293c char **string)<\n-00160580: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n-00160590: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n-001605a0: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng\n-001605b0: 696e 6520 7768 656e 2061 6e20 6572 726f ine when an erro\n-001605c0: 7220 6973 2072 6169 7365 6420 746f 2061 r is raised to a\n-001605d0: 6c6c 6f77 2069 6e73 7065 6374 696f 6e20 llow inspection \n-001605e0: 6f72 206f 7665 7272 6964 696e 6720 6f66 or overriding of\n-001605f0: 2074 6865 2066 6175 6c74 2063 6f64 6520 the fault code \n-00160600: 6f72 2066 6175 6c74 2073 7472 696e 6720 or fault string \n-00160610: 6d65 7373 6167 6573 2062 6566 6f72 6520 messages before \n-00160620: 7468 6520 6572 726f 7220 6973 2072 6570 the error is rep\n-00160630: 6f72 7465 6420 6f72 2074 7261 6e73 6d69 orted or transmi\n-00160640: 7474 6564 2e20 4e6f 2062 7569 6c74 2d69 tted. No built-i\n-00160650: 6e20 6675 6e63 7469 6f6e 2069 7320 6173 n function is as\n-00160660: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n-00160670: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fseterro\n-00160720: 723c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 r..

    .f\n-00160760: 6f70 656e 3c2f 6833 3e0a 3c70 3e3c 636f open

    .

    SOAP_SOCKET (\n-00160780: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap:\n-00160820: 3a66 6f70 656e 3c2f 613e 2928 7374 7275 :fopen)(stru\n-00160830: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n-00160840: 6f6e 7374 2063 6861 7220 2a65 6e64 706f onst char *endpo\n-00160850: 696e 742c 2063 6f6e 7374 2063 6861 7220 int, const char \n-00160860: 2a68 6f73 742c 2069 6e74 2070 6f72 7429 *host, int port)\n-00160870: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n-00160880: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-00160890: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en\n-001608a0: 6769 6e65 2061 7420 7468 6520 636c 6965 gine at the clie\n-001608b0: 6e74 2d73 6964 6520 6279 203c 636f 6465 nt-side by soap\n-00160940: 5f63 6f6e 6e65 6374 3c2f 613e 3c2f 636f _connect or soap_con\n-001609d0: 6e65 6374 5f63 6f6d 6d61 6e64 3c2f 613e nect_command\n-001609e0: 3c2f 636f 6465 3e20 746f 206f 7065 6e20 to open \n-001609f0: 6120 5443 5020 6f72 2055 4450 2063 6f6e a TCP or UDP con\n-00160a00: 6e65 6374 696f 6e20 746f 2061 2073 6572 nection to a ser\n-00160a10: 7665 7220 7370 6563 6966 6965 6420 6174 ver specified at\n-00160a20: 2061 6e20 656e 6470 6f69 6e74 2e20 5061 an endpoint. Pa\n-00160a30: 7261 6d65 7465 7273 203c 636f 6465 3e68 rameters h\n-00160a40: 6f73 743c 2f63 6f64 653e 2061 6e64 203c ost and <\n-00160a50: 636f 6465 3e70 6f72 743c 2f63 6f64 653e code>port\n-00160a60: 2061 7265 206d 6963 726f 2d70 6172 7365 are micro-parse\n-00160a70: 6420 6672 6f6d 203c 636f 6465 3e65 6e64 d from end\n-00160a80: 706f 696e 743c 2f63 6f64 653e 2062 6566 point bef\n-00160a90: 6f72 6520 6265 696e 6720 7061 7373 6564 ore being passed\n-00160aa0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fopen\n-00160b50: 3c2f 613e 3c2f 636f 6465 3e2e 2052 6574 . Ret\n-00160b60: 7572 6e73 2061 2076 616c 6964 2073 6f63 urns a valid soc\n-00160b70: 6b65 7420 6f72 203c 636f 6465 3e23 534f ket or #SO\n-00160b80: 4150 5f49 4e56 414c 4944 5f53 4f43 4b45 AP_INVALID_SOCKE\n-00160b90: 543c 2f63 6f64 653e 2077 6974 6820 6120 T with a \n-00160ba0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n-00160c50: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error set to a soap_status (int) \n-00160d40: 6572 726f 7220 636f 6465 2061 6e64 203c error code and <\n-00160d50: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::errnu\n-00160de0: 6d3c 2f61 3e3c 2f63 6f64 653e 2073 6574 m set\n-00160df0: 2074 6f20 3c63 6f64 653e 6572 726e 6f3c to errno<\n-00160e00: 2f63 6f64 653e 206f 6620 7468 6520 636f /code> of the co\n-00160e10: 6e6e 6563 7469 6f6e 2066 6169 6c75 7265 nnection failure\n-00160e20: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n-00160e30: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n-00160e40: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fopen\n-00160ef0: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c is <\n-00160f00: 636f 6465 3e74 6370 5f63 6f6e 6e65 6374 code>tcp_connect\n-00160f10: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..faccep\n-00160f50: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t

    .

    \n-00160f60: 534f 4150 5f53 4f43 4b45 5420 283c 6120 SOAP_SOCKET (soap::f\n-00161020: 6163 6365 7074 3c2f 613e 2928 7374 7275 accept)(stru\n-00161030: 6374 2073 6f61 7020 2a73 6f61 702c 2053 ct soap *soap, S\n-00161040: 4f41 505f 534f 434b 4554 2073 2c20 7374 OAP_SOCKET s, st\n-00161050: 7275 6374 2073 6f63 6b61 6464 7220 2a61 ruct sockaddr *a\n-00161060: 2c20 696e 7420 2a6e 293c 2f63 6f64 653e , int *n)\n-00161070: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-00161080: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00161090: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap_accept (or the\n-00161130: 2043 2b2b 2073 6572 7669 6365 2063 6c61 C++ service cla\n-00161140: 7373 203c 636f 6465 3e61 6363 6570 743c ss accept<\n-00161150: 2f63 6f64 653e 206d 6574 686f 6429 2074 /code> method) t\n-00161160: 6f20 7761 6974 2066 6f72 2061 6e64 2061 o wait for and a\n-00161170: 6363 6570 7420 6120 736f 636b 6574 2063 ccept a socket c\n-00161180: 6f6e 6e65 6374 696f 6e20 7265 7175 6573 onnection reques\n-00161190: 7465 6420 6279 2061 2063 6c69 656e 742e ted by a client.\n-001611a0: 2052 6574 7572 6e73 2061 2076 616c 6964 Returns a valid\n-001611b0: 2073 6f63 6b65 7420 6f72 203c 636f 6465 socket or #SOAP_INVALID_S\n-001611d0: 4f43 4b45 543c 2f63 6f64 653e 2077 6865 OCKET whe\n-001611e0: 6e20 616e 2065 7272 6f72 206f 6363 7572 n an error occur\n-001611f0: 7265 6420 616e 6420 7365 7473 203c 636f red and sets soap::e\n-001612b0: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e20 rror \n-001612c0: 746f 2061 203c 636f 6465 3e3c 6120 636c to a soap\n-00161380: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status value. The bu\n-001613a0: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n-001613b0: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to so\n-00161470: 6170 3a3a 6661 6363 6570 743c 2f61 3e3c ap::faccept<\n-00161480: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n-00161490: 7463 705f 6163 6365 7074 3c2f 636f 6465 tcp_accept.

    .

    <\n-001614d0: 2f61 3e0a 6663 6c6f 7365 3c2f 6833 3e0a /a>.fclose

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

    int (s\n-00161580: 6f61 703a 3a66 636c 6f73 653c 2f61 3e29 oap::fclose)\n-00161590: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-001615a0: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .<\n-001615b0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-001615c0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n-001615d0: 2065 6e67 696e 6520 6174 2074 6865 2063 engine at the c\n-001615e0: 6c69 656e 742d 7369 6465 2074 6f20 636c lient-side to cl\n-001615f0: 6f73 6520 7468 6520 6375 7272 656e 7420 ose the current \n-00161600: 736f 636b 6574 2063 6f6e 6e65 6374 696f socket connectio\n-00161610: 6e20 6265 666f 7265 2061 206e 6577 2073 n before a new s\n-00161620: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n-00161630: 2069 7320 6573 7461 626c 6973 6865 642e is established.\n-00161640: 2054 6869 7320 6361 6c6c 6261 636b 206d This callback m\n-00161650: 6179 2062 6520 6361 6c6c 6564 206d 756c ay be called mul\n-00161660: 7469 706c 6520 7469 6d65 7320 2865 2e67 tiple times (e.g\n-00161670: 2e20 6279 2074 6865 2065 6e67 696e 6520 . by the engine \n-00161680: 616e 6420 6279 2070 6c75 6769 6e73 2920 and by plugins) \n-00161690: 746f 2063 6c6f 7365 2074 6865 2073 616d to close the sam\n-001616a0: 6520 736f 636b 6574 203c 636f 6465 3e3c e socket <\n-001616b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001616c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001616d0: 6d6c 2361 3135 3739 6264 3862 6431 3036 ml#a1579bd8bd106\n-001616e0: 6166 6339 6139 3036 6136 3733 6361 3437 afc9a906a673ca47\n-001616f0: 3330 3436 2220 7469 746c 653d 2254 6865 3046\" title=\"The\n-00161700: 2073 6f63 6b65 7420 7365 7420 6279 2073 socket set by s\n-00161710: 6f61 705f 6163 6365 7074 2028 6f72 2074 oap_accept (or t\n-00161720: 6865 2043 2b2b 2073 6572 7669 6365 2063 he C++ service c\n-00161730: 6c61 7373 2061 6363 6570 7420 6d65 7468 lass accept meth\n-00161740: 6f64 2920 6f72 2073 6f61 705f 636f 6e6e od) or soap_conn\n-00161750: 6563 7420 6f72 2073 6f61 705f 636f 6e6e ect or soap_conn\n-00161760: 6563 2e2e 2e22 3e73 6f61 703a 3a73 6f63 ec...\">soap::soc\n-00161770: 6b65 743c 2f61 3e3c 2f63 6f64 653e 2e20 ket. \n-00161780: 4368 6563 6b73 2069 6e74 6572 6e61 6c6c Checks internall\n-00161790: 7920 6966 203c 636f 6465 3e3c 6120 636c y if soap::socket<\n-00161860: 2f61 3e3c 2f63 6f64 653e 203d 3d20 3c63 /a> == #SOAP_INVALI\n-00161880: 445f 534f 434b 4554 3c2f 636f 6465 3e20 D_SOCKET
    \n-00161890: 6265 666f 7265 2063 6c6f 7369 6e67 2c20 before closing, \n-001618a0: 7768 6963 6820 6d65 616e 7320 7468 6174 which means that\n-001618b0: 2074 6865 2073 6f63 6b65 7420 7761 7320 the socket was \n-001618c0: 616c 7265 6164 7920 636c 6f73 6564 2e20 already closed. \n-001618d0: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-001618e0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n-001618f0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n-001619b0: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-001619c0: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n-001619d0: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n-001619e0: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n-001619f0: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap\n-00161a90: 3a3a 6663 6c6f 7365 3c2f 613e 3c2f 636f ::fclose is tcp\n-00161ab0: 5f64 6973 636f 6e6e 6563 743c 2f63 6f64 _disconnect.

    .

    \n-00161af0: 3c2f 613e 0a66 7265 736f 6c76 653c 2f68 .fresolve.

    int \n-00161b10: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::f\n-00161bb0: 7265 736f 6c76 653c 2f61 3e29 2873 7472 resolve)(str\n-00161bc0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-00161bd0: 636f 6e73 7420 6368 6172 202a 6164 6472 const char *addr\n-00161be0: 2c20 7374 7275 6374 2069 6e5f 6164 6472 , struct in_addr\n-00161bf0: 202a 696e 6164 6472 293c 2f63 6f64 653e *inaddr)\n-00161c00: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-00161c10: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00161c20: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap_b\n-00161ca0: 696e 643c 2f61 3e3c 2f63 6f64 653e 2028 ind (\n-00161cb0: 6f72 2074 6865 2043 2b2b 2073 6572 7669 or the C++ servi\n-00161cc0: 6365 2063 6c61 7373 203c 636f 6465 3e62 ce class b\n-00161cd0: 696e 643c 2f63 6f64 653e 206d 6574 686f ind metho\n-00161ce0: 6429 2061 7420 7468 6520 7365 7276 6572 d) at the server\n-00161cf0: 2d73 6964 6520 616e 6420 6279 203c 636f -side and by so\n-00161d80: 6170 5f63 6f6e 6e65 6374 3c2f 613e 3c2f ap_connect or <\n-00161da0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00161db0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00161dc0: 5f69 6f2e 6874 6d6c 2367 6133 3135 6236 _io.html#ga315b6\n-00161dd0: 6531 6435 3838 3837 3830 6266 3465 6633 e1d5888780bf4ef3\n-00161de0: 3230 6335 3066 3233 3739 3622 2074 6974 20c50f23796\" tit\n-00161df0: 6c65 3d22 436f 6e6e 6563 7420 746f 2061 le=\"Connect to a\n-00161e00: 2073 6572 7665 722e 223e 736f 6170 5f63 server.\">soap_c\n-00161e10: 6f6e 6e65 6374 5f63 6f6d 6d61 6e64 3c2f onnect_command at the\n-00161e30: 2063 6c69 656e 742d 7369 6465 2077 6974 client-side wit\n-00161e40: 6820 6120 686f 7374 203c 636f 6465 3e6e h a host n\n-00161e50: 616d 653c 2f63 6f64 653e 2070 6172 616d ame param\n-00161e60: 6574 6572 2074 6f20 7265 736f 6c76 6520 eter to resolve \n-00161e70: 746f 2061 6464 7265 7373 203c 636f 6465 to address inaddr b\n-00161e90: 7920 6164 6472 6573 7320 7472 616e 736c y address transl\n-00161ea0: 6174 696f 6e2e 2057 6865 6e20 7375 6363 ation. When succ\n-00161eb0: 6573 7366 756c 2073 6574 7320 7061 7261 essful sets para\n-00161ec0: 6d65 7465 7220 3c63 6f64 653e 696e 6164 meter inad\n-00161ed0: 6472 3c2f 636f 6465 3e20 616e 6420 7265 dr and re\n-00161ee0: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-00161ef0: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n-00161f00: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n-00161fc0: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus (\n-00161fd0: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code.\n-00161fe0: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n-00161ff0: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n-00162000: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::fresolve<\n-001620b0: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is tcp_gethost<\n-001620d0: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

    .

    \n-001620e0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fconnec\n-00162110: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t

    .

    \n-00162120: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fconnect<\n-001621d0: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n-001621e0: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-001621f0: 6172 202a 656e 6470 6f69 6e74 2c20 636f ar *endpoint, co\n-00162200: 6e73 7420 6368 6172 202a 686f 7374 2c20 nst char *host, \n-00162210: 696e 7420 706f 7274 293c 2f63 6f64 653e int port)\n-00162220: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-00162230: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00162240: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n-00162250: 206f 7074 696f 6e61 6c6c 7920 6f76 6572 optionally over\n-00162260: 7269 6465 2063 6c69 656e 742d 7369 6465 ride client-side\n-00162270: 2063 6f6e 6e65 6374 696e 672e 2054 6865 connecting. The\n-00162280: 2070 6172 616d 6574 6572 7320 3c63 6f64 parameters host an\n-001622a0: 6420 3c63 6f64 653e 706f 7274 3c2f 636f d port were micro-p\n-001622c0: 6172 7365 6420 6672 6f6d 2074 6865 203c arsed from the <\n-001622d0: 636f 6465 3e65 6e64 706f 696e 743c 2f63 code>endpoint prior to pa\n-001622f0: 7373 696e 6720 7468 656d 2074 6f20 7468 ssing them to th\n-00162300: 6973 2063 616c 6c62 6163 6b2e 2052 6574 is callback. Ret\n-00162310: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00162320: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-00162330: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-001623f0: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00162400: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00162410: 4e6f 2062 7569 6c74 2d69 6e20 6675 6e63 No built-in func\n-00162420: 7469 6f6e 2069 7320 6173 7369 676e 6564 tion is assigned\n-00162430: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fcon\n-001624e0: 6e65 6374 3c2f 613e 3c2f 636f 6465 3e2e nect.\n-001624f0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fdisconnect.

    int \n-00162540: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fdis\n-001625e0: 636f 6e6e 6563 743c 2f61 3e29 2873 7472 connect)(str\n-001625f0: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n-00162600: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n-00162610: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n-00162620: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng\n-00162630: 696e 6520 3c63 6f64 653e 3c61 2063 6c61 ine soa\n-001626b0: 705f 636c 6f73 6573 6f63 6b3c 2f61 3e3c p_closesock<\n-001626c0: 2f63 6f64 653e 2062 6566 6f72 6520 7468 /code> before th\n-001626d0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::f\n-00162770: 636c 6f73 653c 2f61 3e3c 2f63 6f64 653e close\n-00162780: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n-00162790: 6c65 6420 746f 2073 6875 7464 6f77 6e2f led to shutdown/\n-001627a0: 6469 7363 6f6e 6e65 6374 2e20 5265 7475 disconnect. Retu\n-001627b0: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n-001627c0: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n-001627d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n-00162890: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n-001628a0: 7429 2065 7272 6f72 2063 6f64 652e 204e t) error code. N\n-001628b0: 6f20 6275 696c 742d 696e 2066 756e 6374 o built-in funct\n-001628c0: 696f 6e20 6973 2061 7373 6967 6e65 6420 ion is assigned \n-001628d0: 746f 203c 636f 6465 3e3c 6120 636c 6173 to so\n-00162970: 6170 3a3a 6664 6973 636f 6e6e 6563 743c ap::fdisconnect<\n-00162980: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

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

    .fcl\n-001629c0: 6f73 6573 6f63 6b65 743c 2f68 333e 0a3c osesocket

    .<\n-001629d0: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (s\n-00162a60: 6f61 703a 3a66 636c 6f73 6573 6f63 6b65 oap::fclosesocke\n-00162a70: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so\n-00162a80: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S\n-00162a90: 4f43 4b45 5420 736f 636b 293c 2f63 6f64 OCKET sock)

    .

    This c\n-00162ab0: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-00162ac0: 6420 746f 2063 6c6f 7365 2061 2073 6f63 d to close a soc\n-00162ad0: 6b65 7420 6279 2074 6865 2065 6e67 696e ket by the engin\n-00162ae0: 652e 2052 6574 7572 6e73 203c 636f 6465 e. Returns #SOAP_OK\n-00162b00: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n-00162bc0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n-00162be0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n-00162bf0: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n-00162c00: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to \n-00162c90: 736f 6170 3a3a 6663 6c6f 7365 736f 636b soap::fclosesock\n-00162ca0: 6574 3c2f 613e 3c2f 636f 6465 3e20 6973 et is\n-00162cb0: 203c 636f 6465 3e74 6370 5f63 6c6f 7365 tcp_close\n-00162cc0: 736f 636b 6574 3c2f 636f 6465 3e2e 3c2f socket..

    .\n-00162d00: 6673 6875 7464 6f77 6e73 6f63 6b65 743c fshutdownsocket<\n-00162d10: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n-00162d20: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n-00162db0: 7368 7574 646f 776e 736f 636b 6574 3c2f shutdownsocket)(struct soap \n-00162dd0: 2a73 6f61 702c 2053 4f41 505f 534f 434b *soap, SOAP_SOCK\n-00162de0: 4554 2073 6f63 6b2c 2069 6e74 2068 6f77 ET sock, int how\n-00162df0: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n-00162e00: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n-00162e10: 2063 616c 6c65 6420 746f 2073 6875 7420 called to shut \n-00162e20: 646f 776e 2061 2073 6f63 6b65 7420 6279 down a socket by\n-00162e30: 2074 6865 2065 6e67 696e 652e 2052 6574 the engine. Ret\n-00162e40: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00162e50: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-00162e60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-00162f20: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00162f30: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00162f40: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-00162f50: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-00162f60: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so\n-00162ff0: 6170 3a3a 6673 6875 7464 6f77 6e73 6f63 ap::fshutdownsoc\n-00163000: 6b65 743c 2f61 3e3c 2f63 6f64 653e 2069 ket i\n-00163010: 7320 3c63 6f64 653e 7463 705f 7368 7574 s tcp_shut\n-00163020: 646f 776e 736f 636b 6574 3c2f 636f 6465 downsocket.

    .

    <\n-00163060: 2f61 3e0a 6670 6f6c 6c3c 2f68 333e 0a3c /a>.fpoll

    .<\n-00163070: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (soap::f\n-00163140: 706f 6c6c 3c2f 613e 2928 7374 7275 6374 poll)(struct\n-00163150: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This \n-00163170: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n-00163180: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n-00163190: 2074 6f20 7761 6974 2066 6f72 2061 6374 to wait for act\n-001631a0: 6976 6974 7920 6f6e 2074 6865 203c 636f ivity on the soap:\n-00163270: 3a73 6f63 6b65 743c 2f61 3e3c 2f63 6f64 :socket or soap::master\n-00163350: 3c2f 613e 3c2f 636f 6465 3e20 736f 636b sock\n-00163360: 6574 2075 7369 6e67 203c 636f 6465 3e70 et using p\n-00163370: 6f6c 6c3c 2f63 6f64 653e 206f 7220 3c63 oll or select. Times out whe\n-001633a0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n \n-00163450: 736f 6170 3a3a 7365 6e64 5f74 696d 656f soap::send_timeo\n-00163460: 7574 3c2f 613e 3c2f 636f 6465 3e20 6f72 ut or\n-00163470: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::recv_tim\n-00163530: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout \n-00163540: 6172 6520 6e6f 6e7a 6572 6f2e 2052 6574 are nonzero. Ret\n-00163550: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00163560: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-00163570: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-00163630: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00163640: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00163650: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-00163660: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-00163670: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fpoll<\n-00163740: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is soap_poll.

    .

    .frecv.

    size_\n-001637b0: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap\n-00163850: 3a3a 6672 6563 763c 2f61 3e29 2873 7472 ::frecv)(str\n-00163860: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-00163870: 6368 6172 202a 6275 662c 2073 697a 655f char *buf, size_\n-00163880: 7420 6c65 6e29 3c2f 636f 6465 3e3c 2f70 t len).

    This callba\n-001638a0: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n-001638b0: 7468 6520 656e 6769 6e65 2074 6f20 7265 the engine to re\n-001638c0: 6365 6976 6520 286f 7220 7265 6164 2920 ceive (or read) \n-001638d0: 6461 7461 2069 6e74 6f20 6120 7370 6563 data into a spec\n-001638e0: 6966 6965 6420 6275 6666 6572 203c 636f ified buffer buf an\n-00163900: 6420 3c63 6f64 653e 6c65 6e3c 2f63 6f64 d len. The source f\n-00163920: 6f72 2074 6865 2064 6174 6120 746f 2072 or the data to r\n-00163930: 6561 6420 6279 2074 6869 7320 6361 6c6c ead by this call\n-00163940: 6261 636b 2069 7320 3c63 6f64 653e 3c61 back is soap::is when n\n-00163a20: 6f6e 2d4e 554c 4c2c 203c 636f 6465 3e3c on-NULL, <\n-00163a30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00163a40: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00163a50: 6d6c 2361 3135 3739 6264 3862 6431 3036 ml#a1579bd8bd106\n-00163a60: 6166 6339 6139 3036 6136 3733 6361 3437 afc9a906a673ca47\n-00163a70: 3330 3436 2220 7469 746c 653d 2254 6865 3046\" title=\"The\n-00163a80: 2073 6f63 6b65 7420 7365 7420 6279 2073 socket set by s\n-00163a90: 6f61 705f 6163 6365 7074 2028 6f72 2074 oap_accept (or t\n-00163aa0: 6865 2043 2b2b 2073 6572 7669 6365 2063 he C++ service c\n-00163ab0: 6c61 7373 2061 6363 6570 7420 6d65 7468 lass accept meth\n-00163ac0: 6f64 2920 6f72 2073 6f61 705f 636f 6e6e od) or soap_conn\n-00163ad0: 6563 7420 6f72 2073 6f61 705f 636f 6e6e ect or soap_conn\n-00163ae0: 6563 2e2e 2e22 3e73 6f61 703a 3a73 6f63 ec...\">soap::soc\n-00163af0: 6b65 743c 2f61 3e3c 2f63 6f64 653e 2077 ket w\n-00163b00: 6865 6e20 7661 6c69 642c 206f 7220 3c63 hen valid, or soap\n-00163bd0: 3a3a 7265 6376 6664 3c2f 613e 3c2f 636f ::recvfd. Returns #SOAP_OK or a s\n-00163cc0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n-00163ce0: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil\n-00163cf0: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n-00163d00: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n-00163d10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::f\n-00163db0: 7265 6376 3c2f 613e 3c2f 636f 6465 3e20 recv \n-00163dc0: 6973 203c 636f 6465 3e66 7265 6376 3c2f is frecv.

    .

    <\n-00163de0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-00163df0: 2069 643d 2261 7574 6f74 6f63 5f6d 6435 id=\"autotoc_md5\n-00163e00: 3522 3e3c 2f61 3e0a 6673 656e 643c 2f68 5\">.fsend.

    int \n-00163e20: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap:\n-00163eb0: 3a66 7365 6e64 3c2f 613e 2928 7374 7275 :fsend)(stru\n-00163ec0: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n-00163ed0: 6f6e 7374 2063 6861 7220 2a62 7566 2c20 onst char *buf, \n-00163ee0: 7369 7a65 5f74 206c 656e 293c 2f63 6f64 size_t len)

    .

    This c\n-00163f00: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-00163f10: 6420 6279 2074 6865 2065 6e67 696e 6520 d by the engine \n-00163f20: 746f 2073 656e 6420 286f 7220 7772 6974 to send (or writ\n-00163f30: 6529 2064 6174 6120 7370 6563 6966 6965 e) data specifie\n-00163f40: 6420 6279 203c 636f 6465 3e64 6174 613c d by data<\n-00163f50: 2f63 6f64 653e 2062 7974 6573 206f 6620 /code> bytes of \n-00163f60: 6c65 6e67 7468 203c 636f 6465 3e6c 656e length len\n-00163f70: 3c2f 636f 6465 3e2e 2054 6865 2073 696e . The sin\n-00163f80: 6b20 666f 7220 7468 6520 6461 7461 2074 k for the data t\n-00163f90: 6f20 6265 2073 656e 7420 746f 2069 7320 o be sent to is \n-00163fa0: 7479 7069 6361 6c6c 7920 3c63 6f64 653e typically \n-00163fb0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::so\n-00164070: 636b 6574 3c2f 613e 3c2f 636f 6465 3e2c cket,\n-00164080: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-00164140: 6f61 703a 3a73 656e 6466 643c 2f61 3e3c oap::sendfd<\n-00164150: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n-00164160: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::os\n-00164220: 3c2f 613e 3c2f 636f 6465 3e2e 2052 6574 . Ret\n-00164230: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-00164240: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-00164250: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-00164310: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-00164320: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-00164330: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-00164340: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-00164350: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fsend is fsend.<\n-00164410: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n-00164440: 0a66 7365 7276 6572 6c6f 6f70 3c2f 6833 .fserverloop.

    int (\n-00164460: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fser\n-00164530: 7665 6c6f 6f70 3c2f 613e 2928 7374 7275 veloop)(stru\n-00164540: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)

    .

    Thi\n-00164560: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n-00164570: 6c6c 6564 2061 6674 6572 2065 6163 6820 lled after each \n-00164580: 7375 6363 6573 7366 756c 2063 6f6d 706c successful compl\n-00164590: 6574 696f 6e20 6f66 2061 2073 6572 7665 etion of a serve\n-001645a0: 7220 6f70 6572 6174 696f 6e20 696e 2074 r operation in t\n-001645b0: 6865 2073 6572 7665 7220 6c6f 6f70 2e20 he server loop. \n-001645c0: 4578 6563 7574 6573 2069 6d6d 6564 6961 Executes immedia\n-001645d0: 7465 6c79 2061 6674 6572 2073 656e 6469 tely after sendi\n-001645e0: 6e67 2074 6865 2072 6573 706f 6e73 6520 ng the response \n-001645f0: 746f 2061 2063 6c69 656e 7420 616e 6420 to a client and \n-00164600: 6265 666f 7265 2074 6865 206e 6578 7420 before the next \n-00164610: 6b65 6570 2d61 6c69 7665 2073 6572 7665 keep-alive serve\n-00164620: 7220 6c6f 6f70 2069 7465 7261 7469 6f6e r loop iteration\n-00164630: 2077 6865 6e20 656e 6162 6c65 6420 7769 when enabled wi\n-00164640: 7468 203c 636f 6465 3e23 534f 4150 5f49 th #SOAP_I\n-00164650: 4f5f 4b45 4550 414c 4956 453c 2f63 6f64 O_KEEPALIVE. This callbac\n-00164670: 6b20 6361 6e20 6265 2075 7365 6420 746f k can be used to\n-00164680: 2072 6563 6c61 696d 2072 6573 6f75 7263 reclaim resourc\n-00164690: 6573 2069 6e20 7468 6520 6b65 6570 2d61 es in the keep-a\n-001646a0: 6c69 7665 2073 6572 7665 7220 6c6f 6f70 live server loop\n-001646b0: 2c20 666f 7220 6578 616d 706c 6520 6d61 , for example ma\n-001646c0: 6e61 6765 6420 6d65 6d6f 7279 2063 616e naged memory can\n-001646d0: 2062 6520 7265 636c 6169 6d65 6420 6279 be reclaimed by\n-001646e0: 2063 616c 6c69 6e67 203c 636f 6465 3e3c calling <\n-001646f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00164700: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00164710: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-00164720: 6637 6430 3137 3631 3631 6539 6465 6633 f7d0176161e9def3\n-00164730: 3639 3831 6532 3466 6161 3139 3133 6439 6981e24faa1913d9\n-00164740: 2220 7469 746c 653d 2244 656c 6574 6520 \" title=\"Delete \n-00164750: 616c 6c20 6479 6e61 6d69 6361 6c6c 792d all dynamically-\n-00164760: 616c 6c6f 6361 7465 6420 432b 2b20 6f62 allocated C++ ob\n-00164770: 6a65 6374 7320 6d61 6e61 6765 6420 6279 jects managed by\n-00164780: 2074 6865 2073 7065 6369 6669 6564 2073 the specified s\n-00164790: 6f61 7020 636f 6e74 6578 742e 223e 736f oap context.\">so\n-001647a0: 6170 5f64 6573 7472 6f79 3c2f 613e 3c2f ap_destroy and \n-001647c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_end\n-00164890: 3c2f 636f 6465 3e20 696e 2074 6861 7420 in that \n-001648a0: 6f72 6465 7220 616e 6420 616c 6c20 6465 order and all de\n-001648b0: 7365 7269 616c 697a 6564 2061 6e64 206f serialized and o\n-001648c0: 7468 6572 2064 796e 616d 6963 616c 6c79 ther dynamically\n-001648d0: 2d61 6c6c 6f63 6174 6564 2064 6174 6120 -allocated data \n-001648e0: 6d61 6e61 6765 6420 6279 2074 6865 2063 managed by the c\n-001648f0: 6f6e 7465 7874 2077 696c 6c20 6265 2064 ontext will be d\n-00164900: 6561 6c6c 6f63 6174 6564 2e20 5265 7475 eallocated. Retu\n-00164910: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n-00164920: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n-00164930: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n-001649f0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n-00164a00: 7429 2065 7272 6f72 2063 6f64 652e 204e t) error code. N\n-00164a10: 6f20 6275 696c 742d 696e 2066 756e 6374 o built-in funct\n-00164a20: 696f 6e20 6973 2061 7373 6967 6e65 6420 ion is assigned \n-00164a30: 746f 203c 636f 6465 3e3c 6120 636c 6173 to s\n-00164b00: 6f61 703a 3a66 7365 7276 656c 6f6f 703c oap::fserveloop<\n-00164b10: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n-00164b20: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fma\n-00164b50: 6c6c 6f63 3c2f 6833 3e0a 3c70 3e3c 636f lloc

    .

    void (soap::fmall\n-00164c10: 6f63 3c2f 613e 2928 7374 7275 6374 2073 oc)(struct s\n-00164c20: 6f61 7020 2a73 6f61 702c 2073 697a 655f oap *soap, size_\n-00164c30: 7420 7369 7a65 293c 2f63 6f64 653e 3c2f t size).

    This callb\n-00164c50: 6163 6b20 6361 6e20 6265 2075 7365 6420 ack can be used \n-00164c60: 746f 206f 7665 7272 6964 6520 6d65 6d6f to override memo\n-00164c70: 7279 2061 6c6c 6f63 6174 696f 6e20 616e ry allocation an\n-00164c80: 6420 6d61 6e61 6765 6d65 6e74 2064 6f6e d management don\n-00164c90: 6520 6279 203c 636f 6465 3e3c 6120 636c e by soa\n-00164d40: 705f 6d61 6c6c 6f63 3c2f 613e 3c2f 636f p_malloc in C. Memory\n-00164d60: 2061 6c6c 6f63 6174 6564 2076 6961 2074 allocated via t\n-00164d70: 6869 7320 6361 6c6c 6261 636b 2077 696c his callback wil\n-00164d80: 6c20 6e6f 7420 6265 206d 616e 6167 6564 l not be managed\n-00164d90: 2061 6e64 206e 6f74 2062 6520 6175 746f and not be auto\n-00164da0: 6d61 7469 6361 6c6c 7920 7265 6c65 6173 matically releas\n-00164db0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n-00164dc0: 2e20 496e 7374 6561 642c 2074 6865 2061 . Instead, the a\n-00164dd0: 7070 6c69 6361 7469 6f6e 2075 7369 6e67 pplication using\n-00164de0: 2074 6869 7320 6361 6c6c 6261 636b 2073 this callback s\n-00164df0: 686f 756c 6420 7265 6c65 6173 6520 616c hould release al\n-00164e00: 6c6f 6361 7465 6420 6d65 6d6f 7279 2e20 located memory. \n-00164e10: 416c 6c20 616c 6c6f 6361 7469 6f6e 7320 All allocations \n-00164e20: 646f 6e65 2062 7920 3c63 6f64 653e 3c61 done by \n-00164ed0: 736f 6170 5f6d 616c 6c6f 633c 2f61 3e3c soap_malloc<\n-00164ee0: 2f63 6f64 653e 2061 7265 2072 6570 6c61 /code> are repla\n-00164ef0: 6365 6420 7769 7468 2061 2063 616c 6c20 ced with a call \n-00164f00: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::fmall\n-00164fb0: 6f63 3c2f 613e 3c2f 636f 6465 3e2e 2048 oc. H\n-00164fc0: 6f77 6576 6572 2c20 6e6f 206f 7468 6572 owever, no other\n-00164fd0: 2061 6c6c 6f63 6174 696f 6e73 2c20 7375 allocations, su\n-00164fe0: 6368 2061 7320 3c63 6f64 653e 3c61 2063 ch as soap_new<\n-00165080: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_new_T for C++ class\n-001650b0: 6573 203c 636f 6465 3e54 3c2f 636f 6465 es T are affected, \n-001650d0: 6265 6361 7573 6520 6f62 6a65 6374 7320 because objects \n-001650e0: 6172 6520 616c 6c6f 6361 7465 6420 6469 are allocated di\n-001650f0: 6666 6572 656e 746c 792e 2054 6869 7320 fferently. This \n-00165100: 6361 6c6c 6261 636b 2069 7320 7468 6572 callback is ther\n-00165110: 6566 6f72 6520 6e6f 7420 7573 6566 756c efore not useful\n-00165120: 2066 6f72 2043 2b2b 2061 7070 6c69 6361 for C++ applica\n-00165130: 7469 6f6e 732e 2052 6574 7572 6e73 2061 tions. Returns a\n-00165140: 2070 6f69 6e74 6572 2074 6f20 6479 6e61 pointer to dyna\n-00165150: 6d69 6361 6c6c 7920 616c 6c6f 6361 7465 mically allocate\n-00165160: 6420 6d65 6d6f 7279 206f 7220 4e55 4c4c d memory or NULL\n-00165170: 206f 6e20 6661 696c 7572 6520 746f 2061 on failure to a\n-00165180: 6c6c 6f63 6174 652e 204e 6f20 6275 696c llocate. No buil\n-00165190: 742d 696e 2066 756e 6374 696f 6e20 6973 t-in function is\n-001651a0: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to s\n-00165250: 6f61 703a 3a66 6d61 6c6c 6f63 3c2f 613e oap::fmalloc\n-00165260: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 646c .

    .
    War\n-00165290: 6e69 6e67 3c2f 6474 3e3c 6464 3e44 6570 ning
    Dep\n-001652a0: 7265 6361 7465 6420 7369 6e63 6520 322e recated since 2.\n-001652b0: 382e 3732 2e20 4465 6669 6e65 203c 636f 8.72. Define #SOAP_MALLOC<\n-001652d0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and #SOAP_FREE instead.
    \n-00165300: 3c2f 646c 3e0a 3c68 333e 3c61 2063 6c61 .

    .user variable\n-00165340: 3c2f 6833 3e0a 3c70 3e41 203c 636f 6465

    .

    A void* s\n-00165410: 6f61 703a 3a75 7365 723c 2f61 3e3c 2f63 oap::user variable is\n-00165430: 2061 7661 696c 6162 6c65 2074 6f20 7061 available to pa\n-00165440: 7373 2075 7365 722d 6465 6669 6e65 6420 ss user-defined \n-00165450: 6461 7461 2074 6f20 7468 6520 6361 6c6c data to the call\n-00165460: 6261 636b 732e 3c2f 703e 0a3c 6833 3e3c backs.

    .

    <\n-00165470: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-00165480: 2069 643d 2261 7574 6f74 6f63 5f6d 6435 id=\"autotoc_md5\n-00165490: 3922 3e3c 2f61 3e0a 4578 616d 706c 6573 9\">.Examples\n-001654a0: 3c2f 6833 3e0a 3c70 3e54 6865 2066 6f6c

    .

    The fol\n-001654b0: 6c6f 7769 6e67 2065 7861 6d70 6c65 2075 lowing example u\n-001654c0: 7365 7320 492f 4f20 6361 6c6c 6261 636b ses I/O callback\n-001654d0: 7320 666f 7220 6375 7374 6f6d 697a 6564 s for customized\n-001654e0: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n-001654f0: 6620 6461 7461 2069 6e74 6f20 6120 6669 f data into a fi\n-00165500: 7865 642d 7369 7a65 2062 7566 6665 7220 xed-size buffer \n-00165510: 616e 6420 6465 7365 7269 616c 697a 6174 and deserializat\n-00165520: 696f 6e20 6261 636b 2069 6e74 6f20 6120 ion back into a \n-00165530: 6461 7461 2073 7472 7563 7475 7265 3a3c data structure:<\n-00165540: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    char buf[10000]; // XML buffe\n-001655c0: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    .\n-001655d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-00165600: 2f73 7061 6e3e 206c 656e 3120 3d20 303b /span> len1 = 0;\n-00165610: 2020 2020 3c73 7061 6e20 636c 6173 733d // #ch\n-00165630: 6172 7320 7772 6974 7465 6e20 3c2f 7370 ars written
    .
    int\n-00165680: 206c 656e 3220 3d20 303b 2020 2020 3c73 len2 = 0; // #chars re\n-001656b0: 6164 203c 2f73 7061 6e3e 3c2f 6469 763e ad
    \n-001656c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    // mysend: pu\n-00165710: 7420 584d 4c20 696e 2062 7566 5b5d 203c t XML in buf[] <\n-00165720: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-00165740: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165750: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int mysend(struct <\n-00165790: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001657a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001657b0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001657c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001657f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-00165830: 6172 3c2f 7370 616e 3e20 2a73 2c20 3c73 ar *s, size_t n)
    .\n-00165870: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (len1 + n >\n-001658d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 sizeof(buf)) .
    return \n-00165940: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_EOF\n-001659a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    str\n-001659c0: 6370 7928 6275 6620 2b20 6c65 6e31 2c20 cpy(buf + len1, \n-001659d0: 7329 3b20 3c2f 6469 763e 0a3c 6469 7620 s);
    .
    l\n-001659f0: 656e 3120 2b3d 206e 3b20 3c2f 6469 763e en1 += n;
    \n-00165a00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n-00165a30: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK; .
    }
    .\n-00165ac0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    // myrecv: get\n-00165b10: 2058 4d4c 2066 726f 6d20 6275 665b 5d20 XML from buf[] \n-00165b20: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00165b40: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n-00165b60: 3c2f 7370 616e 3e20 6d79 7265 6376 283c myrecv(<\n-00165b70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165b80: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-00165bf0: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, c\n-00165c10: 6861 723c 2f73 7061 6e3e 202a 732c 203c har *s, <\n-00165c20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165c30: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n-00165c40: 2f73 7061 6e3e 206e 2920 3c2f 6469 763e /span> n)
    \n-00165c50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00165c80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165c90: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (len2 + n >\n-00165cb0: 3b20 6c65 6e31 2920 3c2f 6469 763e 0a3c ; len1)
    .<\n-00165cc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00165cd0: 3e20 2020 206e 203d 206c 656e 3120 2d20 > n = len1 - \n-00165ce0: 6c65 6e32 3b20 3c2f 6469 763e 0a3c 6469 len2;
    . \n-00165d00: 2073 7472 6e63 7079 2873 2c20 6275 6620 strncpy(s, buf \n-00165d10: 2b20 6c65 6e32 2c20 6e29 3b20 3c2f 6469 + len2, n); .
    len2 += n\n-00165d40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    return n;
    .<\n-00165d90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00165da0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}

    .
    .
    \n-00165df0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-00165e00: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str\n-00165e50: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    str\n-00165ef0: 7563 7420 3c2f 7370 616e 3e6e 735f 5f70 uct ns__p\n-00165f00: 6572 736f 6e20 703b 203c 2f64 6976 3e0a erson p;
    .\n-00165f10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . \n-00166040: 6c65 6e31 203d 206c 656e 3220 3d20 303b len1 = len2 = 0;\n-00166050: 2020 2020 203c 7370 616e 2063 6c61 7373 // re\n-00166070: 7365 7420 6275 6666 6572 2070 6f69 6e74 set buffer point\n-00166080: 6572 7320 3c2f 7370 616e 3e3c 2f64 6976 ers .
    p.name = <\n-001660b0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-001660c0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-001660d0: 3b4a 6f68 6e20 446f 6526 7175 6f74 3b3c ;John Doe"<\n-001660e0: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-001660f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00166100: 3e20 2070 2e61 6765 203d 2032 353b 203c > p.age = 25; <\n-00166110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fsend = mys\n-001661c0: 656e 643b 203c 7370 616e 2063 6c61 7373 end; // as\n-001661e0: 7369 676e 2063 616c 6c62 6163 6b20 3c2f sign callback
    . \n-00166210: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-00166240: 3c61 2063 6c61 7373 3d22 636f 6465 2220 frecv\n-001662a0: 203d 206d 7972 6563 763b 203c 7370 616e = myrecv; // assign callb\n-001662d0: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack .
    \n-00166310: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n-00166320: 7772 6974 655f 6e73 5f5f 7065 7273 6f6e write_ns__person\n-00166330: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00166360: 703c 2f61 3e2c 2026 616d 703b 7029 293c p, &p))<\n-00166370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    soap_\n-00166400: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n-00166410: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-00166440: 3c2f 613e 2c20 7374 646f 7574 293b 203c , stdout); <\n-00166450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    exit\n-00166470: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); \n-00166480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    if (soa\n-001664e0: 705f 7265 6164 5f6e 735f 5f50 6572 736f p_read_ns__Perso\n-001664f0: 6e28 2661 6d70 3b3c 6120 636c 6173 733d n(&so\n-00166520: 6170 3c2f 613e 2c20 2661 6d70 3b70 2929 ap, &p))\n-00166530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    soap\n-001665c0: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n-001665d0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00166600: 703c 2f61 3e2c 2073 7464 6f75 7429 3b20 p, stdout); \n-00166610: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exi\n-00166630: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n-00166640: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .\n-001667d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n-00166a10: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00166a30: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00166a40: 3a34 3630 373c 2f64 6976 3e3c 2f64 6976 :4607
    .
    \n-00166b30: 696e 7428 2a20 6673 656e 6429 2873 7472 int(* fsend)(str\n-00166b40: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-00166b50: 636f 6e73 7420 6368 6172 202a 6461 7461 const char *data\n-00166b60: 2c20 7369 7a65 5f74 206c 656e 293c 2f64 , size_t len)
    Callback t\n-00166b90: 6861 7420 7365 6e64 7320 7468 6520 6769 hat sends the gi\n-00166ba0: 7665 6e20 6279 7465 7320 6f66 2064 6174 ven bytes of dat\n-00166bb0: 612e 3c2f 6469 763e 3c64 6976 2063 6c61 a.
    De\n-00166bd0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00166be0: 6473 6f61 7032 2e68 3a34 3632 303c 2f64 dsoap2.h:4620
    .
    \n-00166c00: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The follo\n-00168140: 7769 6e67 2065 7861 6d70 6c65 2069 6c6c wing example ill\n-00168150: 7573 7472 6174 6573 2063 7573 746f 6d69 ustrates customi\n-00168160: 7a65 6420 492f 4f20 616e 6420 4854 5450 zed I/O and HTTP\n-00168170: 2068 6561 6465 7220 6861 6e64 6c69 6e67 header handling\n-00168180: 2e20 5468 6520 584d 4c20 6d65 7373 6167 . The XML messag\n-00168190: 6520 6973 2073 6176 6564 2074 6f20 6120 e is saved to a \n-001681a0: 6669 6c65 2074 6f20 6465 6d6f 6e73 7472 file to demonstr\n-001681b0: 6174 6520 492f 4f20 616e 6420 4854 5450 ate I/O and HTTP\n-001681c0: 2063 616c 6c62 6163 6b73 2e20 5468 6520 callbacks. The \n-001681d0: 636c 6965 6e74 2070 726f 7879 2074 6865 client proxy the\n-001681e0: 6e20 7265 6164 7320 7468 6520 6669 6c65 n reads the file\n-001681f0: 2063 6f6e 7465 6e74 7320 6173 2074 6865 contents as the\n-00168200: 2073 6572 7669 6365 2072 6573 706f 6e73 service respons\n-00168210: 652e 2054 6f20 7065 7266 6f72 6d20 7468 e. To perform th\n-00168220: 6973 2074 7269 636b 2c20 7468 6520 7365 is trick, the se\n-00168230: 7276 6963 6520 7265 7370 6f6e 7365 2068 rvice response h\n-00168240: 6173 2065 7861 6374 6c79 2074 6865 2073 as exactly the s\n-00168250: 616d 6520 7374 7275 6374 7572 6520 6173 ame structure as\n-00168260: 2074 6865 2072 6571 7565 7374 2e20 5468 the request. Th\n-00168270: 6973 2069 7320 6465 636c 6172 6564 2062 is is declared b\n-00168280: 7920 7468 6520 3c63 6f64 653e 7374 7275 y the stru\n-00168290: 6374 206e 735f 5f74 6573 743c 2f63 6f64 ct ns__test output parame\n-001682b0: 7465 7220 7061 7274 206f 6620 7468 6520 ter part of the \n-001682c0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-001682d0: 6e20 6465 636c 6172 6174 696f 6e2e 2054 n declaration. T\n-001682e0: 6869 7320 7374 7275 6374 2072 6573 656d his struct resem\n-001682f0: 626c 6573 2074 6865 2073 6572 7669 6365 bles the service\n-00168300: 2072 6571 7565 7374 2028 7365 6520 7468 request (see th\n-00168310: 6520 6765 6e65 7261 7465 6420 3c65 6d3e e generated \n-00168320: 3c63 6f64 653e 736f 6170 5374 7562 2e68 soapStub.h\n-00168330: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n-00168340: 6520 6765 6e65 7261 7465 6420 6279 2073 e generated by s\n-00168350: 6f61 7063 7070 3220 6672 6f6d 2074 6865 oapcpp2 from the\n-00168360: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-00168370: 7220 6669 6c65 2069 6e70 7574 292e 3c2f r file input)..

    The interf\n+00158680: 6e73 743c 2f73 7061 6e3e 2054 202a 612c nst T *a,\n+00158690: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n+001586d0: 6172 3c2f 7370 616e 3e20 2a74 7970 6529 ar *type)\n+001586e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;

    .
    T *soa\n+00158700: 705f 696e 5f54 283c 7370 616e 2063 6c61 p_in_T(str\n+00158720: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, const \n+001587b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tag, T *a\n+001587e0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n+00158820: 6861 723c 2f73 7061 6e3e 202a 7479 7065 har *type\n+00158830: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .
    <\n+00158840: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00158850: 3c70 3e54 6865 2066 756e 6374 696f 6e20

    The function \n+00158860: 7072 6f74 6f74 7970 6573 206f 6620 7468 prototypes of th\n+00158870: 6573 6520 6675 6e63 7469 6f6e 7320 6361 ese functions ca\n+00158880: 6e20 6265 2066 6f75 6e64 2069 6e20 7468 n be found in th\n+00158890: 6520 736f 6170 6370 7032 2d67 656e 6572 e soapcpp2-gener\n+001588a0: 6174 6564 203c 656d 3e3c 636f 6465 3e73 ated s\n+001588b0: 6f61 7048 2e68 3c2f 636f 6465 3e3c 2f65 oapH.h file.

    .

    \n+001588d0: 466f 7220 6578 616d 706c 652c 2074 6865 For example, the\n+001588e0: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n+001588f0: 6620 3c63 6f64 653e 4d79 4461 7461 3c2f f MyData can be don\n+00158910: 6520 7769 7468 2074 6865 2066 6f6c 6c6f e with the follo\n+00158920: 7769 6e67 2063 6f64 653a 3c2f 703e 0a3c wing code:

    .<\n+00158930: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00158940: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int soap\n+00158980: 5f73 6572 6961 6c69 7a65 5f4d 7944 6174 _serialize_MyDat\n+00158990: 6128 3c73 7061 6e20 636c 6173 733d 226b a(struct soa\n+001589e0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00158a10: 6170 3c2f 613e 2c20 4d79 4461 7461 203c ap, MyData <\n+00158a20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00158a30: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const*a)
    .{<\n+00158a60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+00158a90: 2f2f 206e 6f20 6e65 6564 2074 6f20 6d61 // no need to ma\n+00158aa0: 726b 2074 6869 7320 6e6f 6465 2028 666f rk this node (fo\n+00158ab0: 7220 6d75 6c74 692d 7265 6620 616e 6420 r multi-ref and \n+00158ac0: 6379 636c 6520 6465 7465 6374 696f 6e29 cycle detection)\n+00158ad0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00158ae0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00158af0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+00158b10: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n+00158b70: 4f41 505f 4f4b 3c2f 613e 3b3c 2f64 6976 OAP_OK;.
    }
    .void soap_default\n+00158be0: 5f4d 7944 6174 6128 3c73 7061 6e20 636c _MyData(st\n+00158c00: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, My\n+00158c70: 4461 7461 202a 6129 203c 2f64 6976 3e0a Data *a)
    .\n+00158c80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    *a\n+00158cb0: 203d 204e 554c 4c3b 3c2f 6469 763e 0a3c = NULL;
    .<\n+00158cc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00158cd0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    int\n+00158d10: 2073 6f61 705f 6f75 745f 4d79 4461 7461 soap_out_MyData\n+00158d20: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+00158d70: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+00158da0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, con\n+00158dc0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00158df0: 2a74 6167 2c20 3c73 7061 6e20 636c 6173 *tag, \n+00158e10: 696e 743c 2f73 7061 6e3e 203c 7370 616e int id, \n+00158e40: 4d79 4461 7461 203c 7370 616e 2063 6c61 MyData con\n+00158e60: 7374 3c2f 7370 616e 3e2a 612c 203c 7370 st*a, const \n+00158e90: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *type) .
    {
    .\n+00158ef0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_elem\n+00158f20: 656e 745f 6265 6769 6e5f 6f75 7428 3c61 ent_begin_out(soap, t\n+00158f60: 6167 2c20 3c73 7061 6e20 636c 6173 733d ag, id\n+00158f80: 3c2f 7370 616e 3e2c 2074 7970 6529 203c , type) <\n+00158f90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00158fa0: 656e 7422 3e2f 2f20 7072 696e 7420 584d ent\">// print XM\n+00158fb0: 4c20 6265 6769 6e6e 696e 6720 7461 6720 L beginning tag \n+00158fc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00158fe0: 2020 207c 7c20 3c61 2063 6c61 7373 3d22 || soap_send<\n+00159040: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00159070: 2f61 3e2c 202a 6129 203c 7370 616e 2063 /a>, *a) /\n+00159090: 2f20 6a75 7374 2070 7269 6e74 2074 6865 / just print the\n+001590a0: 2073 7472 696e 6720 286e 6f20 584d 4c20 string (no XML \n+001590b0: 636f 6e76 6572 7369 6f6e 2920 3c2f 7370 conversion)
    ..
    \n+00159180: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001591a0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001591d0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error; \n+00159230: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_OK;
    .
    } <\n+001592f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    MyData *\n+00159310: 2a73 6f61 705f 696e 5f4d 7944 6174 6128 *soap_in_MyData(\n+00159320: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00159370: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001593a0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , cons\n+001593c0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001593f0: 7461 672c 204d 7944 6174 6120 2a61 2c20 tag, MyData *a, \n+00159400: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+00159440: 723c 2f73 7061 6e3e 202a 7479 7065 2920 r *type) \n+00159450: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00159470: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+001594a0: 663c 2f73 7061 6e3e 2028 736f 6170 5f65 f (soap_e\n+001594b0: 6c65 6d65 6e74 5f62 6567 696e 5f69 6e28 lement_begin_in(\n+001594c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001594f0: 2074 6167 2929 203c 2f64 6976 3e0a 3c64 tag))
    .\n+00159510: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n+00159530: 7475 726e 3c2f 7370 616e 3e20 4e55 4c4c turn NULL\n+00159540: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n+00159580: 2028 2161 2920 3c2f 6469 763e 0a3c 6469 (!a)
    . \n+001595a0: 2020 2061 203d 2028 4d79 4461 7461 2a29 a = (MyData*)\n+001595b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_malloc\n+00159610: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+00159640: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , size\n+00159660: 6f66 3c2f 7370 616e 3e28 4d79 4461 7461 of(MyData\n+00159670: 2929 3b20 3c2f 6469 763e 0a3c 6469 7620 ));
    .
    <\n+00159690: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001596a0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n+001596e0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->null) .
    *a = NUL\n+00159760: 4c3b 203c 7370 616e 2063 6c61 7373 3d22 L; // xsi:\n+00159780: 6e69 6c20 656c 656d 656e 7420 3c2f 7370 nil element
    .
    if (*soap<\n+00159800: 2f61 3e2d 2667 743b 7479 7065 2026 616d /a>->type &am\n+00159810: 703b 2661 6d70 3b20 3c61 2063 6c61 7373 p;& soap_m\n+00159870: 6174 6368 5f74 6167 3c2f 613e 283c 6120 atch_tag(soap, soap-&g\n+001598e0: 743b 7479 7065 2c20 7479 7065 2929 203c t;type, type)) <\n+001598f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    s\n+00159950: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error =\n+001599b0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_TYPE;
    .
    \n+00159a30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00159a50: 6e3c 2f73 7061 6e3e 204e 554c 4c3b 203c n NULL; <\n+00159a60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00159a70: 656e 7422 3e2f 2f20 7479 7065 206d 6973 ent\">// type mis\n+00159a80: 6d61 7463 6820 3c2f 7370 616e 3e3c 2f64 match .
    }
    \n+00159ab0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+00159ae0: 663c 2f73 7061 6e3e 2028 2a3c 6120 636c f (*soap->h\n+00159b20: 7265 6629 203c 2f64 6976 3e0a 3c64 6976 ref)
    . \n+00159b40: 2020 6120 3d20 284d 7944 6174 612a 2a29 a = (MyData**)\n+00159b50: 736f 6170 5f69 645f 666f 7277 6172 6428 soap_id_forward(\n+00159b60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00159b90: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00159bc0: 2d26 6774 3b68 7265 662c 2061 2c20 302c ->href, a, 0,\n+00159bd0: 2053 4f41 505f 5459 5045 5f4d 7944 6174 SOAP_TYPE_MyDat\n+00159be0: 612c 2030 2c20 3c73 7061 6e20 636c 6173 a, 0, size\n+00159c00: 6f66 3c2f 7370 616e 3e28 4d79 4461 7461 of(MyData\n+00159c10: 292c 2030 2c20 4e55 4c4c 2c20 4e55 4c4c ), 0, NULL, NULL\n+00159c20: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    else if<\n+00159c80: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n+00159cb0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->body) <\n+00159d10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    char *s\n+00159d70: 203d 2073 6f61 705f 7661 6c75 6528 3c61 = soap_value(soap); \n+00159db0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // fill bu\n+00159dd0: 6666 6572 203c 2f73 7061 6e3e 3c2f 6469 ffer .
    *a = (<\n+00159e00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00159e10: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char*)soap_\n+00159e80: 6d61 6c6c 6f63 3c2f 613e 283c 6120 636c malloc(soap, strl\n+00159ec0: 656e 2873 292b 3129 3b20 3c2f 6469 763e en(s)+1);
    \n+00159ed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    strcpy(*a\n+00159ef0: 2c20 7329 3b20 3c2f 6469 763e 0a3c 6469 , s);
    . \n+00159f10: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    if (soap->\n+00159fd0: 626f 6479 3c2f 613e 2026 616d 703b 2661 body &&a\n+00159fe0: 6d70 3b20 736f 6170 5f65 6c65 6d65 6e74 mp; soap_element\n+00159ff0: 5f65 6e64 5f69 6e28 3c61 2063 6c61 7373 _end_in(s\n+0015a020: 6f61 703c 2f61 3e2c 2074 6167 2929 203c oap, tag)) <\n+0015a030: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return NULL;
    \n+0015a080: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n+0015a0b0: 6574 7572 6e3c 2f73 7061 6e3e 2061 3b20 eturn a; \n+0015a0c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n+0015a0e0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    \n+0015a190: 534f 4150 5f54 5950 453c 2f61 3e3c 2f64 SOAP_TYPE
    #define S\n+0015a1c0: 4f41 505f 5459 5045 3c2f 6469 763e 3c64 OAP_TYPE
    A soap_status e\n+0015a1f0: 7272 6f72 2063 6f64 653a 2058 4d4c 2065 rror code: XML e\n+0015a200: 6c65 6d65 6e74 206f 7220 6174 7472 6962 lement or attrib\n+0015a210: 7574 6520 6861 7320 6120 6d69 736d 6174 ute has a mismat\n+0015a220: 6368 696e 6720 7479 7065 206f 7220 7661 ching type or va\n+0015a230: 6c75 6520 7468 6174 2069 7320 6361 7573 lue that is caus\n+0015a240: 696e 6720 6120 2e2e 2e3c 2f64 6976 3e3c ing a ...
    <\n+0015a250: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+0015a260: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+0015a270: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+0015a280: 3236 3037 3c2f 6469 763e 3c2f 6469 763e 2607
    \n+0015a290: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    i\n+0015a360: 6e74 2073 6f61 705f 7365 6e64 2873 7472 nt soap_send(str\n+0015a370: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+0015a380: 636f 6e73 7420 6368 6172 202a 7329 3c2f const char *s)
    Send a st\n+0015a3b0: 7269 6e67 2e3c 2f64 6976 3e3c 2f64 6976 ring.
    .
    soa\n+0015a470: 705f 6d61 7463 685f 7461 673c 2f61 3e3c p_match_tag<\n+0015a480: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa\n+0015a4a0: 705f 6d61 7463 685f 7461 6728 7374 7275 p_match_tag(stru\n+0015a4b0: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+0015a4c0: 6f6e 7374 2063 6861 7220 2a74 6167 312c onst char *tag1,\n+0015a4d0: 2063 6f6e 7374 2063 6861 7220 2a74 6167 const char *tag\n+0015a4e0: 3229 3c2f 6469 763e 3c64 6976 2063 6c61 2)
    Match\n+0015a500: 2061 6e20 584d 4c20 7461 6720 6e61 6d65 an XML tag name\n+0015a510: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .
    s\n+0015a5e0: 686f 7274 2062 6f64 793c 2f64 6976 3e3c hort body
    <\n+0015a5f0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0015a600: 223e 5468 6520 736f 6170 3a3a 626f 6479 \">The soap::body\n+0015a610: 2066 6c61 6720 6973 2073 6574 2077 6865 flag is set whe\n+0015a620: 6e20 616e 2065 6c65 6d65 6e74 2068 6173 n an element has\n+0015a630: 2065 6c65 6d65 6e74 2063 6f6e 7465 6e74 element content\n+0015a640: 2064 7572 696e 6720 584d 4c20 7061 7273 during XML pars\n+0015a650: 696e 6720 6f72 2077 6865 6e20 6120 4854 ing or when a HT\n+0015a660: 5450 206d 6573 732e 2e2e 3c2f 6469 763e TP mess...
    \n+0015a670: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+0015a690: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0015a6a0: 3a32 3936 353c 2f64 6976 3e3c 2f64 6976 :2965
    .
    <\n+0015a710: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+0015a720: 6170 2e68 746d 6c23 6164 6466 3039 3963 ap.html#addf099c\n+0015a730: 6363 6537 3634 6366 3338 6639 3662 6533 cce764cf38f96be3\n+0015a740: 3035 6234 3434 3036 6122 3e73 6f61 703a 05b44406a\">soap:\n+0015a750: 3a6e 756c 6c3c 2f61 3e3c 2f64 6976 3e3c :null
    <\n+0015a760: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+0015a770: 6922 3e73 686f 7274 206e 756c 6c3c 2f64 i\">short null
    The soap::\n+0015a7a0: 6e75 6c6c 2066 6c61 6720 6973 2073 6574 null flag is set\n+0015a7b0: 2077 6865 6e20 616e 2065 6c65 6d65 6e74 when an element\n+0015a7c0: 2063 6172 7269 6573 2061 2078 7369 3a6e carries a xsi:n\n+0015a7d0: 696c 2061 7474 7269 6275 7465 2074 6861 il attribute tha\n+0015a7e0: 7420 6973 2074 7275 652e 3c2f 6469 763e t is true.
    \n+0015a7f0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+0015a810: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0015a820: 3a32 3936 333c 2f64 6976 3e3c 2f64 6976 :2963
    .

    More\n+0015a850: 2069 6e66 6f72 6d61 7469 6f6e 206f 6e20 information on \n+0015a860: 6375 7374 6f6d 2073 6572 6961 6c69 7a61 custom serializa\n+0015a870: 7469 6f6e 2069 7320 6176 6169 6c61 626c tion is availabl\n+0015a880: 6520 696e 2074 6865 2067 534f 4150 2073 e in the gSOAP s\n+0015a890: 6f75 7263 6520 636f 6465 2070 6163 6b61 ource code packa\n+0015a8a0: 6765 2069 6e20 7468 6520 3c65 6d3e 3c63 ge in the gsoap/custom\n+0015a8c0: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir\n+0015a8d0: 6563 746f 7279 2c20 7768 6572 6520 796f ectory, where yo\n+0015a8e0: 7520 6361 6e20 616c 736f 2066 696e 6420 u can also find \n+0015a8f0: 7365 7665 7261 6c20 6375 7374 6f6d 2073 several custom s\n+0015a900: 6572 6961 6c69 7a65 7273 2074 6f20 7573 erializers to us\n+0015a910: 6520 7769 7468 2079 6f75 7220 7072 6f6a e with your proj\n+0015a920: 6563 7473 2e3c 2f70 3e0a 3c70 3ef0 9f94 ects.

    .

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

    .\n+0015a960: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Functio\n+0015a990: 6e20 6361 6c6c 6261 636b 7320 666f 7220 n callbacks for \n+0015a9a0: 6375 7374 6f6d 697a 6564 2049 2f4f 2061 customized I/O a\n+0015a9b0: 6e64 2048 5454 5020 6861 6e64 6c69 6e67 nd HTTP handling\n+0015a9c0: 3c2f 6832 3e0a 3c70 3e54 6865 2066 6f6c

    .

    The fol\n+0015a9d0: 6c6f 7769 6e67 206c 6973 7420 6f66 2066 lowing list of f\n+0015a9e0: 756e 6374 696f 6e73 2063 616e 2062 6520 unctions can be \n+0015a9f0: 7573 6564 2066 6f72 2063 7573 746f 6d69 used for customi\n+0015aa00: 7a65 6420 4854 5450 2068 616e 646c 696e zed HTTP handlin\n+0015aa10: 6720 616e 6420 492f 4f2e 3c2f 703e 0a3c g and I/O.

    .<\n+0015aa20: 703e 5365 6520 616c 736f 2041 5049 2064 p>See also API d\n+0015aa30: 6f63 756d 656e 7461 7469 6f6e 204d 6f64 ocumentation Mod\n+0015aa40: 756c 6520 3c61 2063 6c61 7373 3d22 656c ule Callback f\n+0015aa80: 756e 6374 696f 6e73 3c2f 613e 2e3c 2f70 unctions..

    To reset th\n+0015aaa0: 6520 6361 6c6c 6261 636b 2066 756e 6374 e callback funct\n+0015aab0: 696f 6e73 2074 6f20 7468 6520 696e 7465 ions to the inte\n+0015aac0: 726e 616c 2066 756e 6374 696f 6e73 206f rnal functions o\n+0015aad0: 6620 7468 6520 656e 6769 6e65 2c20 7573 f the engine, us\n+0015aae0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap\n+0015abb0: 5f64 6f6e 653c 2f61 3e3c 2f63 6f64 653e _done\n+0015abc0: 2066 6f6c 6c6f 7765 6420 6279 203c 636f followed by soap_in\n+0015ac60: 6974 3c2f 613e 3c2f 636f 6465 3e2e 2054 it. T\n+0015ac70: 6869 7320 7265 2d69 6e69 7469 616c 697a his re-initializ\n+0015ac80: 6573 2074 6865 203c 636f 6465 3e3c 6120 es the soap context\n+0015acf0: 2c20 7265 6d6f 7665 7320 616c 6c20 706c , removes all pl\n+0015ad00: 7567 696e 732c 2061 6e64 2072 6573 6574 ugins, and reset\n+0015ad10: 7320 6675 6e63 7469 6f6e 2063 616c 6c62 s function callb\n+0015ad20: 6163 6b73 2e3c 2f70 3e0a 3c68 333e 3c61 acks.

    .

    .fpost.

    int (\n+0015ad70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fpost)(struct soap *\n+0015ae50: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+0015ae60: 202a 656e 6470 6f69 6e74 2c20 636f 6e73 *endpoint, cons\n+0015ae70: 7420 6368 6172 202a 686f 7374 2c20 696e t char *host, in\n+0015ae80: 7420 706f 7274 2c20 636f 6e73 7420 6368 t port, const ch\n+0015ae90: 6172 202a 7061 7468 2c20 636f 6e73 7420 ar *path, const \n+0015aea0: 6368 6172 202a 6163 7469 6f6e 2c20 554c char *action, UL\n+0015aeb0: 4f4e 4736 3420 636f 756e 7429 3c2f 636f ONG64 count)

    .

    This \n+0015aed0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+0015aee0: 6564 2061 7420 7468 6520 7365 7276 6572 ed at the server\n+0015aef0: 2073 6964 6520 6279 2074 6865 2065 6e67 side by the eng\n+0015af00: 696e 6520 746f 2073 656e 6420 7468 6520 ine to send the \n+0015af10: 4854 5450 2068 6561 6465 7273 2074 6f20 HTTP headers to \n+0015af20: 7468 6520 636f 6e6e 6563 7465 6420 636c the connected cl\n+0015af30: 6965 6e74 2e20 5468 6520 7061 7261 6d65 ient. The parame\n+0015af40: 7465 7220 3c63 6f64 653e 7374 6174 7573 ter status\n+0015af50: 3c2f 636f 6465 3e20 7368 6f75 6c64 2062 should b\n+0015af60: 6520 616e 2048 5454 5020 7374 6174 7573 e an HTTP status\n+0015af70: 2065 7272 6f72 2063 6f64 6520 6f72 203c error code or <\n+0015af80: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK (200 OK) or\n+0015afa0: 203c 636f 6465 3e23 534f 4150 5f48 544d #SOAP_HTM\n+0015afb0: 4c3c 2f63 6f64 653e 206f 7220 3c63 6f64 L or #SOAP_FILE. Using #SOAP_HTML sets the cont\n+0015b000: 656e 742d 7479 7065 2068 6561 6465 7220 ent-type header \n+0015b010: 746f 203c 636f 6465 3e74 6578 742f 6874 to text/ht\n+0015b020: 6d6c 3b20 6368 6172 7365 743d 7574 662d ml; charset=utf-\n+0015b030: 383c 2f63 6f64 653e 2e20 5573 696e 6720 8. Using \n+0015b040: 3c63 6f64 653e 2353 4f41 505f 4649 4c45 #SOAP_FILE\n+0015b050: 3c2f 636f 6465 3e20 7365 7473 2074 6865 sets the\n+0015b060: 2063 6f6e 7465 6e74 2d74 7970 6520 6865 content-type he\n+0015b070: 6164 6572 2074 6f20 7468 6520 7661 6c75 ader to the valu\n+0015b080: 6520 6f66 203c 636f 6465 3e3c 6120 636c e of soap::http_co\n+0015b150: 6e74 656e 743c 2f61 3e3c 2f63 6f64 653e ntent\n+0015b160: 2e20 4578 7472 6120 4854 5450 2068 6561 . Extra HTTP hea\n+0015b170: 6465 7273 2061 7265 2061 6464 6564 2077 ders are added w\n+0015b180: 6865 6e20 3c63 6f64 653e 3c61 2063 6c61 hen soap::h\n+0015b240: 7474 705f 6578 7472 615f 6865 6164 6572 ttp_extra_header\n+0015b250: 3c2f 613e 3c2f 636f 6465 3e20 6973 2073 is s\n+0015b260: 6574 2074 6f20 6f6e 6520 6f72 206d 6f72 et to one or mor\n+0015b270: 6520 6865 6164 6572 206c 696e 6573 2073 e header lines s\n+0015b280: 6570 6172 6174 6564 2062 7920 4352 4c46 eparated by CRLF\n+0015b290: 2e20 5768 656e 2072 6564 6566 696e 696e . When redefinin\n+0015b2a0: 6720 7468 6973 2063 616c 6c62 6163 6b2c g this callback,\n+0015b2b0: 2075 7365 2066 756e 6374 696f 6e20 3c63 use function soap_se\n+0015b330: 6e64 3c2f 613e 3c2f 636f 6465 3e20 746f nd to\n+0015b340: 2077 7269 7465 2074 6865 2068 6561 6465 write the heade\n+0015b350: 7220 636f 6e74 656e 7473 2e20 5265 7475 r contents. Retu\n+0015b360: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n+0015b370: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n+0015b380: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n+0015b440: 733c 2f61 3e3c 2f63 6f64 653e 2065 7272 s err\n+0015b450: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n+0015b460: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+0015b470: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to so\n+0015b540: 6170 3a3a 6672 6573 706f 6e73 653c 2f61 ap::fresponse is http_response<\n+0015b570: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

    .

    \n+0015b580: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .frespon\n+0015b5b0: 7365 3c2f 6833 3e0a 3c70 3e3c 636f 6465 se

    .

    int (soap::frespon\n+0015b690: 7365 3c2f 613e 2928 7374 7275 6374 2073 se)(struct s\n+0015b6a0: 6f61 7020 2a73 6f61 702c 2069 6e74 2073 oap *soap, int s\n+0015b6b0: 6f61 705f 6572 726f 725f 636f 6465 2c20 oap_error_code, \n+0015b6c0: 554c 4f4e 4736 3420 636f 756e 7429 3c2f ULONG64 count)

    .

    Thi\n+0015b6e0: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n+0015b6f0: 6c6c 6564 2061 7420 7468 6520 7365 7276 lled at the serv\n+0015b700: 6572 2073 6964 6520 6279 2074 6865 2065 er side by the e\n+0015b710: 6e67 696e 6520 746f 2073 656e 6420 7468 ngine to send th\n+0015b720: 6520 4854 5450 2068 6561 6465 7273 2074 e HTTP headers t\n+0015b730: 6f20 7468 6520 636f 6e6e 6563 7465 6420 o the connected \n+0015b740: 636c 6965 6e74 2e20 5468 6520 7061 7261 client. The para\n+0015b750: 6d65 7465 7220 3c63 6f64 653e 7374 6174 meter stat\n+0015b760: 7573 3c2f 636f 6465 3e20 7368 6f75 6c64 us should\n+0015b770: 2062 6520 616e 2048 5454 5020 7374 6174 be an HTTP stat\n+0015b780: 7573 2065 7272 6f72 2063 6f64 6520 6f72 us error code or\n+0015b790: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+0015b7a0: 2f63 6f64 653e 2028 3230 3020 4f4b 2920 /code> (200 OK) \n+0015b7b0: 6f72 203c 636f 6465 3e23 534f 4150 5f48 or #SOAP_H\n+0015b7c0: 544d 4c3c 2f63 6f64 653e 206f 7220 3c63 TML or #SOAP_FILE. Using #SOAP_HTML sets the co\n+0015b810: 6e74 656e 742d 7479 7065 2068 6561 6465 ntent-type heade\n+0015b820: 7220 746f 203c 636f 6465 3e74 6578 742f r to text/\n+0015b830: 6874 6d6c 3b20 6368 6172 7365 743d 7574 html; charset=ut\n+0015b840: 662d 383c 2f63 6f64 653e 2e20 5573 696e f-8. Usin\n+0015b850: 6720 3c63 6f64 653e 2353 4f41 505f 4649 g #SOAP_FI\n+0015b860: 4c45 3c2f 636f 6465 3e20 7365 7473 2074 LE sets t\n+0015b870: 6865 2063 6f6e 7465 6e74 2d74 7970 6520 he content-type \n+0015b880: 6865 6164 6572 2074 6f20 7468 6520 7661 header to the va\n+0015b890: 6c75 6520 6f66 203c 636f 6465 3e3c 6120 lue of soap::http_\n+0015b960: 636f 6e74 656e 743c 2f61 3e3c 2f63 6f64 content. Extra HTTP h\n+0015b980: 6561 6465 7273 2061 7265 2061 6464 6564 eaders are added\n+0015b990: 2077 6865 6e20 3c63 6f64 653e 3c61 2063 when soap:\n+0015ba50: 3a68 7474 705f 6578 7472 615f 6865 6164 :http_extra_head\n+0015ba60: 6572 3c2f 613e 3c2f 636f 6465 3e20 6973 er is\n+0015ba70: 2073 6574 2074 6f20 6f6e 6520 6f72 206d set to one or m\n+0015ba80: 6f72 6520 6865 6164 6572 206c 696e 6573 ore header lines\n+0015ba90: 2073 6570 6172 6174 6564 2062 7920 4352 separated by CR\n+0015baa0: 4c46 2e20 5768 656e 2072 6564 6566 696e LF. When redefin\n+0015bab0: 696e 6720 7468 6973 2063 616c 6c62 6163 ing this callbac\n+0015bac0: 6b2c 2075 7365 2066 756e 6374 696f 6e20 k, use function \n+0015bad0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_\n+0015bb40: 7365 6e64 3c2f 613e 3c2f 636f 6465 3e20 send \n+0015bb50: 746f 2077 7269 7465 2074 6865 2068 6561 to write the hea\n+0015bb60: 6465 7220 636f 6e74 656e 7473 2e20 5265 der contents. Re\n+0015bb70: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n+0015bb80: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n+0015bb90: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n+0015bc50: 7475 733c 2f61 3e3c 2f63 6f64 653e 2065 tus e\n+0015bc60: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n+0015bc70: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+0015bc80: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to \n+0015bd50: 736f 6170 3a3a 6672 6573 706f 6e73 653c soap::fresponse<\n+0015bd60: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is http_respons\n+0015bd80: 653c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 e.

    ..fpost\n+0015bdc0: 6864 723c 2f68 333e 0a3c 703e 3c63 6f64 hdr

    .

    int (soap::fpost\n+0015be80: 6864 723c 2f61 3e29 2873 7472 7563 7420 hdr)(struct \n+0015be90: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons\n+0015bea0: 7420 6368 6172 202a 6b65 792c 2063 6f6e t char *key, con\n+0015beb0: 7374 2063 6861 7220 2a76 616c 293c 2f63 st char *val)

    .

    This\n+0015bed0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015bee0: 6c65 6420 6279 203c 636f 6465 3e3c 6120 led by s\n+0015bfb0: 6f61 703a 3a66 706f 7374 3c2f 613e 3c2f oap::fpost and \n+0015bfd0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soa\n+0015c090: 703a 3a66 7265 7370 6f6e 7365 3c2f 613e p::fresponse\n+0015c0a0: 3c2f 636f 6465 3e20 746f 2073 656e 6420 to send \n+0015c0b0: 616e 2048 5454 5020 6865 6164 6572 2077 an HTTP header w\n+0015c0c0: 6974 6820 6120 6b65 7920 616e 6420 616e ith a key and an\n+0015c0d0: 206f 7074 696f 6e61 6c20 7661 6c75 652e optional value.\n+0015c0e0: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n+0015c0f0: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n+0015c100: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n+0015c1c0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n+0015c1e0: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in\n+0015c1f0: 2066 756e 6374 696f 6e20 6173 7369 676e function assign\n+0015c200: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::\n+0015c2b0: 6670 6f73 7468 6472 3c2f 613e 3c2f 636f fposthdr is htt\n+0015c2d0: 705f 706f 7374 5f68 6561 6465 723c 2f63 p_post_header.

    .

    .fparse.

    int \n+0015c330: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fparse\n+0015c3d0: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa\n+0015c3e0: 7020 2a73 6f61 7029 3c2f 636f 6465 3e3c p *soap)<\n+0015c3f0: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call\n+0015c400: 6261 636b 2069 7320 6361 6c6c 6564 2062 back is called b\n+0015c410: 7920 7468 6520 656e 6769 6e65 2028 6173 y the engine (as\n+0015c420: 2061 2063 6c69 656e 7420 6f72 2073 6572 a client or ser\n+0015c430: 7665 7229 2074 6f20 7265 6164 2061 6e64 ver) to read and\n+0015c440: 2070 6172 7365 2048 5454 5020 6865 6164 parse HTTP head\n+0015c450: 6572 7320 6f72 204d 494d 4520 6865 6164 ers or MIME head\n+0015c460: 6572 732e 2057 6865 6e20 7265 6465 6669 ers. When redefi\n+0015c470: 6e65 642c 2074 6869 7320 6675 6e63 7469 ned, this functi\n+0015c480: 6f6e 2073 686f 756c 6420 6174 2072 6561 on should at rea\n+0015c490: 6420 6f72 2073 6b69 7020 7468 6520 656e d or skip the en\n+0015c4a0: 7469 7265 2048 5454 5020 6865 6164 6572 tire HTTP header\n+0015c4b0: 2074 6f20 7265 6163 6820 7468 6520 6d65 to reach the me\n+0015c4c0: 7373 6167 6520 626f 6479 2e20 4675 6e63 ssage body. Func\n+0015c4d0: 7469 6f6e 203c 636f 6465 3e3c 6120 636c tion soap_getline\n+0015c550: 3c2f 613e 3c2f 636f 6465 3e20 6973 2075 is u\n+0015c560: 7365 6420 6279 2074 6869 7320 6361 6c6c sed by this call\n+0015c570: 6261 636b 2074 6f20 7265 6164 2065 6163 back to read eac\n+0015c580: 6820 6865 6164 6572 206c 696e 6520 696e h header line in\n+0015c590: 746f 2061 6e20 696e 7465 726e 616c 2062 to an internal b\n+0015c5a0: 7566 6665 7220 3c63 6f64 653e 3c61 2063 uffer soap::msgbuf\n+0015c670: 3c2f 613e 3c2f 636f 6465 3e20 7769 7468 with\n+0015c680: 203c 636f 6465 3e3c 6120 636c 6173 733d \n+0015c6f0: 736f 6170 5f67 6574 6c69 6e65 3c2f 613e soap_getline\n+0015c700: 2873 6f61 702c 2073 6f61 702d 2667 743b (soap, soap->\n+0015c710: 6d73 6762 7566 2c20 7369 7a65 6f66 2873 msgbuf, sizeof(s\n+0015c720: 6f61 702d 2667 743b 6d73 6762 7566 2929 oap->msgbuf))\n+0015c730: 3c2f 636f 6465 3e2e 2052 6574 7572 6e73 . Returns\n+0015c740: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+0015c750: 2f63 6f64 653e 2c20 6f72 2061 2067 534f /code>, or a gSO\n+0015c760: 4150 2065 7272 6f72 2063 6f64 652e 2054 AP error code. T\n+0015c770: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func\n+0015c780: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to\n+0015c790: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::\n+0015c830: 6670 6172 7365 3c2f 613e 3c2f 636f 6465 fparse is http_\n+0015c850: 7061 7273 653c 2f63 6f64 653e 2e3c 2f70 parse..

    .f\n+0015c890: 7061 7273 6568 6472 3c2f 6833 3e0a 3c70 parsehdr

    .int (soap::fparsehd\n+0015c960: 723c 2f61 3e29 2873 7472 7563 7420 736f r)(struct so\n+0015c970: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n+0015c980: 6368 6172 202a 6b65 792c 2063 6f6e 7374 char *key, const\n+0015c990: 2063 6861 7220 2a76 616c 293c 2f63 6f64 char *val)

    .

    This c\n+0015c9b0: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n+0015c9c0: 6420 6279 203c 636f 6465 3e3c 6120 636c d by so\n+0015ca60: 6170 3a3a 6670 6172 7365 3c2f 613e 3c2f ap::fparse, consumes \n+0015ca80: 616e 2048 5454 5020 6865 6164 6572 2074 an HTTP header t\n+0015ca90: 6861 7420 6973 2073 706c 6974 2069 6e20 hat is split in \n+0015caa0: 6120 6b65 792d 7661 6c75 6520 7061 6972 a key-value pair\n+0015cab0: 2061 6e64 2075 7064 6174 6573 2074 6865 and updates the\n+0015cac0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context state\n+0015cb30: 2061 6363 6f72 6469 6e67 6c79 2e20 5468 accordingly. Th\n+0015cb40: 6520 636f 6e74 6578 7420 6973 2075 7064 e context is upd\n+0015cb50: 6174 6564 2077 6974 6820 7468 6520 4854 ated with the HT\n+0015cb60: 5450 2068 6561 6465 7220 696e 666f 726d TP header inform\n+0015cb70: 6174 696f 6e20 7265 6365 6976 6564 2c20 ation received, \n+0015cb80: 6275 7420 4854 5450 2068 6561 6465 7273 but HTTP headers\n+0015cb90: 2061 7265 206e 6f74 206c 6974 6572 616c are not literal\n+0015cba0: 6c79 2072 6574 6169 6e65 6420 6279 2074 ly retained by t\n+0015cbb0: 6865 2065 6e67 696e 652e 2052 6574 7572 he engine. Retur\n+0015cbc0: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n+0015cbd0: 4b3c 2f63 6f64 653e 206f 7220 3c63 6f64 K or #SOAP_STOP to prevent f\n+0015cc00: 7572 7468 6572 2072 6561 6469 6e67 206f urther reading o\n+0015cc10: 6620 7468 6520 4854 5450 2062 6f64 792c f the HTTP body,\n+0015cc20: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+0015cce0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n+0015cd00: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n+0015cd10: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n+0015cd20: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fparse\n+0015cde0: 6864 723c 2f61 3e3c 2f63 6f64 653e 2069 hdr i\n+0015cdf0: 7320 3c63 6f64 653e 6874 7470 5f70 6172 s http_par\n+0015ce00: 7365 5f68 6561 6465 723c 2f63 6f64 653e se_header\n+0015ce10: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fget

    .

    \n+0015ce50: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soa\n+0015cf20: 703a 3a66 6765 743c 2f61 3e29 2873 7472 p::fget)(str\n+0015cf30: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+0015cf40: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n+0015cf50: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+0015cf60: 616c 6c65 6420 6279 2074 6865 2073 6572 alled by the ser\n+0015cf70: 7669 6365 2064 6973 7061 7463 6865 7220 vice dispatcher \n+0015cf80: 7768 656e 2061 6e20 4854 5450 2047 4554 when an HTTP GET\n+0015cf90: 2072 6571 7565 7374 2069 7320 7065 6e64 request is pend\n+0015cfa0: 696e 672e 2052 6564 6566 696e 6520 7468 ing. Redefine th\n+0015cfb0: 6973 2063 616c 6c62 6163 6b20 746f 2072 is callback to r\n+0015cfc0: 6573 706f 6e64 2074 6f20 4854 5450 2047 espond to HTTP G\n+0015cfd0: 4554 2072 6571 7565 7374 7320 7769 7468 ET requests with\n+0015cfe0: 2063 6f6e 7465 6e74 2c20 7365 6520 7468 content, see th\n+0015cff0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e http_ge\n+0015d080: 743c 2f61 3e3c 2f63 6f64 653e 2048 5454 t HTT\n+0015d090: 5020 4745 5420 706c 7567 696e 2066 6f72 P GET plugin for\n+0015d0a0: 206d 6f72 6520 6465 7461 696c 732e 2052 more details. R\n+0015d0b0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+0015d0c0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+0015d0d0: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+0015d190: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+0015d1a0: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n+0015d1b0: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n+0015d1c0: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n+0015d1d0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap\n+0015d2a0: 3a3a 6667 6574 3c2f 613e 3c2f 636f 6465 ::fget is the interna\n+0015d2c0: 6c20 7374 6174 6963 2066 756e 6374 696f l static functio\n+0015d2d0: 6e20 3c63 6f64 653e 6874 7470 5f67 6574 n http_get\n+0015d2e0: 3c2f 636f 6465 3e20 7468 6174 2072 6574 that ret\n+0015d2f0: 7572 6e73 2074 6865 203c 636f 6465 3e23 urns the #\n+0015d300: 534f 4150 5f47 4554 5f4d 4554 484f 443c SOAP_GET_METHOD<\n+0015d310: 2f63 6f64 653e 2065 7272 6f72 2e3c 2f70 /code> error..

    .f\n+0015d350: 7075 743c 2f68 333e 0a3c 703e 3c63 6f64 put

    .

    int (soap::f\n+0015d430: 7075 743c 2f61 3e29 2873 7472 7563 7420 put)(struct \n+0015d440: 736f 6170 202a 736f 6170 293c 2f63 6f64 soap *soap)

    .

    This c\n+0015d460: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n+0015d470: 6420 6279 2074 6865 2073 6572 7669 6365 d by the service\n+0015d480: 2064 6973 7061 7463 6865 7220 7768 656e dispatcher when\n+0015d490: 2061 6e20 4854 5450 2050 5554 2072 6571 an HTTP PUT req\n+0015d4a0: 7565 7374 2069 7320 7065 6e64 696e 672e uest is pending.\n+0015d4b0: 2052 6564 6566 696e 6520 7468 6973 2063 Redefine this c\n+0015d4c0: 616c 6c62 6163 6b20 746f 2072 6573 706f allback to respo\n+0015d4d0: 6e64 2074 6f20 4854 5450 2050 5554 2072 nd to HTTP PUT r\n+0015d4e0: 6571 7565 7374 732c 2073 6565 2074 6865 equests, see the\n+0015d4f0: 203c 636f 6465 3e3c 6120 636c 6173 733d http_po\n+0015d580: 7374 3c2f 613e 3c2f 636f 6465 3e20 4854 st HT\n+0015d590: 5450 2050 4f53 5420 706c 7567 696e 2066 TP POST plugin f\n+0015d5a0: 6f72 206d 6f72 6520 6465 7461 696c 732e or more details.\n+0015d5b0: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n+0015d5c0: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n+0015d5d0: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n+0015d690: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status error code. Th\n+0015d6b0: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n+0015d6c0: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n+0015d6d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fp\n+0015d7a0: 7574 3c2f 613e 3c2f 636f 6465 3e20 6973 ut is\n+0015d7b0: 2074 6865 2069 6e74 6572 6e61 6c20 7374 the internal st\n+0015d7c0: 6174 6963 2066 756e 6374 696f 6e20 3c63 atic function http_put that returns\n+0015d7f0: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n+0015d800: 5f50 5554 5f4d 4554 484f 443c 2f63 6f64 _PUT_METHOD error.

    ..fpatc\n+0015d850: 683c 2f68 333e 0a3c 703e 3c63 6f64 653e h

    .

    \n+0015d860: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap:\n+0015d930: 3a66 7061 7463 683c 2f61 3e29 2873 7472 :fpatch)(str\n+0015d940: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+0015d950: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n+0015d960: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+0015d970: 616c 6c65 6420 6279 2074 6865 2073 6572 alled by the ser\n+0015d980: 7669 6365 2064 6973 7061 7463 6865 7220 vice dispatcher \n+0015d990: 7768 656e 2061 6e20 4854 5450 2050 4154 when an HTTP PAT\n+0015d9a0: 4348 2072 6571 7565 7374 2069 7320 7065 CH request is pe\n+0015d9b0: 6e64 696e 672e 2052 6564 6566 696e 6520 nding. Redefine \n+0015d9c0: 7468 6973 2063 616c 6c62 6163 6b20 746f this callback to\n+0015d9d0: 2072 6573 706f 6e64 2074 6f20 4854 5450 respond to HTTP\n+0015d9e0: 2050 4154 4348 2072 6571 7565 7374 732c PATCH requests,\n+0015d9f0: 2073 6565 2074 6865 203c 636f 6465 3e3c see the <\n+0015da00: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015da10: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015da20: 5f69 6f2e 6874 6d6c 2367 6134 6330 3864 _io.html#ga4c08d\n+0015da30: 3565 6632 3862 6330 6463 3337 6565 6534 5ef28bc0dc37eee4\n+0015da40: 3633 3361 6364 6431 3134 3022 2074 6974 633acdd1140\" tit\n+0015da50: 6c65 3d22 5468 6520 4854 5450 2050 4f53 le=\"The HTTP POS\n+0015da60: 5420 706c 7567 696e 2072 6567 6973 7472 T plugin registr\n+0015da70: 6174 696f 6e20 6675 6e63 7469 6f6e 2e22 ation function.\"\n+0015da80: 3e68 7474 705f 706f 7374 3c2f 613e 3c2f >http_post HTTP POST \n+0015daa0: 706c 7567 696e 2066 6f72 206d 6f72 6520 plugin for more \n+0015dab0: 6465 7461 696c 732e 2052 6574 7572 6e73 details. Returns\n+0015dac0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+0015dad0: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status error \n+0015dbb0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n+0015dbc0: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n+0015dbd0: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fpatch\n+0015dcb0: 3c2f 613e 3c2f 636f 6465 3e20 6973 2074 is t\n+0015dcc0: 6865 2069 6e74 6572 6e61 6c20 7374 6174 he internal stat\n+0015dcd0: 6963 2066 756e 6374 696f 6e20 3c63 6f64 ic function http_patch that returns\n+0015dd00: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n+0015dd10: 5f50 4154 4348 5f4d 4554 484f 443c 2f63 _PATCH_METHOD error.

    .\n+0015dd30: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fde\n+0015dd60: 6c3c 2f68 333e 0a3c 703e 3c63 6f64 653e l

    .

    \n+0015dd70: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap:\n+0015de40: 3a66 6465 6c3c 2f61 3e29 2873 7472 7563 :fdel)(struc\n+0015de50: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

    .

    This\n+0015de70: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015de80: 6c65 6420 6279 2074 6865 2073 6572 7669 led by the servi\n+0015de90: 6365 2064 6973 7061 7463 6865 7220 7768 ce dispatcher wh\n+0015dea0: 656e 2061 6e20 4854 5450 2044 454c 4554 en an HTTP DELET\n+0015deb0: 4520 7265 7175 6573 7420 6973 2070 656e E request is pen\n+0015dec0: 6469 6e67 2e20 5265 6465 6669 6e65 2074 ding. Redefine t\n+0015ded0: 6869 7320 6361 6c6c 6261 636b 2074 6f20 his callback to \n+0015dee0: 7265 7370 6f6e 6420 746f 2048 5454 5020 respond to HTTP \n+0015def0: 4445 4c45 5445 2072 6571 7565 7374 732c DELETE requests,\n+0015df00: 2073 6565 2074 6865 203c 636f 6465 3e3c see the <\n+0015df10: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015df20: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015df30: 5f69 6f2e 6874 6d6c 2367 6134 6330 3864 _io.html#ga4c08d\n+0015df40: 3565 6632 3862 6330 6463 3337 6565 6534 5ef28bc0dc37eee4\n+0015df50: 3633 3361 6364 6431 3134 3022 2074 6974 633acdd1140\" tit\n+0015df60: 6c65 3d22 5468 6520 4854 5450 2050 4f53 le=\"The HTTP POS\n+0015df70: 5420 706c 7567 696e 2072 6567 6973 7472 T plugin registr\n+0015df80: 6174 696f 6e20 6675 6e63 7469 6f6e 2e22 ation function.\"\n+0015df90: 3e68 7474 705f 706f 7374 3c2f 613e 3c2f >http_post HTTP POST \n+0015dfb0: 706c 7567 696e 2066 6f72 206d 6f72 6520 plugin for more \n+0015dfc0: 6465 7461 696c 732e 2052 6574 7572 6e73 details. Returns\n+0015dfd0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+0015dfe0: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n+0015e0c0: 6572 726f 7220 636f 6465 2e20 5468 6520 error code. The \n+0015e0d0: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n+0015e0e0: 6e20 6173 7369 676e 6564 2074 6f20 3c63 n assigned to soap::\n+0015e1c0: 6664 656c 3c2f 613e 3c2f 636f 6465 3e20 fdel \n+0015e1d0: 6973 2074 6865 2069 6e74 6572 6e61 6c20 is the internal \n+0015e1e0: 7374 6174 6963 2066 756e 6374 696f 6e20 static function \n+0015e1f0: 3c63 6f64 653e 6874 7470 5f64 656c 3c2f http_del that retur\n+0015e210: 6e73 2074 6865 203c 636f 6465 3e23 534f ns the #SO\n+0015e220: 4150 5f44 454c 5f4d 4554 484f 443c 2f63 AP_DEL_METHOD error.

    .\n+0015e240: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fop\n+0015e270: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t

    .

    \n+0015e280: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap:\n+0015e350: 3a66 6f70 743c 2f61 3e29 2873 7472 7563 :fopt)(struc\n+0015e360: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

    .

    Call\n+0015e380: 6564 2062 7920 7468 6520 7365 7276 6963 ed by the servic\n+0015e390: 6520 6469 7370 6174 6368 6572 2077 6865 e dispatcher whe\n+0015e3a0: 6e20 616e 2048 5454 5020 4f50 5449 4f4e n an HTTP OPTION\n+0015e3b0: 2072 6571 7565 7374 2069 7320 7065 6e64 request is pend\n+0015e3c0: 696e 672e 2052 6564 6566 696e 6520 7468 ing. Redefine th\n+0015e3d0: 6973 2063 616c 6c62 6163 6b20 746f 2072 is callback to r\n+0015e3e0: 6573 706f 6e64 2074 6f20 4854 5450 204f espond to HTTP O\n+0015e3f0: 5054 494f 4e20 7265 7175 6573 7473 2c20 PTION requests, \n+0015e400: 7365 6520 7468 6520 3c63 6f64 653e 3c61 see the \n+0015e490: 6874 7470 5f70 6f73 743c 2f61 3e3c 2f63 http_post HTTP POST p\n+0015e4b0: 6c75 6769 6e20 666f 7220 6d6f 7265 2064 lugin for more d\n+0015e4c0: 6574 6169 6c73 2e20 5265 7475 726e 7320 etails. Returns \n+0015e4d0: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n+0015e5c0: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n+0015e5d0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+0015e5e0: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::f\n+0015e6c0: 6f70 743c 2f61 3e3c 2f63 6f64 653e 2069 opt i\n+0015e6d0: 7320 7468 6520 696e 7465 726e 616c 2073 s the internal s\n+0015e6e0: 7461 7469 6320 6675 6e63 7469 6f6e 203c tatic function <\n+0015e6f0: 636f 6465 3e68 7474 705f 3230 303c 2f63 code>http_200 that return\n+0015e710: 7320 4854 5450 2032 3030 204f 4b2e 3c2f s HTTP 200 OK..

    .\n+0015e750: 6668 6561 643c 2f68 333e 0a3c 703e 3c63 fhead

    .

    int (soap\n+0015e830: 3a3a 6668 6561 643c 2f61 3e29 2873 7472 ::fhead)(str\n+0015e840: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+0015e850: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n+0015e860: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+0015e870: 616c 6c65 6420 6279 2074 6865 2073 6572 alled by the ser\n+0015e880: 7669 6365 2064 6973 7061 7463 6865 7220 vice dispatcher \n+0015e890: 7768 656e 2061 6e20 4854 5450 2048 4541 when an HTTP HEA\n+0015e8a0: 4420 7265 7175 6573 7420 6973 2070 656e D request is pen\n+0015e8b0: 6469 6e67 2e20 5265 6465 6669 6e65 2074 ding. Redefine t\n+0015e8c0: 6869 7320 6361 6c6c 6261 636b 2074 6f20 his callback to \n+0015e8d0: 7265 7370 6f6e 6420 746f 2048 5454 5020 respond to HTTP \n+0015e8e0: 4845 4144 2072 6571 7565 7374 7320 6d6f HEAD requests mo\n+0015e8f0: 7265 2073 7065 6369 6669 6361 6c6c 792e re specifically.\n+0015e900: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n+0015e910: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n+0015e920: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n+0015e9e0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n+0015ea00: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in\n+0015ea10: 2066 756e 6374 696f 6e20 6173 7369 676e function assign\n+0015ea20: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to s\n+0015eaf0: 6f61 703a 3a66 6865 6164 3c2f 613e 3c2f oap::fhead is the int\n+0015eb10: 6572 6e61 6c20 7374 6174 6963 2066 756e ernal static fun\n+0015eb20: 6374 696f 6e20 3c63 6f64 653e 6874 7470 ction http\n+0015eb30: 5f32 3030 3c2f 636f 6465 3e20 7468 6174 _200 that\n+0015eb40: 2072 6574 7572 6e73 2048 5454 5020 3230 returns HTTP 20\n+0015eb50: 3020 4f4b 2e3c 2f70 3e0a 3c68 333e 3c61 0 OK.

    .

    .fform.

    int (\n+0015eba0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ffor\n+0015ec70: 6d3c 2f61 3e29 2873 7472 7563 7420 736f m)(struct so\n+0015ec80: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap)\n+0015ec90: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+0015eca0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+0015ecb0: 6279 2074 6865 2048 5454 5020 464f 524d by the HTTP FORM\n+0015ecc0: 2068 616e 646c 6572 2070 6c75 6769 6e20 handler plugin \n+0015ecd0: 746f 2070 6172 7365 2048 544d 4c20 666f to parse HTML fo\n+0015ece0: 726d 7320 7265 6365 6976 6564 2077 6974 rms received wit\n+0015ecf0: 6820 4854 5450 2050 4f53 5420 616e 6420 h HTTP POST and \n+0015ed00: 5055 5420 7265 7175 6573 7473 2c20 7365 PUT requests, se\n+0015ed10: 6520 7468 6520 3c63 6f64 653e 3b3a 6874 e the ;:ht\n+0015ed20: 7470 5f66 6f72 6d3c 2f63 6f64 653e 2048 tp_form H\n+0015ed30: 5454 5020 464f 524d 2070 6c75 6769 6e20 TTP FORM plugin \n+0015ed40: 666f 7220 6d6f 7265 2064 6574 6169 6c73 for more details\n+0015ed50: 2e20 5468 6520 4854 5450 2062 6f64 7920 . The HTTP body \n+0015ed60: 7769 7468 2074 6865 2066 6f72 6d20 6461 with the form da\n+0015ed70: 7461 2073 686f 756c 6420 6265 2070 6172 ta should be par\n+0015ed80: 7365 6420 6279 2074 6869 7320 6361 6c6c sed by this call\n+0015ed90: 6261 636b 2c20 6f74 6865 7277 6973 6520 back, otherwise \n+0015eda0: 4854 5450 206b 6565 702d 616c 6976 6520 HTTP keep-alive \n+0015edb0: 6d65 7373 6167 6573 2077 696c 6c20 656e messages will en\n+0015edc0: 6420 7570 206f 7574 206f 6620 7379 6e63 d up out of sync\n+0015edd0: 2061 7320 6120 7265 7375 6c74 206f 6620 as a result of \n+0015ede0: 7468 6520 6375 7272 656e 7420 706f 7369 the current posi\n+0015edf0: 7469 6f6e 206e 6f74 2062 6569 6e67 2061 tion not being a\n+0015ee00: 6476 616e 6365 6420 746f 2074 6865 2065 dvanced to the e\n+0015ee10: 6e64 206f 6620 7468 6520 4854 5450 2062 nd of the HTTP b\n+0015ee20: 6f64 792e 2052 6574 7572 6e73 203c 636f ody. Returns #SOAP_OK or a s\n+0015ef00: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n+0015ef20: 7220 636f 6465 2e20 4e6f 2062 7569 6c74 r code. No built\n+0015ef30: 2d69 6e20 6675 6e63 7469 6f6e 2069 7320 -in function is \n+0015ef40: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::ff\n+0015f020: 6f72 6d3c 2f61 3e3c 2f63 6f64 653e 2e3c orm.<\n+0015f030: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+0015f060: 0a66 6865 6164 6572 3c2f 6833 3e0a 3c70 .fheader

    .int (soap::fheader<\n+0015f150: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+0015f160: 202a 736f 6170 293c 2f63 6f64 653e 3c2f *soap).

    This callb\n+0015f180: 6163 6b20 6973 2063 616c 6c65 6420 696d ack is called im\n+0015f190: 6d65 6469 6174 656c 7920 6166 7465 7220 mediately after \n+0015f1a0: 7061 7273 696e 6720 6120 534f 4150 2048 parsing a SOAP H\n+0015f1b0: 6561 6465 7220 696e 746f 2074 6865 203c eader into the <\n+0015f1c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0015f280: 703a 3a68 6561 6465 723c 2f61 3e3c 2f63 p::header structure. \n+0015f2a0: 5468 6520 534f 4150 2048 6561 6465 7220 The SOAP Header \n+0015f2b0: 7374 7275 6374 7572 6520 3c63 6f64 653e structure \n+0015f2c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::he\n+0015f380: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader \n+0015f390: 6361 6e20 6265 2069 6e73 7065 6374 6564 can be inspected\n+0015f3a0: 2062 7920 7468 6973 2066 756e 6374 696f by this functio\n+0015f3b0: 6e20 616e 6420 7665 7269 6669 6564 206f n and verified o\n+0015f3c0: 7220 7265 6a65 6374 6564 2062 6566 6f72 r rejected befor\n+0015f3d0: 6520 7468 6520 7265 7374 206f 6620 7468 e the rest of th\n+0015f3e0: 6520 6d65 7373 6167 6520 7769 7468 2074 e message with t\n+0015f3f0: 6865 2053 4f41 5020 426f 6479 2069 7320 he SOAP Body is \n+0015f400: 636f 6e73 756d 6564 2e20 5265 7475 726e consumed. Return\n+0015f410: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n+0015f420: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n+0015f4f0: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n+0015f500: 2065 7272 6f72 2063 6f64 652e 204e 6f20 error code. No \n+0015f510: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n+0015f520: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n+0015f530: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n+0015f600: 703a 3a66 6865 6164 6572 3c2f 613e 3c2f p::fheader.

    .

    <\n+0015f620: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0015f630: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id=\"autotoc_md4\n+0015f640: 3122 3e3c 2f61 3e0a 6669 676e 6f72 653c 1\">.fignore<\n+0015f650: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in\n+0015f660: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n+0015f730: 6967 6e6f 7265 3c2f 613e 2928 7374 7275 ignore)(stru\n+0015f740: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+0015f750: 6f6e 7374 2063 6861 7220 2a74 6167 293c onst char *tag)<\n+0015f760: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n+0015f770: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+0015f780: 616c 6c65 6420 7768 656e 2061 6e20 756e alled when an un\n+0015f790: 7265 636f 676e 697a 6564 2058 4d4c 2065 recognized XML e\n+0015f7a0: 6c65 6d65 6e74 2077 6173 2065 6e63 6f75 lement was encou\n+0015f7b0: 6e74 6572 6564 206f 6e20 7468 6520 696e ntered on the in\n+0015f7c0: 7075 7420 7468 6174 2063 6f75 6c64 2062 put that could b\n+0015f7d0: 6520 6967 6e6f 7265 6420 6465 7065 6e64 e ignored depend\n+0015f7e0: 696e 6720 6f6e 2073 6f6d 6520 7370 6563 ing on some spec\n+0015f7f0: 6966 6965 6420 6c6f 6769 632e 2054 6865 ified logic. The\n+0015f800: 203c 636f 6465 3e74 6167 3c2f 636f 6465 tag parameter is t\n+0015f820: 6865 206f 6666 656e 6469 6e67 2058 4d4c he offending XML\n+0015f830: 2065 6c65 6d65 6e74 2074 6167 206e 616d element tag nam\n+0015f840: 6520 7374 7269 6e67 2e20 5468 6520 6361 e string. The ca\n+0015f850: 6c6c 6261 636b 2073 686f 756c 6420 7265 llback should re\n+0015f860: 7475 726e 203c 636f 6465 3e23 534f 4150 turn #SOAP\n+0015f870: 5f4f 4b3c 2f63 6f64 653e 2074 6f20 6967 _OK to ig\n+0015f880: 6e6f 7265 2074 6865 2065 6c65 6d65 6e74 nore the element\n+0015f890: 206f 7220 7265 7475 726e 2061 6e20 3c63 or return an soap_status\n+0015f960: 3c2f 613e 3c2f 636f 6465 3e20 6572 726f erro\n+0015f970: 7220 636f 6465 2073 7563 6820 6173 203c r code such as <\n+0015f980: 636f 6465 3e23 534f 4150 5f54 4147 5f4d code>#SOAP_TAG_M\n+0015f990: 4953 4d41 5443 483c 2f63 6f64 653e 2074 ISMATCH t\n+0015f9a0: 6f20 7472 6967 6765 7220 6120 7661 6c69 o trigger a vali\n+0015f9b0: 6461 7469 6f6e 2065 7272 6f72 2e20 5468 dation error. Th\n+0015f9c0: 6973 2063 616c 6c62 6163 6b20 616c 736f is callback also\n+0015f9d0: 206f 7665 7272 6964 6573 203c 636f 6465 overrides mustUnderstand<\n+0015f9f0: 2f63 6f64 653e 2061 7474 7269 6275 7465 /code> attribute\n+0015fa00: 7320 6f6e 2075 6e72 6563 6f67 6e69 7a65 s on unrecognize\n+0015fa10: 6420 534f 4150 2048 6561 6465 7220 656c d SOAP Header el\n+0015fa20: 656d 656e 7473 2074 6861 7420 6e6f 726d ements that norm\n+0015fa30: 616c 6c79 2072 6169 7365 2066 6175 6c74 ally raise fault\n+0015fa40: 732e 2049 7420 6973 2073 7472 6f6e 676c s. It is strongl\n+0015fa50: 7920 7265 636f 6d6d 656e 6465 6420 7468 y recommended th\n+0015fa60: 6174 2074 6865 2063 616c 6c62 6163 6b20 at the callback \n+0015fa70: 7265 7475 726e 7320 3c63 6f64 653e 2353 returns #S\n+0015fa80: 4f41 505f 4d55 5354 554e 4445 5253 5441 OAP_MUSTUNDERSTA\n+0015fa90: 4e44 3c2f 636f 6465 3e20 7768 656e 203c ND when <\n+0015faa0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0015fb60: 703a 3a6d 7573 7455 6e64 6572 7374 616e p::mustUnderstan\n+0015fb70: 643c 2f61 3e3c 2f63 6f64 653e 2021 3d20 d != \n+0015fb80: 3c63 6f64 653e 303c 2f63 6f64 653e 2e20 0. \n+0015fb90: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n+0015fba0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n+0015fbb0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+0015fc70: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+0015fc80: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n+0015fc90: 652e 204e 6f20 6275 696c 742d 696e 2066 e. No built-in f\n+0015fca0: 756e 6374 696f 6e20 6973 2061 7373 6967 unction is assig\n+0015fcb0: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::fignore\n+0015fd90: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 703e .

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

    .fs\n+0015fdd0: 7661 6c69 6461 7465 3c2f 6833 3e0a 3c70 validate

    .int (soap::fsvalida\n+0015fe90: 7465 3c2f 613e 2928 7374 7275 6374 2073 te)(struct s\n+0015fea0: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+0015feb0: 2063 6861 7220 2a70 6174 7465 726e 2c20 char *pattern, \n+0015fec0: 636f 6e73 7420 6368 6172 202a 7374 7269 const char *stri\n+0015fed0: 6e67 293c 2f63 6f64 653e 3c2f 703e 0a3c ng)

    .<\n+0015fee0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n+0015fef0: 6973 2063 616c 6c65 6420 746f 2076 616c is called to val\n+0015ff00: 6964 6174 6520 6120 7374 7269 6e67 2061 idate a string a\n+0015ff10: 6761 696e 7374 2061 6e20 584d 4c20 7265 gainst an XML re\n+0015ff20: 6765 7820 7061 7474 6572 6e2e 2050 6174 gex pattern. Pat\n+0015ff30: 7465 726e 7320 7573 6520 584d 4c20 7363 terns use XML sc\n+0015ff40: 6865 6d61 2072 6567 6578 2073 796e 7461 hema regex synta\n+0015ff50: 782e 2054 6869 7320 6361 6c6c 6261 636b x. This callback\n+0015ff60: 2061 6c6c 6f77 7320 7573 6572 2d64 6566 allows user-def\n+0015ff70: 696e 6564 2070 6174 7465 726e 2076 616c ined pattern val\n+0015ff80: 6964 6174 696f 6e20 7468 6174 2069 7320 idation that is \n+0015ff90: 6e6f 726d 616c 6c79 2064 6973 6162 6c65 normally disable\n+0015ffa0: 642e 2052 6574 7572 6e73 203c 636f 6465 d. Returns #SOAP_OK\n+0015ffc0: 2077 6865 6e20 7468 6520 7374 7269 6e67 when the string\n+0015ffd0: 206d 6174 6368 6573 2074 6865 2070 6174 matches the pat\n+0015ffe0: 7465 726e 206f 7220 3c63 6f64 653e 2353 tern or #S\n+0015fff0: 4f41 505f 5459 5045 3c2f 636f 6465 3e20 OAP_TYPE \n+00160000: 7768 656e 2074 6865 2073 7472 696e 6720 when the string \n+00160010: 646f 6573 206e 6f74 206d 6174 6368 2e20 does not match. \n+00160020: 4e6f 2062 7569 6c74 2d69 6e20 6675 6e63 No built-in func\n+00160030: 7469 6f6e 2069 7320 6173 7369 676e 6564 tion is assigned\n+00160040: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to \n+001600e0: 736f 6170 3a3a 6673 7661 6c69 6461 7465 soap::fsvalidate\n+001600f0: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 703e .

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

    .fw\n+00160130: 7661 6c69 6461 7465 3c2f 6833 3e0a 3c70 validate

    .int (soap::fwv\n+001601f0: 616c 6964 6174 653c 2f61 3e29 2873 7472 alidate)(str\n+00160200: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00160210: 636f 6e73 7420 6368 6172 202a 7061 7474 const char *patt\n+00160220: 6572 6e2c 2063 6f6e 7374 2077 6368 6172 ern, const wchar\n+00160230: 5f74 202a 7374 7269 6e67 293c 2f63 6f64 _t *string) This callback\n+00160250: 2069 7320 6361 6c6c 6564 2074 6f20 7661 is called to va\n+00160260: 6c69 6461 7465 2061 2077 6964 6520 7374 lidate a wide st\n+00160270: 7269 6e67 2061 6761 696e 7374 2061 6e20 ring against an \n+00160280: 584d 4c20 7265 6765 7820 7061 7474 6572 XML regex patter\n+00160290: 6e2e 2050 6174 7465 726e 7320 7573 6520 n. Patterns use \n+001602a0: 584d 4c20 7363 6865 6d61 2072 6567 6578 XML schema regex\n+001602b0: 2073 796e 7461 782e 2054 6869 7320 6361 syntax. This ca\n+001602c0: 6c6c 6261 636b 2061 6c6c 6f77 7320 7573 llback allows us\n+001602d0: 6572 2d64 6566 696e 6564 2070 6174 7465 er-defined patte\n+001602e0: 726e 2076 616c 6964 6174 696f 6e20 7468 rn validation th\n+001602f0: 6174 2069 7320 6e6f 726d 616c 6c79 2064 at is normally d\n+00160300: 6973 6162 6c65 642e 2052 6574 7572 6e73 isabled. Returns\n+00160310: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+00160320: 2f63 6f64 653e 2077 6865 6e20 7468 6520 /code> when the \n+00160330: 7374 7269 6e67 206d 6174 6368 6573 2074 string matches t\n+00160340: 6865 2070 6174 7465 726e 206f 7220 3c63 he pattern or #SOAP_TYPE when the s\n+00160370: 7472 696e 6720 646f 6573 206e 6f74 206d tring does not m\n+00160380: 6174 6368 2e20 4e6f 2062 7569 6c74 2d69 atch. No built-i\n+00160390: 6e20 6675 6e63 7469 6f6e 2069 7320 6173 n function is as\n+001603a0: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n+001603b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap:\n+00160450: 3a66 7776 616c 6964 6174 653c 2f61 3e3c :fwvalidate<\n+00160460: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

    .

    \n+00160470: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fseterr\n+001604a0: 6f72 3c2f 6833 3e0a 3c70 3e3c 636f 6465 or

    .

    void (soap::f\n+00160560: 7365 7465 7272 6f72 3c2f 613e 2928 7374 seterror)(st\n+00160570: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+00160580: 2063 6f6e 7374 2063 6861 7220 2a2a 636f const char **co\n+00160590: 6465 2c20 636f 6e73 7420 6368 6172 202a de, const char *\n+001605a0: 2a73 7472 696e 6729 3c2f 636f 6465 3e3c *string)<\n+001605b0: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call\n+001605c0: 6261 636b 2069 7320 6361 6c6c 6564 2062 back is called b\n+001605d0: 7920 7468 6520 656e 6769 6e65 2077 6865 y the engine whe\n+001605e0: 6e20 616e 2065 7272 6f72 2069 7320 7261 n an error is ra\n+001605f0: 6973 6564 2074 6f20 616c 6c6f 7720 696e ised to allow in\n+00160600: 7370 6563 7469 6f6e 206f 7220 6f76 6572 spection or over\n+00160610: 7269 6469 6e67 206f 6620 7468 6520 6661 riding of the fa\n+00160620: 756c 7420 636f 6465 206f 7220 6661 756c ult code or faul\n+00160630: 7420 7374 7269 6e67 206d 6573 7361 6765 t string message\n+00160640: 7320 6265 666f 7265 2074 6865 2065 7272 s before the err\n+00160650: 6f72 2069 7320 7265 706f 7274 6564 206f or is reported o\n+00160660: 7220 7472 616e 736d 6974 7465 642e 204e r transmitted. N\n+00160670: 6f20 6275 696c 742d 696e 2066 756e 6374 o built-in funct\n+00160680: 696f 6e20 6973 2061 7373 6967 6e65 6420 ion is assigned \n+00160690: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap:\n+00160740: 3a66 7365 7465 7272 6f72 3c2f 613e 3c2f :fseterror.

    .

    <\n+00160760: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00160770: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id=\"autotoc_md4\n+00160780: 3522 3e3c 2f61 3e0a 666f 7065 6e3c 2f68 5\">.fopen.

    SOAP\n+001607a0: 5f53 4f43 4b45 5420 283c 6120 636c 6173 _SOCKET (soap::fopen<\n+00160850: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+00160860: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n+00160870: 6172 202a 656e 6470 6f69 6e74 2c20 636f ar *endpoint, co\n+00160880: 6e73 7420 6368 6172 202a 686f 7374 2c20 nst char *host, \n+00160890: 696e 7420 706f 7274 293c 2f63 6f64 653e int port)\n+001608a0: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n+001608b0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+001608c0: 6279 2074 6865 2065 6e67 696e 6520 6174 by the engine at\n+001608d0: 2074 6865 2063 6c69 656e 742d 7369 6465 the client-side\n+001608e0: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soap_connec\n+00160970: 743c 2f61 3e3c 2f63 6f64 653e 206f 7220 t or \n+00160980: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_connect_co\n+00160a00: 6d6d 616e 643c 2f61 3e3c 2f63 6f64 653e mmand\n+00160a10: 2074 6f20 6f70 656e 2061 2054 4350 206f to open a TCP o\n+00160a20: 7220 5544 5020 636f 6e6e 6563 7469 6f6e r UDP connection\n+00160a30: 2074 6f20 6120 7365 7276 6572 2073 7065 to a server spe\n+00160a40: 6369 6669 6564 2061 7420 616e 2065 6e64 cified at an end\n+00160a50: 706f 696e 742e 2050 6172 616d 6574 6572 point. Parameter\n+00160a60: 7320 3c63 6f64 653e 686f 7374 3c2f 636f s host and po\n+00160a80: 7274 3c2f 636f 6465 3e20 6172 6520 6d69 rt are mi\n+00160a90: 6372 6f2d 7061 7273 6564 2066 726f 6d20 cro-parsed from \n+00160aa0: 3c63 6f64 653e 656e 6470 6f69 6e74 3c2f endpoint before bei\n+00160ac0: 6e67 2070 6173 7365 6420 746f 203c 636f ng passed to so\n+00160b70: 6170 3a3a 666f 7065 6e3c 2f61 3e3c 2f63 ap::fopen. Returns a \n+00160b90: 7661 6c69 6420 736f 636b 6574 206f 7220 valid socket or \n+00160ba0: 3c63 6f64 653e 2353 4f41 505f 494e 5641 #SOAP_INVA\n+00160bb0: 4c49 445f 534f 434b 4554 3c2f 636f 6465 LID_SOCKET with a <\n+00160bd0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00160be0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00160bf0: 6d6c 2361 6238 3566 3564 3432 3730 3239 ml#ab85f5d427029\n+00160c00: 3633 6431 3365 6135 3430 6264 3938 3736 63d13ea540bd9876\n+00160c10: 6536 6432 2220 7469 746c 653d 2254 6865 e6d2\" title=\"The\n+00160c20: 2073 6f61 7020 636f 6e74 6578 7420 736f soap context so\n+00160c30: 6170 5f73 7461 7475 7320 2869 6e74 2920 ap_status (int) \n+00160c40: 6572 726f 7220 636f 6465 206f 6620 7468 error code of th\n+00160c50: 6520 6c61 7374 206f 7065 7261 7469 6f6e e last operation\n+00160c60: 206f 7220 2353 4f41 505f 4f4b 2028 7a65 or #SOAP_OK (ze\n+00160c70: 726f 2922 3e73 6f61 703a 3a65 7272 6f72 ro)\">soap::error\n+00160c80: 3c2f 613e 3c2f 636f 6465 3e20 7365 7420 set \n+00160c90: 746f 2061 203c 636f 6465 3e3c 6120 636c to a soap\n+00160d50: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status (int) error c\n+00160d70: 6f64 6520 616e 6420 3c63 6f64 653e 3c61 ode and so\n+00160e00: 6170 3a3a 6572 726e 756d 3c2f 613e 3c2f ap::errnum set to errno \n+00160e30: 6f66 2074 6865 2063 6f6e 6e65 6374 696f of the connectio\n+00160e40: 6e20 6661 696c 7572 652e 2054 6865 2062 n failure. The b\n+00160e50: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+00160e60: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to so\n+00160f10: 6170 3a3a 666f 7065 6e3c 2f61 3e3c 2f63 ap::fopen is tc\n+00160f30: 705f 636f 6e6e 6563 743c 2f63 6f64 653e p_connect\n+00160f40: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .faccept

    .\n+00160f80: 3c70 3e3c 636f 6465 3e53 4f41 505f 534f

    SOAP_SO\n+00160f90: 434b 4554 2028 3c61 2063 6c61 7373 3d22 CKET (soap::faccept<\n+00161050: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+00161060: 202a 736f 6170 2c20 534f 4150 5f53 4f43 *soap, SOAP_SOC\n+00161070: 4b45 5420 732c 2073 7472 7563 7420 736f KET s, struct so\n+00161080: 636b 6164 6472 202a 612c 2069 6e74 202a ckaddr *a, int *\n+00161090: 6e29 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 n)

    .This callback i\n+001610b0: 7320 6361 6c6c 6564 2062 7920 3c63 6f64 s called by soap_\n+00161140: 6163 6365 7074 3c2f 613e 3c2f 636f 6465 accept (or the C++ se\n+00161160: 7276 6963 6520 636c 6173 7320 3c63 6f64 rvice class accept
    \n+00161180: 6d65 7468 6f64 2920 746f 2077 6169 7420 method) to wait \n+00161190: 666f 7220 616e 6420 6163 6365 7074 2061 for and accept a\n+001611a0: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti\n+001611b0: 6f6e 2072 6571 7565 7374 6564 2062 7920 on requested by \n+001611c0: 6120 636c 6965 6e74 2e20 5265 7475 726e a client. Return\n+001611d0: 7320 6120 7661 6c69 6420 736f 636b 6574 s a valid socket\n+001611e0: 206f 7220 3c63 6f64 653e 2353 4f41 505f or #SOAP_\n+001611f0: 494e 5641 4c49 445f 534f 434b 4554 3c2f INVALID_SOCKET when an er\n+00161210: 726f 7220 6f63 6375 7272 6564 2061 6e64 ror occurred and\n+00161220: 2073 6574 7320 3c63 6f64 653e 3c61 2063 sets soap::error to a soap_status\n+001613b0: 3c2f 613e 3c2f 636f 6465 3e20 7661 6c75 valu\n+001613c0: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n+001613d0: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n+001613e0: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fac\n+001614a0: 6365 7074 3c2f 613e 3c2f 636f 6465 3e20 cept \n+001614b0: 6973 203c 636f 6465 3e74 6370 5f61 6363 is tcp_acc\n+001614c0: 6570 743c 2f63 6f64 653e 2e3c 2f70 3e0a ept.

    .\n+001614d0: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fcl\n+00161500: 6f73 653c 2f68 333e 0a3c 703e 3c63 6f64 ose

    .

    int (soap::fc\n+001615b0: 6c6f 7365 3c2f 613e 2928 7374 7275 6374 lose)(struct\n+001615c0: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This \n+001615e0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+001615f0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine\n+00161600: 2061 7420 7468 6520 636c 6965 6e74 2d73 at the client-s\n+00161610: 6964 6520 746f 2063 6c6f 7365 2074 6865 ide to close the\n+00161620: 2063 7572 7265 6e74 2073 6f63 6b65 7420 current socket \n+00161630: 636f 6e6e 6563 7469 6f6e 2062 6566 6f72 connection befor\n+00161640: 6520 6120 6e65 7720 736f 636b 6574 2063 e a new socket c\n+00161650: 6f6e 6e65 6374 696f 6e20 6973 2065 7374 onnection is est\n+00161660: 6162 6c69 7368 6564 2e20 5468 6973 2063 ablished. This c\n+00161670: 616c 6c62 6163 6b20 6d61 7920 6265 2063 allback may be c\n+00161680: 616c 6c65 6420 6d75 6c74 6970 6c65 2074 alled multiple t\n+00161690: 696d 6573 2028 652e 672e 2062 7920 7468 imes (e.g. by th\n+001616a0: 6520 656e 6769 6e65 2061 6e64 2062 7920 e engine and by \n+001616b0: 706c 7567 696e 7329 2074 6f20 636c 6f73 plugins) to clos\n+001616c0: 6520 7468 6520 7361 6d65 2073 6f63 6b65 e the same socke\n+001616d0: 7420 3c63 6f64 653e 3c61 2063 6c61 7373 t \n+00161790: 736f 6170 3a3a 736f 636b 6574 3c2f 613e soap::socket\n+001617a0: 3c2f 636f 6465 3e2e 2043 6865 636b 7320 . Checks \n+001617b0: 696e 7465 726e 616c 6c79 2069 6620 3c63 internally if soap\n+00161880: 3a3a 736f 636b 6574 3c2f 613e 3c2f 636f ::socket == #SO\n+001618a0: 4150 5f49 4e56 414c 4944 5f53 4f43 4b45 AP_INVALID_SOCKE\n+001618b0: 543c 2f63 6f64 653e 2062 6566 6f72 6520 T before \n+001618c0: 636c 6f73 696e 672c 2077 6869 6368 206d closing, which m\n+001618d0: 6561 6e73 2074 6861 7420 7468 6520 736f eans that the so\n+001618e0: 636b 6574 2077 6173 2061 6c72 6561 6479 cket was already\n+001618f0: 2063 6c6f 7365 642e 2052 6574 7572 6e73 closed. Returns\n+00161900: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+00161910: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n+001619f0: 6572 726f 7220 636f 6465 2e20 5468 6520 error code. The \n+00161a00: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n+00161a10: 6e20 6173 7369 676e 6564 2074 6f20 3c63 n assigned to soap::fclos\n+00161ac0: 653c 2f61 3e3c 2f63 6f64 653e 2069 7320 e is \n+00161ad0: 3c63 6f64 653e 7463 705f 6469 7363 6f6e tcp_discon\n+00161ae0: 6e65 6374 3c2f 636f 6465 3e2e 3c2f 703e nect.

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

    .fr\n+00161b20: 6573 6f6c 7665 3c2f 6833 3e0a 3c70 3e3c esolve

    .

    <\n+00161b30: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap::fresolve\n+00161be0: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa\n+00161bf0: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n+00161c00: 6861 7220 2a61 6464 722c 2073 7472 7563 har *addr, struc\n+00161c10: 7420 696e 5f61 6464 7220 2a69 6e61 6464 t in_addr *inadd\n+00161c20: 7229 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 r)

    .This callback i\n+00161c40: 7320 6361 6c6c 6564 2062 7920 3c63 6f64 s called by soap_bind\n+00161cd0: 3c2f 636f 6465 3e20 286f 7220 7468 6520 (or the \n+00161ce0: 432b 2b20 7365 7276 6963 6520 636c 6173 C++ service clas\n+00161cf0: 7320 3c63 6f64 653e 6269 6e64 3c2f 636f s bind method) at t\n+00161d10: 6865 2073 6572 7665 722d 7369 6465 2061 he server-side a\n+00161d20: 6e64 2062 7920 3c63 6f64 653e 3c61 2063 nd by soap_conn\n+00161db0: 6563 743c 2f61 3e3c 2f63 6f64 653e 206f ect o\n+00161dc0: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap_connect_\n+00161e40: 636f 6d6d 616e 643c 2f61 3e3c 2f63 6f64 command at the client\n+00161e60: 2d73 6964 6520 7769 7468 2061 2068 6f73 -side with a hos\n+00161e70: 7420 3c63 6f64 653e 6e61 6d65 3c2f 636f t name parameter to\n+00161e90: 2072 6573 6f6c 7665 2074 6f20 6164 6472 resolve to addr\n+00161ea0: 6573 7320 3c63 6f64 653e 696e 6164 6472 ess inaddr\n+00161eb0: 3c2f 636f 6465 3e20 6279 2061 6464 7265 by addre\n+00161ec0: 7373 2074 7261 6e73 6c61 7469 6f6e 2e20 ss translation. \n+00161ed0: 5768 656e 2073 7563 6365 7373 6675 6c20 When successful \n+00161ee0: 7365 7473 2070 6172 616d 6574 6572 203c sets parameter <\n+00161ef0: 636f 6465 3e69 6e61 6464 723c 2f63 6f64 code>inaddr and returns <\n+00161f10: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+00161f30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+00161ff0: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n+00162000: 726f 7220 636f 6465 2e20 5468 6520 6275 ror code. The bu\n+00162010: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n+00162020: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::\n+001620d0: 6672 6573 6f6c 7665 3c2f 613e 3c2f 636f fresolve is tcp\n+001620f0: 5f67 6574 686f 7374 3c2f 636f 6465 3e2e _gethost.\n+00162100: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fconnect

    .\n+00162140: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::\n+001621f0: 6663 6f6e 6e65 6374 3c2f 613e 2928 7374 fconnect)(st\n+00162200: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+00162210: 2063 6f6e 7374 2063 6861 7220 2a65 6e64 const char *end\n+00162220: 706f 696e 742c 2063 6f6e 7374 2063 6861 point, const cha\n+00162230: 7220 2a68 6f73 742c 2069 6e74 2070 6f72 r *host, int por\n+00162240: 7429 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 t)

    .This callback i\n+00162260: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n+00162270: 656e 6769 6e65 2074 6f20 6f70 7469 6f6e engine to option\n+00162280: 616c 6c79 206f 7665 7272 6964 6520 636c ally override cl\n+00162290: 6965 6e74 2d73 6964 6520 636f 6e6e 6563 ient-side connec\n+001622a0: 7469 6e67 2e20 5468 6520 7061 7261 6d65 ting. The parame\n+001622b0: 7465 7273 203c 636f 6465 3e68 6f73 743c ters host<\n+001622c0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and port wer\n+001622e0: 6520 6d69 6372 6f2d 7061 7273 6564 2066 e micro-parsed f\n+001622f0: 726f 6d20 7468 6520 3c63 6f64 653e 656e rom the en\n+00162300: 6470 6f69 6e74 3c2f 636f 6465 3e20 7072 dpoint pr\n+00162310: 696f 7220 746f 2070 6173 7369 6e67 2074 ior to passing t\n+00162320: 6865 6d20 746f 2074 6869 7320 6361 6c6c hem to this call\n+00162330: 6261 636b 2e20 5265 7475 726e 7320 3c63 back. Returns #SOAP_OK or a <\n+00162360: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00162370: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00162380: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n+00162390: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n+001623a0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n+001623b0: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n+001623c0: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n+001623d0: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n+001623e0: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n+001623f0: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n+00162400: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n+00162410: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n+00162420: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n+00162430: 6f72 2063 6f64 652e 204e 6f20 6275 696c or code. No buil\n+00162440: 742d 696e 2066 756e 6374 696f 6e20 6973 t-in function is\n+00162450: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to s\n+00162500: 6f61 703a 3a66 636f 6e6e 6563 743c 2f61 oap::fconnect.

    .
    .fdisc\n+00162550: 6f6e 6e65 6374 3c2f 6833 3e0a 3c70 3e3c onnect

    .

    <\n+00162560: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (s\n+00162600: 6f61 703a 3a66 6469 7363 6f6e 6e65 6374 oap::fdisconnect\n+00162610: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa\n+00162620: 7020 2a73 6f61 7029 3c2f 636f 6465 3e3c p *soap)<\n+00162630: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call\n+00162640: 6261 636b 2069 7320 6361 6c6c 6564 2062 back is called b\n+00162650: 7920 7468 6520 656e 6769 6e65 203c 636f y the engine soap_close\n+001626e0: 736f 636b 3c2f 613e 3c2f 636f 6465 3e20 sock \n+001626f0: 6265 666f 7265 2074 6865 203c 636f 6465 before the soap::fclose callba\n+001627b0: 636b 2069 7320 6361 6c6c 6564 2074 6f20 ck is called to \n+001627c0: 7368 7574 646f 776e 2f64 6973 636f 6e6e shutdown/disconn\n+001627d0: 6563 742e 2052 6574 7572 6e73 203c 636f ect. Returns #SOAP_OK or a s\n+001628b0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n+001628d0: 7220 636f 6465 2e20 4e6f 2062 7569 6c74 r code. No built\n+001628e0: 2d69 6e20 6675 6e63 7469 6f6e 2069 7320 -in function is \n+001628f0: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fdi\n+001629a0: 7363 6f6e 6e65 6374 3c2f 613e 3c2f 636f sconnect.

    .

    .fclosesock\n+001629f0: 6574 3c2f 6833 3e0a 3c70 3e3c 636f 6465 et

    .

    int (soap::fc\n+00162a90: 6c6f 7365 736f 636b 6574 3c2f 613e 2928 losesocket)(\n+00162aa0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00162ab0: 702c 2053 4f41 505f 534f 434b 4554 2073 p, SOAP_SOCKET s\n+00162ac0: 6f63 6b29 3c2f 636f 6465 3e3c 2f70 3e0a ock)

    .\n+00162ad0: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n+00162ae0: 2069 7320 6361 6c6c 6564 2074 6f20 636c is called to cl\n+00162af0: 6f73 6520 6120 736f 636b 6574 2062 7920 ose a socket by \n+00162b00: 7468 6520 656e 6769 6e65 2e20 5265 7475 the engine. Retu\n+00162b10: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n+00162b20: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n+00162b30: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n+00162bf0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n+00162c00: 7429 2065 7272 6f72 2063 6f64 652e 2054 t) error code. T\n+00162c10: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func\n+00162c20: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to\n+00162c30: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::f\n+00162cc0: 636c 6f73 6573 6f63 6b65 743c 2f61 3e3c closesocket<\n+00162cd0: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n+00162ce0: 7463 705f 636c 6f73 6573 6f63 6b65 743c tcp_closesocket<\n+00162cf0: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

    .

    \n+00162d00: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fshutdo\n+00162d30: 776e 736f 636b 6574 3c2f 6833 3e0a 3c70 wnsocket

    .int (soap::fshutdow\n+00162de0: 6e73 6f63 6b65 743c 2f61 3e29 2873 7472 nsocket)(str\n+00162df0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00162e00: 534f 4150 5f53 4f43 4b45 5420 736f 636b SOAP_SOCKET sock\n+00162e10: 2c20 696e 7420 686f 7729 3c2f 636f 6465 , int how)

    .

    This ca\n+00162e30: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+00162e40: 2074 6f20 7368 7574 2064 6f77 6e20 6120 to shut down a \n+00162e50: 736f 636b 6574 2062 7920 7468 6520 656e socket by the en\n+00162e60: 6769 6e65 2e20 5265 7475 726e 7320 3c63 gine. Returns #SOAP_OK or a <\n+00162e90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00162ea0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00162eb0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n+00162ec0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n+00162ed0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n+00162ee0: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n+00162ef0: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n+00162f00: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n+00162f10: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n+00162f20: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n+00162f30: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n+00162f40: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n+00162f50: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n+00162f60: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n+00162f70: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+00162f80: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fsh\n+00163020: 7574 646f 776e 736f 636b 6574 3c2f 613e utdownsocket\n+00163030: 3c2f 636f 6465 3e20 6973 203c 636f 6465 is tcp_shutdownsoc\n+00163050: 6b65 743c 2f63 6f64 653e 2e3c 2f70 3e0a ket.

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

    .fpo\n+00163090: 6c6c 3c2f 6833 3e0a 3c70 3e3c 636f 6465 ll

    .

    int (soap::fpoll)(struct soap *\n+00163180: 736f 6170 293c 2f63 6f64 653e 3c2f 703e soap)

    \n+00163190: 0a3c 703e 5468 6973 2063 616c 6c62 6163 .

    This callbac\n+001631a0: 6b20 6973 2063 616c 6c65 6420 6279 2074 k is called by t\n+001631b0: 6865 2065 6e67 696e 6520 746f 2077 6169 he engine to wai\n+001631c0: 7420 666f 7220 6163 7469 7669 7479 206f t for activity o\n+001631d0: 6e20 7468 6520 3c63 6f64 653e 3c61 2063 n the soap::socket\n+001632a0: 3c2f 613e 3c2f 636f 6465 3e20 6f72 203c or <\n+001632b0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+00163370: 703a 3a6d 6173 7465 723c 2f61 3e3c 2f63 p::master socket usin\n+00163390: 6720 3c63 6f64 653e 706f 6c6c 3c2f 636f g poll or sel\n+001633b0: 6563 743c 2f63 6f64 653e 2e20 5469 6d65 ect. Time\n+001633c0: 7320 6f75 7420 7768 656e 203c 636f 6465 s out when soap::s\n+00163480: 656e 645f 7469 6d65 6f75 743c 2f61 3e3c end_timeout<\n+00163490: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n+001634a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap:\n+00163550: 3a72 6563 765f 7469 6d65 6f75 743c 2f61 :recv_timeout are non\n+00163570: 7a65 726f 2e20 5265 7475 726e 7320 3c63 zero. Returns #SOAP_OK or a <\n+001635a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001635b0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001635c0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n+001635d0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n+001635e0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n+001635f0: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n+00163600: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n+00163610: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n+00163620: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n+00163630: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n+00163640: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n+00163650: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n+00163660: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n+00163670: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n+00163680: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+00163690: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soa\n+00163760: 703a 3a66 706f 6c6c 3c2f 613e 3c2f 636f p::fpoll is soa\n+00163780: 705f 706f 6c6c 3c2f 636f 6465 3e2e 3c2f p_poll..

    .\n+001637c0: 6672 6563 763c 2f68 333e 0a3c 703e 3c63 frecv

    .

    size_t (soap::frecv\n+00163880: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa\n+00163890: 7020 2a73 6f61 702c 2063 6861 7220 2a62 p *soap, char *b\n+001638a0: 7566 2c20 7369 7a65 5f74 206c 656e 293c uf, size_t len)<\n+001638b0: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n+001638c0: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n+001638d0: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng\n+001638e0: 696e 6520 746f 2072 6563 6569 7665 2028 ine to receive (\n+001638f0: 6f72 2072 6561 6429 2064 6174 6120 696e or read) data in\n+00163900: 746f 2061 2073 7065 6369 6669 6564 2062 to a specified b\n+00163910: 7566 6665 7220 3c63 6f64 653e 6275 663c uffer buf<\n+00163920: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and len. The\n+00163940: 2073 6f75 7263 6520 666f 7220 7468 6520 source for the \n+00163950: 6461 7461 2074 6f20 7265 6164 2062 7920 data to read by \n+00163960: 7468 6973 2063 616c 6c62 6163 6b20 6973 this callback is\n+00163970: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+00163a30: 6f61 703a 3a69 733c 2f61 3e3c 2f63 6f64 oap::is when non-NULL\n+00163a50: 2c20 3c63 6f64 653e 3c61 2063 6c61 7373 , \n+00163b10: 736f 6170 3a3a 736f 636b 6574 3c2f 613e soap::socket\n+00163b20: 3c2f 636f 6465 3e20 7768 656e 2076 616c when val\n+00163b30: 6964 2c20 6f72 203c 636f 6465 3e3c 6120 id, or soap::recvf\n+00163c00: 643c 2f61 3e3c 2f63 6f64 653e 2e20 5265 d. Re\n+00163c10: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n+00163c20: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n+00163c30: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n+00163cf0: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus (\n+00163d00: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code.\n+00163d10: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n+00163d20: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n+00163d30: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::frecv is frecv.<\n+00163e00: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+00163e30: 0a66 7365 6e64 3c2f 6833 3e0a 3c70 3e3c .fsend

    .

    <\n+00163e40: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap::fsend<\n+00163ee0: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+00163ef0: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n+00163f00: 6172 202a 6275 662c 2073 697a 655f 7420 ar *buf, size_t \n+00163f10: 6c65 6e29 3c2f 636f 6465 3e3c 2f70 3e0a len)

    .\n+00163f20: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback\n+00163f30: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n+00163f40: 6520 656e 6769 6e65 2074 6f20 7365 6e64 e engine to send\n+00163f50: 2028 6f72 2077 7269 7465 2920 6461 7461 (or write) data\n+00163f60: 2073 7065 6369 6669 6564 2062 7920 3c63 specified by data \n+00163f80: 6279 7465 7320 6f66 206c 656e 6774 6820 bytes of length \n+00163f90: 3c63 6f64 653e 6c65 6e3c 2f63 6f64 653e len\n+00163fa0: 2e20 5468 6520 7369 6e6b 2066 6f72 2074 . The sink for t\n+00163fb0: 6865 2064 6174 6120 746f 2062 6520 7365 he data to be se\n+00163fc0: 6e74 2074 6f20 6973 2074 7970 6963 616c nt to is typical\n+00163fd0: 6c79 203c 636f 6465 3e3c 6120 636c 6173 ly soap::socket, \n+001640b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::se\n+00164170: 6e64 6664 3c2f 613e 3c2f 636f 6465 3e20 ndfd \n+00164180: 6f72 203c 636f 6465 3e3c 6120 636c 6173 or soap::os. Returns #SOAP_OK or a <\n+00164280: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00164290: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001642a0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n+001642b0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n+001642c0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n+001642d0: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n+001642e0: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n+001642f0: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n+00164300: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n+00164310: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n+00164320: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n+00164330: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n+00164340: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n+00164350: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n+00164360: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+00164370: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap:\n+00164410: 3a66 7365 6e64 3c2f 613e 3c2f 636f 6465 :fsend is fsend\n+00164430: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    ..fserve\n+00164470: 726c 6f6f 703c 2f68 333e 0a3c 703e 3c63 rloop.

    int (s\n+00164550: 6f61 703a 3a66 7365 7276 656c 6f6f 703c oap::fserveloop<\n+00164560: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+00164570: 202a 736f 6170 293c 2f63 6f64 653e 3c2f *soap).

    This callb\n+00164590: 6163 6b20 6973 2063 616c 6c65 6420 6166 ack is called af\n+001645a0: 7465 7220 6561 6368 2073 7563 6365 7373 ter each success\n+001645b0: 6675 6c20 636f 6d70 6c65 7469 6f6e 206f ful completion o\n+001645c0: 6620 6120 7365 7276 6572 206f 7065 7261 f a server opera\n+001645d0: 7469 6f6e 2069 6e20 7468 6520 7365 7276 tion in the serv\n+001645e0: 6572 206c 6f6f 702e 2045 7865 6375 7465 er loop. Execute\n+001645f0: 7320 696d 6d65 6469 6174 656c 7920 6166 s immediately af\n+00164600: 7465 7220 7365 6e64 696e 6720 7468 6520 ter sending the \n+00164610: 7265 7370 6f6e 7365 2074 6f20 6120 636c response to a cl\n+00164620: 6965 6e74 2061 6e64 2062 6566 6f72 6520 ient and before \n+00164630: 7468 6520 6e65 7874 206b 6565 702d 616c the next keep-al\n+00164640: 6976 6520 7365 7276 6572 206c 6f6f 7020 ive server loop \n+00164650: 6974 6572 6174 696f 6e20 7768 656e 2065 iteration when e\n+00164660: 6e61 626c 6564 2077 6974 6820 3c63 6f64 nabled with #SOAP_IO_KEEPA\n+00164680: 4c49 5645 3c2f 636f 6465 3e2e 2054 6869 LIVE. Thi\n+00164690: 7320 6361 6c6c 6261 636b 2063 616e 2062 s callback can b\n+001646a0: 6520 7573 6564 2074 6f20 7265 636c 6169 e used to reclai\n+001646b0: 6d20 7265 736f 7572 6365 7320 696e 2074 m resources in t\n+001646c0: 6865 206b 6565 702d 616c 6976 6520 7365 he keep-alive se\n+001646d0: 7276 6572 206c 6f6f 702c 2066 6f72 2065 rver loop, for e\n+001646e0: 7861 6d70 6c65 206d 616e 6167 6564 206d xample managed m\n+001646f0: 656d 6f72 7920 6361 6e20 6265 2072 6563 emory can be rec\n+00164700: 6c61 696d 6564 2062 7920 6361 6c6c 696e laimed by callin\n+00164710: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g soap_dest\n+001647d0: 726f 793c 2f61 3e3c 2f63 6f64 653e 2061 roy a\n+001647e0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soa\n+001648b0: 705f 656e 643c 2f61 3e3c 2f63 6f64 653e p_end\n+001648c0: 2069 6e20 7468 6174 206f 7264 6572 2061 in that order a\n+001648d0: 6e64 2061 6c6c 2064 6573 6572 6961 6c69 nd all deseriali\n+001648e0: 7a65 6420 616e 6420 6f74 6865 7220 6479 zed and other dy\n+001648f0: 6e61 6d69 6361 6c6c 792d 616c 6c6f 6361 namically-alloca\n+00164900: 7465 6420 6461 7461 206d 616e 6167 6564 ted data managed\n+00164910: 2062 7920 7468 6520 636f 6e74 6578 7420 by the context \n+00164920: 7769 6c6c 2062 6520 6465 616c 6c6f 6361 will be dealloca\n+00164930: 7465 642e 2052 6574 7572 6e73 203c 636f ted. Returns #SOAP_OK or a s\n+00164a10: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n+00164a30: 7220 636f 6465 2e20 4e6f 2062 7569 6c74 r code. No built\n+00164a40: 2d69 6e20 6675 6e63 7469 6f6e 2069 7320 -in function is \n+00164a50: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fs\n+00164b30: 6572 7665 6c6f 6f70 3c2f 613e 3c2f 636f erveloop.

    .

    .fmalloc.

    void\n+00164b90: 2028 3c61 2063 6c61 7373 3d22 656c 2220 (so\n+00164c30: 6170 3a3a 666d 616c 6c6f 633c 2f61 3e29 ap::fmalloc)\n+00164c40: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00164c50: 6170 2c20 7369 7a65 5f74 2073 697a 6529 ap, size_t size)\n+00164c60: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n+00164c70: 6869 7320 6361 6c6c 6261 636b 2063 616e his callback can\n+00164c80: 2062 6520 7573 6564 2074 6f20 6f76 6572 be used to over\n+00164c90: 7269 6465 206d 656d 6f72 7920 616c 6c6f ride memory allo\n+00164ca0: 6361 7469 6f6e 2061 6e64 206d 616e 6167 cation and manag\n+00164cb0: 656d 656e 7420 646f 6e65 2062 7920 3c63 ement done by soap_mallo\n+00164d70: 633c 2f61 3e3c 2f63 6f64 653e 2069 6e20 c in \n+00164d80: 432e 204d 656d 6f72 7920 616c 6c6f 6361 C. Memory alloca\n+00164d90: 7465 6420 7669 6120 7468 6973 2063 616c ted via this cal\n+00164da0: 6c62 6163 6b20 7769 6c6c 206e 6f74 2062 lback will not b\n+00164db0: 6520 6d61 6e61 6765 6420 616e 6420 6e6f e managed and no\n+00164dc0: 7420 6265 2061 7574 6f6d 6174 6963 616c t be automatical\n+00164dd0: 6c79 2072 656c 6561 7365 6420 6279 2074 ly released by t\n+00164de0: 6865 2065 6e67 696e 652e 2049 6e73 7465 he engine. Inste\n+00164df0: 6164 2c20 7468 6520 6170 706c 6963 6174 ad, the applicat\n+00164e00: 696f 6e20 7573 696e 6720 7468 6973 2063 ion using this c\n+00164e10: 616c 6c62 6163 6b20 7368 6f75 6c64 2072 allback should r\n+00164e20: 656c 6561 7365 2061 6c6c 6f63 6174 6564 elease allocated\n+00164e30: 206d 656d 6f72 792e 2041 6c6c 2061 6c6c memory. All all\n+00164e40: 6f63 6174 696f 6e73 2064 6f6e 6520 6279 ocations done by\n+00164e50: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_ma\n+00164f00: 6c6c 6f63 3c2f 613e 3c2f 636f 6465 3e20 lloc \n+00164f10: 6172 6520 7265 706c 6163 6564 2077 6974 are replaced wit\n+00164f20: 6820 6120 6361 6c6c 2074 6f20 3c63 6f64 h a call to so\n+00164fd0: 6170 3a3a 666d 616c 6c6f 633c 2f61 3e3c ap::fmalloc<\n+00164fe0: 2f63 6f64 653e 2e20 486f 7765 7665 722c /code>. However,\n+00164ff0: 206e 6f20 6f74 6865 7220 616c 6c6f 6361 no other alloca\n+00165000: 7469 6f6e 732c 2073 7563 6820 6173 203c tions, such as <\n+00165010: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+001650a0: 5f6e 6577 3c2f 613e 3c2f 636f 6465 3e20 _new \n+001650b0: 616e 6420 3c63 6f64 653e 736f 6170 5f6e and soap_n\n+001650c0: 6577 5f54 3c2f 636f 6465 3e20 666f 7220 ew_T for \n+001650d0: 432b 2b20 636c 6173 7365 7320 3c63 6f64 C++ classes T are a\n+001650f0: 6666 6563 7465 642c 2062 6563 6175 7365 ffected, because\n+00165100: 206f 626a 6563 7473 2061 7265 2061 6c6c objects are all\n+00165110: 6f63 6174 6564 2064 6966 6665 7265 6e74 ocated different\n+00165120: 6c79 2e20 5468 6973 2063 616c 6c62 6163 ly. This callbac\n+00165130: 6b20 6973 2074 6865 7265 666f 7265 206e k is therefore n\n+00165140: 6f74 2075 7365 6675 6c20 666f 7220 432b ot useful for C+\n+00165150: 2b20 6170 706c 6963 6174 696f 6e73 2e20 + applications. \n+00165160: 5265 7475 726e 7320 6120 706f 696e 7465 Returns a pointe\n+00165170: 7220 746f 2064 796e 616d 6963 616c 6c79 r to dynamically\n+00165180: 2061 6c6c 6f63 6174 6564 206d 656d 6f72 allocated memor\n+00165190: 7920 6f72 204e 554c 4c20 6f6e 2066 6169 y or NULL on fai\n+001651a0: 6c75 7265 2074 6f20 616c 6c6f 6361 7465 lure to allocate\n+001651b0: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu\n+001651c0: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign\n+001651d0: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fm\n+00165280: 616c 6c6f 633c 2f61 3e3c 2f63 6f64 653e alloc\n+00165290: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

    .
    Warning
    Deprecated\n+001652d0: 2073 696e 6365 2032 2e38 2e37 322e 2044 since 2.8.72. D\n+001652e0: 6566 696e 6520 3c63 6f64 653e 2353 4f41 efine #SOA\n+001652f0: 505f 4d41 4c4c 4f43 3c2f 636f 6465 3e20 P_MALLOC \n+00165300: 616e 6420 3c63 6f64 653e 2353 4f41 505f and #SOAP_\n+00165310: 4652 4545 3c2f 636f 6465 3e20 696e 7374 FREE inst\n+00165320: 6561 642e 3c2f 6464 3e3c 2f64 6c3e 0a3c ead.
    .<\n+00165330: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.user\n+00165360: 2076 6172 6961 626c 653c 2f68 333e 0a3c variable

    .<\n+00165370: 703e 4120 3c63 6f64 653e 766f 6964 2a20 p>A void* \n+00165380: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::us\n+00165440: 6572 3c2f 613e 3c2f 636f 6465 3e20 7661 er va\n+00165450: 7269 6162 6c65 2069 7320 6176 6169 6c61 riable is availa\n+00165460: 626c 6520 746f 2070 6173 7320 7573 6572 ble to pass user\n+00165470: 2d64 6566 696e 6564 2064 6174 6120 746f -defined data to\n+00165480: 2074 6865 2063 616c 6c62 6163 6b73 2e3c the callbacks.<\n+00165490: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    \n+001654c0: 0a45 7861 6d70 6c65 733c 2f68 333e 0a3c .Examples

    .<\n+001654d0: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following \n+001654e0: 6578 616d 706c 6520 7573 6573 2049 2f4f example uses I/O\n+001654f0: 2063 616c 6c62 6163 6b73 2066 6f72 2063 callbacks for c\n+00165500: 7573 746f 6d69 7a65 6420 7365 7269 616c ustomized serial\n+00165510: 697a 6174 696f 6e20 6f66 2064 6174 6120 ization of data \n+00165520: 696e 746f 2061 2066 6978 6564 2d73 697a into a fixed-siz\n+00165530: 6520 6275 6666 6572 2061 6e64 2064 6573 e buffer and des\n+00165540: 6572 6961 6c69 7a61 7469 6f6e 2062 6163 erialization bac\n+00165550: 6b20 696e 746f 2061 2064 6174 6120 7374 k into a data st\n+00165560: 7275 6374 7572 653a 3c2f 703e 0a3c 6469 ructure:

    .
    c\n+001655b0: 6861 723c 2f73 7061 6e3e 2062 7566 5b31 har buf[1\n+001655c0: 3030 3030 5d3b 203c 7370 616e 2063 6c61 0000]; // \n+001655e0: 584d 4c20 6275 6666 6572 203c 2f73 7061 XML buffer
    .
    int \n+00165630: 6c65 6e31 203d 2030 3b20 2020 203c 7370 len1 = 0; // #chars wri\n+00165660: 7474 656e 203c 2f73 7061 6e3e 3c2f 6469 tten .
    i\n+001656a0: 6e74 3c2f 7370 616e 3e20 6c65 6e32 203d nt len2 =\n+001656b0: 2030 3b20 2020 203c 7370 616e 2063 6c61 0; // \n+001656d0: 2363 6861 7273 2072 6561 6420 3c2f 7370 #chars read
    .
    .
    // m\n+00165730: 7973 656e 643a 2070 7574 2058 4d4c 2069 ysend: put XML i\n+00165740: 6e20 6275 665b 5d20 3c2f 7370 616e 3e3c n buf[] <\n+00165750: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mys\n+00165790: 656e 6428 3c73 7061 6e20 636c 6173 733d end(struct\n+001657b0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001657e0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+00165810: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n+00165830: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *s, size_t n\n+00165890: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    if (len1\n+001658f0: 202b 206e 2026 6774 3b20 3c73 7061 6e20 + n > \n+00165910: 7369 7a65 6f66 3c2f 7370 616e 3e28 6275 sizeof(bu\n+00165920: 6629 2920 3c2f 6469 763e 0a3c 6469 7620 f))
    .
    \n+00165940: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00165960: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n+001659c0: 505f 454f 463c 2f61 3e3b 203c 2f64 6976 P_EOF; .
    strcpy(buf\n+001659f0: 202b 206c 656e 312c 2073 293b 203c 2f64 + len1, s); .
    len1 += \n+00165a20: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    ..\n+00165ae0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    // my\n+00165b30: 7265 6376 3a20 6765 7420 584d 4c20 6672 recv: get XML fr\n+00165b40: 6f6d 2062 7566 5b5d 203c 2f73 7061 6e3e om buf[] \n+00165b50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t\n+00165b90: 206d 7972 6563 7628 3c73 7061 6e20 636c myrecv(st\n+00165bb0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, char *s, size_t \n+00165c70: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {.
    if (len\n+00165cd0: 3220 2b20 6e20 2667 743b 206c 656e 3129 2 + n > len1)\n+00165ce0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    n \n+00165d00: 3d20 6c65 6e31 202d 206c 656e 323b 203c = len1 - len2; <\n+00165d10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    strncp\n+00165d30: 7928 732c 2062 7566 202b 206c 656e 322c y(s, buf + len2,\n+00165d40: 206e 293b 203c 2f64 6976 3e0a 3c64 6976 n);
    . \n+00165d60: 6c65 6e32 202b 3d20 6e3b 203c 2f64 6976 len2 += n; .
    \n+00165da0: 7265 7475 726e 3c2f 7370 616e 3e20 6e3b return n;\n+00165db0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    .<\n+00165e00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00165e10: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main() .
    {
    . \n+00165e60: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00165eb0: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> soap<\n+00165ee0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n+00165f00: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__person p\n+00165f30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_init1\n+00165fb0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+00165fe0: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_X\n+00166040: 4d4c 5f54 5245 453c 2f61 3e29 3b20 3c2f ML_TREE); .
    len1 = \n+00166070: 6c65 6e32 203d 2030 3b20 2020 2020 3c73 len2 = 0; // reset buf\n+001660a0: 6665 7220 706f 696e 7465 7273 203c 2f73 fer pointers
    .
    p\n+001660d0: 2e6e 616d 6520 3d20 3c73 7061 6e20 636c .name = "John D\n+00166100: 6f65 2671 756f 743b 3c2f 7370 616e 3e3b oe";\n+00166110: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    p.ag\n+00166130: 6520 3d20 3235 3b20 3c2f 6469 763e 0a3c e = 25;
    .<\n+00166140: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00166150: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap.fsend<\n+001661e0: 2f61 3e20 3d20 6d79 7365 6e64 3b20 3c73 /a> = mysend; // assign ca\n+00166210: 6c6c 6261 636b 203c 2f73 7061 6e3e 3c2f llback .
    \n+00166260: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.\n+001662c0: 6672 6563 763c 2f61 3e20 3d20 6d79 7265 frecv = myre\n+001662d0: 6376 3b20 3c73 7061 6e20 636c 6173 733d cv; // ass\n+001662f0: 6967 6e20 6361 6c6c 6261 636b 203c 2f73 ign callback
    .
    <\n+00166320: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00166330: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_write_n\n+00166350: 735f 5f70 6572 736f 6e28 2661 6d70 3b3c s__person(&<\n+00166360: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00166370: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00166380: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00166390: 2661 6d70 3b70 2929 3c2f 6469 763e 0a3c &p))
    .<\n+001663a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001663b0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n+001663d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+00166430: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s\n+00166470: 7464 6f75 7429 3b20 3c2f 6469 763e 0a3c tdout);
    .<\n+00166480: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00166490: 3e20 2020 2065 7869 7428 4558 4954 5f46 > exit(EXIT_F\n+001664a0: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    .\n+001664b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n+001664e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_read_\n+00166510: 6e73 5f5f 5065 7273 6f6e 2826 616d 703b ns__Person(&\n+00166520: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00166550: 2026 616d 703b 7029 293c 2f64 6976 3e0a &p))
    .\n+00166560: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+00166590: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n+001665f0: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n+00166600: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00166610: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00166620: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00166630: 7374 646f 7574 293b 203c 2f64 6976 3e0a stdout);
    .\n+00166640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXIT_\n+00166660: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
    \n+00166670: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+001666a0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest\n+00166700: 726f 793c 2f61 3e28 2661 6d70 3b3c 6120 roy(&soap); <\n+00166740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+001667b0: 6f61 705f 656e 643c 2f61 3e28 2661 6d70 oap_end(&\n+001667c0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+001667f0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_done\n+00166870: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+001668a0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n+001668c0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    <\n+00166920: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00166930: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soa\n+00166980: 703a 3a66 7265 6376 3c2f 613e 3c2f 6469 p::frecv
    size_t(* f\n+001669b0: 7265 6376 2928 7374 7275 6374 2073 6f61 recv)(struct soa\n+001669c0: 7020 2a73 6f61 702c 2063 6861 7220 2a62 p *soap, char *b\n+001669d0: 7566 2c20 7369 7a65 5f74 206c 656e 293c uf, size_t len)<\n+001669e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n+00166a00: 2074 6861 7420 7265 6365 6976 6573 2062 that receives b\n+00166a10: 7974 6573 206f 6620 6461 7461 2069 6e74 ytes of data int\n+00166a20: 6f20 7468 6520 6769 7665 6e20 6275 6666 o the given buff\n+00166a30: 6572 2e3c 2f64 6976 3e3c 6469 7620 636c er.
    D\n+00166a50: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+00166a60: 7464 736f 6170 322e 683a 3436 3037 3c2f tdsoap2.h:4607
    .
    \n+00166b30: 736f 6170 3a3a 6673 656e 643c 2f61 3e3c soap::fsend<\n+00166b40: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int(* f\n+00166b60: 7365 6e64 2928 7374 7275 6374 2073 6f61 send)(struct soa\n+00166b70: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n+00166b80: 6861 7220 2a64 6174 612c 2073 697a 655f har *data, size_\n+00166b90: 7420 6c65 6e29 3c2f 6469 763e 3c64 6976 t len)
    C\n+00166bb0: 616c 6c62 6163 6b20 7468 6174 2073 656e allback that sen\n+00166bc0: 6473 2074 6865 2067 6976 656e 2062 7974 ds the given byt\n+00166bd0: 6573 206f 6620 6461 7461 2e3c 2f64 6976 es of data.
    Definitio\n+00166c00: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00166c10: 683a 3436 3230 3c2f 6469 763e 3c2f 6469 h:4620
    .

    A f\n+00166c40: 6978 6564 2d73 697a 6520 6275 6666 6572 ixed-size buffer\n+00166c50: 2074 6f20 7374 6f72 6520 7468 6520 6f75 to store the ou\n+00166c60: 7462 6f75 6e64 206d 6573 7361 6765 2073 tbound message s\n+00166c70: 656e 7420 6973 206e 6f74 2066 6c65 7869 ent is not flexi\n+00166c80: 626c 6520 746f 2068 616e 646c 6520 6c61 ble to handle la\n+00166c90: 7267 6520 636f 6e74 656e 742e 2054 6f20 rge content. To \n+00166ca0: 7374 6f72 6520 7468 6520 6d65 7373 6167 store the messag\n+00166cb0: 6520 696e 2061 6e20 6578 7061 6e64 696e e in an expandin\n+00166cc0: 6720 6275 6666 6572 3a3c 2f70 3e0a 3c64 g buffer:

    .
    stru\n+00166d10: 6374 203c 2f73 7061 6e3e 6275 6666 6572 ct buffer\n+00166d20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n+00166d70: 7369 7a65 5f74 3c2f 7370 616e 3e20 6c65 size_t le\n+00166d80: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    size_t max; .
    \n+00166e00: 6368 6172 3c2f 7370 616e 3e20 2a62 7566 char *buf\n+00166e10: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }; .
    .<\n+00166e50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00166e60: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main() .
    {
    .\n+00166ec0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+00166ee0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+00166f10: 703c 2f61 3e20 3c61 2063 6c61 7373 3d22 p soa\n+00166f40: 703c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 p;
    .\n+00166f60: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+00166f80: 2f73 7061 6e3e 6e73 5f5f 7065 7273 6f6e /span>ns__person\n+00166f90: 2070 3b20 3c2f 6469 763e 0a3c 6469 7620 p;
    .
    <\n+00166fb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00166fc0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct buffer *h = m\n+00166fe0: 616c 6c6f 6328 3c73 7061 6e20 636c 6173 alloc(size\n+00167000: 6f66 3c2f 7370 616e 3e28 3c73 7061 6e20 of(\n+00167020: 7374 7275 6374 3c2f 7370 616e 3e20 6275 struct bu\n+00167030: 6666 6572 2929 3b20 3c2f 6469 763e 0a3c ffer));
    .<\n+00167040: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167050: 3e20 2068 2d26 6774 3b6c 656e 203d 2030 > h->len = 0\n+00167060: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    h-&\n+00167080: 6774 3b6d 6178 203d 2030 3b20 3c2f 6469 gt;max = 0; .
    h->buf\n+001670b0: 203d 204e 554c 4c3b 203c 2f64 6976 3e0a = NULL;
    .\n+001670c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . \n+001671f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n+00167220: 3c61 2063 6c61 7373 3d22 636f 6465 2220 user = (v\n+00167290: 6f69 643c 2f73 7061 6e3e 2a29 683b 203c oid*)h; <\n+001672a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001672b0: 656e 7422 3e2f 2f20 7061 7373 2062 7566 ent\">// pass buf\n+001672c0: 6665 7220 6173 2061 2068 616e 646c 6520 fer as a handle \n+001672d0: 746f 2074 6865 2063 616c 6c62 6163 6b20 to the callback \n+001672e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00167300: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.fsend = mysend; // assign ca\n+001673c0: 6c6c 6261 636b 203c 2f73 7061 6e3e 3c2f llback ..
    {..
    e\n+00167560: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n+00167570: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } \n+00167590: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n+001675d0: 682d 2667 743b 6c65 6e29 203c 2f64 6976 h->len) .
    {
    .\n+00167610: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+00167630: 2075 7365 2068 2d26 6774 3b62 7566 5b30 use h->buf[0\n+00167640: 2e2e 682d 2667 743b 6c65 6e2d 315d 2063 ..h->len-1] c\n+00167650: 6f6e 7465 6e74 203c 2f73 7061 6e3e 3c2f ontent .
    // then cleanup\n+001676a0: 3a20 3c2f 7370 616e 3e3c 2f64 6976 3e0a :
    .\n+001676b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    h->len \n+001676d0: 3d20 303b 203c 2f64 6976 3e0a 3c64 6976 = 0;
    . \n+001676f0: 2020 682d 2667 743b 6d61 7820 3d20 303b h->max = 0;\n+00167700: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    fr\n+00167720: 6565 2868 2d26 6774 3b62 7566 293b 203c ee(h->buf); <\n+00167730: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    h-&g\n+00167750: 743b 6275 6620 3d20 4e55 4c4c 3b20 3c2f t;buf = NULL; .
    } .
    soap_\n+001677f0: 6465 7374 726f 793c 2f61 3e28 2661 6d70 destroy(&\n+00167800: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00167830: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_end(\n+001678b0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+001678e0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+00167900: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_done\n+00167960: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
    }
    . \n+001679d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int my\n+00167a10: 7365 6e64 283c 7370 616e 2063 6c61 7373 send(struc\n+00167a30: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+00167a60: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *s, size_t \n+00167b10: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {.
    st\n+00167b60: 7275 6374 203c 2f73 7061 6e3e 6275 6666 ruct buff\n+00167b70: 6572 202a 6820 3d20 283c 7370 616e 2063 er *h = (s\n+00167b90: 7472 7563 7420 3c2f 7370 616e 3e62 7566 truct buf\n+00167ba0: 6665 722a 293c 6120 636c 6173 733d 2263 fer*)soap\n+00167bd0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->user; // get buffer \n+00167c50: 7468 726f 7567 6820 6861 6e64 6c65 203c through handle <\n+00167c60: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00167c80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int m = h->\n+00167cb0: 6d61 782c 206b 203d 2068 2d26 6774 3b6c max, k = h->l\n+00167cc0: 656e 202b 206e 3b20 3c2f 6469 763e 0a3c en + n;
    .<\n+00167cd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167ce0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // need\n+00167d00: 2074 6f20 696e 6372 6561 7365 2073 7061 to increase spa\n+00167d10: 6365 3f20 3c2f 7370 616e 3e3c 2f64 6976 ce? .
    if (m == 0\n+00167d40: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    m\n+00167d60: 203d 2031 3032 343b 203c 2f64 6976 3e0a = 1024;
    .\n+00167d70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n+00167da0: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
    \n+00167db0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    while (k\n+00167df0: 2026 6774 3b3d 206d 2920 3c2f 6469 763e >= m)
    \n+00167e00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    m *= 2;\n+00167e20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if \n+00167e60: 286d 2021 3d20 682d 2667 743b 6d61 7829 (m != h->max)\n+00167e70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    char \n+00167ed0: 2a62 7566 203d 206d 616c 6c6f 6328 6d29 *buf = malloc(m)\n+00167ee0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    m\n+00167f00: 656d 6370 7928 6275 662c 2068 2d26 6774 emcpy(buf, h->\n+00167f10: 3b62 7566 2c20 682d 2667 743b 6c65 6e29 ;buf, h->len)\n+00167f20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    h\n+00167f40: 2d26 6774 3b6d 6178 203d 206d 3b20 3c2f ->max = m; .
    if (\n+00167f90: 682d 2667 743b 6275 6629 203c 2f64 6976 h->buf) .
    free(h\n+00167fc0: 2d26 6774 3b62 7566 293b 203c 2f64 6976 ->buf); .
    h->bu\n+00167ff0: 6620 3d20 6275 663b 203c 2f64 6976 3e0a f = buf;
    .\n+00168000: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n+00168030: 206d 656d 6370 7928 682d 2667 743b 6275 memcpy(h->bu\n+00168040: 6620 2b20 682d 2667 743b 6c65 6e2c 2073 f + h->len, s\n+00168050: 2c20 6e29 3b20 3c2f 6469 763e 0a3c 6469 , n);
    . \n+00168070: 2068 2d26 6774 3b6c 656e 202b 3d20 6e3b h->len += n;\n+00168080: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..}<\n+00168140: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+00168160: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex\n+00168170: 616d 706c 6520 696c 6c75 7374 7261 7465 ample illustrate\n+00168180: 7320 6375 7374 6f6d 697a 6564 2049 2f4f s customized I/O\n+00168190: 2061 6e64 2048 5454 5020 6865 6164 6572 and HTTP header\n+001681a0: 2068 616e 646c 696e 672e 2054 6865 2058 handling. The X\n+001681b0: 4d4c 206d 6573 7361 6765 2069 7320 7361 ML message is sa\n+001681c0: 7665 6420 746f 2061 2066 696c 6520 746f ved to a file to\n+001681d0: 2064 656d 6f6e 7374 7261 7465 2049 2f4f demonstrate I/O\n+001681e0: 2061 6e64 2048 5454 5020 6361 6c6c 6261 and HTTP callba\n+001681f0: 636b 732e 2054 6865 2063 6c69 656e 7420 cks. The client \n+00168200: 7072 6f78 7920 7468 656e 2072 6561 6473 proxy then reads\n+00168210: 2074 6865 2066 696c 6520 636f 6e74 656e the file conten\n+00168220: 7473 2061 7320 7468 6520 7365 7276 6963 ts as the servic\n+00168230: 6520 7265 7370 6f6e 7365 2e20 546f 2070 e response. To p\n+00168240: 6572 666f 726d 2074 6869 7320 7472 6963 erform this tric\n+00168250: 6b2c 2074 6865 2073 6572 7669 6365 2072 k, the service r\n+00168260: 6573 706f 6e73 6520 6861 7320 6578 6163 esponse has exac\n+00168270: 746c 7920 7468 6520 7361 6d65 2073 7472 tly the same str\n+00168280: 7563 7475 7265 2061 7320 7468 6520 7265 ucture as the re\n+00168290: 7175 6573 742e 2054 6869 7320 6973 2064 quest. This is d\n+001682a0: 6563 6c61 7265 6420 6279 2074 6865 203c eclared by the <\n+001682b0: 636f 6465 3e73 7472 7563 7420 6e73 5f5f code>struct ns__\n+001682c0: 7465 7374 3c2f 636f 6465 3e20 6f75 7470 test outp\n+001682d0: 7574 2070 6172 616d 6574 6572 2070 6172 ut parameter par\n+001682e0: 7420 6f66 2074 6865 2073 6572 7669 6365 t of the service\n+001682f0: 206f 7065 7261 7469 6f6e 2064 6563 6c61 operation decla\n+00168300: 7261 7469 6f6e 2e20 5468 6973 2073 7472 ration. This str\n+00168310: 7563 7420 7265 7365 6d62 6c65 7320 7468 uct resembles th\n+00168320: 6520 7365 7276 6963 6520 7265 7175 6573 e service reques\n+00168330: 7420 2873 6565 2074 6865 2067 656e 6572 t (see the gener\n+00168340: 6174 6564 203c 656d 3e3c 636f 6465 3e73 ated s\n+00168350: 6f61 7053 7475 622e 683c 2f63 6f64 653e oapStub.h\n+00168360: 3c2f 656d 3e20 6669 6c65 2067 656e 6572 file gener\n+00168370: 6174 6564 2062 7920 736f 6170 6370 7032 ated by soapcpp2\n+00168380: 2066 726f 6d20 7468 6520 696e 7465 7266 from the interf\n 00168390: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-001683a0: 666f 7220 736f 6170 6370 7032 2069 733a for soapcpp2 is:\n-001683b0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns se\n-00168400: 7276 6963 6520 6e61 6d65 3a20 6361 6c6c rvice name: call\n-00168410: 6261 636b 203c 2f73 7061 6e3e 3c2f 6469 back .
    //gso\n-00168450: 6170 206e 7320 7365 7276 6963 6520 6e61 ap ns service na\n-00168460: 6d65 7370 6163 653a 2075 726e 3a63 616c mespace: urn:cal\n-00168470: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
    stru\n-001684b0: 6374 203c 2f73 7061 6e3e 6e73 5f5f 7065 ct ns__pe\n-001684c0: 7273 6f6e 203c 2f64 6976 3e0a 3c64 6976 rson
    .{<\n-001684e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *name;
    .\n-00168530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00168560: 696e 743c 2f73 7061 6e3e 2061 6765 3b20 int age; \n-00168570: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }; .
    i\n-001685c0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 7465 nt ns__te\n-001685d0: 7374 283c 7370 616e 2063 6c61 7373 3d22 st(struct<\n-001685f0: 2f73 7061 6e3e 206e 735f 5f70 6572 736f /span> ns__perso\n-00168600: 6e20 696e 2c20 3c73 7061 6e20 636c 6173 n in, stru\n-00168620: 6374 3c2f 7370 616e 3e20 6e73 5f5f 7465 ct ns__te\n-00168630: 7374 2026 616d 703b 6f75 7429 3b3c 2f64 st &out);.

    Th\n-00168660: 6520 636c 6965 6e74 2070 726f 6772 616d e client program\n-00168670: 2069 733a 3c2f 703e 0a3c 6469 7620 636c is:

    .
    <\n-00168690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001686a0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n-001686c0: 6c75 6465 2026 7175 6f74 3b73 6f61 7048 lude "soapH\n-001686d0: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" \n-001686e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu\n-00168720: 6f74 3b6e 732e 6e73 6d61 7026 7175 6f74 ot;ns.nsmap"\n-00168730: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    .\n-00168740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    SO\n-001687c0: 4150 5f53 4f43 4b45 543c 2f61 3e20 6d79 AP_SOCKET my\n-001687d0: 6f70 656e 283c 7370 616e 2063 6c61 7373 open(struc\n-001687f0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-00168820: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *endpoint, <\n-001688b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001688c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001688f0: 3c2f 7370 616e 3e20 2a68 6f73 742c 203c *host, <\n-00168900: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00168910: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int port)
    \n-00168930: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00168960: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00168970: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (strncmp(endp\n-00168990: 6f69 6e74 2c20 3c73 7061 6e20 636c 6173 oint, "file:&qu\n-001689c0: 6f74 3b3c 2f73 7061 6e3e 2c20 3529 2920 ot;, 5)) \n-001689d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    printf(\n-00168a10: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00168a30: 743b 4669 6c65 206e 616d 6520 6578 7065 t;File name expe\n-00168a40: 6374 6564 5c6e 2671 756f 743b 3c2f 7370 cted\\n");
    . \n-00168a70: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n-00168a90: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn SOA\n-00168af0: 505f 494e 5641 4c49 445f 534f 434b 4554 P_INVALID_SOCKET\n-00168b00: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n-00168b20: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    if ((soap<\n-00168b90: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->sendfd = soap-&g\n-00168c20: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;recvf\n-00168c70: 643c 2f61 3e20 3d20 6f70 656e 2868 6f73 d = open(hos\n-00168c80: 742c 204f 5f52 4457 527c 4f5f 4352 4541 t, O_RDWR|O_CREA\n-00168c90: 542c 2053 5f49 5755 5352 7c53 5f49 5255 T, S_IWUSR|S_IRU\n-00168ca0: 5352 2929 2026 6c74 3b20 3029 203c 2f64 SR)) < 0) .
    return SOAP_INVALID\n-00168d50: 5f53 4f43 4b45 543c 2f61 3e3b 203c 2f64 _SOCKET; .
    return \n-00168da0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-00168dd0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >sen\n-00168e20: 6466 643c 2f61 3e3b 203c 2f64 6976 3e0a dfd;
    .\n-00168e30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    void myc\n-00168ea0: 6c6f 7365 283c 7370 616e 2063 6c61 7373 lose(struc\n-00168ec0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-00168ef0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap) .
    {
    . \n-00168f60: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap\n-00168fb0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->sendfd >\n-00169010: 3b20 3229 2020 3c73 7061 6e20 636c 6173 ; 2) // s\n-00169030: 7469 6c6c 206f 7065 6e3f 203c 2f73 7061 till open?
    .
    c\n-00169060: 6c6f 7365 283c 6120 636c 6173 733d 2263 lose(soap\n-00169090: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->sendfd); <\n-001690f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00169100: 656e 7422 3e2f 2f20 7468 656e 2063 6c6f ent\">// then clo\n-00169110: 7365 2069 7420 3c2f 7370 616e 3e3c 2f64 se it .
    s\n-00169160: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->recvfd \n-001691c0: 3d20 303b 2020 2020 2020 3c73 7061 6e20 = 0; \n-001691e0: 2f2f 2073 6574 2062 6163 6b20 746f 2073 // set back to s\n-001691f0: 7464 696e 203c 2f73 7061 6e3e 3c2f 6469 tdin .
    so\n-00169240: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->sendfd =\n-001692a0: 2031 3b20 2020 2020 203c 7370 616e 2063 1; /\n-001692c0: 2f20 7365 7420 6261 636b 2074 6f20 7374 / set back to st\n-001692d0: 646f 7574 203c 2f73 7061 6e3e 3c2f 6469 dout .
    }
    .\n-00169310: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n-00169350: 7970 6f73 7428 3c73 7061 6e20 636c 6173 ypost(stru\n-00169370: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, const <\n-00169400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00169410: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *endpoint, \n-00169430: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00169470: 723c 2f73 7061 6e3e 202a 686f 7374 2c20 r *host, \n-00169480: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001694c0: 723c 2f73 7061 6e3e 202a 7061 7468 2c20 r *path, \n-001694d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00169510: 723c 2f73 7061 6e3e 202a 6163 7469 6f6e r *action\n-00169520: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , ULONG64 \n-00169580: 636f 756e 7429 203c 2f64 6976 3e0a 3c64 count)
    .\n-001695a0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..}\n-00169710: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    char buf[256]; ...\n-00169ad0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-00169b00: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-00169b60: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .<\n-00169b90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00169ba0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-00169be0: 6d61 696e 2829 203c 2f64 6976 3e0a 3c64 main()
    .\n-00169c00: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-00169c40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00169c70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n-00169ca0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct \n-00169ce0: 6e73 5f5f 7465 7374 2072 3b20 3c2f 6469 ns__test r; .
    str\n-00169d20: 7563 7420 3c2f 7370 616e 3e6e 735f 5f70 uct ns__p\n-00169d30: 6572 736f 6e20 703b 203c 2f64 6976 3e0a erson p;
    .\n-00169d40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_in\n-00169db0: 6974 3c2f 613e 2826 616d 703b 3c61 2063 it(&soap);.
    p.name =\n-00169e10: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00169e30: 6f74 3b4a 6f68 6e20 446f 6526 7175 6f74 ot;John Doe"\n-00169e40: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n-00169e50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    p.age = 99;\n-00169e70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap.fopen = m\n-00169f20: 796f 7065 6e3b 2020 203c 7370 616e 2063 yopen; /\n-00169f40: 2f20 7573 6520 6375 7374 6f6d 206f 7065 / use custom ope\n-00169f50: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n-00169f60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap<\n-00169fa0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.fpost\n-0016a000: 3c2f 613e 203d 206d 7970 6f73 743b 2020 = mypost; \n-0016a010: 203c 7370 616e 2063 6c61 7373 3d22 636f // use cu\n-0016a030: 7374 6f6d 2070 6f73 7420 3c2f 7370 616e stom post
    .
    soap.fparse = \n-0016a0f0: 6d79 7061 7273 653b 203c 7370 616e 2063 myparse; /\n-0016a110: 2f20 7573 6520 6375 7374 6f6d 2072 6573 / use custom res\n-0016a120: 706f 6e73 6520 7061 7273 6572 203c 2f73 ponse parser
    .
    <\n-0016a150: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016a160: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016a170: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-0016a180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016a190: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0016a1a0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-0016a1b0: 6c23 6761 6239 3539 3164 6438 3064 6262 l#gab9591dd80dbb\n-0016a1c0: 3065 3537 3137 3834 6261 6435 3432 3162 0e571784bad5421b\n-0016a1d0: 3232 3032 223e 6663 6c6f 7365 3c2f 613e 2202\">fclose\n-0016a1e0: 203d 206d 7963 6c6f 7365 3b20 3c73 7061 = myclose; // use custom \n-0016a210: 636c 6f73 6520 3c2f 7370 616e 3e3c 2f64 close .
    soap_cal\n-0016a240: 6c5f 6e73 5f5f 7465 7374 2826 616d 703b l_ns__test(&\n-0016a250: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0016a280: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0016a2a0: 6f74 3b66 696c 653a 2f2f 7465 7374 2e78 ot;file://test.x\n-0016a2b0: 6d6c 2671 756f 743b 3c2f 7370 616e 3e2c ml",\n-0016a2c0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0016a2e0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;"\n-0016a2f0: 2c20 702c 2072 293b 203c 2f64 6976 3e0a , p, r);
    .\n-0016a300: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-0016a330: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (\n-0016a360: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.error) .
    {
    .\n-0016a3e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr\n-0016a450: 696e 745f 6661 756c 743c 2f61 3e28 2661 int_fault(&a\n-0016a460: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, stdout); .
    exit(E\n-0016a4c0: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .\n-0016a710: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    \n-0016a7e0: 736f 6170 3a3a 6670 6f73 743c 2f61 3e3c soap::fpost<\n-0016a7f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int(* f\n-0016a810: 706f 7374 2928 7374 7275 6374 2073 6f61 post)(struct soa\n-0016a820: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n-0016a830: 6861 7220 2a65 6e64 706f 696e 742c 2063 har *endpoint, c\n-0016a840: 6f6e 7374 2063 6861 7220 2a68 6f73 742c onst char *host,\n-0016a850: 2069 6e74 2070 6f72 742c 2063 6f6e 7374 int port, const\n-0016a860: 2063 6861 7220 2a70 6174 682c 2063 6f6e char *path, con\n-0016a870: 7374 2063 6861 7220 2a61 6374 696f 6e2c st char *action,\n-0016a880: 2055 4c4f 4e47 3634 2063 6f75 6e74 293c ULONG64 count)<\n-0016a890: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback\n-0016a8b0: 2074 6861 7420 706f 7075 6c61 7465 7320 that populates \n-0016a8c0: 616e 6420 7468 656e 2073 656e 6473 2048 and then sends H\n-0016a8d0: 5454 5020 6865 6164 6572 7320 6672 6f6d TTP headers from\n-0016a8e0: 2074 6865 2063 6c69 656e 742d 7369 6465 the client-side\n-0016a8f0: 2074 6f20 6120 636f 6e6e 6563 7465 6420 to a connected \n-0016a900: 4854 5450 2073 6572 7665 722e 3c2f 6469 HTTP server.
    Definiti\n-0016a930: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0016a940: 2e68 3a34 3232 303c 2f64 6976 3e3c 2f64 .h:4220
    .
    <\n-0016a9c0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-0016a9d0: 726f 7570 5f5f 6361 6c6c 6261 636b 732e roup__callbacks.\n-0016a9e0: 6874 6d6c 2367 6139 6362 3035 6365 3938 html#ga9cb05ce98\n-0016a9f0: 6638 3435 6631 3663 3932 3063 3434 3432 f845f16c920c4442\n-0016aa00: 3661 6333 3561 3522 3e73 6f61 703a 3a66 6ac35a5\">soap::f\n-0016aa10: 7061 7273 653c 2f61 3e3c 2f64 6976 3e3c parse
    <\n-0016aa20: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0016aa30: 6922 3e69 6e74 282a 2066 7061 7273 6529 i\">int(* fparse)\n-0016aa40: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0016aa50: 6170 293c 2f64 6976 3e3c 6469 7620 636c ap)
    Call\n-0016aa70: 6261 636b 2074 6861 7420 7265 6164 7320 back that reads \n-0016aa80: 616e 6420 7061 7273 6573 2048 5454 5020 and parses HTTP \n-0016aa90: 616e 6420 4d49 4d45 2068 6561 6465 7273 and MIME headers\n-0016aaa0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-0016aac0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-0016aad0: 736f 6170 322e 683a 3432 3530 3c2f 6469 soap2.h:4250
    .
    \n-0016ab90: 736f 6170 5f67 6574 6c69 6e65 3c2f 613e soap_getline\n-0016aba0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so\n-0016abc0: 6170 5f67 6574 6c69 6e65 2873 7472 7563 ap_getline(struc\n-0016abd0: 7420 736f 6170 202a 736f 6170 2c20 6368 t soap *soap, ch\n-0016abe0: 6172 202a 6275 662c 2069 6e74 206c 656e ar *buf, int len\n-0016abf0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Get a \n-0016ac10: 6865 6164 6572 206c 696e 652e 3c2f 6469 header line.
    .
    <\n-0016ac30: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-0016ac40: 3c70 3e53 4f41 5020 312e 312f 312e 3220

    SOAP 1.1/1.2 \n-0016ac50: 5250 4320 656e 636f 6469 6e67 2073 7065 RPC encoding spe\n-0016ac60: 6369 6669 6573 2074 6861 7420 534f 4150 cifies that SOAP\n-0016ac70: 2f58 4d4c 2065 6c65 6d65 6e74 7320 6d61 /XML elements ma\n-0016ac80: 7920 6265 2069 676e 6f72 6564 2077 6865 y be ignored whe\n-0016ac90: 6e20 7072 6573 656e 7420 696e 2061 2053 n present in a S\n-0016aca0: 4f41 5020 7061 796c 6f61 6420 6f6e 2074 OAP payload on t\n-0016acb0: 6865 2072 6563 6569 7669 6e67 2073 6964 he receiving sid\n-0016acc0: 652e 2048 6f77 6576 6572 2c20 646f 6375 e. However, docu\n-0016acd0: 6d65 6e74 2f6c 6974 6572 616c 2073 7479 ment/literal sty\n-0016ace0: 6c65 206d 6573 7361 6769 6e67 2076 616c le messaging val\n-0016acf0: 6964 6174 6573 2058 4d4c 206d 6573 7361 idates XML messa\n-0016ad00: 6765 7320 616e 6420 6578 7472 6120 656c ges and extra el\n-0016ad10: 656d 656e 7473 2063 616e 6e6f 7420 6a75 ements cannot ju\n-0016ad20: 7374 2062 6520 6967 6e6f 7265 6420 6173 st be ignored as\n-0016ad30: 2073 7563 682e 2057 6974 6820 534f 4150 such. With SOAP\n-0016ad40: 2064 6f63 756d 656e 742f 6c69 7465 7261 document/litera\n-0016ad50: 6c20 7374 796c 6520 6974 2069 7320 7265 l style it is re\n-0016ad60: 636f 6d6d 656e 6465 6420 746f 2065 6e61 commended to ena\n-0016ad70: 626c 6520 7468 6520 3c63 6f64 653e 2353 ble the #S\n-0016ad80: 4f41 505f 584d 4c5f 5354 5249 4354 3c2f OAP_XML_STRICT mode flag.\n-0016ada0: 2057 6974 6820 534f 4150 2052 5043 2065 With SOAP RPC e\n-0016adb0: 6e63 6f64 696e 672c 2074 6865 2065 6e67 ncoding, the eng\n-0016adc0: 696e 6520 6967 6e6f 7265 7320 584d 4c20 ine ignores XML \n-0016add0: 656c 656d 656e 7473 2074 6861 7420 6172 elements that ar\n-0016ade0: 6520 756e 6b6e 6f77 6e20 6279 2064 6566 e unknown by def\n-0016adf0: 6175 6c74 2c20 756e 6c65 7373 2074 6865 ault, unless the\n-0016ae00: 2058 4d4c 2061 7474 7269 6275 7465 203c XML attribute <\n-0016ae10: 656d 3e3c 636f 6465 3e6d 7573 7455 6e64 em>mustUnd\n-0016ae20: 6572 7374 616e 643d 2274 7275 6522 3c2f erstand=\"true\" is pr\n-0016ae40: 6573 656e 7420 696e 2074 6865 2058 4d4c esent in the XML\n-0016ae50: 2065 6c65 6d65 6e74 2e20 4974 206d 6179 element. It may\n-0016ae60: 2062 6520 756e 6465 7369 7261 626c 6520 be undesirable \n-0016ae70: 666f 7220 656c 656d 656e 7473 2074 6f20 for elements to \n-0016ae80: 6265 2069 676e 6f72 6564 2077 6865 6e20 be ignored when \n-0016ae90: 7468 6520 6f75 7463 6f6d 6520 6f66 2074 the outcome of t\n-0016aea0: 6865 206f 6d69 7373 696f 6e20 6973 2075 he omission is u\n-0016aeb0: 6e63 6572 7461 696e 2e20 5468 6520 3c63 ncertain. The soap::\n-0016af90: 6669 676e 6f72 653c 2f61 3e3c 2f63 6f64 fignore callback can \n-0016afb0: 6265 2073 6574 2074 6f20 6120 6675 6e63 be set to a func\n-0016afc0: 7469 6f6e 2074 6861 7420 7265 7475 726e tion that return\n-0016afd0: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-0016afe0: 3c2f 636f 6465 3e20 696e 2063 6173 6520 in case \n-0016aff0: 7468 6520 656c 656d 656e 7420 6361 6e20 the element can \n-0016b000: 6265 2073 6166 656c 7920 6967 6e6f 7265 be safely ignore\n-0016b010: 642c 206f 7220 3c63 6f64 653e 2353 4f41 d, or #SOA\n-0016b020: 505f 4d55 5354 554e 4445 5253 5441 4e44 P_MUSTUNDERSTAND\n-0016b030: 3c2f 636f 6465 3e20 746f 2074 6872 6f77 to throw\n-0016b040: 2061 6e20 6578 6365 7074 696f 6e2c 206f an exception, o\n-0016b050: 7220 746f 2070 6572 666f 726d 2073 6f6d r to perform som\n-0016b060: 6520 6170 706c 6963 6174 696f 6e2d 7370 e application-sp\n-0016b070: 6563 6966 6963 2061 6374 696f 6e2e 2046 ecific action. F\n-0016b080: 6f72 2065 7861 6d70 6c65 2c20 746f 2074 or example, to t\n-0016b090: 6872 6f77 2061 6e20 6578 6365 7074 696f hrow an exceptio\n-0016b0a0: 6e20 6173 2073 6f6f 6e20 6173 2061 6e20 n as soon as an \n-0016b0b0: 756e 6b6e 6f77 6e20 656c 656d 656e 7420 unknown element \n-0016b0c0: 6973 2065 6e63 6f75 6e74 6572 6564 206f is encountered o\n-0016b0d0: 6e20 7468 6520 696e 7075 742c 2075 7365 n the input, use\n-0016b0e0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int main()
    .\n-0016b140: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    ..\n-0016b260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-0016b330: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n-0016b350: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n-0016b360: 6d65 7468 6f64 2873 6f61 702c 202e 2e2e method(soap, ...\n-0016b370: 2920 6f72 2073 6f61 705f 7365 7276 6528 ) or soap_serve(\n-0016b380: 736f 6170 2920 3c2f 7370 616e 3e3c 2f64 soap) .
    }
    .\n-0016b3c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n-0016b400: 7969 676e 6f72 6528 3c73 7061 6e20 636c yignore(st\n-0016b420: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const\n-0016b4b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0016b4d0: 2f73 7061 6e3e 202a 7461 6729 203c 2f64 /span> *tag) .
    {
    .\n-0016b510: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-0016b530: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-0016b590: 4150 5f4d 5553 5455 4e44 4552 5354 414e AP_MUSTUNDERSTAN\n-0016b5a0: 443c 2f61 3e3b 203c 7370 616e 2063 6c61 D; // \n-0016b5c0: 6e65 7665 7220 736b 6970 2065 6c65 6d65 never skip eleme\n-0016b5d0: 6e74 7320 2873 6563 7572 6529 203c 2f73 nts (secure)
    .
    } <\n-0016b600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap:\n-0016b6c0: 3a66 6967 6e6f 7265 3c2f 613e 3c2f 6469 :fignore
    int(* fign\n-0016b6f0: 6f72 6529 2873 7472 7563 7420 736f 6170 ore)(struct soap\n-0016b700: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-0016b710: 6172 202a 7461 6729 3c2f 6469 763e 3c64 ar *tag)
    Callback to cat\n-0016b740: 6368 2075 6e72 6563 6f67 6e69 7a65 6420 ch unrecognized \n-0016b750: 584d 4c20 656c 656d 656e 7473 2061 6e64 XML elements and\n-0016b760: 206f 7665 7272 6964 6573 2023 534f 4150 overrides #SOAP\n-0016b770: 5f58 4d4c 5f53 5452 4943 5420 7661 6c69 _XML_STRICT vali\n-0016b780: 6461 7469 6f6e 2065 7272 6f72 7320 666f dation errors fo\n-0016b790: 7220 7468 6573 2e2e 2e3c 2f64 6976 3e3c r thes...
    <\n-0016b7a0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-0016b7b0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-0016b7c0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-0016b7d0: 3434 3433 3c2f 6469 763e 3c2f 6469 763e 4443
    \n-0016b7e0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    #define SOAP_MU\n-0016b8d0: 5354 554e 4445 5253 5441 4e44 3c2f 6469 STUNDERSTAND
    A soap_stat\n-0016b900: 7573 2065 7272 6f72 2063 6f64 653a 2061 us error code: a\n-0016b910: 6e20 584d 4c20 656c 656d 656e 7420 6973 n XML element is\n-0016b920: 2070 7265 7365 6e74 2077 6974 6820 6120 present with a \n-0016b930: 6d75 7374 556e 6465 7273 7461 6e64 2061 mustUnderstand a\n-0016b940: 7474 7269 6275 7465 2077 6869 6368 206d ttribute which m\n-0016b950: 7573 7420 6265 2075 6e64 2e2e 2e3c 2f64 ust be und...
    Definit\n-0016b980: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0016b990: 322e 683a 3234 3930 3c2f 6469 763e 3c2f 2.h:2490
    .

    T\n-0016b9c0: 6f20 7365 6c65 6374 6976 656c 7920 7468 o selectively th\n-0016b9d0: 726f 7720 616e 2065 7863 6570 7469 6f6e row an exception\n-0016b9e0: 2077 6865 6e20 3c65 6d3e 3c63 6f64 653e when \n-0016b9f0: 6d75 7374 556e 6465 7273 7461 6e64 3d22 mustUnderstand=\"\n-0016ba00: 7472 7565 223c 2f63 6f64 653e 3c2f 656d true\" SOAP Header el\n-0016ba20: 656d 656e 7420 6973 2065 6e63 6f75 6e74 ement is encount\n-0016ba30: 6572 6564 206f 7220 7768 656e 2061 6e20 ered or when an \n-0016ba40: 756e 6b6e 6f77 6e20 656c 656d 656e 7420 unknown element \n-0016ba50: 6973 2065 6e63 6f75 6e74 6572 6564 2065 is encountered e\n-0016ba60: 7863 6570 7420 666f 7220 656c 656d 656e xcept for elemen\n-0016ba70: 7420 3c65 6d3e 3c63 6f64 653e 6e73 3a78 t ns:x\n-0016ba80: 797a 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 yz, \n-0016ba90: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    <\n-0016bab0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016bac0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main().
    {
    . \n-0016bb20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap\n-0016bb70: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-0016bba0: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n-0016bc00: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    so\n-0016bc50: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fignore = \n-0016bcc0: 6967 6e6f 7265 3b20 3c2f 6469 763e 0a3c ignore;
    .<\n-0016bcd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016bce0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-0016bd00: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we\n-0016bd10: 626d 6574 686f 6428 736f 6170 2c20 2e2e bmethod(soap, ..\n-0016bd20: 2e29 206f 7220 736f 6170 5f73 6572 7665 .) or soap_serve\n-0016bd30: 2873 6f61 7029 203c 2f73 7061 6e3e 3c2f (soap) .
    }
    .<\n-0016bd60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016bd70: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-0016bdb0: 6967 6e6f 7265 283c 7370 616e 2063 6c61 ignore(str\n-0016bdd0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, const \n-0016be60: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tag) .
    {
    . \n-0016bec0: 203c 7370 616e 2063 6c61 7373 3d22 636f // do not\n-0016bee0: 2069 676e 6f72 6520 6d75 7374 556e 6465 ignore mustUnde\n-0016bef0: 7273 7461 6e64 3d26 7175 6f74 3b74 7275 rstand="tru\n-0016bf00: 6526 7175 6f74 3b20 3c2f 7370 616e 3e3c e" <\n-0016bf10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (!\n-0016bf50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-0016bf80: 2667 743b 3c61 2063 6c61 7373 3d22 636f >mus\n-0016bfd0: 7455 6e64 6572 7374 616e 643c 2f61 3e29 tUnderstand)\n-0016bfe0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    /\n-0016c030: 2f20 7461 6773 2026 6c74 3b6e 733a 736f / tags <ns:so\n-0016c040: 6d65 456c 656d 656e 7426 6774 3b20 6361 meElement> ca\n-0016c050: 6e20 6265 2073 6166 656c 7920 6967 6e6f n be safely igno\n-0016c060: 7265 643c 2f73 7061 6e3e 3c2f 6469 763e red
    \n-0016c070: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (so\n-0016c100: 6170 5f6d 6174 6368 5f74 6167 3c2f 613e ap_match_tag\n-0016c110: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0016c140: 2c20 7461 672c 203c 7370 616e 2063 6c61 , tag, "ns:some\n-0016c170: 456c 656d 656e 7426 7175 6f74 3b3c 2f73 Element") == SOA\n-0016c1e0: 505f 4f4b 3c2f 613e 293c 2f64 6976 3e0a P_OK)
    .\n-0016c1f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    return \n-0016c230: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n-0016c290: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    return <\n-0016c2f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016c300: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0016c310: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-0016c320: 6136 6536 3834 3966 3532 6533 3634 3166 a6e6849f52e3641f\n-0016c330: 6662 6134 3433 6466 3636 3864 3535 3136 fba443df668d5516\n-0016c340: 3822 3e53 4f41 505f 4d55 5354 554e 4445 8\">SOAP_MUSTUNDE\n-0016c350: 5253 5441 4e44 3c2f 613e 3b20 3c2f 6469 RSTAND; .
    }
    . \n-0016c390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n-0016c3c0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct Namesp\n-0016c400: 6163 653c 2f61 3e20 3c61 2063 6c61 7373 ace n\n-0016c460: 616d 6573 7061 6365 733c 2f61 3e5b 5d20 amespaces[] \n-0016c470: 3d20 3c2f 6469 763e 0a3c 6469 7620 636c =
    .
    {.
    { "SOAP-\n-0016c4d0: 454e 5626 7175 6f74 3b3c 2f73 7061 6e3e ENV"\n-0016c4e0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0016c500: 756f 743b 6874 7470 3a2f 2f73 6368 656d uot;http://schem\n-0016c510: 6173 2e78 6d6c 736f 6170 2e6f 7267 2f73 as.xmlsoap.org/s\n-0016c520: 6f61 702f 656e 7665 6c6f 7065 2f26 7175 oap/envelope/&qu\n-0016c530: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c2f ot; }, .
    { "SOA\n-0016c580: 502d 454e 4326 7175 6f74 3b3c 2f73 7061 P-ENC", \n-0016c5b0: 2671 756f 743b 6874 7470 3a2f 2f73 6368 "http://sch\n-0016c5c0: 656d 6173 2e78 6d6c 736f 6170 2e6f 7267 emas.xmlsoap.org\n-0016c5d0: 2f73 6f61 702f 656e 636f 6469 6e67 2f26 /soap/encoding/&\n-0016c5e0: 7175 6f74 3b3c 2f73 7061 6e3e 207d 2c20 quot; }, \n-0016c5f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "x\n-0016c630: 7369 2671 756f 743b 3c2f 7370 616e 3e2c si",\n-0016c640: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w\n-0016c670: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X\n-0016c680: 4d4c 5363 6865 6d61 2d69 6e73 7461 6e63 MLSchema-instanc\n-0016c690: 6526 7175 6f74 3b3c 2f73 7061 6e3e 207d e" }\n-0016c6a0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    { <\n-0016c6c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0016c6d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0016c6e0: 3b78 7364 2671 756f 743b 3c2f 7370 616e ;xsd", "http:/\n-0016c720: 2f77 7777 2e77 332e 6f72 672f 3230 3031 /www.w3.org/2001\n-0016c730: 2f58 4d4c 5363 6865 6d61 2671 756f 743b /XMLSchema"\n-0016c740: 3c2f 7370 616e 3e20 7d2c 203c 2f64 6976 }, .
    { "ns&quo\n-0016c790: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n-0016c7a0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0016c7c0: 6f74 3b73 6f6d 652d 5552 4926 7175 6f74 ot;some-URI"\n-0016c7d0: 3b3c 2f73 7061 6e3e 7d2c 203c 7370 616e ;}, // binds "\n-0016c800: 6e73 2671 756f 743b 206e 616d 6573 7061 ns" namespa\n-0016c810: 6365 2070 7265 6669 7820 746f 2073 6368 ce prefix to sch\n-0016c820: 656d 6120 5552 493c 2f73 7061 6e3e 3c2f ema URI.
    { NULL,\n-0016c850: 204e 554c 4c7d 203c 2f64 6976 3e0a 3c64 NULL}
    ..

    T\n+001683b0: 6865 2069 6e74 6572 6661 6365 2068 6561 he interface hea\n+001683c0: 6465 7220 6669 6c65 2066 6f72 2073 6f61 der file for soa\n+001683d0: 7063 7070 3220 6973 3a3c 2f70 3e0a 3c64 pcpp2 is:

    .
    //gs\n+00168420: 6f61 7020 6e73 2073 6572 7669 6365 206e oap ns service n\n+00168430: 616d 653a 2063 616c 6c62 6163 6b20 3c2f ame: callback
    .//gsoap ns s\n+00168480: 6572 7669 6365 206e 616d 6573 7061 6365 ervice namespace\n+00168490: 3a20 7572 6e3a 6361 6c6c 6261 636b 203c : urn:callback <\n+001684a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001684c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001684d0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__person .
    {
    .<\n+00168510: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00168520: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n+00168540: 6861 723c 2f73 7061 6e3e 202a 6e61 6d65 har *name\n+00168550: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+00168570: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00168580: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int age;
    .\n+001685a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .int ns__test(struct \n+00168620: 6e73 5f5f 7065 7273 6f6e 2069 6e2c 203c ns__person in, <\n+00168630: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00168640: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct ns__test &\n+00168660: 3b6f 7574 293b 3c2f 6469 763e 0a3c 2f64 ;out);
    .

    The clien\n+00168690: 7420 7072 6f67 7261 6d20 6973 3a3c 2f70 t program is:.

    #include &q\n+001686f0: 756f 743b 736f 6170 482e 6826 7175 6f74 uot;soapH.h"\n+00168700: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    .\n+00168710: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n+00168740: 636c 7564 6520 2671 756f 743b 6e73 2e6e clude "ns.n\n+00168750: 736d 6170 2671 756f 743b 3c2f 7370 616e smap"
    .
    ..
    {.
    if (str\n+001689b0: 6e63 6d70 2865 6e64 706f 696e 742c 203c ncmp(endpoint, <\n+001689c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001689d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001689e0: 3b66 696c 653a 2671 756f 743b 3c2f 7370 ;file:", 5))
    .\n+00168a00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+00168a30: 2020 7072 696e 7466 283c 7370 616e 2063 printf("File \n+00168a60: 6e61 6d65 2065 7870 6563 7465 645c 6e26 name expected\\n&\n+00168a70: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); <\n+00168a80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_INVAL\n+00168b20: 4944 5f53 4f43 4b45 543c 2f61 3e3b 203c ID_SOCKET; <\n+00168b30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    if ((soap->\n+00168bc0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;sendfd\n+00168c10: 3c2f 613e 203d 203c 6120 636c 6173 733d = so\n+00168c40: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->recvfd =\n+00168ca0: 206f 7065 6e28 686f 7374 2c20 4f5f 5244 open(host, O_RD\n+00168cb0: 5752 7c4f 5f43 5245 4154 2c20 535f 4957 WR|O_CREAT, S_IW\n+00168cc0: 5553 527c 535f 4952 5553 5229 2920 266c USR|S_IRUSR)) &l\n+00168cd0: 743b 2030 2920 3c2f 6469 763e 0a3c 6469 t; 0)
    . \n+00168cf0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n+00168d10: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn SOA\n+00168d70: 505f 494e 5641 4c49 445f 534f 434b 4554 P_INVALID_SOCKET\n+00168d80: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n+00168da0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00168dc0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n \n+00168df0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->sendfd\n+00168e50: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    .\n+00168ea0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void myclose(struct soap *soap)
    .
    {.
    if (soap-&g\n+00168fe0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;sendf\n+00169030: 643c 2f61 3e20 2667 743b 2032 2920 203c d > 2) <\n+00169040: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00169050: 656e 7422 3e2f 2f20 7374 696c 6c20 6f70 ent\">// still op\n+00169060: 656e 3f20 3c2f 7370 616e 3e3c 2f64 6976 en? .
    close(soap-&g\n+001690c0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;sendf\n+00169110: 643c 2f61 3e29 3b20 3c73 7061 6e20 636c d); //\n+00169130: 2074 6865 6e20 636c 6f73 6520 6974 203c then close it <\n+00169140: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00169160: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00169190: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->re\n+001691e0: 6376 6664 3c2f 613e 203d 2030 3b20 2020 cvfd = 0; \n+001691f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // set \n+00169210: 6261 636b 2074 6f20 7374 6469 6e20 3c2f back to stdin
    . \n+00169240: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00169270: 2667 743b 3c61 2063 6c61 7373 3d22 636f >sen\n+001692c0: 6466 643c 2f61 3e20 3d20 313b 2020 2020 dfd = 1; \n+001692d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // set b\n+001692f0: 6163 6b20 746f 2073 7464 6f75 7420 3c2f ack to stdout
    .} \n+00169320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00169340: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    {
    \n+001695d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n+00169600: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn soa\n+00169660: 705f 7365 6e64 3c2f 613e 283c 6120 636c p_send(soap, "Cu\n+001696c0: 7374 6f6d 2d67 656e 6572 6174 6564 2066 stom-generated f\n+001696d0: 696c 655c 6e26 7175 6f74 3b3c 2f73 7061 ile\\n"); // wr\n+00169700: 6974 6573 2074 6f20 736f 6170 2d26 6774 ites to soap->\n+00169710: 3b73 656e 6466 6420 3c2f 7370 616e 3e3c ;sendfd <\n+00169720: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+00169740: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int myparse(\n+001697b0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+001697f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169800: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00169810: 6874 6d6c 223e 736f 6170 3c2f 613e 2920 html\">soap) \n+00169820: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00169840: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    c\n+00169870: 6861 723c 2f73 7061 6e3e 2062 7566 5b32 har buf[2\n+00169880: 3536 5d3b 203c 2f64 6976 3e0a 3c64 6976 56];
    . \n+001698a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (lseek(soap-><\n+00169900: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00169910: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00169920: 6874 6d6c 2361 3139 3263 3235 6363 3230 html#a192c25cc20\n+00169930: 3636 3638 3630 3032 3132 6664 3334 6636 6668600212fd34f6\n+00169940: 3534 3166 3334 223e 7265 6376 6664 3c2f 541f34\">recvfd, 0, SEEK_SET)\n+00169960: 2026 6c74 3b20 3020 7c7c 203c 6120 636c < 0 || soap_\n+001699c0: 6765 746c 696e 653c 2f61 3e28 3c61 2063 getline(soap, buf\n+00169a00: 2c20 3235 3629 2920 3c73 7061 6e20 636c , 256)) //\n+00169a20: 2067 6f20 746f 2062 6567 696e 2061 6e64 go to begin and\n+00169a30: 2073 6b69 7020 6375 7374 6f6d 2068 6561 skip custom hea\n+00169a40: 6465 7220 3c2f 7370 616e 3e3c 2f64 6976 der .
    return \n+00169a90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_EOF\n+00169af0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..}\n+00169bb0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    in\n+00169c00: 743c 2f73 7061 6e3e 206d 6169 6e28 2920 t main() \n+00169c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00169c30: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n+00169cd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n+00169d00: 7420 3c2f 7370 616e 3e6e 735f 5f74 6573 t ns__tes\n+00169d10: 7420 723b 203c 2f64 6976 3e0a 3c64 6976 t r;
    . \n+00169d30: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__person p\n+00169d60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_init(\n+00169de0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+00169e10: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n+00169e30: 2070 2e6e 616d 6520 3d20 3c73 7061 6e20 p.name = "John\n+00169e60: 2044 6f65 2671 756f 743b 3c2f 7370 616e Doe";
    .
    p.\n+00169e90: 6167 6520 3d20 3939 3b20 3c2f 6469 763e age = 99;
    \n+00169ea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n+00169ee0: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fope\n+00169f40: 6e3c 2f61 3e20 3d20 6d79 6f70 656e 3b20 n = myopen; \n+00169f50: 2020 3c73 7061 6e20 636c 6173 733d 2263 // use c\n+00169f70: 7573 746f 6d20 6f70 656e 203c 2f73 7061 ustom open
    .
    soap.fpost = \n+0016a030: 6d79 706f 7374 3b20 2020 3c73 7061 6e20 mypost; \n+0016a050: 2f2f 2075 7365 2063 7573 746f 6d20 706f // use custom po\n+0016a060: 7374 203c 2f73 7061 6e3e 3c2f 6469 763e st
    \n+0016a070: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n+0016a0b0: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fpar\n+0016a110: 7365 3c2f 613e 203d 206d 7970 6172 7365 se = myparse\n+0016a120: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // use c\n+0016a140: 7573 746f 6d20 7265 7370 6f6e 7365 2070 ustom response p\n+0016a150: 6172 7365 7220 3c2f 7370 616e 3e3c 2f64 arser .
    s\n+0016a1a0: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.f\n+0016a200: 636c 6f73 653c 2f61 3e20 3d20 6d79 636c close = mycl\n+0016a210: 6f73 653b 203c 7370 616e 2063 6c61 7373 ose; // us\n+0016a230: 6520 6375 7374 6f6d 2063 6c6f 7365 203c e custom close <\n+0016a240: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0016a260: 2073 6f61 705f 6361 6c6c 5f6e 735f 5f74 soap_call_ns__t\n+0016a270: 6573 7428 2661 6d70 3b3c 6120 636c 6173 est(&\n+0016a2a0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "file\n+0016a2d0: 3a2f 2f74 6573 742e 786d 6c26 7175 6f74 ://test.xml"\n+0016a2e0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "&quo\n+0016a310: 743b 3c2f 7370 616e 3e2c 2070 2c20 7229 t;, p, r)\n+0016a320: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n+0016a360: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap.error\n+0016a3e0: 3c2f 613e 2920 3c2f 6469 763e 0a3c 6469 )
    . \n+0016a400: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n+0016a420: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016a430: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016a440: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n+0016a450: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n+0016a460: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n+0016a470: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n+0016a480: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n+0016a4c0: 6f75 7429 3b20 3c2f 6469 763e 0a3c 6469 out);
    . \n+0016a4e0: 2020 2065 7869 7428 4558 4954 5f46 4149 exit(EXIT_FAI\n+0016a4f0: 4c55 5245 293b 203c 2f64 6976 3e0a 3c64 LURE);
    .\n+0016a510: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    <\n+0016a530: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016a540: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016a550: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+0016a560: 6761 6637 6430 3137 3631 3631 6539 6465 gaf7d0176161e9de\n+0016a570: 6633 3639 3831 6532 3466 6161 3139 3133 f36981e24faa1913\n+0016a580: 6439 223e 736f 6170 5f64 6573 7472 6f79 d9\">soap_destroy\n+0016a590: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
    soap_\n+0016a640: 656e 643c 2f61 3e28 2661 6d70 3b3c 6120 end(&soap); <\n+0016a680: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+0016a6f0: 6f61 705f 646f 6e65 3c2f 613e 2826 616d oap_done(&am\n+0016a700: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    }.
    int(* fpost)(s\n+0016a840: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+0016a850: 2c20 636f 6e73 7420 6368 6172 202a 656e , const char *en\n+0016a860: 6470 6f69 6e74 2c20 636f 6e73 7420 6368 dpoint, const ch\n+0016a870: 6172 202a 686f 7374 2c20 696e 7420 706f ar *host, int po\n+0016a880: 7274 2c20 636f 6e73 7420 6368 6172 202a rt, const char *\n+0016a890: 7061 7468 2c20 636f 6e73 7420 6368 6172 path, const char\n+0016a8a0: 202a 6163 7469 6f6e 2c20 554c 4f4e 4736 *action, ULONG6\n+0016a8b0: 3420 636f 756e 7429 3c2f 6469 763e 3c64 4 count)
    Callback that p\n+0016a8e0: 6f70 756c 6174 6573 2061 6e64 2074 6865 opulates and the\n+0016a8f0: 6e20 7365 6e64 7320 4854 5450 2068 6561 n sends HTTP hea\n+0016a900: 6465 7273 2066 726f 6d20 7468 6520 636c ders from the cl\n+0016a910: 6965 6e74 2d73 6964 6520 746f 2061 2063 ient-side to a c\n+0016a920: 6f6e 6e65 6374 6564 2048 5454 5020 7365 onnected HTTP se\n+0016a930: 7276 6572 2e3c 2f64 6976 3e3c 6469 7620 rver.
    Definition:\n+0016a960: 2073 7464 736f 6170 322e 683a 3432 3230 stdsoap2.h:4220\n+0016a970: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    int(\n+0016aa60: 2a20 6670 6172 7365 2928 7374 7275 6374 * fparse)(struct\n+0016aa70: 2073 6f61 7020 2a73 6f61 7029 3c2f 6469 soap *soap)
    Callback th\n+0016aaa0: 6174 2072 6561 6473 2061 6e64 2070 6172 at reads and par\n+0016aab0: 7365 7320 4854 5450 2061 6e64 204d 494d ses HTTP and MIM\n+0016aac0: 4520 6865 6164 6572 732e 3c2f 6469 763e E headers.
    \n+0016aad0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+0016aaf0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0016ab00: 3a34 3235 303c 2f64 6976 3e3c 2f64 6976 :4250
    .
    <\n+0016abd0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+0016abe0: 6922 3e69 6e74 2073 6f61 705f 6765 746c i\">int soap_getl\n+0016abf0: 696e 6528 7374 7275 6374 2073 6f61 7020 ine(struct soap \n+0016ac00: 2a73 6f61 702c 2063 6861 7220 2a62 7566 *soap, char *buf\n+0016ac10: 2c20 696e 7420 6c65 6e29 3c2f 6469 763e , int len)
    \n+0016ac20: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Get a header \n+0016ac40: 6c69 6e65 2e3c 2f64 6976 3e3c 2f64 6976 line.
    .

    SOAP\n+0016ac70: 2031 2e31 2f31 2e32 2052 5043 2065 6e63 1.1/1.2 RPC enc\n+0016ac80: 6f64 696e 6720 7370 6563 6966 6965 7320 oding specifies \n+0016ac90: 7468 6174 2053 4f41 502f 584d 4c20 656c that SOAP/XML el\n+0016aca0: 656d 656e 7473 206d 6179 2062 6520 6967 ements may be ig\n+0016acb0: 6e6f 7265 6420 7768 656e 2070 7265 7365 nored when prese\n+0016acc0: 6e74 2069 6e20 6120 534f 4150 2070 6179 nt in a SOAP pay\n+0016acd0: 6c6f 6164 206f 6e20 7468 6520 7265 6365 load on the rece\n+0016ace0: 6976 696e 6720 7369 6465 2e20 486f 7765 iving side. Howe\n+0016acf0: 7665 722c 2064 6f63 756d 656e 742f 6c69 ver, document/li\n+0016ad00: 7465 7261 6c20 7374 796c 6520 6d65 7373 teral style mess\n+0016ad10: 6167 696e 6720 7661 6c69 6461 7465 7320 aging validates \n+0016ad20: 584d 4c20 6d65 7373 6167 6573 2061 6e64 XML messages and\n+0016ad30: 2065 7874 7261 2065 6c65 6d65 6e74 7320 extra elements \n+0016ad40: 6361 6e6e 6f74 206a 7573 7420 6265 2069 cannot just be i\n+0016ad50: 676e 6f72 6564 2061 7320 7375 6368 2e20 gnored as such. \n+0016ad60: 5769 7468 2053 4f41 5020 646f 6375 6d65 With SOAP docume\n+0016ad70: 6e74 2f6c 6974 6572 616c 2073 7479 6c65 nt/literal style\n+0016ad80: 2069 7420 6973 2072 6563 6f6d 6d65 6e64 it is recommend\n+0016ad90: 6564 2074 6f20 656e 6162 6c65 2074 6865 ed to enable the\n+0016ada0: 203c 636f 6465 3e23 534f 4150 5f58 4d4c #SOAP_XML\n+0016adb0: 5f53 5452 4943 543c 2f63 6f64 653e 206d _STRICT m\n+0016adc0: 6f64 6520 666c 6167 2e20 5769 7468 2053 ode flag. With S\n+0016add0: 4f41 5020 5250 4320 656e 636f 6469 6e67 OAP RPC encoding\n+0016ade0: 2c20 7468 6520 656e 6769 6e65 2069 676e , the engine ign\n+0016adf0: 6f72 6573 2058 4d4c 2065 6c65 6d65 6e74 ores XML element\n+0016ae00: 7320 7468 6174 2061 7265 2075 6e6b 6e6f s that are unkno\n+0016ae10: 776e 2062 7920 6465 6661 756c 742c 2075 wn by default, u\n+0016ae20: 6e6c 6573 7320 7468 6520 584d 4c20 6174 nless the XML at\n+0016ae30: 7472 6962 7574 6520 3c65 6d3e 3c63 6f64 tribute mustUnderstand\n+0016ae50: 3d22 7472 7565 223c 2f63 6f64 653e 3c2f =\"true\" is present i\n+0016ae70: 6e20 7468 6520 584d 4c20 656c 656d 656e n the XML elemen\n+0016ae80: 742e 2049 7420 6d61 7920 6265 2075 6e64 t. It may be und\n+0016ae90: 6573 6972 6162 6c65 2066 6f72 2065 6c65 esirable for ele\n+0016aea0: 6d65 6e74 7320 746f 2062 6520 6967 6e6f ments to be igno\n+0016aeb0: 7265 6420 7768 656e 2074 6865 206f 7574 red when the out\n+0016aec0: 636f 6d65 206f 6620 7468 6520 6f6d 6973 come of the omis\n+0016aed0: 7369 6f6e 2069 7320 756e 6365 7274 6169 sion is uncertai\n+0016aee0: 6e2e 2054 6865 203c 636f 6465 3e3c 6120 n. The soap::fignore\n+0016afc0: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n+0016afd0: 6261 636b 2063 616e 2062 6520 7365 7420 back can be set \n+0016afe0: 746f 2061 2066 756e 6374 696f 6e20 7468 to a function th\n+0016aff0: 6174 2072 6574 7572 6e73 203c 636f 6465 at returns #SOAP_OK\n+0016b010: 2069 6e20 6361 7365 2074 6865 2065 6c65 in case the ele\n+0016b020: 6d65 6e74 2063 616e 2062 6520 7361 6665 ment can be safe\n+0016b030: 6c79 2069 676e 6f72 6564 2c20 6f72 203c ly ignored, or <\n+0016b040: 636f 6465 3e23 534f 4150 5f4d 5553 5455 code>#SOAP_MUSTU\n+0016b050: 4e44 4552 5354 414e 443c 2f63 6f64 653e NDERSTAND\n+0016b060: 2074 6f20 7468 726f 7720 616e 2065 7863 to throw an exc\n+0016b070: 6570 7469 6f6e 2c20 6f72 2074 6f20 7065 eption, or to pe\n+0016b080: 7266 6f72 6d20 736f 6d65 2061 7070 6c69 rform some appli\n+0016b090: 6361 7469 6f6e 2d73 7065 6369 6669 6320 cation-specific \n+0016b0a0: 6163 7469 6f6e 2e20 466f 7220 6578 616d action. For exam\n+0016b0b0: 706c 652c 2074 6f20 7468 726f 7720 616e ple, to throw an\n+0016b0c0: 2065 7863 6570 7469 6f6e 2061 7320 736f exception as so\n+0016b0d0: 6f6e 2061 7320 616e 2075 6e6b 6e6f 776e on as an unknown\n+0016b0e0: 2065 6c65 6d65 6e74 2069 7320 656e 636f element is enco\n+0016b0f0: 756e 7465 7265 6420 6f6e 2074 6865 2069 untered on the i\n+0016b100: 6e70 7574 2c20 7573 653a 3c2f 703e 0a3c nput, use:

    .<\n+0016b110: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0016b120: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int main\n+0016b160: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
    ..
    \n+0016b3f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .{\n+0016b520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_MUST\n+0016b5c0: 554e 4445 5253 5441 4e44 3c2f 613e 3b20 UNDERSTAND; \n+0016b5d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // never s\n+0016b5f0: 6b69 7020 656c 656d 656e 7473 2028 7365 kip elements (se\n+0016b600: 6375 7265 2920 3c2f 7370 616e 3e3c 2f64 cure) .
    }
    .<\n+0016b630: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0016b640: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+0016b650: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n+0016b660: 6c5f 6761 3063 3265 3161 3062 3561 3531 l_ga0c2e1a0b5a51\n+0016b670: 3937 3132 3861 6631 6163 6334 3836 3632 97128af1acc48662\n+0016b680: 6231 6264 223e 3c64 6976 2063 6c61 7373 b1bd\">
    i\n+0016b710: 6e74 282a 2066 6967 6e6f 7265 2928 7374 nt(* fignore)(st\n+0016b720: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0016b730: 2063 6f6e 7374 2063 6861 7220 2a74 6167 const char *tag\n+0016b740: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n+0016b760: 636b 2074 6f20 6361 7463 6820 756e 7265 ck to catch unre\n+0016b770: 636f 676e 697a 6564 2058 4d4c 2065 6c65 cognized XML ele\n+0016b780: 6d65 6e74 7320 616e 6420 6f76 6572 7269 ments and overri\n+0016b790: 6465 7320 2353 4f41 505f 584d 4c5f 5354 des #SOAP_XML_ST\n+0016b7a0: 5249 4354 2076 616c 6964 6174 696f 6e20 RICT validation \n+0016b7b0: 6572 726f 7273 2066 6f72 2074 6865 732e errors for thes.\n+0016b7c0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De\n+0016b7e0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+0016b7f0: 6473 6f61 7032 2e68 3a34 3434 333c 2f64 dsoap2.h:4443
    .
    SOAP_MU\n+0016b8c0: 5354 554e 4445 5253 5441 4e44 3c2f 613e STUNDERSTAND\n+0016b8d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    #defin\n+0016b8f0: 6520 534f 4150 5f4d 5553 5455 4e44 4552 e SOAP_MUSTUNDER\n+0016b900: 5354 414e 443c 2f64 6976 3e3c 6469 7620 STAND
    A \n+0016b920: 736f 6170 5f73 7461 7475 7320 6572 726f soap_status erro\n+0016b930: 7220 636f 6465 3a20 616e 2058 4d4c 2065 r code: an XML e\n+0016b940: 6c65 6d65 6e74 2069 7320 7072 6573 656e lement is presen\n+0016b950: 7420 7769 7468 2061 206d 7573 7455 6e64 t with a mustUnd\n+0016b960: 6572 7374 616e 6420 6174 7472 6962 7574 erstand attribut\n+0016b970: 6520 7768 6963 6820 6d75 7374 2062 6520 e which must be \n+0016b980: 756e 642e 2e2e 3c2f 6469 763e 3c64 6976 und...
    <\n+0016b9a0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:249\n+0016b9c0: 303c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 0
    .

    To selec\n+0016b9f0: 7469 7665 6c79 2074 6872 6f77 2061 6e20 tively throw an \n+0016ba00: 6578 6365 7074 696f 6e20 7768 656e 203c exception when <\n+0016ba10: 656d 3e3c 636f 6465 3e6d 7573 7455 6e64 em>mustUnd\n+0016ba20: 6572 7374 616e 643d 2274 7275 6522 3c2f erstand=\"true\" SOAP \n+0016ba40: 4865 6164 6572 2065 6c65 6d65 6e74 2069 Header element i\n+0016ba50: 7320 656e 636f 756e 7465 7265 6420 6f72 s encountered or\n+0016ba60: 2077 6865 6e20 616e 2075 6e6b 6e6f 776e when an unknown\n+0016ba70: 2065 6c65 6d65 6e74 2069 7320 656e 636f element is enco\n+0016ba80: 756e 7465 7265 6420 6578 6365 7074 2066 untered except f\n+0016ba90: 6f72 2065 6c65 6d65 6e74 203c 656d 3e3c or element <\n+0016baa0: 636f 6465 3e6e 733a 7879 7a3c 2f63 6f64 code>ns:xyz, use:.

    int m\n+0016bb10: 6169 6e28 293c 2f64 6976 3e0a 3c64 6976 ain()
    .{<\n+0016bb30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+0016bb60: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+0016bba0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016bbb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0016bbc0: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+0016bbd0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    . \n+0016bc50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0016bc80: 2667 743b 3c61 2063 6c61 7373 3d22 636f >figno\n+0016bce0: 7265 3c2f 613e 203d 2069 676e 6f72 653b re = ignore;\n+0016bcf0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... \n+0016bd10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // soap_ca\n+0016bd30: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n+0016bd40: 2873 6f61 702c 202e 2e2e 2920 6f72 2073 (soap, ...) or s\n+0016bd50: 6f61 705f 7365 7276 6528 736f 6170 2920 oap_serve(soap) \n+0016bd60: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0016bd80: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    .
    in\n+0016bdd0: 743c 2f73 7061 6e3e 2069 676e 6f72 6528 t ignore(\n+0016bde0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+0016be30: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+0016be60: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , cons\n+0016be80: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+0016beb0: 7461 6729 203c 2f64 6976 3e0a 3c64 6976 tag)
    .{<\n+0016bed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+0016bf00: 2f2f 2064 6f20 6e6f 7420 6967 6e6f 7265 // do not ignore\n+0016bf10: 206d 7573 7455 6e64 6572 7374 616e 643d mustUnderstand=\n+0016bf20: 2671 756f 743b 7472 7565 2671 756f 743b "true"\n+0016bf30: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0016bf40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016bf50: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+0016bf70: 2f73 7061 6e3e 2028 213c 6120 636c 6173 /span> (!\n+0016bfa0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->mustUnders\n+0016c000: 7461 6e64 3c2f 613e 293c 2f64 6976 3e0a tand)
    .\n+0016c010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+0016c040: 2020 3c73 7061 6e20 636c 6173 733d 2263 // tags \n+0016c060: 266c 743b 6e73 3a73 6f6d 6545 6c65 6d65 <ns:someEleme\n+0016c070: 6e74 2667 743b 2063 616e 2062 6520 7361 nt> can be sa\n+0016c080: 6665 6c79 2069 676e 6f72 6564 3c2f 7370 fely ignored
    .
    \n+0016c0b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_matc\n+0016c130: 685f 7461 673c 2f61 3e28 3c61 2063 6c61 h_tag(soap, tag, \n+0016c170: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0016c190: 743b 6e73 3a73 6f6d 6545 6c65 6d65 6e74 t;ns:someElement\n+0016c1a0: 2671 756f 743b 3c2f 7370 616e 3e29 203d ") =\n+0016c1b0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = SOAP_OK)
    ..\n+0016c2c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n+0016c2f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+0016c310: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n+0016c370: 5f4d 5553 5455 4e44 4552 5354 414e 443c _MUSTUNDERSTAND<\n+0016c380: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    .}<\n+0016c3a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n+0016c3c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+0016c3f0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>Namespace\n+0016c430: 203c 6120 636c 6173 733d 2263 6f64 6522 namespac\n+0016c490: 6573 3c2f 613e 5b5d 203d 203c 2f64 6976 es[] = .
    {
    . \n+0016c4d0: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n+0016c4f0: 756f 743b 534f 4150 2d45 4e56 2671 756f uot;SOAP-ENV&quo\n+0016c500: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "htt\n+0016c530: 703a 2f2f 7363 6865 6d61 732e 786d 6c73 p://schemas.xmls\n+0016c540: 6f61 702e 6f72 672f 736f 6170 2f65 6e76 oap.org/soap/env\n+0016c550: 656c 6f70 652f 2671 756f 743b 3c2f 7370 elope/" },
    .\n+0016c580: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+0016c5a0: 2671 756f 743b 534f 4150 2d45 4e43 2671 "SOAP-ENC&q\n+0016c5b0: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "h\n+0016c5e0: 7474 703a 2f2f 7363 6865 6d61 732e 786d ttp://schemas.xm\n+0016c5f0: 6c73 6f61 702e 6f72 672f 736f 6170 2f65 lsoap.org/soap/e\n+0016c600: 6e63 6f64 696e 672f 2671 756f 743b 3c2f ncoding/" },
    .\n+0016c620: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "xsi"\n+0016c660: 3b3c 2f73 7061 6e3e 2c20 2020 2020 203c ;, <\n+0016c670: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0016c680: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0016c690: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f ;http://www.w3.o\n+0016c6a0: 7267 2f32 3030 312f 584d 4c53 6368 656d rg/2001/XMLSchem\n+0016c6b0: 612d 696e 7374 616e 6365 2671 756f 743b a-instance"\n+0016c6c0: 3c2f 7370 616e 3e20 7d2c 203c 2f64 6976 }, .
    { "xsd&qu\n+0016c710: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n+0016c720: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0016c740: 6f74 3b68 7474 703a 2f2f 7777 772e 7733 ot;http://www.w3\n+0016c750: 2e6f 7267 2f32 3030 312f 584d 4c53 6368 .org/2001/XMLSch\n+0016c760: 656d 6126 7175 6f74 3b3c 2f73 7061 6e3e ema"\n+0016c770: 207d 2c20 3c2f 6469 763e 0a3c 6469 7620 },
    .
    {\n+0016c790: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0016c7b0: 6f74 3b6e 7326 7175 6f74 3b3c 2f73 7061 ot;ns", "some\n+0016c7f0: 2d55 5249 2671 756f 743b 3c2f 7370 616e -URI"}, // bin\n+0016c820: 6473 2026 7175 6f74 3b6e 7326 7175 6f74 ds "ns"\n+0016c830: 3b20 6e61 6d65 7370 6163 6520 7072 6566 ; namespace pref\n+0016c840: 6978 2074 6f20 7363 6865 6d61 2055 5249 ix to schema URI\n+0016c850: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0016c870: 5d3b 3c2f 6469 763e 0a3c 6469 7620 636c ];
    .
    \n-0016c930: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    short mustUn\n-0016c950: 6465 7273 7461 6e64 3c2f 6469 763e 3c64 derstand
    The soap::mustU\n-0016c980: 6e64 6572 7374 616e 6420 666c 6167 2069 nderstand flag i\n-0016c990: 7320 7365 7420 7768 656e 2061 2053 4f41 s set when a SOA\n-0016c9a0: 5020 4865 6164 6572 2065 6c65 6d65 6e74 P Header element\n-0016c9b0: 2063 6172 7269 6573 2061 2053 4f41 502d carries a SOAP-\n-0016c9c0: 454e 563a 6d75 7374 556e 6465 7273 7461 ENV:mustUndersta\n-0016c9d0: 6e64 2061 7474 2e2e 2e3c 2f64 6976 3e3c nd att...
    <\n-0016c9e0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-0016c9f0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-0016ca00: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-0016ca10: 3239 3631 3c2f 6469 763e 3c2f 6469 763e 2961
    \n-0016ca20: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Funct\n-0016ca40: 696f 6e20 3c63 6f64 653e 3c61 2063 6c61 ion soap_ma\n-0016cac0: 7463 685f 7461 673c 2f61 3e3c 2f63 6f64 tch_tag compares two \n-0016cae0: 7461 6773 2e20 5468 6520 7468 6972 6420 tags. The third \n-0016caf0: 7061 7261 6d65 7465 7220 6d61 7920 6265 parameter may be\n-0016cb00: 2061 2070 6174 7465 726e 2077 6865 7265 a pattern where\n-0016cb10: 203c 636f 6465 3e2a 3c2f 636f 6465 3e20 * \n-0016cb20: 6973 2061 2077 696c 6463 6172 6420 616e is a wildcard an\n-0016cb30: 6420 3c63 6f64 653e 2d3c 2f63 6f64 653e d -\n-0016cb40: 2069 7320 6120 7369 6e67 6c65 2063 6861 is a single cha\n-0016cb50: 7261 6374 6572 2077 696c 6463 6172 642e racter wildcard.\n-0016cb60: 2053 6f20 666f 7220 6578 616d 706c 6520 So for example \n-0016cb70: 3c63 6f64 653e 736f 6170 5f6d 6174 6368 soap_match\n-0016cb80: 5f74 6167 2873 6f61 702c 2074 6167 2c20 _tag(soap, tag, \n-0016cb90: 226e 733a 2a22 293c 2f63 6f64 653e 2077 \"ns:*\") w\n-0016cba0: 696c 6c20 6d61 7463 6820 616e 7920 656c ill match any el\n-0016cbb0: 656d 656e 7420 696e 206e 616d 6573 7061 ement in namespa\n-0016cbc0: 6365 203c 636f 6465 3e6e 733c 2f63 6f64 ce ns or when no na\n-0016cbe0: 6d65 7370 6163 6520 7072 6566 6978 2069 mespace prefix i\n-0016cbf0: 7320 7072 6573 656e 7420 696e 2074 6865 s present in the\n-0016cc00: 2058 4d4c 206d 6573 7361 6765 2e3c 2f70 XML message..

    The callbac\n-0016cc20: 6b20 6361 6e20 616c 736f 2062 6520 7573 k can also be us\n-0016cc30: 6564 2074 6f20 6b65 6570 2074 7261 636b ed to keep track\n-0016cc40: 206f 6620 756e 6b6e 6f77 6e20 656c 656d of unknown elem\n-0016cc50: 656e 7473 2069 6e20 616e 2069 6e74 6572 ents in an inter\n-0016cc60: 6e61 6c20 6461 7461 2073 7472 7563 7475 nal data structu\n-0016cc70: 7265 2073 7563 6820 6173 2061 206c 6973 re such as a lis\n-0016cc80: 743a 3c2f 703e 0a3c 6469 7620 636c 6173 t:

    .
    <\n-0016ccb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016ccc0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct Unknown .
    {
    . \n-0016cd10: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tag; .
    str\n-0016cd70: 7563 7420 3c2f 7370 616e 3e55 6e6b 6e6f uct Unkno\n-0016cd80: 776e 202a 6e65 7874 3b20 3c2f 6469 763e wn *next;
    \n-0016cd90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .<\n-0016cdc0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016cdd0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int myignore(struct
    \n-0016ce10: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-0016ce40: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, const \n-0016ceb0: 6368 6172 3c2f 7370 616e 3e20 2a74 6167 char *tag\n-0016cec0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    char *s \n-0016cf20: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (cha\n-0016cf40: 723c 2f73 7061 6e3e 2a29 3c61 2063 6c61 r*)s\n-0016cfa0: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 283c oap_malloc(<\n-0016cfb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016cfc0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016cfd0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0016cfe0: 7374 726c 656e 2874 6167 292b 3129 3b20 strlen(tag)+1); \n-0016cff0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct U\n-0016d030: 6e6b 6e6f 776e 202a 7520 3d20 283c 7370 nknown *u = (struct Unknown*)s\n-0016d0c0: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 283c oap_malloc(<\n-0016d0d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016d0e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016d0f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0016d100: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(struct\n-0016d140: 3c2f 7370 616e 3e20 556e 6b6e 6f77 6e29 Unknown)\n-0016d150: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    if (s && \n-0016d1a0: 7529 203c 2f64 6976 3e0a 3c64 6976 2063 u)
    .
    {<\n-0016d1c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    strc\n-0016d1e0: 7079 2873 2c20 7461 6729 3b20 3c2f 6469 py(s, tag); .
    u->t\n-0016d210: 6167 203d 2073 3b20 3c2f 6469 763e 0a3c ag = s;
    .<\n-0016d220: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016d230: 3e20 2020 2075 2d26 6774 3b6e 6578 7420 > u->next \n-0016d240: 3d20 756c 6973 743b 203c 2f64 6976 3e0a = ulist;
    .\n-0016d250: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ulist = u;\n-0016d270: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    }
    .\n-0016d2b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n-0016d300: 206d 6169 6e28 293c 2f64 6976 3e0a 3c64 main()
    .\n-0016d320: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-0016d360: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0016d390: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap;
    .
    <\n-0016d400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016d410: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct Unknown *ulis\n-0016d430: 7420 3d20 4e55 4c4c 3b20 3c2f 6469 763e t = NULL;
    \n-0016d440: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_i\n-0016d4b0: 6e69 743c 2f61 3e28 2661 6d70 3b3c 6120 nit(&soap); <\n-0016d4f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fignore = m\n-0016d5a0: 7969 676e 6f72 653b 203c 2f64 6976 3e0a yignore;
    .\n-0016d5b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-0016d5e0: 2073 6f61 705f 6361 6c6c 5f6e 735f 5f77 soap_call_ns__w\n-0016d5f0: 6562 6d65 7468 6f64 2873 6f61 702c 202e ebmethod(soap, .\n-0016d600: 2e2e 2920 6f72 2073 6f61 705f 7365 7276 ..) or soap_serv\n-0016d610: 6528 736f 6170 2920 3c2f 7370 616e 3e3c e(soap) <\n-0016d620: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // print the\n-0016d660: 206c 6973 7420 6f66 2075 6e6b 6e6f 776e list of unknown\n-0016d670: 2065 6c65 6d65 6e74 7320 7374 6f72 6564 elements stored\n-0016d680: 2069 6e20 756c 6973 743c 2f73 7061 6e3e in ulist\n-0016d690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n-0016d760: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n-0016d7c0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0016d7f0: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n-0016d800: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-0016d870: 6f6e 653c 2f61 3e28 2661 6d70 3b3c 6120 one(&soap);.
    }
    .<\n-0016d8d0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

    .

    \n-0016d920: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 <\n-0016d940: 2f61 3e0a 486f 7720 746f 2068 616e 646c /a>.How to handl\n-0016d950: 6520 4854 5450 2033 3037 2074 656d 706f e HTTP 307 tempo\n-0016d960: 7261 7279 2072 6564 6972 6563 743c 2f68 rary redirect.

    The client\n-0016d980: 2d73 6964 6520 6861 6e64 6c69 6e67 206f -side handling o\n-0016d990: 6620 4854 5450 2033 3037 2063 6f64 6520 f HTTP 307 code \n-0016d9a0: 2254 656d 706f 7261 7279 2052 6564 6972 \"Temporary Redir\n-0016d9b0: 6563 7422 2061 6e64 2061 6e79 206f 6620 ect\" and any of \n-0016d9c0: 7468 6520 7265 6469 7265 6374 2063 6f64 the redirect cod\n-0016d9d0: 6573 2033 3031 2c20 3330 322c 2061 6e64 es 301, 302, and\n-0016d9e0: 2033 3033 2061 7265 206e 6f74 2061 7574 303 are not aut\n-0016d9f0: 6f6d 6174 6564 2e20 436c 6965 6e74 2061 omated. Client a\n-0016da00: 7070 6c69 6361 7469 6f6e 2064 6576 656c pplication devel\n-0016da10: 6f70 6572 7320 6d61 7920 7761 6e74 2074 opers may want t\n-0016da20: 6f20 636f 6e73 6964 6572 2061 6464 696e o consider addin\n-0016da30: 6720 6120 6665 7720 6c69 6e65 7320 6f66 g a few lines of\n-0016da40: 2063 6f64 6520 746f 2073 7570 706f 7274 code to support\n-0016da50: 2072 6564 6972 6563 7473 2e20 4974 2077 redirects. It w\n-0016da60: 6173 2064 6563 6964 6564 206e 6f74 2074 as decided not t\n-0016da70: 6f20 6175 746f 6d61 7469 6361 6c6c 7920 o automatically \n-0016da80: 7375 7070 6f72 7420 7265 6469 7265 6374 support redirect\n-0016da90: 7320 666f 7220 7468 6520 666f 6c6c 6f77 s for the follow\n-0016daa0: 696e 6720 7265 6173 6f6e 733a 3c2f 703e ing reasons:

    \n-0016dab0: 0a3c 756c 3e0a 3c6c 693e 5265 6469 7265 .
      .
    • Redire\n-0016dac0: 6374 696e 6720 6120 7365 6375 7265 2048 cting a secure H\n-0016dad0: 5454 5053 2061 6464 7265 7373 2074 6f20 TTPS address to \n-0016dae0: 6120 6e6f 6e2d 7365 6375 7265 2048 5454 a non-secure HTT\n-0016daf0: 5020 6164 6472 6573 7320 7669 6120 3330 P address via 30\n-0016db00: 3720 6372 6561 7465 7320 6120 7365 6375 7 creates a secu\n-0016db10: 7269 7479 2076 756c 6e65 7261 6269 6c69 rity vulnerabili\n-0016db20: 7479 2e3c 2f6c 693e 0a3c 6c69 3e43 7963 ty.
    • .
    • Cyc\n-0016db30: 6c69 6320 7265 6469 7265 6374 7320 6d75 lic redirects mu\n-0016db40: 7374 2062 6520 6465 7465 6374 6564 2028 st be detected (\n-0016db50: 652e 672e 2061 6c6c 6f77 696e 6720 6f6e e.g. allowing on\n-0016db60: 6c79 2061 206c 696d 6974 6564 206e 756d ly a limited num\n-0016db70: 6265 7220 6f66 2072 6564 6972 6563 7420 ber of redirect \n-0016db80: 6c65 7665 6c73 292e 3c2f 6c69 3e0a 3c6c levels).
    • .Redirecting HT\n-0016dba0: 5450 2050 4f53 5420 7769 6c6c 2072 6573 TP POST will res\n-0016dbb0: 756c 7420 696e 2072 652d 7365 7269 616c ult in re-serial\n-0016dbc0: 697a 6174 696f 6e20 616e 6420 7265 2d70 ization and re-p\n-0016dbd0: 6f73 7420 6f66 2074 6865 2065 6e74 6972 ost of the entir\n-0016dbe0: 6520 534f 4150 2072 6571 7565 7374 2e20 e SOAP request. \n-0016dbf0: 5468 6520 534f 4150 2072 6571 7565 7374 The SOAP request\n-0016dc00: 206d 6573 7361 6765 206d 7573 7420 6265 message must be\n-0016dc10: 2072 652d 706f 7374 6564 2069 6e20 6974 re-posted in it\n-0016dc20: 7320 656e 7469 7265 7479 2077 6865 6e20 s entirety when \n-0016dc30: 7265 2d69 7373 7569 6e67 2074 6865 2053 re-issuing the S\n-0016dc40: 4f41 5020 6f70 6572 6174 696f 6e20 746f OAP operation to\n-0016dc50: 2061 206e 6577 2061 6464 7265 7373 2e3c a new address.<\n-0016dc60: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e 546f /li>.
    .

    To\n-0016dc70: 2069 6d70 6c65 6d65 6e74 2063 6c69 656e implement clien\n-0016dc80: 742d 7369 6465 2033 3037 2072 6564 6972 t-side 307 redir\n-0016dc90: 6563 742c 2061 6464 2074 6865 2066 6f6c ect, add the fol\n-0016dca0: 6c6f 7769 6e67 206c 696e 6573 206f 6620 lowing lines of \n-0016dcb0: 636f 6465 3a3c 2f70 3e0a 3c64 6976 2063 code:

    .
    \n-0016dcd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n-0016dd20: 6861 723c 2f73 7061 6e3e 202a 656e 6470 har *endp\n-0016dd30: 6f69 6e74 203d 204e 554c 4c3b 203c 7370 oint = NULL; // use defaul\n-0016dd60: 7420 656e 6470 6f69 6e74 2067 6976 656e t endpoint given\n-0016dd70: 2069 6e20 5753 444c 206f 7220 7370 6563 in WSDL or spec\n-0016dd80: 6966 7920 6f6e 6520 6865 7265 3c2f 7370 ify one here
    .
    int\n-0016ddd0: 2072 6564 6972 6563 7473 203d 2031 303b redirects = 10;\n-0016dde0: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-0016de00: 2f2f 206d 6178 2072 6564 6972 6563 7420 // max redirect \n-0016de10: 636f 756e 7420 3c2f 7370 616e 3e3c 2f64 count .
    \n-0016de50: 7768 696c 653c 2f73 7061 6e3e 2028 7265 while (re\n-0016de60: 6469 7265 6374 732d 2d29 203c 2f64 6976 directs--) .
    {
    . \n-0016dea0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-0016ded0: 7331 5f5f 6d79 4d65 7468 6f64 283c 6120 s1__myMethod(
    soap, en\n-0016df10: 6470 6f69 6e74 2c20 2e2e 2e29 2920 3c2f dpoint, ...)) .
    {
    \n-0016df40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if ((soap->\n-0016dfb0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;error<\n-0016e000: 2f61 3e20 2667 743b 3d20 3330 3120 2661 /a> >= 301 &a\n-0016e010: 6d70 3b26 616d 703b 203c 6120 636c 6173 mp;& \n-0016e040: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->error \n-0016e0a0: 266c 743b 3d20 3330 3329 207c 7c20 3c61 <= 303) || soap-&g\n-0016e0e0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error\n-0016e130: 3c2f 613e 203d 3d20 3330 3729 203c 2f64 == 307) .
    {.
    endpoi\n-0016e180: 6e74 203d 203c 6120 636c 6173 733d 2263 nt = soap_s\n-0016e1e0: 7472 6475 703c 2f61 3e28 3c61 2063 6c61 trdup(soap, soap-><\n-0016e250: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016e260: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016e270: 6874 6d6c 2361 6564 3162 3836 6238 6133 html#aed1b86b8a3\n-0016e280: 3461 6561 3836 3130 3337 3531 6139 3332 4aea86103751a932\n-0016e290: 6339 6463 6539 223e 656e 6470 6f69 6e74 c9dce9\">endpoint\n-0016e2a0: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // \n-0016e2c0: 656e 6470 6f69 6e74 2066 726f 6d20 4854 endpoint from HT\n-0016e2d0: 5450 2033 3031 2c20 3330 322c 2033 3033 TP 301, 302, 303\n-0016e2e0: 2c20 3330 3720 4c6f 6361 7469 6f6e 2068 , 307 Location h\n-0016e2f0: 6561 6465 7220 3c2f 7370 616e 3e3c 2f64 eader .
    }.
    else .
    {.
    ... <\n-0016e3a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0016e3b0: 656e 7422 3e2f 2f20 6861 6e64 6c65 2065 ent\">// handle e\n-0016e3c0: 7272 6f72 203c 2f73 7061 6e3e 3c2f 6469 rror .
    break;
    .
    \n-0016e430: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    } <\n-0016e450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else \n-0016e490: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    break;\n-0016e4f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // all OK\n-0016e510: 206e 6f77 3c2f 7370 616e 3e3c 2f64 6976 now.
    }
    .\n-0016e550: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    <\n-0016e570: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n-0016e590: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n-0016e5a0: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .How to \n-0016e5d0: 696d 706c 656d 656e 7420 4854 5450 2047 implement HTTP G\n-0016e5e0: 4554 2c20 5055 542c 2061 6e64 2050 4154 ET, PUT, and PAT\n-0016e5f0: 4348 2073 6572 7669 6365 733c 2f68 323e CH services

    \n-0016e600: 0a3c 703e 546f 2069 6d70 6c65 6d65 6e74 .

    To implement\n-0016e610: 2048 5454 5020 4745 5420 7265 7175 6573 HTTP GET reques\n-0016e620: 7420 7265 7370 6f6e 7365 732c 2064 6566 t responses, def\n-0016e630: 696e 6520 7468 6520 3c63 6f64 653e 3c61 ine the \n-0016e700: 736f 6170 3a3a 6667 6574 3c2f 613e 3c2f soap::fget callback f\n-0016e720: 756e 6374 696f 6e2e 2054 6865 2063 616c unction. The cal\n-0016e730: 6c62 6163 6b20 6973 2072 6571 7569 7265 lback is require\n-0016e740: 6420 746f 2070 726f 6475 6365 2061 2072 d to produce a r\n-0016e750: 6573 706f 6e73 6520 746f 2074 6865 2072 esponse to the r\n-0016e760: 6571 7565 7374 2069 6e20 7465 7874 7561 equest in textua\n-0016e770: 6c20 666f 726d 2c20 7375 6368 2061 7320 l form, such as \n-0016e780: 6120 5765 6220 7061 6765 206f 7220 616e a Web page or an\n-0016e790: 2058 4d4c 206f 7220 4a53 4f4e 2072 6573 XML or JSON res\n-0016e7a0: 706f 6e73 652e 3c2f 703e 0a3c 703e 596f ponse.

    .

    Yo\n-0016e7b0: 7520 6361 6e20 616c 736f 2075 7365 2074 u can also use t\n-0016e7c0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_g\n-0016e850: 6574 3c2f 613e 3c2f 636f 6465 3e20 706c et pl\n-0016e860: 7567 696e 2077 6869 6368 2065 7373 656e ugin which essen\n-0016e870: 7469 616c 6c79 2073 6574 7320 7468 6520 tially sets the \n-0016e880: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fg\n-0016e950: 6574 3c2f 613e 3c2f 636f 6465 3e20 6361 et ca\n-0016e960: 6c6c 6261 636b 2061 6e64 2061 6c73 6f20 llback and also \n-0016e970: 6b65 6570 7320 7472 6163 6b20 6f66 2074 keeps track of t\n-0016e980: 6865 206e 756d 6265 7220 6f66 2048 5454 he number of HTT\n-0016e990: 5020 4745 5420 616e 6420 504f 5354 2072 P GET and POST r\n-0016e9a0: 6571 7565 7374 7320 6d61 6465 2061 7420 equests made at \n-0016e9b0: 7468 6520 7365 7276 6572 2073 6964 652e the server side.\n-0016e9c0: 3c2f 703e 0a3c 703e 5468 6520 666f 6c6c

    .

    The foll\n-0016e9d0: 6f77 696e 6720 6578 616d 706c 6520 7072 owing example pr\n-0016e9e0: 6f64 7563 6573 2061 2057 6562 2070 6167 oduces a Web pag\n-0016e9f0: 6520 7570 6f6e 2061 2048 5454 5020 4745 e upon a HTTP GE\n-0016ea00: 5420 7265 7175 6573 7420 2865 2e67 2e20 T request (e.g. \n-0016ea10: 6672 6f6d 2061 2062 726f 7773 6572 293a from a browser):\n-0016ea20: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main()
    .<\n-0016ea80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016ea90: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap\n-0016eb00: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n-0016eb90: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    .\n-0016eba0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n-0016ecb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016ecc0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... //<\n-0016ece0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-0016ed00: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_serve(\n-0016ed60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0016ed90: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    ...\n-0016edb0: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n-0016edd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-0016edf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int http_get(<\n-0016eea0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016eeb0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-0016ef20: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    .{<\n-0016ef40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (<\n-0016ef80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016ef90: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0016efa0: 705f 5f69 6f2e 6874 6d6c 2367 6130 3339 p__io.html#ga039\n-0016efb0: 3065 3538 6264 3261 3365 6265 3666 6533 0e58bd2a3ebe6fe3\n-0016efc0: 6134 3664 6530 3533 3461 3631 3422 3e73 a46de0534a614\">s\n-0016efd0: 6f61 705f 7265 7370 6f6e 7365 3c2f 613e oap_response\n-0016efe0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0016f010: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_HTML)\n-0016f070: 203c 7370 616e 2063 6c61 7373 3d22 636f // HTTP r\n-0016f090: 6573 706f 6e73 6520 6865 6164 6572 2077 esponse header w\n-0016f0a0: 6974 6820 7465 7874 2f68 746d 6c20 3c2f ith text/html
    . \n-0016f0d0: 207c 7c20 3c61 2063 6c61 7373 3d22 636f || soap_send(soap, &\n-0016f180: 7175 6f74 3b26 6c74 3b48 544d 4c26 6774 quot;<HTML>\n-0016f190: 3b4d 7920 5765 6220 7365 7276 6572 2069 ;My Web server i\n-0016f1a0: 7320 6f70 6572 6174 696f 6e61 6c2e 266c s operational.&l\n-0016f1b0: 743b 2f48 544d 4c26 6774 3b26 7175 6f74 t;/HTML>"\n-0016f1c0: 3b3c 2f73 7061 6e3e 293c 2f64 6976 3e0a ;)
    .\n-0016f1d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    || soap_end\n-0016f240: 5f73 656e 643c 2f61 3e28 3c61 2063 6c61 _send(soap)).
    return \n-0016f2c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-0016f310: 736f 6170 5f63 6c6f 7365 736f 636b 3c2f soap_closesock(soap);
    .
    <\n-0016f370: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016f380: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-0016f390: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_clos\n-0016f3f0: 6573 6f63 6b3c 2f61 3e28 3c61 2063 6c61 esock(soap);.
    }
    .
    soap::fget<\n-0016f510: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int(* f\n-0016f530: 6765 7429 2873 7472 7563 7420 736f 6170 get)(struct soap\n-0016f540: 202a 736f 6170 293c 2f64 6976 3e3c 6469 *soap)
    \n-0016f560: 4361 6c6c 6261 636b 2074 6f20 696d 706c Callback to impl\n-0016f570: 656d 656e 7420 6c6f 6769 6320 6174 2074 ement logic at t\n-0016f580: 6865 2073 6572 7665 722d 7369 6465 2074 he server-side t\n-0016f590: 6f20 7365 7276 6520 7265 7370 6f6e 7365 o serve response\n-0016f5a0: 7320 746f 2048 5454 5020 4745 5420 7265 s to HTTP GET re\n-0016f5b0: 7175 6573 7473 2066 726f 6d20 636c 6965 quests from clie\n-0016f5c0: 6e74 732e 3c2f 6469 763e 3c64 6976 2063 nts.
    \n-0016f5e0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-0016f5f0: 7374 6473 6f61 7032 2e68 3a34 3333 303c stdsoap2.h:4330<\n-0016f600: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n-0016f670: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_response\n-0016f6c0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    in\n-0016f6e0: 7420 736f 6170 5f72 6573 706f 6e73 6528 t soap_response(\n-0016f6f0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-0016f700: 702c 2069 6e74 2073 7461 7475 7329 3c2f p, int status)
    Initializ\n-0016f730: 6520 7468 6520 636f 6e74 6578 7420 666f e the context fo\n-0016f740: 7220 7365 7276 6572 2d73 6964 6520 7365 r server-side se\n-0016f750: 6e64 696e 6720 616e 6420 7365 6e64 2061 nding and send a\n-0016f760: 2048 5454 5020 7265 7370 6f6e 7365 2068 HTTP response h\n-0016f770: 6561 6465 722e 3c2f 6469 763e 3c2f 6469 eader.
    .
    soap_c\n-0016f830: 6c6f 7365 736f 636b 3c2f 613e 3c2f 6469 losesock
    int soap_c\n-0016f860: 6c6f 7365 736f 636b 2873 7472 7563 7420 losesock(struct \n-0016f870: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
    Close the so\n-0016f8a0: 636b 6574 2063 6f6e 6e65 6374 696f 6e2e cket connection.\n-0016f8b0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .http_get\n-0016f970: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int ht\n-0016f990: 7470 5f67 6574 2873 7472 7563 7420 736f tp_get(struct so\n-0016f9a0: 6170 202a 2c20 7374 7275 6374 2073 6f61 ap *, struct soa\n-0016f9b0: 705f 706c 7567 696e 202a 2c20 766f 6964 p_plugin *, void\n-0016f9c0: 202a 293c 2f64 6976 3e3c 6469 7620 636c *)
    The \n-0016f9e0: 4854 5450 2047 4554 2070 6c75 6769 6e20 HTTP GET plugin \n-0016f9f0: 7265 6769 7374 7261 7469 6f6e 2066 756e registration fun\n-0016fa00: 6374 696f 6e2e 3c2f 6469 763e 3c2f 6469 ction.
    .
    #define SOAP_HT\n-0016faf0: 4d4c 3c2f 6469 763e 3c64 6976 2063 6c61 ML
    A spe\n-0016fb10: 6369 616c 2073 6f61 705f 7374 6174 7573 cial soap_status\n-0016fb20: 2065 7272 6f72 2063 6f64 6520 746f 2073 error code to s\n-0016fb30: 6967 6e61 6c20 7468 6174 2061 2063 7573 ignal that a cus\n-0016fb40: 746f 6d20 4854 5450 2072 6573 706f 6e73 tom HTTP respons\n-0016fb50: 6520 6973 2070 7265 7365 6e74 2061 6e64 e is present and\n-0016fb60: 206e 6f20 4854 5450 2072 6573 706f 6e73 no HTTP respons\n-0016fb70: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-0016fb90: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0016fba0: 7464 736f 6170 322e 683a 3237 3132 3c2f tdsoap2.h:2712
    .
    <\n-0016fc20: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-0016fc30: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga\n-0016fc40: 3239 3064 6462 3436 6166 6462 6635 6563 290ddb46afdbf5ec\n-0016fc50: 3636 3639 6236 6163 3864 6163 6135 6339 6669b6ac8daca5c9\n-0016fc60: 223e 736f 6170 5f65 6e64 5f73 656e 643c \">soap_end_send<\n-0016fc70: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    int\n-0016fc90: 2073 6f61 705f 656e 645f 7365 6e64 2873 soap_end_send(s\n-0016fca0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0016fcb0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Finali\n-0016fcd0: 7a65 2074 6865 2063 6f6e 7465 7874 2061 ze the context a\n-0016fce0: 6674 6572 2073 656e 6469 6e67 2e3c 2f64 fter sending.
    .
    \n-0016fd00: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This e\n-00171400: 7861 6d70 6c65 2073 686f 7773 2068 6f77 xample shows how\n-00171410: 206f 6e65 2070 7265 6465 7465 726d 696e one predetermin\n-00171420: 6564 2066 696c 6520 6973 2073 6572 7665 ed file is serve\n-00171430: 642e 2054 6865 203c 656d 3e3c 636f 6465 d. The gsoap/samples/w\n-00171450: 6562 7365 7276 6572 3c2f 636f 6465 3e3c ebserver<\n-00171460: 2f65 6d3e 2064 656d 6f6e 7374 7261 7465 /em> demonstrate\n-00171470: 7320 686f 7720 6669 6c65 7320 7368 6f75 s how files shou\n-00171480: 6c64 2062 6520 7365 7276 6564 2069 6e20 ld be served in \n-00171490: 6765 6e65 7261 6c2c 2062 7920 6164 6469 general, by addi\n-001714a0: 6e67 2074 6865 206e 6563 6573 7361 7279 ng the necessary\n-001714b0: 206c 6f67 6963 2074 6f20 6164 6420 6d65 logic to add me\n-001714c0: 6469 6120 7479 7065 7320 746f 2048 5454 dia types to HTT\n-001714d0: 5020 6865 6164 6572 7320 616e 6420 746f P headers and to\n-001714e0: 2072 6573 7472 6963 7420 7468 6520 7365 restrict the se\n-001714f0: 6c65 6374 696f 6e20 6f66 2066 696c 6573 lection of files\n-00171500: 2074 6861 7420 7368 6f75 6c64 2062 6520 that should be \n-00171510: 7365 7276 6564 2e3c 2f70 3e0a 3c64 6c20 served.

    .
    Warn\n-00171540: 696e 673c 2f64 743e 3c64 643e 5768 656e ing
    When\n-00171550: 2073 6572 7669 6e67 2066 696c 6573 2061 serving files a\n-00171560: 7320 7265 7370 6f6e 7365 7320 746f 2072 s responses to r\n-00171570: 6571 7565 7374 732c 2077 6520 6e65 6564 equests, we need\n-00171580: 2074 6f20 6265 2076 6172 7920 6361 7265 to be vary care\n-00171590: 6675 6c2c 2062 6563 6175 7365 2077 6520 ful, because we \n-001715a0: 646f 6e27 7420 7761 6e74 2072 6571 7565 don't want reque\n-001715b0: 7374 7320 746f 2073 6e6f 6f70 2061 726f sts to snoop aro\n-001715c0: 756e 6420 696e 2064 6972 6563 746f 7269 und in directori\n-001715d0: 6573 2061 6e64 2073 6572 7665 2066 696c es and serve fil\n-001715e0: 6573 2074 6861 7420 7368 6f75 6c64 2062 es that should b\n-001715f0: 6520 7072 6f74 6563 7465 6420 6672 6f6d e protected from\n-00171600: 2070 7562 6c69 6320 7669 6577 2e20 5468 public view. Th\n-00171610: 6572 6566 6f72 652c 2077 6865 6e20 6164 erefore, when ad\n-00171620: 6469 6e67 206c 6f67 6963 2074 6f20 7365 ding logic to se\n-00171630: 7276 6520 6669 6c65 732c 2077 6520 6d75 rve files, we mu\n-00171640: 7374 2072 656a 6563 7420 7265 7175 6573 st reject reques\n-00171650: 7420 7468 6174 2068 6176 6520 3c63 6f64 t that have soap::p\n-001716f0: 6174 683c 2f61 3e3c 2f63 6f64 653e 2076 ath v\n-00171700: 616c 7565 7320 7769 7468 2061 203c 636f alues with a / or a\n-00171720: 203c 636f 6465 3e5c 3c2f 636f 6465 3e20 \\ \n-00171730: 283c 636f 6465 3e3c 6120 636c 6173 733d (so\n-001717c0: 6170 3a3a 7061 7468 3c2f 613e 3c2f 636f ap::path is a string \n-001717e0: 7769 7468 2074 6865 2070 6174 6820 7061 with the path pa\n-001717f0: 7274 206f 6620 7468 6520 5552 4c2c 2073 rt of the URL, s\n-00171800: 7461 7274 696e 6720 7769 7468 2061 203c tarting with a <\n-00171810: 636f 6465 3e2f 3c2f 636f 6465 3e29 2e20 code>/). \n-00171820: 4966 2074 6865 7365 2061 7265 2061 6c6c If these are all\n-00171830: 6f77 6564 2c20 7468 656e 2077 6520 6d75 owed, then we mu\n-00171840: 7374 2061 7420 6c65 6173 7420 6368 6563 st at least chec\n-00171850: 6b20 666f 7220 3c63 6f64 653e 2e2e 3c2f k for .. in the pat\n-00171870: 6820 746f 2061 766f 6964 2072 6571 7565 h to avoid reque\n-00171880: 7374 2066 726f 6d20 736e 6f6f 7069 6e67 st from snooping\n-00171890: 2061 726f 756e 6420 696e 2068 6967 6865 around in highe\n-001718a0: 7220 6469 7265 6374 6f72 6965 7320 616c r directories al\n-001718b0: 6c20 7468 6520 7761 7920 7570 2074 6f20 l the way up to \n-001718c0: 7468 6520 726f 6f74 2e3c 2f64 643e 3c2f the root.
    .

    For a one\n-001718e0: 2d77 6179 2053 4f41 502f 584d 4c20 6d65 -way SOAP/XML me\n-001718f0: 7373 6167 652c 2079 6f75 2063 616e 2061 ssage, you can a\n-00171900: 6c73 6f20 7265 7475 726e 2061 2053 4f41 lso return a SOA\n-00171910: 502f 584d 4c20 7265 7370 6f6e 7365 3a3c P/XML response:<\n-00171920: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n-00171970: 203c 6120 636c 6173 733d 2263 6f64 6522 http_get(struct soap *soap)
    .
    {.
    soap_re\n-00171ae0: 7370 6f6e 7365 3c2f 613e 283c 6120 636c sponse(soap, \n-00171b70: 534f 4150 5f4f 4b3c 2f61 3e29 3b20 3c2f SOAP_OK); .
    return\n-00171bc0: 2073 6f61 705f 7365 6e64 5f6e 7331 5f5f soap_send_ns1__\n-00171bd0: 6d79 5365 6e64 4d65 7468 6f64 5265 7370 mySendMethodResp\n-00171be0: 6f6e 7365 283c 6120 636c 6173 733d 2263 onse(soap\n-00171c10: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "", NULL, ...\n-00171c50: 2070 6172 616d 7320 2e2e 2e29 3b20 3c2f params ...); .
    }
    .\n-00171c80: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    where \n-00171ca0: 3c63 6f64 653e 6e73 315f 5f6d 7953 656e ns1__mySen\n-00171cb0: 644d 6574 686f 6452 6573 706f 6e73 653c dMethodResponse<\n-00171cc0: 2f63 6f64 653e 2069 7320 6120 6f6e 652d /code> is a one-\n-00171cd0: 7761 7920 6d65 7373 6167 6520 6465 636c way message decl\n-00171ce0: 6172 6564 2069 6e20 6120 696e 7465 7266 ared in a interf\n-00171cf0: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-00171d00: 6173 3a3c 2f70 3e0a 3c64 6976 2063 6c61 as:

    .
    \n-00171d30: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns1__mySend\n-00171d60: 4d65 7468 6f64 5265 7370 6f6e 7365 282e MethodResponse(.\n-00171d70: 2e2e 2070 6172 616d 7320 2e2e 2e2c 203c .. params ..., <\n-00171d80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00171d90: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void);
    .

    The gener\n-00171dd0: 6174 6564 203c 656d 3e3c 636f 6465 3e73 ated s\n-00171de0: 6f61 7043 6c69 656e 742e 6370 703c 2f63 oapClient.cpp includ\n-00171e00: 6573 2074 6865 2073 656e 6469 6e67 2d73 es the sending-s\n-00171e10: 6964 6520 7374 7562 2066 756e 6374 696f ide stub functio\n-00171e20: 6e2e 3c2f 703e 0a3c 703e 5468 6520 6578 n.

    .

    The ex\n-00171e30: 616d 706c 6573 2061 626f 7665 2061 7265 amples above are\n-00171e40: 2066 6f72 2048 5454 5020 4745 542e 2054 for HTTP GET. T\n-00171e50: 6f20 696d 706c 656d 656e 7420 4854 5450 o implement HTTP\n-00171e60: 2050 5554 2061 6e64 2050 4154 4348 2073 PUT and PATCH s\n-00171e70: 6574 2074 6865 203c 636f 6465 3e3c 6120 et the s\n-00171f40: 6f61 703a 3a66 7075 743c 2f61 3e3c 2f63 oap::fput and <\n-00171f60: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00171f70: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00171f80: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-00171f90: 6761 3830 3861 3661 3962 3765 3664 3137 ga808a6a9b7e6d17\n-00171fa0: 6530 3339 6662 3533 6135 6538 6139 6238 e039fb53a5e8a9b8\n-00171fb0: 3461 2220 7469 746c 653d 2243 616c 6c62 4a\" title=\"Callb\n-00171fc0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n-00171fd0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n-00171fe0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n-00171ff0: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n-00172000: 4854 5450 2050 4154 4348 2072 6571 7565 HTTP PATCH reque\n-00172010: 7374 7320 6672 6f6d 2063 6c69 656e 7473 sts from clients\n-00172020: 2e2e 2e22 3e73 6f61 703a 3a66 7061 7463 ...\">soap::fpatc\n-00172030: 683c 2f61 3e3c 2f63 6f64 653e 2063 616c h cal\n-00172040: 6c62 6163 6b20 6675 6e63 7469 6f6e 7320 lback functions \n-00172050: 6f72 2075 7365 2074 6865 203c 636f 6465 or use the http_post\n-001720f0: 3c2f 636f 6465 3e20 706c 7567 696e 2077 plugin w\n-00172100: 6869 6368 2069 7320 6d6f 7265 2063 6170 hich is more cap\n-00172110: 6162 6c65 2e3c 2f70 3e0a 3c70 3ef0 9f94 able.

    .

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

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

    .TCP an\n-00172180: 6420 4854 5450 206b 6565 702d 616c 6976 d HTTP keep-aliv\n-00172190: 653c 2f68 323e 0a3c 703e 546f 2061 6374 e

    .

    To act\n-001721a0: 6976 6174 6520 4854 5450 206b 6565 702d ivate HTTP keep-\n-001721b0: 616c 6976 652c 2073 6574 2074 6865 203c alive, set the <\n-001721c0: 636f 6465 3e23 534f 4150 5f49 4f5f 4b45 code>#SOAP_IO_KE\n-001721d0: 4550 414c 4956 453c 2f63 6f64 653e 2066 EPALIVE f\n-001721e0: 6c61 6720 666f 7220 626f 7468 2069 6e70 lag for both inp\n-001721f0: 7574 2061 6e64 206f 7574 7075 7420 6d6f ut and output mo\n-00172200: 6465 732c 2073 6565 2053 6563 7469 6f6e des, see Section\n-00172210: 203c 6120 636c 6173 733d 2265 6c22 2068 Run-time \n-00172240: 666c 6167 733c 2f61 3e20 2e20 466f 7220 flags . For \n-00172250: 6578 616d 706c 653c 2f70 3e0a 3c64 6976 example

    ..\n-00172310: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .

    When a c\n-00172450: 6c69 656e 7420 6f72 2061 2073 6572 7669 lient or a servi\n-00172460: 6365 2063 6f6d 6d75 6e69 6361 7465 7320 ce communicates \n-00172470: 7769 7468 2061 6e6f 7468 6572 2063 6c69 with another cli\n-00172480: 656e 7420 6f72 2073 6572 7669 6365 2074 ent or service t\n-00172490: 6861 7420 7375 7070 6f72 7473 206b 6565 hat supports kee\n-001724a0: 7020 616c 6976 652c 2074 6865 203c 636f p alive, the soap::keep_aliv\n-00172570: 653c 2f61 3e3c 2f63 6f64 653e 2076 6172 e var\n-00172580: 6961 626c 6520 7769 6c6c 2062 6520 7365 iable will be se\n-00172590: 7420 746f 2031 2c20 6f74 6865 7277 6973 t to 1, otherwis\n-001725a0: 6520 6974 2069 7320 7265 7365 7420 746f e it is reset to\n-001725b0: 2030 2069 6e64 6963 6174 696e 6720 7468 0 indicating th\n-001725c0: 6174 2074 6865 206f 7468 6572 2070 6172 at the other par\n-001725d0: 7479 2077 616e 7473 2074 6f20 636c 6f73 ty wants to clos\n-001725e0: 6520 7468 6520 636f 6e6e 6563 7469 6f6e e the connection\n-001725f0: 2e20 5468 6520 636f 6e6e 6563 7469 6f6e . The connection\n-00172600: 206d 6179 6265 2074 6572 6d69 6e61 7465 maybe terminate\n-00172610: 6420 6f6e 2065 6974 6865 7220 656e 6420 d on either end \n-00172620: 6265 666f 7265 2074 6865 2063 6f6d 6d75 before the commu\n-00172630: 6e69 6361 7469 6f6e 2063 6f6d 706c 6574 nication complet\n-00172640: 6564 2c20 666f 7220 6578 616d 706c 6520 ed, for example \n-00172650: 7768 656e 2074 6865 2073 6572 7665 7220 when the server \n-00172660: 6b65 6570 2d61 6c69 7665 2063 6f6e 6e65 keep-alive conne\n-00172670: 6374 696f 6e20 6861 7320 7469 6d65 6420 ction has timed \n-00172680: 6f75 742e 2054 6869 7320 6d61 7920 6765 out. This may ge\n-00172690: 6e65 7261 7465 2061 2022 4272 6f6b 656e nerate a \"Broken\n-001726a0: 2050 6970 6522 2073 6967 6e61 6c20 6f6e Pipe\" signal on\n-001726b0: 2055 6e69 782f 4c69 6e75 7820 706c 6174 Unix/Linux plat\n-001726c0: 666f 726d 732e 2054 6869 7320 7369 676e forms. This sign\n-001726d0: 616c 2063 616e 2062 6520 6361 7567 6874 al can be caught\n-001726e0: 2077 6974 6820 6120 7369 676e 616c 2068 with a signal h\n-001726f0: 616e 646c 6572 3a3c 2f70 3e0a 3c64 6976 andler:

    .
    signal(SIGPI\n-00172730: 5045 2c20 7369 6770 6970 655f 6861 6e64 PE, sigpipe_hand\n-00172740: 6c65 293b 3c2f 6469 763e 0a3c 2f64 6976 le);
    .

    Alternativ\n-00172830: 656c 792c 2062 726f 6b65 6e20 7069 7065 ely, broken pipe\n-00172840: 7320 6361 6e20 6265 206b 6570 7420 7369 s can be kept si\n-00172850: 6c65 6e74 2062 7920 7365 7474 696e 673a lent by setting:\n-00172860: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    soap.socket_fla\n-00172910: 6773 3c2f 613e 203d 204d 5347 5f4e 4f53 gs = MSG_NOS\n-00172920: 4947 4e41 4c3b 3c2f 6469 763e 0a3c 6469 IGNAL;
    .
    soap::sock\n-001729d0: 6574 5f66 6c61 6773 3c2f 613e 3c2f 6469 et_flags
    int socket\n-00172a00: 5f66 6c61 6773 3c2f 6469 763e 3c64 6976 _flags
    U\n-00172a20: 7365 722d 6465 6669 6e61 626c 6520 736f ser-definable so\n-00172a30: 636b 6574 2073 656e 6420 616e 6420 7265 cket send and re\n-00172a40: 6376 2066 6c61 6773 2c20 666f 7220 6578 cv flags, for ex\n-00172a50: 616d 706c 6520 6173 7369 676e 204d 5347 ample assign MSG\n-00172a60: 5f4e 4f53 4947 4e41 4c20 746f 2064 6973 _NOSIGNAL to dis\n-00172a70: 6162 6c65 2073 6967 7069 7065 2028 7468 able sigpipe (th\n-00172a80: 6520 7661 2e2e 2e3c 2f64 6976 3e3c 6469 e va...
    \n-00172aa0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:33\n-00172ac0: 3539 3c2f 6469 763e 3c2f 6469 763e 0a3c 59
    .<\n-00172ad0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This se\n-00172af0: 7474 696e 6720 7769 6c6c 206e 6f74 2067 tting will not g\n-00172b00: 656e 6572 6174 6520 6120 5349 4750 4950 enerate a SIGPIP\n-00172b10: 4520 6275 7420 7265 6164 2f77 7269 7465 E but read/write\n-00172b20: 206f 7065 7261 7469 6f6e 7320 7265 7475 operations retu\n-00172b30: 726e 203c 636f 6465 3e23 534f 4150 5f45 rn #SOAP_E\n-00172b40: 4f46 3c2f 636f 6465 3e20 696e 7374 6561 OF instea\n-00172b50: 642e 204e 6f74 6520 7468 6174 2057 696e d. Note that Win\n-00172b60: 646f 7773 2064 6f65 7320 6e6f 7420 7375 dows does not su\n-00172b70: 7070 6f72 7420 7369 676e 616c 7320 616e pport signals an\n-00172b80: 6420 6c61 636b 2074 6865 203c 636f 6465 d lack the MSG_NOSIGNAL flag.

    .<\n-00172bb0: 703e 4966 2074 6865 2063 6c69 656e 7420 p>If the client \n-00172bc0: 646f 6573 206e 6f74 2063 6c6f 7365 2074 does not close t\n-00172bd0: 6865 2063 6f6e 6e65 6374 696f 6e2c 2074 he connection, t\n-00172be0: 6865 2073 6572 7665 7220 7769 6c6c 2077 he server will w\n-00172bf0: 6169 7420 666f 7265 7665 7220 7768 656e ait forever when\n-00172c00: 206e 6f20 3c63 6f64 653e 3c61 2063 6c61 no soap::recv_\n-00172cc0: 7469 6d65 6f75 743c 2f61 3e3c 2f63 6f64 timeout is specified,\n-00172ce0: 2073 6f20 6265 2063 6172 6566 756c 2074 so be careful t\n-00172cf0: 6f20 7365 7420 7469 6d65 6f75 7473 2c20 o set timeouts, \n-00172d00: 5365 6520 5365 6374 696f 6e20 3c61 2063 See Section Timeout mana\n-00172d40: 6765 6d65 6e74 2066 6f72 206e 6f6e 2d62 gement for non-b\n-00172d50: 6c6f 636b 696e 6720 6f70 6572 6174 696f locking operatio\n-00172d60: 6e73 3c2f 613e 2e20 496e 2061 6464 6974 ns. In addit\n-00172d70: 696f 6e2c 206f 7468 6572 2063 6c69 656e ion, other clien\n-00172d80: 7473 2077 696c 6c20 6265 2064 656e 6965 ts will be denie\n-00172d90: 6420 7365 7276 6963 6520 6173 206c 6f6e d service as lon\n-00172da0: 6720 6173 2061 2063 6c69 656e 7420 6b65 g as a client ke\n-00172db0: 6570 7320 7468 6520 636f 6e6e 6563 7469 eps the connecti\n-00172dc0: 6f6e 2074 6f20 7468 6520 7365 7276 6572 on to the server\n-00172dd0: 206f 7065 6e2e 2054 6f20 7072 6576 656e open. To preven\n-00172de0: 7420 7468 6973 2066 726f 6d20 6861 7070 t this from happ\n-00172df0: 656e 696e 672c 2074 6865 2073 6572 7669 ening, the servi\n-00172e00: 6365 2073 686f 756c 6420 6265 206d 756c ce should be mul\n-00172e10: 7469 2d74 6872 6561 6465 6420 7375 6368 ti-threaded such\n-00172e20: 2074 6861 7420 6561 6368 2074 6872 6561 that each threa\n-00172e30: 6420 6861 6e64 6c65 7320 7468 6520 636c d handles the cl\n-00172e40: 6965 6e74 2063 6f6e 6e65 6374 696f 6e3a ient connection:\n-00172e50: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main(int argc\n-00172ed0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n-00172ef0: 3c2f 7370 616e 3e20 2a2a 6172 6776 2920 **argv) \n-00172f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00172f20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n-00172f50: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-00172f80: 736f 6170 3c2f 613e 203c 6120 636c 6173 soap \n-00172fb0: 736f 6170 3c2f 613e 2c20 2a74 736f 6170 soap, *tsoap\n-00172fc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..\n-00173060: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-00173080: 2f73 7061 6e3e 206d 2c20 733b 203c 2f64 /span> m, s; ..\n-00173230: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.max_k\n-001732b0: 6565 705f 616c 6976 653c 2f61 3e20 3d20 eep_alive = \n-001732c0: 3130 303b 203c 7370 616e 2063 6c61 7373 100; // at\n-001732e0: 206d 6f73 7420 3130 3020 6361 6c6c 7320 most 100 calls \n-001732f0: 7065 7220 6b65 6570 2d61 6c69 7665 2073 per keep-alive s\n-00173300: 6573 7369 6f6e 203c 2f73 7061 6e3e 3c2f ession .
    \n-00173350: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.accept_timeout\n-001733b0: 3c2f 613e 203d 2036 3030 3b20 3c73 7061 = 600; // optional: l\n-001733e0: 6574 2073 6572 7665 7220 7469 6d65 206f et server time o\n-001733f0: 7574 2061 6674 6572 2074 656e 206d 696e ut after ten min\n-00173400: 7574 6573 206f 6620 696e 6163 7469 7669 utes of inactivi\n-00173410: 7479 203c 2f73 7061 6e3e 3c2f 6469 763e ty
    \n-00173420: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    m = soap_bi\n-00173490: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap, NUL\n-001734d0: 4c2c 2031 3830 3030 2c20 4241 434b 4c4f L, 18000, BACKLO\n-001734e0: 4729 3b20 3c73 7061 6e20 636c 6173 733d G); // use\n-00173500: 2070 6f72 7420 3138 3030 3020 6f6e 2074 port 18000 on t\n-00173510: 6865 2063 7572 7265 6e74 206d 6163 6869 he current machi\n-00173520: 6e65 203c 2f73 7061 6e3e 3c2f 6469 763e ne
    \n-00173530: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-00173560: 663c 2f73 7061 6e3e 2028 213c 6120 636c f (!soa\n-001735c0: 705f 7661 6c69 645f 736f 636b 6574 3c2f p_valid_socket(m))
    .\n-001735f0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    ..\n-001736d0: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA\n-001736e0: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .<\n-001736f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00173700: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-00173720: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n-00173730: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00173750: 743b 536f 636b 6574 2063 6f6e 6e65 6374 t;Socket connect\n-00173760: 696f 6e20 7375 6363 6573 7366 756c 2025 ion successful %\n-00173770: 645c 6e26 7175 6f74 3b3c 2f73 7061 6e3e d\\n"\n-00173780: 2c20 6d29 3b20 3c2f 6469 763e 0a3c 6469 , m);
    . \n-001737a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 for (\n-00173810: 636f 756e 743c 2f61 3e20 3d20 303b 203c count = 0; <\n-00173820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00173830: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00173840: 6874 6d6c 2361 3430 3764 6165 3462 6338 html#a407dae4bc8\n-00173850: 3464 3065 3762 3830 3964 3531 6133 6238 4d0e7b809d51a3b8\n-00173860: 3739 3865 3063 223e 636f 756e 743c 2f61 798e0c\">count >= 0; count++)\n-001738d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {..
    \n-00173c60: 2020 6670 7269 6e74 6628 7374 6465 7272 fprintf(stderr\n-00173c70: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-00173c90: 756f 743b 4163 6365 7074 2073 6f63 6b65 uot;Accept socke\n-00173ca0: 7420 2564 2063 6f6e 6e65 6374 696f 6e20 t %d connection \n-00173cb0: 6672 6f6d 2049 5020 2564 2e25 642e 2564 from IP %d.%d.%d\n-00173cc0: 2e25 645c 6e26 7175 6f74 3b3c 2f73 7061 .%d\\n", s, (int)(soap.ip>\n-00173d80: 3b26 6774 3b32 3429 2661 6d70 3b30 7846 ;>24)&0xF\n-00173d90: 462c 2028 3c73 7061 6e20 636c 6173 733d F, (in\n-00173db0: 743c 2f73 7061 6e3e 2928 3c61 2063 6c61 t)(soap.ip>>\n-00173e40: 3b31 3629 2661 6d70 3b30 7846 462c 2028 ;16)&0xFF, (\n-00173e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 int)(soa\n-00173ea0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.i\n-00173ef0: 703c 2f61 3e26 6774 3b26 6774 3b38 2926 p>>8)&\n-00173f00: 616d 703b 3078 4646 2c20 283c 7370 616e amp;0xFF, (int)\n-00173f30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-00173f60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 ip&\n-00173fb0: 616d 703b 3078 4646 293b 203c 2f64 6976 amp;0xFF); .
    tsoap \n-00173fe0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_copy\n-00174040: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); .
    if (\n-001740c0: 2174 736f 6170 293c 2f64 6976 3e0a 3c64 !tsoap)
    .\n-001740e0: 2020 2020 2020 2020 3c61 2063 6c61 7373 soap_for\n-00174140: 6365 5f63 6c6f 7365 736f 636b 3c2f 613e ce_closesock\n-00174150: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00174180: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n-001741a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-001741c0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    while (THREAD_\n-00174270: 4352 4541 5445 3c2f 613e 2826 616d 703b CREATE(&\n-00174280: 7469 642c 2028 3c73 7061 6e20 636c 6173 tid, (\n-001742a0: 766f 6964 3c2f 7370 616e 3e2a 282a 2928 void*(*)(\n-001742b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void*))process_\n-001742e0: 7265 7175 6573 742c 2028 3c73 7061 6e20 request, (void*\n-00174310: 2974 736f 6170 2929 3c2f 6469 763e 0a3c )tsoap))
    .<\n-00174320: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174330: 3e20 2020 2020 2020 2020 2073 6c65 6570 > sleep\n-00174340: 2831 293b 203c 7370 616e 2063 6c61 7373 (1); // fa\n-00174360: 696c 6564 2c20 7472 7920 6167 6169 6e3c iled, try again<\n-00174370: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00174390: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    \n-001743b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-001743d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap.errnum)\n-00174480: 203c 7370 616e 2063 6c61 7373 3d22 636f // accept\n-001744a0: 2066 6169 6c65 642c 2074 7279 2061 6761 failed, try aga\n-001744b0: 696e 2061 6674 6572 2031 2073 6563 6f6e in after 1 secon\n-001744c0: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
    .<\n-001744d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001744e0: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n-00174500: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri\n-00174560: 6e74 5f66 6175 6c74 3c2f 613e 2826 616d nt_fault(&am\n-00174570: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, stderr); .
    sleep\n-001745d0: 2831 293b 3c2f 6469 763e 0a3c 6469 7620 (1);
    .
    \n-001745f0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    <\n-00174610: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00174620: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    .
    \n-00174650: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n-00174670: 2066 7072 696e 7466 2873 7464 6572 722c fprintf(stderr,\n-00174680: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001746a0: 6f74 3b53 6572 7665 7220 7469 6d65 6420 ot;Server timed \n-001746b0: 6f75 745c 6e26 7175 6f74 3b3c 2f73 7061 out\\n");
    .
    \n-001746e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 bre\n-00174700: 616b 3c2f 7370 616e 3e3b 203c 2f64 6976 ak; .
    }
    \n-00174730: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-00174760: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-00174780: 726e 3c2f 7370 616e 3e20 303b 203c 2f64 rn 0; .
    }
    .<\n-001747b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001747c0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    void\n-00174800: 202a 7072 6f63 6573 735f 7265 7175 6573 *process_reques\n-00174810: 7428 3c73 7061 6e20 636c 6173 733d 226b t(void\n-00174830: 3c2f 7370 616e 3e20 2a74 736f 6170 2920 *tsoap) \n-00174840: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00174860: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n-00174890: 7420 3c2f 7370 616e 3e2a 3c61 2063 6c61 t *soap = (struct soap\n-00174920: 2a29 7473 6f61 703b 3c2f 6469 763e 0a3c *)tsoap;
    .<\n-00174930: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174940: 3e20 203c 6120 636c 6173 733d 2263 6f64 > THREAD_D\n-001749a0: 4554 4143 483c 2f61 3e28 3c61 2063 6c61 ETACH(T\n-00174a00: 4852 4541 445f 4944 3c2f 613e 293b 203c HREAD_ID); <\n-00174a10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ((struct \n-00174a50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap*\n-00174a80: 293c 6120 636c 6173 733d 2263 6f64 6522 )soap\n-00174ab0: 292d 2667 743b 7265 6376 5f74 696d 656f )->recv_timeo\n-00174ac0: 7574 203d 2036 303b 203c 7370 616e 2063 ut = 60; /\n-00174ae0: 2f20 5469 6d65 6f75 7420 6166 7465 7220 / Timeout after \n-00174af0: 3120 6d69 6e75 7465 2073 7461 6c6c 206f 1 minute stall o\n-00174b00: 6e20 7265 6376 203c 2f73 7061 6e3e 3c2f n recv .
    ((struct <\n-00174b50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00174b60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00174b70: 6874 6d6c 223e 736f 6170 3c2f 613e 2a29 html\">soap*)\n-00174b80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00174bb0: 2d26 6774 3b73 656e 645f 7469 6d65 6f75 ->send_timeou\n-00174bc0: 7420 3d20 3130 3b20 3c73 7061 6e20 636c t = 10; //\n-00174be0: 2054 696d 656f 7574 2061 6674 6572 2031 Timeout after 1\n-00174bf0: 3020 7365 636f 6e64 2073 7461 6c6c 206f 0 second stall o\n-00174c00: 6e20 7365 6e64 203c 2f73 7061 6e3e 3c2f n send .\n-00174cc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-00174d30: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .
    soa\n-00174de0: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap); .
    soap\n-00174e90: 5f66 7265 653c 2f61 3e28 3c61 2063 6c61 _free(soap); .
    return N\n-00174f10: 554c 4c3b 203c 2f64 6976 3e0a 3c64 6976 ULL;
    .}<\n-00174f30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-00174f80: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00174f90: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-00174fd0: 6f61 703a 3a63 6f75 6e74 3c2f 613e 3c2f oap::count
    ULONG64 \n-00175000: 636f 756e 743c 2f64 6976 3e3c 6469 7620 count
    Me\n-00175020: 7373 6167 6520 6c65 6e67 7468 2063 6f75 ssage length cou\n-00175030: 6e74 6572 2076 616c 7565 206f 6620 7468 nter value of th\n-00175040: 6520 6d65 7373 6167 6520 7265 6365 6976 e message receiv\n-00175050: 6564 2061 6e64 2063 6f75 6e74 6572 2076 ed and counter v\n-00175060: 616c 7565 206f 6620 7468 6520 4854 5450 alue of the HTTP\n-00175070: 2063 6f6e 7465 6e74 206c 656e 6774 6820 content length \n-00175080: 6865 612e 2e2e 3c2f 6469 763e 3c64 6976 hea...
    <\n-001750a0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:420\n-001750c0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .
    soap::acc\n-00175170: 6570 745f 666c 6167 733c 2f61 3e3c 2f64 ept_flags
    int accep\n-001751a0: 745f 666c 6167 733c 2f64 6976 3e3c 6469 t_flags
    \n-001751c0: 5573 6572 2d64 6566 696e 6162 6c65 2073 User-definable s\n-001751d0: 6574 736f 636b 6f70 7420 6c65 7665 6c20 etsockopt level \n-001751e0: 534f 4c5f 534f 434b 4554 2066 6c61 6773 SOL_SOCKET flags\n-001751f0: 2028 3020 6279 2064 6566 6175 6c74 292c (0 by default),\n-00175200: 2077 6865 6e20 6e6f 6e7a 6572 6f20 7365 when nonzero se\n-00175210: 7473 2074 6865 2073 6f61 703a 3a73 6f63 ts the soap::soc\n-00175220: 6b65 7420 662e 2e2e 3c2f 6469 763e 3c64 ket f...
    Definition:<\n-00175250: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n-00175260: 3435 333c 2f64 6976 3e3c 2f64 6976 3e0a 453
    .\n-00175270: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    A clie\n-00175290: 6e74 2063 616c 6c20 7769 6c6c 2061 7574 nt call will aut\n-001752a0: 6f6d 6174 6963 616c 6c79 2061 7474 656d omatically attem\n-001752b0: 7074 2074 6f20 7265 2d65 7374 6162 6c69 pt to re-establi\n-001752c0: 7368 2061 2063 6f6e 6e65 6374 696f 6e20 sh a connection \n-001752d0: 746f 2061 2073 6572 7665 7220 7768 656e to a server when\n-001752e0: 2074 6865 2073 6572 7665 7220 6861 7320 the server has \n-001752f0: 7465 726d 696e 6174 6564 2074 6865 2063 terminated the c\n-00175300: 6f6e 6e65 6374 696f 6e20 666f 7220 616e onnection for an\n-00175310: 7920 7265 6173 6f6e 2e20 5468 6973 2077 y reason. This w\n-00175320: 6179 2c20 6120 7365 7175 656e 6365 206f ay, a sequence o\n-00175330: 6620 6361 6c6c 7320 6361 6e20 6265 206d f calls can be m\n-00175340: 6164 6520 746f 2074 6865 2073 6572 7665 ade to the serve\n-00175350: 7220 7768 696c 6520 6b65 6570 696e 6720 r while keeping \n-00175360: 7468 6520 636f 6e6e 6563 7469 6f6e 206f the connection o\n-00175370: 7065 6e2e 2043 6c69 656e 7420 7374 7562 pen. Client stub\n-00175380: 2066 756e 6374 696f 6e73 2070 6f6c 6c20 functions poll \n-00175390: 7468 6520 7365 7276 6572 2074 6f20 6368 the server to ch\n-001753a0: 6563 6b20 6966 2074 6865 2063 6f6e 6e65 eck if the conne\n-001753b0: 6374 696f 6e20 6973 2073 7469 6c6c 206f ction is still o\n-001753c0: 7065 6e2e 2057 6865 6e20 7468 6520 636f pen. When the co\n-001753d0: 6e6e 6563 7469 6f6e 2077 6173 2074 6572 nnection was ter\n-001753e0: 6d69 6e61 7465 6420 6279 2074 6865 2073 minated by the s\n-001753f0: 6572 7665 722c 2074 6865 2063 6c69 656e erver, the clien\n-00175400: 7420 7769 6c6c 2061 7574 6f6d 6174 6963 t will automatic\n-00175410: 616c 6c79 2072 6563 6f6e 6e65 6374 2e20 ally reconnect. \n-00175420: 3c62 7220 202f 3e0a 3c2f 703e 0a3c 703e
    .

    .

    \n-00175430: 4120 636c 6965 6e74 206d 6179 2063 6c65 A client may cle\n-00175440: 6172 2074 6865 203c 636f 6465 3e23 534f ar the #SO\n-00175450: 4150 5f49 4f5f 4b45 4550 414c 4956 453c AP_IO_KEEPALIVE<\n-00175460: 2f63 6f64 653e 2066 6c61 6720 6a75 7374 /code> flag just\n-00175470: 2062 6566 6f72 6520 7468 6520 6c61 7374 before the last\n-00175480: 2063 616c 6c20 746f 2061 2073 6572 7665 call to a serve\n-00175490: 7220 746f 206c 6574 2074 6865 2073 6572 r to let the ser\n-001754a0: 7665 7220 6b6e 6f77 2069 7420 7761 6e74 ver know it want\n-001754b0: 7320 746f 2063 6c6f 7365 2074 6865 2063 s to close the c\n-001754c0: 6f6e 6e65 6374 696f 6e20 6166 7465 7220 onnection after \n-001754d0: 7468 6973 206c 6173 7420 6361 6c6c 2e20 this last call. \n-001754e0: 5468 6973 2077 696c 6c20 636c 6f73 6520 This will close \n-001754f0: 7468 6520 736f 636b 6574 2061 6674 6572 the socket after\n-00175500: 2074 6865 2063 616c 6c20 616e 6420 616c the call and al\n-00175510: 736f 2069 6e66 6f72 6d73 2074 6865 2073 so informs the s\n-00175520: 6572 7665 7220 746f 2067 7261 6365 6675 erver to gracefu\n-00175530: 6c6c 7920 636c 6f73 6520 7468 6520 636f lly close the co\n-00175540: 6e6e 6563 7469 6f6e 2e3c 2f70 3e0a 3c70 nnection.

    .The client-side\n-00175560: 2063 616e 2061 6c73 6f20 7365 7420 7468 can also set th\n-00175570: 6520 5443 5020 6b65 6570 2d61 6c69 7665 e TCP keep-alive\n-00175580: 2073 6f63 6b65 7420 7072 6f70 6572 7469 socket properti\n-00175590: 6573 2c20 7573 696e 6720 7468 6520 3c63 es, using the soap\n-00175660: 3a3a 7463 705f 6b65 6570 5f61 6c69 7665 ::tcp_keep_alive\n-00175670: 3c2f 613e 3c2f 636f 6465 3e20 666c 6167 flag\n-00175680: 2028 7365 7420 746f 2031 2074 6f20 656e (set to 1 to en\n-00175690: 6162 6c65 292c 203c 636f 6465 3e3c 6120 able), soap\n-00175740: 3a3a 7463 705f 6b65 6570 5f69 646c 653c ::tcp_keep_idle<\n-00175750: 2f61 3e3c 2f63 6f64 653e 2074 6f20 7365 /a> to se\n-00175760: 7420 7468 6520 3c63 6f64 653e 5443 505f t the TCP_\n-00175770: 4b45 4550 4944 4c45 3c2f 636f 6465 3e20 KEEPIDLE \n-00175780: 7661 6c75 652c 203c 636f 6465 3e3c 6120 value, soa\n-00175830: 703a 3a74 6370 5f6b 6565 705f 696e 7476 p::tcp_keep_intv\n-00175840: 6c3c 2f61 3e3c 2f63 6f64 653e 2074 6f20 l to \n-00175850: 7365 7420 7468 6520 3c63 6f64 653e 5443 set the TC\n-00175860: 505f 4b45 4550 494e 5456 4c3c 2f63 6f64 P_KEEPINTVL value, and soap::tcp_keep\n-00175930: 5f63 6e74 3c2f 613e 3c2f 636f 6465 3e20 _cnt \n-00175940: 746f 2073 6574 2074 6865 203c 636f 6465 to set the TCP_KEEPCNT value.

    .<\n-00175970: 703e 4966 2061 2063 6c69 656e 7420 6973 p>If a client is\n-00175980: 2069 6e20 7468 6520 6d69 6464 6c65 206f in the middle o\n-00175990: 6620 736f 6170 2063 616c 6c20 7468 6174 f soap call that\n-001759a0: 206d 6967 6874 2074 616b 6520 6120 6c6f might take a lo\n-001759b0: 6e67 2074 696d 6520 616e 6420 7468 6520 ng time and the \n-001759c0: 7365 7276 6572 2067 6f65 7320 6177 6179 server goes away\n-001759d0: 2f64 6f77 6e20 7468 6520 6361 6c6c 6572 /down the caller\n-001759e0: 2064 6f65 7320 6e6f 7420 6765 7420 616e does not get an\n-001759f0: 7920 6665 6564 6261 636b 2075 6e74 696c y feedback until\n-00175a00: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::recv\n-00175ac0: 5f74 696d 656f 7574 3c2f 613e 3c2f 636f _timeout is reached. \n-00175ae0: 456e 6162 6c69 6e67 2054 4350 206b 6565 Enabling TCP kee\n-00175af0: 7020 616c 6976 6520 6f6e 2073 7973 7465 p alive on syste\n-00175b00: 6d73 2074 6861 7420 7375 7070 6f72 7420 ms that support \n-00175b10: 6974 2061 6c6c 6f77 7320 666f 7220 6120 it allows for a \n-00175b20: 6661 7374 6572 2063 6f6e 6e65 6374 696f faster connectio\n-00175b30: 6e20 7465 6172 646f 776e 2064 6574 6563 n teardown detec\n-00175b40: 7469 6f6e 2066 6f72 2061 7070 6c69 6361 tion for applica\n-00175b50: 7469 6f6e 7320 7468 6174 206e 6565 6420 tions that need \n-00175b60: 6974 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 it.

    .

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

    ..HTTP chunk\n-00175bd0: 6564 2074 7261 6e73 6665 7220 656e 636f ed transfer enco\n-00175be0: 6469 6e67 3c2f 6832 3e0a 3c70 3e4f 7574 ding

    .

    Out\n-00175bf0: 626f 756e 6420 4854 5450 206d 6573 7361 bound HTTP messa\n-00175c00: 6765 7320 6172 6520 6e6f 7420 6368 756e ges are not chun\n-00175c10: 6b65 6420 756e 6c65 7373 2074 6865 203c ked unless the <\n-00175c20: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH\n-00175c30: 554e 4b3c 2f63 6f64 653e 2066 6c61 6720 UNK flag \n-00175c40: 6973 2065 6e61 626c 6564 2e20 4368 756e is enabled. Chun\n-00175c50: 6b69 6e67 206d 6179 2069 6d70 726f 7665 king may improve\n-00175c60: 2074 6865 2073 7065 6564 206f 6620 6d65 the speed of me\n-00175c70: 7373 6167 6520 7365 6e64 696e 6720 7769 ssage sending wi\n-00175c80: 7468 2048 5454 502c 2062 6563 6175 7365 th HTTP, because\n-00175c90: 2074 6865 206d 6573 7361 6765 206c 656e the message len\n-00175ca0: 6774 6820 646f 6573 206e 6f74 206e 6565 gth does not nee\n-00175cb0: 6420 746f 2062 6520 6465 7465 726d 696e d to be determin\n-00175cc0: 6564 2069 6e20 6164 7661 6e63 6520 666f ed in advance fo\n-00175cd0: 7220 7468 6520 4854 5450 2063 6f6e 7465 r the HTTP conte\n-00175ce0: 6e74 206c 656e 6774 6820 6865 6164 6572 nt length header\n-00175cf0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-00175d30: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n-00175d50: 3c2f 613e 0a48 5454 5020 6275 6666 6572 .HTTP buffer\n-00175d60: 6564 2073 656e 6473 3c2f 6832 3e0a 3c70 ed sends

    .The entire outb\n-00175d80: 6f75 6e64 206d 6573 7361 6765 2063 616e ound message can\n-00175d90: 2062 6520 7374 6f72 6564 2069 6e20 6120 be stored in a \n-00175da0: 6275 6666 6572 2074 6f20 6465 7465 726d buffer to determ\n-00175db0: 696e 6520 7468 6520 4854 5450 2063 6f6e ine the HTTP con\n-00175dc0: 7465 6e74 206c 656e 6774 6820 7261 7468 tent length rath\n-00175dd0: 6572 2074 6861 6e20 7468 6520 7477 6f2d er than the two-\n-00175de0: 7068 6173 6520 656e 636f 6469 6e67 2075 phase encoding u\n-00175df0: 7365 6420 6279 2067 534f 4150 2063 6c69 sed by gSOAP cli\n-00175e00: 656e 742d 7369 6465 2073 7475 6220 6675 ent-side stub fu\n-00175e10: 6e63 7469 6f6e 7320 616e 6420 7365 7276 nctions and serv\n-00175e20: 6572 2d73 6964 6520 736b 656c 6574 6f6e er-side skeleton\n-00175e30: 2066 756e 6374 696f 6e73 2067 656e 6572 functions gener\n-00175e40: 6174 6564 2062 7920 736f 6170 6370 7032 ated by soapcpp2\n-00175e50: 2c20 7768 6963 6820 7065 7266 6f72 6d20 , which perform \n-00175e60: 6120 7365 7061 7261 7465 2070 6173 7320 a separate pass \n-00175e70: 6f76 6572 2074 6865 2064 6174 6120 746f over the data to\n-00175e80: 2064 6574 6572 6d69 6e65 2074 6865 206c determine the l\n-00175e90: 656e 6774 6820 6f66 2074 6865 206f 7574 ength of the out\n-00175ea0: 626f 756e 6420 6d65 7373 6167 652e 2053 bound message. S\n-00175eb0: 6574 7469 6e67 2074 6865 2066 6c61 6720 etting the flag \n-00175ec0: 3c63 6f64 653e 2353 4f41 505f 494f 5f53 #SOAP_IO_S\n-00175ed0: 544f 5245 3c2f 636f 6465 3e20 666f 7220 TORE for \n-00175ee0: 7468 6520 6f75 7470 7574 206d 6f64 6520 the output mode \n-00175ef0: 7769 6c6c 2062 7566 6665 7220 7468 6520 will buffer the \n-00175f00: 656e 7469 7265 206d 6573 7361 6765 2e20 entire message. \n-00175f10: 5468 6973 206d 6179 206f 7220 6d61 7920 This may or may \n-00175f20: 6e6f 7420 7370 6565 6420 7570 2074 6865 not speed up the\n-00175f30: 2074 7261 6e73 6d69 7373 696f 6e20 6f66 transmission of\n-00175f40: 206d 6573 7361 6765 732c 2064 6570 656e messages, depen\n-00175f50: 6469 6e67 206f 6e20 7468 6520 636f 6e74 ding on the cont\n-00175f60: 656e 742c 2062 7574 206d 6179 2072 6571 ent, but may req\n-00175f70: 7569 7265 2073 6967 6e69 6669 6361 6e74 uire significant\n-00175f80: 2073 746f 7261 6765 2073 7061 6365 2074 storage space t\n-00175f90: 6f20 686f 6c64 206c 6172 6765 206d 6573 o hold large mes\n-00175fa0: 7361 6765 7320 7465 6d70 6f72 6172 696c sages temporaril\n-00175fb0: 792e 3c2f 703e 0a3c 703e f09f 949d 203c y.

    .

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

    ..HTTP\n-00176020: 2061 7574 6865 6e74 6963 6174 696f 6e3c authentication<\n-00176030: 2f68 323e 0a3c 703e 5468 6520 666f 6c6c /h2>.

    The foll\n-00176040: 6f77 696e 6720 7365 6374 696f 6e73 2065 owing sections e\n-00176050: 7870 6c61 696e 2068 6f77 2074 6f20 6175 xplain how to au\n-00176060: 7468 656e 7469 6361 7465 2077 6974 6820 thenticate with \n-00176070: 4854 5450 2062 6561 7265 722c 2062 6173 HTTP bearer, bas\n-00176080: 6963 2c20 6469 6765 7374 2c20 616e 6420 ic, digest, and \n-00176090: 4e54 4c4d 2e20 5072 6f78 7920 6175 7468 NTLM. Proxy auth\n-001760a0: 656e 7469 6361 7469 6f6e 2069 7320 616c entication is al\n-001760b0: 736f 2063 6f76 6572 6564 2e3c 2f70 3e0a so covered.

    .\n-001760c0: 3c70 3e59 6f75 2063 6f75 6c64 2061 6c73

    You could als\n-001760d0: 6f20 7573 6520 7468 6520 5769 6e49 6e65 o use the WinIne\n-001760e0: 7420 706c 7567 696e 2061 7661 696c 6162 t plugin availab\n-001760f0: 6c65 2069 6e20 7468 6520 3c65 6d3e 3c63 le in the gsoap/mod_gs\n-00176110: 6f61 703c 2f63 6f64 653e 3c2f 656d 3e20 oap \n-00176120: 6469 7265 6374 6f72 7920 6f66 2074 6865 directory of the\n-00176130: 2067 534f 4150 2073 6f75 7263 6520 636f gSOAP source co\n-00176140: 6465 2070 6163 6b61 6765 2074 6f20 7369 de package to si\n-00176150: 6d70 6c69 6679 2049 6e74 6572 6e65 7420 mplify Internet \n-00176160: 6163 6365 7373 2066 6f72 2067 534f 4150 access for gSOAP\n-00176170: 2063 6c69 656e 7420 6170 706c 6963 6174 client applicat\n-00176180: 696f 6e73 2061 6e64 2064 6561 6c20 7769 ions and deal wi\n-00176190: 7468 2065 6e63 7279 7074 696f 6e2c 2070 th encryption, p\n-001761a0: 726f 7869 6573 2c20 616e 6420 6175 7468 roxies, and auth\n-001761b0: 656e 7469 6361 7469 6f6e 2c20 7365 6520 entication, see \n-001761c0: 7468 6520 6753 4f41 5020 3c61 2068 7265 the gSOAP WinInet plugin\n-00176200: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n-00176210: 6f6e 2e3c 2f70 3e0a 3c70 3e54 6865 2067 on.

    .

    The g\n-00176220: 534f 4150 2043 5552 4c20 706c 7567 696e SOAP CURL plugin\n-00176230: 2063 616e 2061 6c73 6f20 6265 2075 7365 can also be use\n-00176240: 6420 746f 2064 6576 656c 6f70 2067 534f d to develop gSO\n-00176250: 4150 2063 6c69 656e 7420 6170 706c 6963 AP client applic\n-00176260: 6174 696f 6e73 2061 6e64 2043 5552 4c20 ations and CURL \n-00176270: 696d 706c 656d 656e 7473 2076 6172 696f implements vario\n-00176280: 7573 2048 5454 5020 6175 7468 656e 7469 us HTTP authenti\n-00176290: 6361 7469 6f6e 206d 6574 686f 6473 2c20 cation methods, \n-001762a0: 7365 6520 7468 6520 6753 4f41 5020 3c61 see the gSOAP CURL plugin documentation\n-001762f0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-00176330: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n-00176360: 0a48 5454 5020 6265 6172 6572 2061 7574 .HTTP bearer aut\n-00176370: 6865 6e74 6963 6174 696f 6e3c 2f68 333e hentication

    \n-00176380: 0a3c 703e 4854 5450 2062 6561 7265 7220 .

    HTTP bearer \n-00176390: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n-001763a0: 7320 656e 6162 6c65 6420 6174 2074 6865 s enabled at the\n-001763b0: 2063 6c69 656e 742d 7369 6465 2062 7920 client-side by \n-001763c0: 7365 7474 696e 6720 7468 6520 3c63 6f64 setting the soap::\n-00176490: 6265 6172 6572 3c2f 613e 3c2f 636f 6465 bearer string to the \n-001764b0: 6265 6172 6572 2074 6f6b 656e 3a3c 2f70 bearer token:.

    \n-00176500: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n-00176540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00176550: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00176560: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n-00176570: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    .<\n-001765f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00176600: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00176610: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00176620: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;bear\n-00176670: 6572 3c2f 613e 203d 203c 7370 616e 2063 er = "...&q\n-001766a0: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    \n-001766e0: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n-001766f0: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n-00176700: 6f64 283c 6120 636c 6173 733d 2263 6f64 od(soap, ...))
    .\n-00176740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-00176770: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    \n-001767b0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... \n-001767f0: 2f2f 204f 4b3c 2f73 7061 6e3e 3c2f 6469 // OK.
    \n-00176860: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n-001768a0: 3a3a 6265 6172 6572 3c2f 613e 3c2f 6469 ::bearer
    const char\n-001768d0: 202a 2062 6561 7265 723c 2f64 6976 3e3c * bearer
    <\n-001768e0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-001768f0: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n-00176900: 2048 5454 5020 6175 7468 6f72 697a 6174 HTTP authorizat\n-00176910: 696f 6e20 6265 6172 6572 2074 6f6b 656e ion bearer token\n-00176920: 2076 616c 7565 2074 6f20 6265 2073 656e value to be sen\n-00176930: 7420 6279 2074 6865 2063 6c69 656e 742c t by the client,\n-00176940: 2073 6572 7665 7220 7369 6465 2072 6563 server side rec\n-00176950: 6569 7665 7320 742e 2e2e 3c2f 6469 763e eives t...
    \n-00176960: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00176980: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00176990: 3a33 3735 323c 2f64 6976 3e3c 2f64 6976 :3752
    .

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

    .<\n-001769f0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.HTTP basic au\n-00176a30: 7468 656e 7469 6361 7469 6f6e 3c2f 6833 thentication.

    HTTP basic \n-00176a50: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n-00176a60: 7320 656e 6162 6c65 6420 6174 2074 6865 s enabled at the\n-00176a70: 2063 6c69 656e 742d 7369 6465 2062 7920 client-side by \n-00176a80: 7365 7474 696e 6720 7468 6520 3c63 6f64 setting the const char* soap::user\n-00176b60: 6964 3c2f 613e 3c2f 636f 6465 3e20 616e id an\n-00176b70: 6420 3c63 6f64 653e 636f 6e73 7420 6368 d const ch\n-00176b80: 6172 2a20 3c61 2063 6c61 7373 3d22 656c ar* soap\n-00176c40: 3a3a 7061 7373 7764 3c2f 613e 3c2f 636f ::passwd strings to a\n-00176c60: 2075 7365 726e 616d 6520 616e 6420 7061 username and pa\n-00176c70: 7373 776f 7264 2c20 7265 7370 6563 7469 ssword, respecti\n-00176c80: 7665 6c79 2e20 4120 7365 7276 6572 206d vely. A server m\n-00176c90: 6179 2072 6571 7565 7374 2075 7365 7220 ay request user \n-00176ca0: 6175 7468 656e 7469 6361 7469 6f6e 2061 authentication a\n-00176cb0: 6e64 2064 656e 6965 7320 6163 6365 7373 nd denies access\n-00176cc0: 2028 4854 5450 2034 3031 2065 7272 6f72 (HTTP 401 error\n-00176cd0: 2920 7768 656e 2074 6865 2063 6c69 656e ) when the clien\n-00176ce0: 7420 7472 6965 7320 746f 2063 6f6e 6e65 t tries to conne\n-00176cf0: 6374 2077 6974 686f 7574 2048 5454 5020 ct without HTTP \n-00176d00: 6175 7468 656e 7469 6361 7469 6f6e 2028 authentication (\n-00176d10: 6f72 2077 6974 6820 7468 6520 7772 6f6e or with the wron\n-00176d20: 6720 6175 7468 656e 7469 6361 7469 6f6e g authentication\n-00176d30: 2069 6e66 6f72 6d61 7469 6f6e 292e 3c2f information)..

    Basic auth\n-00176d50: 656e 7469 6361 7469 6f6e 2073 686f 756c entication shoul\n-00176d60: 6420 6f6e 6c79 2062 6520 7573 6564 206f d only be used o\n-00176d70: 7665 7220 4854 5450 532c 2062 6563 6175 ver HTTPS, becau\n-00176d80: 7365 2074 6865 2063 7265 6465 6e74 6961 se the credentia\n-00176d90: 6c73 2061 7265 2073 656e 7420 696e 2074 ls are sent in t\n-00176da0: 6865 2063 6c65 6172 2077 6974 6820 4854 he clear with HT\n-00176db0: 5450 2e20 5365 6520 5365 6374 696f 6e20 TP. See Section \n-00176dc0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 The\n-00176df0: 2048 5454 5020 6469 6765 7374 2061 7574 HTTP digest aut\n-00176e00: 6865 6e74 6963 6174 696f 6e20 706c 7567 hentication plug\n-00176e10: 696e 3c2f 613e 2074 6f20 7573 6520 7468 in to use th\n-00176e20: 6520 4854 5450 2064 6967 6573 7420 706c e HTTP digest pl\n-00176e30: 7567 696e 2074 6861 7420 6973 2073 6166 ugin that is saf\n-00176e40: 6520 666f 7220 6175 7468 656e 7469 6361 e for authentica\n-00176e50: 7469 6f6e 206f 7665 7220 4854 5450 2e3c tion over HTTP.<\n-00176e60: 2f70 3e0a 3c70 3e48 6572 6520 6973 2061 /p>.

    Here is a\n-00176e70: 6e20 6578 616d 706c 6520 636c 6965 6e74 n example client\n-00176e80: 2063 6f64 6520 6672 6167 6d65 6e74 2074 code fragment t\n-00176e90: 6f20 7365 7420 7468 6520 4854 5450 2061 o set the HTTP a\n-00176ea0: 7574 6865 6e74 6963 6174 696f 6e20 7573 uthentication us\n-00176eb0: 6572 6e61 6d65 2061 6e64 2070 6173 7377 ername and passw\n-00176ec0: 6f72 643a 3c2f 703e 0a3c 6469 7620 636c ord:

    .
    <\n-00176ee0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00176ef0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n-00176f40: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-00176f70: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n-00176fd0: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); .
    soa\n-00177020: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->userid = \n-00177080: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001770a0: 743b 6775 6573 7426 7175 6f74 3b3c 2f73 t;guest";
    .<\n-001770d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001770e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001770f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00177100: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;pass\n-00177150: 7764 3c2f 613e 203d 203c 7370 616e 2063 wd = "visit\n-00177180: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-00177190: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soa\n-001771d0: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n-001771e0: 7468 6f64 283c 6120 636c 6173 733d 2263 thod(soap\n-00177210: 3c2f 613e 2c20 2e2e 2e29 293c 2f64 6976 , ...)).
    ... \n-00177250: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-00177260: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else.
    ... // success
    .
    .
    <\n-00177640: 703e 4120 636c 6965 6e74 2053 4f41 5020 p>A client SOAP \n-00177650: 7265 7175 6573 7420 7769 6c6c 2068 6176 request will hav\n-00177660: 6520 7468 6520 666f 6c6c 6f77 696e 6720 e the following \n-00177670: 4854 5450 2068 6561 6465 723a 203c 2f70 HTTP header:
    POST /XXX\n-001776a0: 2048 5454 502f 312e 3120 0a48 6f73 743a   HTTP/1.1 .Host:\n-001776b0: 2059 5959 200a 5573 6572 2d41 6765 6e74   YYY .User-Agent\n-001776c0: 3a20 6753 4f41 502f 322e 3820 0a43 6f6e  : gSOAP/2.8 .Con\n-001776d0: 7465 6e74 2d54 7970 653a 2074 6578 742f  tent-Type: text/\n-001776e0: 786d 6c3b 2063 6861 7273 6574 3d75 7466  xml; charset=utf\n-001776f0: 2d38 200a 436f 6e74 656e 742d 4c65 6e67  -8 .Content-Leng\n-00177700: 7468 3a20 5a5a 5a20 0a41 7574 686f 7269  th: ZZZ .Authori\n-00177710: 7a61 7469 6f6e 3a20 4261 7369 6320 5a33  zation: Basic Z3\n-00177720: 566c 6333 5136 5a33 566c 6333 513d 200a  Vlc3Q6Z3Vlc3Q= .\n-00177730: 3c2f 7072 653e 3c70 3e20 4120 636c 6965  

    A clie\n-00177740: 6e74 206d 7573 7420 7365 7420 7468 6520 nt must set the \n-00177750: 3c63 6f64 653e 636f 6e73 7420 6368 6172 const char\n-00177760: 2a20 3c61 2063 6c61 7373 3d22 656c 2220 * soap::\n-00177820: 7573 6572 6964 3c2f 613e 3c2f 636f 6465 userid and cons\n-00177840: 7420 6368 6172 2a20 3c61 2063 6c61 7373 t char* \n-00177900: 736f 6170 3a3a 7061 7373 7764 3c2f 613e soap::passwd\n-00177910: 3c2f 636f 6465 3e20 7374 7269 6e67 7320 strings \n-00177920: 666f 7220 6561 6368 2063 616c 6c20 7468 for each call th\n-00177930: 6174 2072 6571 7569 7265 7320 636c 6965 at requires clie\n-00177940: 6e74 2061 7574 6865 6e74 6963 6174 696f nt authenticatio\n-00177950: 6e2e 2054 6865 2073 7472 696e 6773 2061 n. The strings a\n-00177960: 7265 2072 6573 6574 2061 6674 6572 2065 re reset after e\n-00177970: 6163 6820 7375 6363 6573 7366 756c 206f ach successful o\n-00177980: 7220 756e 7375 6363 6573 7366 756c 2063 r unsuccessful c\n-00177990: 616c 6c2e 3c2f 703e 0a3c 703e 5768 656e all.

    .

    When\n-001779a0: 2070 7265 7365 6e74 2c20 7468 6520 3c63 present, the WWW-Authenti\n-001779c0: 6361 7465 3c2f 636f 6465 3e20 4854 5450 cate HTTP\n-001779d0: 2068 6561 6465 7220 7265 7475 726e 6564 header returned\n-001779e0: 2062 7920 7468 6520 7365 7276 6572 2077 by the server w\n-001779f0: 6974 6820 7468 6520 6175 7468 656e 7469 ith the authenti\n-00177a00: 6361 7469 6f6e 2072 6561 6c6d 2069 7320 cation realm is \n-00177a10: 7374 6f72 6564 2069 6e20 7468 6520 7468 stored in the th\n-00177a20: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e \n-00177ae0: 736f 6170 3a3a 6175 7468 7265 616c 6d3c soap::authrealm<\n-00177af0: 2f61 3e3c 2f63 6f64 653e 2073 7472 696e /a> strin\n-00177b00: 672e 2054 6869 7320 6973 2075 7365 6675 g. This is usefu\n-00177b10: 6c20 666f 7220 636c 6965 6e74 7320 746f l for clients to\n-00177b20: 2075 7365 2074 6869 7320 646f 6d61 696e use this domain\n-00177b30: 2069 6e66 6f72 6d61 7469 6f6e 2074 6f20 information to \n-00177b40: 7265 7370 6f6e 6420 746f 2061 7574 6865 respond to authe\n-00177b50: 6e74 6963 6174 696f 6e20 7265 7175 6573 ntication reques\n-00177b60: 7473 2e3c 2f70 3e0a 3c70 3e41 2073 7461 ts.

    .

    A sta\n-00177b70: 6e64 2d61 6c6f 6e65 2067 534f 4150 2057 nd-alone gSOAP W\n-00177b80: 6562 2053 6572 7669 6365 2061 7070 6c69 eb Service appli\n-00177b90: 6361 7469 6f6e 2063 616e 2065 6e66 6f72 cation can enfor\n-00177ba0: 6365 2048 5454 5020 6175 7468 656e 7469 ce HTTP authenti\n-00177bb0: 6361 7469 6f6e 206f 6e20 636c 6965 6e74 cation on client\n-00177bc0: 7320 6279 2063 6865 636b 696e 6720 7468 s by checking th\n-00177bd0: 6520 3c63 6f64 653e 636f 6e73 7420 6368 e const ch\n-00177be0: 6172 2a20 3c61 2063 6c61 7373 3d22 656c ar* soap\n-00177ca0: 3a3a 7573 6572 6964 3c2f 613e 3c2f 636f ::userid and co\n-00177cc0: 6e73 7420 6368 6172 2a20 3c61 2063 6c61 nst char* soap::passwd string\n-00177da0: 732e 2054 6865 7365 2073 7472 696e 6773 s. These strings\n-00177db0: 2061 7265 2073 6574 2077 6865 6e20 6120 are set when a \n-00177dc0: 636c 6965 6e74 2072 6571 7565 7374 2063 client request c\n-00177dd0: 6f6e 7461 696e 7320 4854 5450 2061 7574 ontains HTTP aut\n-00177de0: 6865 6e74 6963 6174 696f 6e20 6865 6164 hentication head\n-00177df0: 6572 732e 2054 6865 2073 7472 696e 6773 ers. The strings\n-00177e00: 2073 686f 756c 6420 6265 2063 6865 636b should be check\n-00177e10: 6564 2069 6e20 6561 6368 2073 6572 7669 ed in each servi\n-00177e20: 6365 206d 6574 686f 6420 2874 6861 7420 ce method (that \n-00177e30: 7265 7175 6972 6573 2061 7574 6865 6e74 requires authent\n-00177e40: 6963 6174 696f 6e20 746f 2065 7865 6375 ication to execu\n-00177e50: 7465 292e 3c2f 703e 0a3c 703e 4865 7265 te).

    .

    Here\n-00177e60: 2069 7320 616e 2065 7861 6d70 6c65 2073 is an example s\n-00177e70: 6572 7669 6365 206d 6574 686f 6420 696d ervice method im\n-00177e80: 706c 656d 656e 7461 7469 6f6e 2074 6861 plementation tha\n-00177e90: 7420 656e 666f 7263 6564 2063 6c69 656e t enforced clien\n-00177ea0: 7420 6175 7468 656e 7469 6361 7469 6f6e t authentication\n-00177eb0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int ns__webmethod\n-00177f10: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n-00177f60: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-00177f90: 703c 2f61 3e2c 202e 2e2e 2920 3c2f 6469 p, ...) .
    {
    . \n-00177fd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!so\n-00178020: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->userid.
    || !soap-&g\n-001780d0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;passw\n-00178120: 643c 2f61 3e3c 2f64 6976 3e0a 3c64 6976 d
    . \n-00178140: 207c 7c20 7374 7263 6d70 283c 6120 636c || strcmp(soap-><\n-00178180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00178190: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001781a0: 6874 6d6c 2361 3265 6465 3032 3039 3564 html#a2ede02095d\n-001781b0: 3938 3934 3266 3463 3232 3066 6431 3762 98942f4c220fd17b\n-001781c0: 3439 3537 3033 223e 7573 6572 6964 3c2f 495703\">userid, \n-001781f0: 2671 756f 743b 6775 6573 7426 7175 6f74 "guest"\n-00178200: 3b3c 2f73 7061 6e3e 293c 2f64 6976 3e0a ;)
    .\n-00178210: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    || strcmp(<\n-00178230: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00178240: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00178250: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00178260: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;pass\n-001782b0: 7764 3c2f 613e 2c20 3c73 7061 6e20 636c wd, "visit&\n-001782e0: 7175 6f74 3b3c 2f73 7061 6e3e 2929 203c quot;)) <\n-001782f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    }.
    ... // webmethod l\n-001784e0: 6f67 6963 3c2f 7370 616e 3e3c 2f64 6976 ogic.
    \n-00178520: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK;.
    }
    .<\n-001785b0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-001785c0: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-001785d0: 6874 6d6c 5f61 3864 6265 3537 6435 3966 html_a8dbe57d59f\n-001785e0: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7\n-001785f0: 3933 3962 6664 223e 3c64 6976 2063 6c61 939bfd\">
    soap::au\n-00178650: 7468 7265 616c 6d3c 2f61 3e3c 2f64 6976 threalm
    const char \n-00178680: 2a20 6175 7468 7265 616c 6d3c 2f64 6976 * authrealm
    The HTTP and\n-001786b0: 204e 544c 4d20 6175 7468 6f72 697a 6174 NTLM authorizat\n-001786c0: 696f 6e20 7265 616c 6d2f 646f 6d61 696e ion realm/domain\n-001786d0: 2073 7472 696e 6720 7265 6365 6976 6564 string received\n-001786e0: 2062 7920 7468 6520 636c 6965 6e74 2077 by the client w\n-001786f0: 6974 6820 7468 6520 5757 572d 4175 7468 ith the WWW-Auth\n-00178700: 656e 7469 6361 7465 202e 2e2e 3c2f 6469 enticate ...
    Definiti\n-00178730: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-00178740: 2e68 3a33 3833 323c 2f64 6976 3e3c 2f64 .h:3832
    .

    Wh\n-00178770: 656e 2074 6865 2061 7574 6865 6e74 6963 en the authentic\n-00178780: 6174 696f 6e20 6661 696c 732c 2074 6865 ation fails, the\n-00178790: 2073 6572 7669 6365 2072 6573 706f 6e73 service respons\n-001787a0: 6520 7769 7468 2061 2053 4f41 5020 4661 e with a SOAP Fa\n-001787b0: 756c 7420 6d65 7373 6167 6520 616e 6420 ult message and \n-001787c0: 6120 4854 5450 2065 7272 6f72 2063 6f64 a HTTP error cod\n-001787d0: 6520 2234 3031 2055 6e61 7574 686f 7269 e \"401 Unauthori\n-001787e0: 7a65 6422 2e20 5468 6520 4854 5450 2065 zed\". The HTTP e\n-001787f0: 7272 6f72 2063 6f64 6573 2061 7265 2064 rror codes are d\n-00178800: 6573 6372 6962 6564 2069 6e20 5365 6374 escribed in Sect\n-00178810: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Run\n-00178840: 2d74 696d 6520 6572 726f 7220 636f 6465 -time error code\n-00178850: 733c 2f61 3e20 2e3c 2f70 3e0a 3c70 3e54 s .

    .

    T\n-00178860: 6f20 7265 7475 726e 2061 206e 6f6e 2d53 o return a non-S\n-00178870: 4f41 5020 6572 726f 722c 2075 7365 3a3c OAP error, use:<\n-00178880: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    return soap_send_em\n-00178930: 7074 795f 7265 7370 6f6e 7365 3c2f 613e pty_response\n-00178940: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00178970: 2c20 3430 3129 3b20 3c2f 6469 763e 0a3c , 401);
    .<\n-00178980: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

    .

    \n-001789d0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .H\n-00178a00: 5454 5020 4e54 4c4d 2061 7574 6865 6e74 TTP NTLM authent\n-00178a10: 6963 6174 696f 6e3c 2f68 333e 0a3c 703e ication

    .

    \n-00178a20: 4854 5450 204e 544c 4d20 6175 7468 656e HTTP NTLM authen\n-00178a30: 7469 6361 7469 6f6e 2069 7320 656e 6162 tication is enab\n-00178a40: 6c65 6420 6174 2074 6865 2063 6c69 656e led at the clien\n-00178a50: 742d 7369 6465 2062 7920 696e 7374 616c t-side by instal\n-00178a60: 6c69 6e67 203c 636f 6465 3e6c 6962 6e74 ling libnt\n-00178a70: 6c6d 3c2f 636f 6465 3e20 6672 6f6d 203c lm from <\n-00178a80: 6120 6872 6566 3d22 6874 7470 3a2f 2f77 a href=\"http://w\n-00178a90: 7777 2e6e 6f6e 676e 752e 6f72 672f 6c69 ww.nongnu.org/li\n-00178aa0: 626e 746c 6d22 3e68 7474 703a 2f2f 7777 bntlm\">http://ww\n-00178ab0: 772e 6e6f 6e67 6e75 2e6f 7267 2f6c 6962 w.nongnu.org/lib\n-00178ac0: 6e74 6c6d 3c2f 613e 2061 6e64 2063 6f6d ntlm and com\n-00178ad0: 7069 6c69 6e67 2061 6c6c 2070 726f 6a65 piling all proje\n-00178ae0: 6374 2073 6f75 7263 6520 636f 6465 7320 ct source codes \n-00178af0: 7769 7468 2074 6865 2063 6f6d 7069 6c65 with the compile\n-00178b00: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_NTLM.

    .

    In yo\n-00178b30: 7572 2061 7070 6c69 6361 7469 6f6e 2063 ur application c\n-00178b40: 6f64 6520 7365 7420 7468 6520 3c63 6f64 ode set the const char* soap::user\n-00178c20: 6964 3c2f 613e 3c2f 636f 6465 3e20 616e id an\n-00178c30: 6420 3c63 6f64 653e 636f 6e73 7420 6368 d const ch\n-00178c40: 6172 2a20 3c61 2063 6c61 7373 3d22 656c ar* soap\n-00178d00: 3a3a 7061 7373 7764 3c2f 613e 3c2f 636f ::passwd strings to a\n-00178d20: 2075 7365 726e 616d 6520 616e 6420 7061 username and pa\n-00178d30: 7373 776f 7264 2e20 4120 7365 7276 6572 ssword. A server\n-00178d40: 206d 6179 2072 6571 7565 7374 204e 544c may request NTL\n-00178d50: 4d20 6175 7468 656e 7469 6361 7469 6f6e M authentication\n-00178d60: 2061 6e64 2064 656e 6965 7320 6163 6365 and denies acce\n-00178d70: 7373 2028 4854 5450 2034 3031 2061 7574 ss (HTTP 401 aut\n-00178d80: 6865 6e74 6963 6174 696f 6e20 7265 7175 hentication requ\n-00178d90: 6972 6564 206f 7220 4854 5450 2034 3037 ired or HTTP 407\n-00178da0: 2048 5454 5020 7072 6f78 7920 6175 7468 HTTP proxy auth\n-00178db0: 656e 7469 6361 7469 6f6e 2072 6571 7569 entication requi\n-00178dc0: 7265 6429 2077 6865 6e20 7468 6520 636c red) when the cl\n-00178dd0: 6965 6e74 2074 7269 6573 2074 6f20 636f ient tries to co\n-00178de0: 6e6e 6563 7420 7769 7468 6f75 7420 4854 nnect without HT\n-00178df0: 5450 2061 7574 6865 6e74 6963 6174 696f TP authenticatio\n-00178e00: 6e20 286f 7220 7769 7468 2074 6865 2077 n (or with the w\n-00178e10: 726f 6e67 2061 7574 6865 6e74 6963 6174 rong authenticat\n-00178e20: 696f 6e20 696e 666f 726d 6174 696f 6e29 ion information)\n-00178e30: 2e3c 2f70 3e0a 3c70 3e48 6572 6520 6973 .

    .

    Here is\n-00178e40: 2061 6e20 6578 616d 706c 6520 636c 6965 an example clie\n-00178e50: 6e74 2063 6f64 6520 6672 6167 6d65 6e74 nt code fragment\n-00178e60: 2074 6f20 7365 7420 7468 6520 4e54 4c4d to set the NTLM\n-00178e70: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-00178e80: 7573 6572 6e61 6d65 2061 6e64 2070 6173 username and pas\n-00178e90: 7377 6f72 643a 3c2f 703e 0a3c 6469 7620 sword:

    .
    .<\n-00179020: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00179030: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n-00179060: 6e73 5f5f 7765 626d 6574 686f 6428 3c61 ns__webmethod(soap, .\n-001790a0: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
    .{<\n-001790c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (<\n-00179100: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00179110: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00179120: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00179130: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n-00179180: 723c 2f61 3e20 3d3d 2034 3031 2920 3c2f r == 401) .
    {
    \n-001791b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n-001791f0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->userid =\n-00179250: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00179270: 6f74 3b5a 6170 686f 6426 7175 6f74 3b3c ot;Zaphod"<\n-00179280: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-00179290: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001792a0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap\n-001792d0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->passwd = <\n-00179330: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00179340: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00179350: 3b42 6565 626c 6562 726f 7826 7175 6f74 ;Beeblebrox"\n-00179360: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n-00179370: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (soap\n-001793b0: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n-001793c0: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap<\n-001793f0: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...)) .
    ... // error
    .
    \n-00179460: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n-001794a0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n-001794c0: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n-001794d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }.
    }
    .

    The follow\n-00179530: 696e 6720 4e54 4c4d 2068 616e 6473 6861 ing NTLM handsha\n-00179540: 6b65 2062 6574 7765 656e 2074 6865 2063 ke between the c\n-00179550: 6c69 656e 7420 4320 616e 6420 7365 7276 lient C and serv\n-00179560: 6572 2053 2069 7320 7065 7266 6f72 6d65 er S is performe\n-00179570: 643a 203c 2f70 3e3c 7072 6520 636c 6173 d:

    1: \n-00179590: 4320 202d 2d26 6774 3b20 5320 2661 6d70  C  --> S &\n-001795a0: 3b20 504f 5354 202e 2e2e 200a 2020 2020  ; POST ... .    \n-001795b0: 2020 2020 2020 2020 2661 6d70 3b20 436f          & Co\n-001795c0: 6e74 656e 742d 5479 7065 3a20 7465 7874  ntent-Type: text\n-001795d0: 2f78 6d6c 3b20 6368 6172 7365 743d 7574  /xml; charset=ut\n-001795e0: 662d 3820 0a0a 323a 2043 2026 6c74 3b2d  f-8 ..2: C <-\n-001795f0: 2d20 2053 2026 616d 703b 2034 3031 2055  -  S & 401 U\n-00179600: 6e61 7574 686f 7269 7a65 6420 0a20 2020  nauthorized .   \n-00179610: 2020 2020 2020 2020 2026 616d 703b 2057           & W\n-00179620: 5757 2d41 7574 6865 6e74 6963 6174 653a  WW-Authenticate:\n-00179630: 204e 544c 4d20 0a0a 333a 2043 2020 2d2d   NTLM ..3: C  --\n-00179640: 2667 743b 2053 2026 616d 703b 2047 4554  > S & GET\n-00179650: 202e 2e2e 200a 2020 2020 2020 2020 2020   ... .          \n-00179660: 2020 2661 6d70 3b20 4175 7468 6f72 697a    & Authoriz\n-00179670: 6174 696f 6e3a 204e 544c 4d20 266c 743b  ation: NTLM <\n-00179680: 6261 7365 3634 2d65 6e63 6f64 6564 2074  base64-encoded t\n-00179690: 7970 652d 312d 6d65 7373 6167 6526 6774  ype-1-message>\n-001796a0: 3b20 0a0a 343a 2043 2026 6c74 3b2d 2d20  ; ..4: C <-- \n-001796b0: 2053 2026 616d 703b 2034 3031 2055 6e61   S & 401 Una\n-001796c0: 7574 686f 7269 7a65 6420 0a20 2020 2020  uthorized .     \n-001796d0: 2020 2020 2020 2026 616d 703b 2057 5757         & WWW\n-001796e0: 2d41 7574 6865 6e74 6963 6174 653a 204e  -Authenticate: N\n-001796f0: 544c 4d20 266c 743b 6261 7365 3634 2d65  TLM <base64-e\n-00179700: 6e63 6f64 6564 2074 7970 652d 322d 6d65  ncoded type-2-me\n-00179710: 7373 6167 6526 6774 3b20 0a0a 353a 2043  ssage> ..5: C\n-00179720: 2020 2d2d 2667 743b 2053 2026 616d 703b    --> S &\n-00179730: 2050 4f53 5420 2e2e 2e20 0a20 2020 2020   POST ... .     \n-00179740: 2020 2020 2020 2026 616d 703b 2043 6f6e         & Con\n-00179750: 7465 6e74 2d54 7970 653a 2074 6578 742f  tent-Type: text/\n-00179760: 786d 6c3b 2063 6861 7273 6574 3d75 7466  xml; charset=utf\n-00179770: 2d38 200a 2020 2020 2020 2020 2020 2020  -8 .            \n-00179780: 2661 6d70 3b20 4175 7468 6f72 697a 6174  & Authorizat\n-00179790: 696f 6e3a 204e 544c 4d20 266c 743b 6261  ion: NTLM <ba\n-001797a0: 7365 3634 2d65 6e63 6f64 6564 2074 7970  se64-encoded typ\n-001797b0: 652d 332d 6d65 7373 6167 6526 6774 3b20  e-3-message> \n-001797c0: 0a0a 363a 2043 2026 6c74 3b2d 2d20 2053  ..6: C <--  S\n-001797d0: 2026 616d 703b 2032 3030 204f 4b0a 3c2f   & 200 OK.

    where st\n-001797f0: 6167 6573 2031 2061 6e64 2032 2069 6e64 ages 1 and 2 ind\n-00179800: 6963 6174 6573 2061 2063 6c69 656e 7420 icates a client \n-00179810: 6174 7465 6d70 7469 6e67 2074 6f20 636f attempting to co\n-00179820: 6e6e 6563 7420 7769 7468 6f75 7420 6175 nnect without au\n-00179830: 7468 6f72 697a 6174 696f 6e20 696e 666f thorization info\n-00179840: 726d 6174 696f 6e2c 2077 6869 6368 2069 rmation, which i\n-00179850: 7320 7468 6520 6669 7273 7420 6d65 7468 s the first meth\n-00179860: 6f64 2063 616c 6c20 696e 2074 6865 2063 od call in the c\n-00179870: 6f64 6520 6162 6f76 652e 2053 7461 6765 ode above. Stage\n-00179880: 2033 2074 6f20 3620 6861 7070 656e 2077 3 to 6 happen w\n-00179890: 6974 6820 7468 6520 7072 6f70 6572 2063 ith the proper c\n-001798a0: 6c69 656e 7420 6175 7468 656e 7469 6361 lient authentica\n-001798b0: 7469 6f6e 2073 6574 2077 6974 6820 3c63 tion set with const char* \n-001798d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::us\n-00179990: 6572 6964 3c2f 613e 3c2f 636f 6465 3e20 erid \n-001799a0: 616e 6420 3c63 6f64 653e 636f 6e73 7420 and const \n-001799b0: 6368 6172 2a20 3c61 2063 6c61 7373 3d22 char* so\n-00179a70: 6170 3a3a 7061 7373 7764 3c2f 613e 3c2f ap::passwd. Optionall\n-00179a90: 792c 2074 6865 203c 636f 6465 3e63 6f6e y, the con\n-00179aa0: 7374 2063 6861 722a 203c 6120 636c 6173 st char* soap::authrealm\n-00179b70: 3c2f 613e 3c2f 636f 6465 3e20 7374 7269 stri\n-00179b80: 6e67 2073 686f 756c 6420 6265 2073 6574 ng should be set\n-00179b90: 2061 7320 7765 6c6c 2074 6f20 696e 6469 as well to indi\n-00179ba0: 6361 7465 2074 6865 2064 6f6d 6169 6e20 cate the domain \n-00179bb0: 6163 6365 7373 6564 2028 7468 6973 2073 accessed (this s\n-00179bc0: 7472 696e 6720 6973 206e 6f72 6d61 6c6c tring is normall\n-00179bd0: 7920 7365 7420 7768 656e 2074 6865 2073 y set when the s\n-00179be0: 6572 7665 7220 7265 7370 6f6e 6473 2077 erver responds w\n-00179bf0: 6974 6820 4854 5450 2034 3031 2073 6f20 ith HTTP 401 so \n-00179c00: 7468 6520 636c 6965 6e74 2072 6563 6569 the client recei\n-00179c10: 7665 7320 7468 6973 2073 6572 7665 7220 ves this server \n-00179c20: 646f 6d61 696e 2069 6e66 6f72 6d61 7469 domain informati\n-00179c30: 6f6e 292e 204e 544c 4d20 6175 7468 656e on). NTLM authen\n-00179c40: 7469 6361 7465 7320 636f 6e6e 6563 7469 ticates connecti\n-00179c50: 6f6e 732c 206e 6f74 2072 6571 7565 7374 ons, not request\n-00179c60: 732e 2057 6865 6e20 7468 6520 636f 6e6e s. When the conn\n-00179c70: 6563 7469 6f6e 2069 7320 6b65 7074 2061 ection is kept a\n-00179c80: 6c69 7665 2c20 7375 6273 6571 7565 6e74 live, subsequent\n-00179c90: 206d 6573 7361 6765 7320 6361 6e20 6265 messages can be\n-00179ca0: 2065 7863 6861 6e67 6564 2077 6974 686f exchanged witho\n-00179cb0: 7574 2072 652d 6175 7468 656e 7469 6361 ut re-authentica\n-00179cc0: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 6f20 tion.

    .

    To \n-00179cd0: 6176 6f69 6420 7468 6520 6f76 6572 6865 avoid the overhe\n-00179ce0: 6164 206f 6620 7468 6520 6669 7273 7420 ad of the first \n-00179cf0: 7265 6a65 6374 6564 2063 616c 6c2c 2075 rejected call, u\n-00179d00: 7365 3a3c 2f70 3e0a 3c64 6976 2063 6c61 se:

    ..soap-&g\n-00179ed0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;ntlm_\n-00179f20: 6368 616c 6c65 6e67 653c 2f61 3e20 3d20 challenge = \n-00179f30: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00179f50: 743b 2671 756f 743b 3c2f 7370 616e 3e3b t;";\n-00179f60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->userid = \n-0017a020: 2671 756f 743b 5a61 7068 6f64 2671 756f "Zaphod&quo\n-0017a030: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    soap<\n-0017a080: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->passwd = "\n-0017a100: 4265 6562 6c65 6272 6f78 2671 756f 743b Beeblebrox"\n-0017a110: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n-0017a120: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->a\n-0017a1b0: 7574 6872 6561 6c6d 3c2f 613e 203d 203c uthrealm = <\n-0017a1c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0017a1d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0017a1e0: 3b55 7273 612d 4d69 6e6f 7226 7175 6f74 ;Ursa-Minor"\n-0017a1f0: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n-0017a200: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n-0017a230: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n-0017a240: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n-0017a250: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0017a280: 202e 2e2e 2929 203c 2f64 6976 3e0a 3c64 ...))
    .\n-0017a2a0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n-0017a2c0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    el\n-0017a300: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n-0017a310: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-0017a340: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n-0017a350: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-0017a3a0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0017a3b0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-0017a3f0: 6f61 703a 3a6e 746c 6d5f 6368 616c 6c65 oap::ntlm_challe\n-0017a400: 6e67 653c 2f61 3e3c 2f64 6976 3e3c 6469 nge
    const char * nt\n-0017a430: 6c6d 5f63 6861 6c6c 656e 6765 3c2f 6469 lm_challenge
    User-defina\n-0017a460: 626c 6520 4e54 4c4d 2061 7574 6865 6e74 ble NTLM authent\n-0017a470: 6963 6174 696f 6e20 6368 616c 6c65 6e67 ication challeng\n-0017a480: 6520 6b65 7920 7374 7269 6e67 2e3c 2f64 e key string.
    Definit\n-0017a4b0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0017a4c0: 322e 683a 3338 3738 3c2f 6469 763e 3c2f 2.h:3878
    .

    W\n-0017a4f0: 6865 6e20 7468 6520 6175 7468 656e 7469 hen the authenti\n-0017a500: 6361 7469 6f6e 2066 6169 6c73 2028 7374 cation fails (st\n-0017a510: 6167 6520 3120 616e 6420 3229 2c20 7468 age 1 and 2), th\n-0017a520: 6520 7365 7276 6963 6520 7265 7370 6f6e e service respon\n-0017a530: 7365 2077 6974 6820 4854 5450 2065 7272 se with HTTP err\n-0017a540: 6f72 2063 6f64 6520 2234 3031 2055 6e61 or code \"401 Una\n-0017a550: 7574 686f 7269 7a65 6422 2061 6e64 203c uthorized\" and <\n-0017a560: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n-0017a610: 3a65 7272 6f72 3c2f 613e 3c2f 636f 6465 :error is set to HTTP\n-0017a630: 2063 6f64 6520 3430 312e 3c2f 703e 0a3c code 401.

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

    .

    .HTT\n-0017a6b0: 5020 7072 6f78 7920 4e54 4c4d 2061 7574 P proxy NTLM aut\n-0017a6c0: 6865 6e74 6963 6174 696f 6e3c 2f68 333e hentication

    \n-0017a6d0: 0a3c 703e 466f 7220 4854 5450 2034 3037 .

    For HTTP 407\n-0017a6e0: 2050 726f 7879 2041 7574 6865 6e74 6963 Proxy Authentic\n-0017a6f0: 6174 696f 6e20 5265 7175 6972 6564 2073 ation Required s\n-0017a700: 6574 2074 6865 203c 636f 6465 3e3c 6120 et the soap\n-0017a7c0: 3a3a 7072 6f78 795f 7573 6572 6964 3c2f ::proxy_userid and soap::proxy_\n-0017a8a0: 7061 7373 7764 3c2f 613e 3c2f 636f 6465 passwd:

    .
    <\n-0017a8e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0017a8f0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n-0017a960: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n-0017a9c0: 6e65 7731 3c2f 613e 283c 6120 636c 6173 new1(SOAP\n-0017aa20: 5f49 4f5f 4b45 4550 414c 4956 453c 2f61 _IO_KEEPALIVE);
    .
    soap->\n-0017aa80: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;proxy_\n-0017aad0: 686f 7374 3c2f 613e 203d 203c 7370 616e host = "...\n-0017ab00: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-0017ab10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    if\n-0017aca0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e\n-0017ad20: 7272 6f72 3c2f 613e 203d 3d20 3430 3729 rror == 407)\n-0017ad30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soap->proxy_use\n-0017adf0: 7269 643c 2f61 3e20 3d20 3c73 7061 6e20 rid = "Zaph\n-0017ae20: 6f64 2671 756f 743b 3c2f 7370 616e 3e3b od";\n-0017ae30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap-&g\n-0017ae80: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;proxy\n-0017aed0: 5f70 6173 7377 643c 2f61 3e20 3d20 3c73 _passwd = "\n-0017af00: 4265 6562 6c65 6272 6f78 2671 756f 743b Beeblebrox"\n-0017af10: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n-0017af20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soa\n-0017af60: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->authrealm\n-0017afc0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n-0017afe0: 7175 6f74 3b55 7273 612d 4d69 6e6f 7226 quot;Ursa-Minor&\n-0017aff0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    if (\n-0017b040: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we\n-0017b050: 626d 6574 686f 6428 3c61 2063 6c61 7373 bmethod(s\n-0017b080: 6f61 703c 2f61 3e2c 202e 2e2e 2929 203c oap, ...)) <\n-0017b090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ..\n-0017b0b0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // error\n-0017b0d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0017b0f0: 2020 2020 3c73 7061 6e20 636c 6173 733d el\n-0017b110: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n-0017b120: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // success
    .
    int proxy_port<\n-0017b240: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n-0017b260: 696e 6162 6c65 2070 726f 7879 2070 6f72 inable proxy por\n-0017b270: 7420 7768 6963 6820 7368 6f75 6c64 2062 t which should b\n-0017b280: 6520 7365 7420 746f 2063 6f6e 6e65 6374 e set to connect\n-0017b290: 2074 6872 6f75 6768 2061 6e20 4854 5450 through an HTTP\n-0017b2a0: 2070 726f 7879 2028 7468 6520 7661 6c75 proxy (the valu\n-0017b2b0: 6520 6973 2038 3038 3020 6279 202e 2e2e e is 8080 by ...\n-0017b2c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-0017b2e0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0017b2f0: 6f61 7032 2e68 3a33 3930 363c 2f64 6976 oap2.h:3906
    .
    const char * pr\n-0017b3e0: 6f78 795f 7573 6572 6964 3c2f 6469 763e oxy_userid
    \n-0017b3f0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n-0017b410: 6520 7072 6f78 7920 6175 7468 6f72 697a e proxy authoriz\n-0017b420: 6174 696f 6e20 7573 6572 2069 6420 7374 ation user id st\n-0017b430: 7269 6e67 2074 6f20 6175 7468 656e 7469 ring to authenti\n-0017b440: 6361 7465 2061 6e64 2063 6f6e 6e65 6374 cate and connect\n-0017b450: 2074 6f20 616e 2048 5454 5020 7072 6f78 to an HTTP prox\n-0017b460: 792e 3c2f 6469 763e 3c64 6976 2063 6c61 y.
    De\n-0017b480: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-0017b490: 6473 6f61 7032 2e68 3a33 3931 313c 2f64 dsoap2.h:3911
    .
    const char * pr\n-0017b580: 6f78 795f 686f 7374 3c2f 6469 763e 3c64 oxy_host
    User-definable \n-0017b5b0: 7072 6f78 7920 686f 7374 206e 616d 6520 proxy host name \n-0017b5c0: 7374 7269 6e67 2077 6869 6368 2073 686f string which sho\n-0017b5d0: 756c 6420 6265 2073 6574 2074 6f20 636f uld be set to co\n-0017b5e0: 6e6e 6563 7420 7468 726f 7567 6820 616e nnect through an\n-0017b5f0: 2048 5454 5020 7072 6f78 792e 3c2f 6469 HTTP proxy.
    Definiti\n-0017b620: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0017b630: 2e68 3a33 3930 313c 2f64 6976 3e3c 2f64 .h:3901
    .U\n-0017b740: 7365 722d 6465 6669 6e61 626c 6520 7072 ser-definable pr\n-0017b750: 6f78 7920 6175 7468 6f72 697a 6174 696f oxy authorizatio\n-0017b760: 6e20 7061 7373 776f 7264 2073 7472 696e n password strin\n-0017b770: 6720 746f 2061 7574 6865 6e74 6963 6174 g to authenticat\n-0017b780: 6520 616e 6420 636f 6e6e 6563 7420 746f e and connect to\n-0017b790: 2061 6e20 4854 5450 2070 726f 7879 2e3c an HTTP proxy.<\n-0017b7a0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0017b7c0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0017b7d0: 6170 322e 683a 3339 3136 3c2f 6469 763e ap2.h:3916
    \n-0017b7e0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    To avoid the ov\n-0017b810: 6572 6865 6164 206f 6620 7468 6520 6669 erhead of the fi\n-0017b820: 7273 7420 7265 6a65 6374 6564 2063 616c rst rejected cal\n-0017b830: 6c2c 2075 7365 3a3c 2f70 3e0a 3c64 6976 l, use:

    .
    .\n-0017b9c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->p\n-0017ba50: 726f 7879 5f68 6f73 743c 2f61 3e20 3d20 roxy_host = \n-0017ba60: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0017ba80: 743b 2e2e 2e26 7175 6f74 3b3c 2f73 7061 t;...";
    .
    soap->\n-0017bae0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;proxy_\n-0017bb30: 706f 7274 3c2f 613e 203d 202e 2e2e 3b20 port = ...; \n-0017bb40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0017bb80: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->proxy_user\n-0017bbe0: 6964 3c2f 613e 203d 203c 7370 616e 2063 id = "Zapho\n-0017bc10: 6426 7175 6f74 3b3c 2f73 7061 6e3e 3b20 d"; \n-0017bc20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    soap->\n-0017bd50: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;authre\n-0017bda0: 616c 6d3c 2f61 3e20 3d20 3c73 7061 6e20 alm = "Ursa\n-0017bdd0: 2d4d 696e 6f72 2671 756f 743b 3c2f 7370 -Minor";
    .soap-&g\n-0017be30: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;ntlm_\n-0017be80: 6368 616c 6c65 6e67 653c 2f61 3e20 3d20 challenge = \n-0017be90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0017beb0: 743b 2671 756f 743b 3c2f 7370 616e 3e3b t;";\n-0017bec0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (s\n-0017bf00: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n-0017bf10: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n-0017bf40: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
    ... // error
    .
    else\n-0017bfd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n-0017bff0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0017c000: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n-0017c010: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .

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

    .

    .HT\n-0017c0a0: 5450 2070 726f 7879 2062 6173 6963 2061 TP proxy basic a\n-0017c0b0: 7574 6865 6e74 6963 6174 696f 6e3c 2f68 uthentication.

    HTTP proxy\n-0017c0d0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-0017c0e0: 2862 6173 6963 2920 6973 2065 6e61 626c (basic) is enabl\n-0017c0f0: 6564 2061 7420 7468 6520 636c 6965 6e74 ed at the client\n-0017c100: 2d73 6964 6520 6279 2073 6574 7469 6e67 -side by setting\n-0017c110: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::\n-0017c1d0: 7072 6f78 795f 7573 6572 6964 3c2f 613e proxy_userid\n-0017c1e0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap::proxy_pa\n-0017c2b0: 7373 7764 3c2f 613e 3c2f 636f 6465 3e20 sswd \n-0017c2c0: 7374 7269 6e67 7320 746f 2061 2075 7365 strings to a use\n-0017c2d0: 726e 616d 6520 616e 6420 7061 7373 776f rname and passwo\n-0017c2e0: 7264 2c20 7265 7370 6563 7469 7665 6c79 rd, respectively\n-0017c2f0: 2e20 466f 7220 6578 616d 706c 652c 2061 . For example, a\n-0017c300: 2070 726f 7879 2073 6572 7665 7220 6d61 proxy server ma\n-0017c310: 7920 7265 7175 6573 7420 7573 6572 2061 y request user a\n-0017c320: 7574 6865 6e74 6963 6174 696f 6e2e 204f uthentication. O\n-0017c330: 7468 6572 7769 7365 2c20 6163 6365 7373 therwise, access\n-0017c340: 2069 7320 6465 6e69 6564 2062 7920 7468 is denied by th\n-0017c350: 6520 7072 6f78 7920 2848 5454 5020 3430 e proxy (HTTP 40\n-0017c360: 3720 6572 726f 7229 2e20 4578 616d 706c 7 error). Exampl\n-0017c370: 6520 636c 6965 6e74 2063 6f64 6520 6672 e client code fr\n-0017c380: 6167 6d65 6e74 2074 6f20 7365 7420 7072 agment to set pr\n-0017c390: 6f78 7920 7365 7276 6572 2c20 7573 6572 oxy server, user\n-0017c3a0: 6e61 6d65 2c20 616e 6420 7061 7373 776f name, and passwo\n-0017c3b0: 7264 3a3c 2f70 3e0a 3c64 6976 2063 6c61 rd:

    .
    \n-0017c3e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-0017c430: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-0017c460: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n-0017c4c0: 5f6e 6577 3c2f 613e 2829 3b20 3c2f 6469 _new(); .
    soap\n-0017c510: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->proxy_host\n-0017c570: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n-0017c590: 7175 6f74 3b78 782e 7878 2e78 782e 7878 quot;xx.xx.xx.xx\n-0017c5a0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-0017c5b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0017c5c0: 656e 7422 3e2f 2f20 4950 206f 7220 646f ent\">// IP or do\n-0017c5d0: 6d61 696e 203c 2f73 7061 6e3e 3c2f 6469 main .
    soap\n-0017c620: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->proxy_port\n-0017c680: 203d 2038 3038 303b 203c 2f64 6976 3e0a = 8080;
    .\n-0017c690: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->p\n-0017c720: 726f 7879 5f75 7365 7269 643c 2f61 3e20 roxy_userid \n-0017c730: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n-0017c750: 756f 743b 6775 6573 7426 7175 6f74 3b3c uot;guest"<\n-0017c760: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-0017c770: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0017c780: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0017c7b0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pr\n-0017c800: 6f78 795f 7061 7373 7764 3c2f 613e 203d oxy_passwd =\n-0017c810: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0017c830: 6f74 3b67 7565 7374 2671 756f 743b 3c2f ot;guest";
    .

    A client\n-0017c870: 2053 4f41 5020 7265 7175 6573 7420 7769 SOAP request wi\n-0017c880: 6c6c 2068 6176 6520 7468 6520 666f 6c6c ll have the foll\n-0017c890: 6f77 696e 6720 4854 5450 2068 6561 6465 owing HTTP heade\n-0017c8a0: 723a 203c 2f70 3e3c 7072 6520 636c 6173 r:

    POS\n-0017c8c0: 5420 2f58 5858 2048 5454 502f 312e 3120  T /XXX HTTP/1.1 \n-0017c8d0: 0a48 6f73 743a 2059 5959 200a 5573 6572  .Host: YYY .User\n-0017c8e0: 2d41 6765 6e74 3a20 6753 4f41 502f 322e  -Agent: gSOAP/2.\n-0017c8f0: 3820 0a43 6f6e 7465 6e74 2d54 7970 653a  8 .Content-Type:\n-0017c900: 2074 6578 742f 786d 6c3b 2063 6861 7273   text/xml; chars\n-0017c910: 6574 3d75 7466 2d38 200a 436f 6e74 656e  et=utf-8 .Conten\n-0017c920: 742d 4c65 6e67 7468 3a20 5a5a 5a20 0a50  t-Length: ZZZ .P\n-0017c930: 726f 7879 2d41 7574 686f 7269 7a61 7469  roxy-Authorizati\n-0017c940: 6f6e 3a20 4261 7369 6320 5a33 566c 6333  on: Basic Z3Vlc3\n-0017c950: 5136 5a33 566c 6333 513d 200a 3c2f 7072  Q6Z3Vlc3Q= .

    When X-For\n-0017c970: 7761 7264 6564 2d46 6f72 2068 6561 6465 warded-For heade\n-0017c980: 7273 2061 7265 2072 6574 7572 6e65 6420 rs are returned \n-0017c990: 6279 2074 6865 2070 726f 7879 2c20 7468 by the proxy, th\n-0017c9a0: 6520 6865 6164 6572 2063 616e 2062 6520 e header can be \n-0017c9b0: 6163 6365 7373 6564 2069 6e20 7468 6520 accessed in the \n-0017c9c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n-0017ca50: 703a 3a70 726f 7879 5f66 726f 6d3c 2f61 p::proxy_from string.\n-0017ca70: 3c2f 703e 0a3c 703e 5468 6520 434f 4e4e

    .

    The CONN\n-0017ca80: 4543 5420 6d65 7468 6f64 2069 7320 7573 ECT method is us\n-0017ca90: 6564 2066 6f72 2048 5454 5020 7072 6f78 ed for HTTP prox\n-0017caa0: 7920 6175 7468 656e 7469 6361 7469 6f6e y authentication\n-0017cab0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

    CONN\n-0017cad0: 4543 5420 7365 7276 6572 2e65 7861 6d70  ECT server.examp\n-0017cae0: 6c65 2e63 6f6d 3a38 3020 4854 5450 2f31  le.com:80 HTTP/1\n-0017caf0: 2e31 0a3c 2f70 7265 3e3c 703e 2049 6e20  .1.

    In \n-0017cb00: 736f 6d65 2063 6173 6573 2c20 796f 7520 some cases, you \n-0017cb10: 7769 6c6c 206e 6f74 6963 6520 7468 6174 will notice that\n-0017cb20: 2074 6865 2048 6f73 7420 4854 5450 2068 the Host HTTP h\n-0017cb30: 6561 6465 7220 7573 6573 2074 6865 2043 eader uses the C\n-0017cb40: 4f4e 4e45 4354 2070 726f 746f 636f 6c3a ONNECT protocol:\n-0017cb50: 203c 2f70 3e3c 7072 6520 636c 6173 733d

    CONNE\n-0017cb70: 4354 2073 6572 7665 722e 6578 616d 706c  CT server.exampl\n-0017cb80: 652e 636f 6d3a 3830 2048 5454 502f 312e  e.com:80 HTTP/1.\n-0017cb90: 3120 0a48 6f73 743a 2073 6572 7665 722e  1 .Host: server.\n-0017cba0: 6578 616d 706c 652e 636f 6d3a 3830 0a3c  example.com:80.<\n-0017cbb0: 2f70 7265 3e3c 703e 20f0 9f94 9d20 3c61  /pre>

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

    .

    \n-0017cbf0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n-0017cc10: 0a50 6572 666f 726d 616e 6365 2069 6d70 .Performance imp\n-0017cc20: 726f 7665 6d65 6e74 2074 6970 733c 2f68 rovement tips.

    Here are s\n-0017cc40: 6f6d 6520 7469 7073 2079 6f75 2063 616e ome tips you can\n-0017cc50: 2075 7365 2074 6f20 7370 6565 6420 7570 use to speed up\n-0017cc60: 2067 534f 4150 2e20 5468 6520 6465 6661 gSOAP. The defa\n-0017cc70: 756c 7420 7365 7474 696e 6773 2061 7265 ult settings are\n-0017cc80: 2063 686f 7365 6e20 746f 206d 6178 696d chosen to maxim\n-0017cc90: 697a 6520 706f 7274 6162 696c 6974 7920 ize portability \n-0017cca0: 616e 6420 636f 6d70 6174 6962 696c 6974 and compatibilit\n-0017ccb0: 792e 2054 6865 2073 6574 7469 6e67 7320 y. The settings \n-0017ccc0: 6361 6e20 6265 2074 7765 616b 6564 2074 can be tweaked t\n-0017ccd0: 6f20 6f70 7469 6d69 7a65 2074 6865 2070 o optimize the p\n-0017cce0: 6572 666f 726d 616e 6365 2061 7320 666f erformance as fo\n-0017ccf0: 6c6c 6f77 733a 3c2f 703e 0a3c 756c 3e0a llows:

    .

    <\n-0017fab0: 703e 5768 656e 2061 2074 696d 656f 7574 p>When a timeout\n-0017fac0: 206f 6363 7572 7320 696e 2074 6865 2073 occurs in the s\n-0017fad0: 656e 6420 6f72 2072 6563 6569 7665 206f end or receive o\n-0017fae0: 7065 7261 7469 6f6e 732c 2061 203c 636f perations, a #SOAP_EOF exception wi\n-0017fb10: 6c6c 2062 6520 7261 6973 6564 2028 2265 ll be raised (\"e\n-0017fb20: 6e64 206f 6620 6669 6c65 206f 7220 6e6f nd of file or no\n-0017fb30: 2069 6e70 7574 2229 2e20 4e65 6761 7469 input\"). Negati\n-0017fb40: 7665 2074 696d 656f 7574 2076 616c 7565 ve timeout value\n-0017fb50: 7320 6d65 6173 7572 6520 7469 6d65 6f75 s measure timeou\n-0017fb60: 7473 2069 6e20 6d69 6372 6f73 6563 6f6e ts in microsecon\n-0017fb70: 6473 2c20 666f 7220 6578 616d 706c 653a ds, for example:\n-0017fb80: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #define \n-0017fbd0: 7553 6563 202a 2d31 203c 2f73 7061 6e3e uSec *-1 \n-0017fbe0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #define mSec\n-0017fc20: 202a 2d31 3030 3020 3c2f 7370 616e 3e3c *-1000 <\n-0017fc30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-0017fc50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n-0017fc80: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-0017fcb0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-0017fce0: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-0017fd40: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); ..
    soap-><\n-0017fe50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017fe60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017fe70: 6874 6d6c 2361 3731 3162 6233 6135 3364 html#a711bb3a53d\n-0017fe80: 6537 6363 3632 3432 3965 3464 3361 3265 e7cc62429e4d3a2e\n-0017fe90: 3062 3534 3734 223e 7365 6e64 5f74 696d 0b5474\">send_tim\n-0017fea0: 656f 7574 3c2f 613e 203d 2032 3020 6d53 eout = 20 mS\n-0017feb0: 6563 3b20 3c2f 6469 763e 0a3c 6469 7620 ec;
    .
    soap->\n-0017ff00: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;recv_t\n-0017ff50: 696d 656f 7574 3c2f 613e 203d 2032 3020 imeout = 20 \n-0017ff60: 6d53 6563 3b20 3c2f 6469 763e 0a3c 6469 mSec;
    .<\n-0017ff80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017ff90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017ffa0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0017ffb0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;recv\n-00180000: 5f74 696d 656f 7574 3c2f 613e 203d 2031 _timeout = 1\n-00180010: 303b 3c2f 6469 763e 0a3c 2f64 6976 3e3c 0;
    .
    <\n-00180020: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00180030: 3c64 6c20 636c 6173 733d 2273 6563 7469
    \n-00180050: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
    \n-00180060: 4d61 6e79 204c 696e 7578 2076 6572 7369 Many Linux versi\n-00180070: 6f6e 7320 646f 206e 6f74 2073 7570 706f ons do not suppo\n-00180080: 7274 206e 6f6e 2d62 6c6f 636b 696e 6720 rt non-blocking \n-00180090: 3c63 6f64 653e 636f 6e6e 6563 7428 293c connect()<\n-001800a0: 2f63 6f64 653e 2e20 5468 6572 6566 6f72 /code>. Therefor\n-001800b0: 652c 2073 6574 7469 6e67 203c 636f 6465 e, setting soap::c\n-00180180: 6f6e 6e65 6374 5f74 696d 656f 7574 3c2f onnect_timeout for no\n-001801a0: 6e2d 626c 6f63 6b69 6e67 203c 636f 6465 n-blocking soap_call_ns__w\n-001801c0: 6562 6d65 7468 6f64 3c2f 636f 6465 3e20 ebmethod \n-001801d0: 6361 6c6c 7320 6d61 7920 6e6f 7420 776f calls may not wo\n-001801e0: 726b 2075 6e64 6572 204c 696e 7578 2e3c rk under Linux.<\n-001801f0: 2f64 643e 0a3c 6464 3e0a 496e 7465 7272 /dd>.
    .Interr\n-00180200: 7570 7473 2028 4549 4e54 5229 2063 616e upts (EINTR) can\n-00180210: 2061 6666 6563 7420 7468 6520 626c 6f63 affect the bloc\n-00180220: 6b69 6e67 2074 696d 6520 696e 2049 2f4f king time in I/O\n-00180230: 206f 7065 7261 7469 6f6e 732e 2054 6865 operations. The\n-00180240: 206d 6178 696d 756d 206e 756d 6265 7220 maximum number \n-00180250: 6f66 2045 494e 5452 2074 6861 7420 7769 of EINTR that wi\n-00180260: 6c6c 206e 6f74 2074 7269 6767 6572 2061 ll not trigger a\n-00180270: 6e20 6572 726f 7220 6973 2073 6574 2062 n error is set b\n-00180280: 7920 3c63 6f64 653e 2353 4f41 505f 4d41 y #SOAP_MA\n-00180290: 5845 494e 5452 3c2f 636f 6465 3e20 696e XEINTR in\n-001802a0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-001802b0: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h, which i\n-001802d0: 7320 3130 2062 7920 6465 6661 756c 742e s 10 by default.\n-001802e0: 2045 6163 6820 4549 4e54 5220 6d61 7920 Each EINTR may \n-001802f0: 696e 6372 6561 7365 2074 6865 2062 6c6f increase the blo\n-00180300: 636b 696e 6720 7469 6d65 2062 7920 7570 cking time by up\n-00180310: 2074 6f20 6f6e 6520 7365 636f 6e64 2c20 to one second, \n-00180320: 7570 2074 6f20 3c63 6f64 653e 2353 4f41 up to #SOA\n-00180330: 505f 4d41 5845 494e 5452 3c2f 636f 6465 P_MAXEINTR seconds total.\n-00180350: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e f09f
    .

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

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

    .Clos\n-001803c0: 696e 6720 636f 6e6e 6563 7469 6f6e 7320 ing connections \n-001803d0: 6279 2066 6f72 6365 3c2f 6832 3e0a 3c70 by force

    .To close a sock\n-001803f0: 6574 2063 6f6e 6e65 6374 696f 6e20 6279 et connection by\n-00180400: 2066 6f72 6365 2c20 796f 7520 6361 6e20 force, you can \n-00180410: 7573 6520 3c63 6f64 653e 736f 6170 5f66 use soap_f\n-00180420: 6f72 6365 5f63 6c6f 7365 736f 636b 2873 orce_closesock(s\n-00180430: 6f61 7029 3c2f 636f 6465 3e2c 2077 6869 oap), whi\n-00180440: 6368 2063 6c6f 7365 7320 7468 6520 636f ch closes the co\n-00180450: 6e6e 6563 7469 6f6e 2072 6567 6172 646c nnection regardl\n-00180460: 6573 7320 6966 206b 6565 702d 616c 6976 ess if keep-aliv\n-00180470: 6520 6973 2061 6374 6976 652e 2042 7920 e is active. By \n-00180480: 636f 6e74 7261 7374 2c20 3c63 6f64 653e contrast, \n-00180490: 736f 6170 5f63 6c6f 7365 736f 636b 2873 soap_closesock(s\n-001804a0: 6f61 7029 3c2f 636f 6465 3e20 6f6e 6c79 oap) only\n-001804b0: 2063 6c6f 7365 7320 7468 6520 636f 6e6e closes the conn\n-001804c0: 6563 7469 6f6e 2077 6865 6e20 6b65 6570 ection when keep\n-001804d0: 2d61 6c69 7665 2069 7320 6e6f 7420 6163 -alive is not ac\n-001804e0: 7469 7665 2e3c 2f70 3e0a 3c70 3e54 6f20 tive.

    .

    To \n-001804f0: 666f 7263 652d 636c 6f73 6520 6120 636f force-close a co\n-00180500: 6e6e 6563 7469 6f6e 2066 726f 6d20 616e nnection from an\n-00180510: 6f74 6865 7220 7468 7265 6164 2c20 636f other thread, co\n-00180520: 6d70 696c 6520 7374 6473 6f61 7032 2e63 mpile stdsoap2.c\n-00180530: 206f 7220 7374 6473 6f61 7032 2e63 7070 or stdsoap2.cpp\n-00180540: 2061 6e64 2079 6f75 7220 7072 6f6a 6563 and your projec\n-00180550: 7420 736f 7572 6365 2063 6f64 6520 7769 t source code wi\n-00180560: 7468 203c 636f 6465 3e23 5749 5448 5f53 th #WITH_S\n-00180570: 454c 465f 5049 5045 3c2f 636f 6465 3e20 ELF_PIPE \n-00180580: 746f 2065 6e61 626c 6520 7468 6973 2066 to enable this f\n-00180590: 6561 7475 7265 2e20 5573 6520 3c63 6f64 eature. Use soap_close_con\n-001805b0: 6e65 6374 696f 6e28 736f 6170 293c 2f63 nection(soap) on the so\n-00180620: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n-00180630: 6e74 6578 7420 7468 6174 206d 7573 7420 ntext that must \n-00180640: 636c 6f73 652e 2059 6f75 2063 616e 206d close. You can m\n-00180650: 616b 6520 7468 6973 2063 616c 6c20 6672 ake this call fr\n-00180660: 6f6d 2061 6e6f 7468 6572 2074 6872 6561 om another threa\n-00180670: 6420 616e 6420 7061 7373 2074 6865 203c d and pass the <\n-00180680: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-001806e0: 2063 6f6e 7465 7874 2074 6f20 7468 6973 context to this\n-001806f0: 2066 756e 6374 696f 6e20 6f66 2074 6865 function of the\n-00180700: 2074 6872 6561 6420 7468 6174 206d 7573 thread that mus\n-00180710: 7420 636c 6f73 6520 636f 6e6e 6563 7469 t close connecti\n-00180720: 6f6e 732e 3c2f 703e 0a3c 703e f09f 949d ons.

    .

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

    .<\n-00180760: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Socket \n-00180790: 6f70 7469 6f6e 7320 616e 6420 666c 6167 options and flag\n-001807a0: 733c 2f68 323e 0a3c 703e 536f 636b 6574 s

    .

    Socket\n-001807b0: 2063 6f6d 6d75 6e69 6361 7469 6f6e 7320 communications \n-001807c0: 6361 6e20 6265 2063 6f6e 7472 6f6c 6c65 can be controlle\n-001807d0: 6420 7769 7468 2073 6f63 6b65 7420 6f70 d with socket op\n-001807e0: 7469 6f6e 7320 616e 6420 666c 6167 732e tions and flags.\n-001807f0: 2054 6865 203c 636f 6465 3e3c 6120 636c The soap<\n-00180850: 2f63 6f64 653e 2063 6f6e 7465 7874 2066 /code> context f\n-00180860: 6c61 6773 2061 7265 3a3c 2f70 3e0a 3c75 lags are:

    ..
  • soap::socke\n-00180940: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags to set flags \n-00180960: 666f 7220 7468 6520 736f 636b 6574 203c for the socket <\n-00180970: 636f 6465 3e73 656e 643c 2f63 6f64 653e code>send\n-00180980: 2061 6e64 203c 636f 6465 3e72 6563 763c and recv<\n-00180990: 2f63 6f64 653e 2063 616c 6c73 2e3c 2f6c /code> calls..
  • soap::conne\n-00180a70: 6374 5f66 6c61 6773 3c2f 613e 3c2f 636f ct_flags to set clien\n-00180a90: 742d 7369 6465 203c 636f 6465 3e73 6574 t-side set\n-00180aa0: 736f 636b 6f70 743c 2f63 6f64 653e 203c sockopt <\n-00180ab0: 636f 6465 3e53 4f4c 5f53 4f43 4b45 543c code>SOL_SOCKET<\n-00180ac0: 2f63 6f64 653e 2073 6f63 6b65 7420 6f70 /code> socket op\n-00180ad0: 7469 6f6e 7320 7768 656e 2063 6f6e 6e65 tions when conne\n-00180ae0: 6374 696e 672e 3c2f 6c69 3e0a 3c6c 693e cting.
  • .
  • \n-00180af0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-00180bb0: 6170 3a3a 6269 6e64 5f66 6c61 6773 3c2f ap::bind_flags to set\n-00180bd0: 2073 6572 7665 722d 7369 6465 203c 636f server-side setsockopt SOL_S\n-00180c00: 4f43 4b45 543c 2f63 6f64 653e 2073 6f63 OCKET soc\n-00180c10: 6b65 7420 6f70 7469 6f6e 7320 7768 656e ket options when\n-00180c20: 2065 7865 6375 7469 6e67 203c 636f 6465 executing soap_bind<\n-00180cb0: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>.
  • .s\n-00180d80: 6f61 703a 3a62 696e 645f 7636 6f6e 6c79 oap::bind_v6only\n-00180d90: 3c2f 613e 3c2f 636f 6465 3e20 7365 7420 set \n-00180da0: 746f 2031 2074 6f20 7365 7420 3c63 6f64 to 1 to set setsockopt IPPROT\n-00180dd0: 4f5f 4950 5636 3c2f 636f 6465 3e20 3c63 O_IPV6 IPV6_V6ONLY<\n-00180df0: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>..s\n-00180ec0: 6f61 703a 3a61 6363 6570 745f 666c 6167 oap::accept_flag\n-00180ed0: 733c 2f61 3e3c 2f63 6f64 653e 2074 6f20 s to \n-00180ee0: 7365 7420 666c 6167 7320 746f 2074 6865 set flags to the\n-00180ef0: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop\n-00180f00: 743c 2f63 6f64 653e 2073 6f63 6b65 7420 t socket \n-00180f10: 6f70 7469 6f6e 7320 7768 656e 2065 7865 options when exe\n-00180f20: 6375 7469 6e67 203c 636f 6465 3e3c 6120 cuting soap_accep\n-00180fb0: 743c 2f61 3e3c 2f63 6f64 653e 2e3c 2f6c t...

    See \n-00180fd0: 7468 6520 6f70 6572 6174 696e 6720 7379 the operating sy\n-00180fe0: 7374 656d 206d 616e 7561 6c20 7061 6765 stem manual page\n-00180ff0: 7320 6f66 203c 636f 6465 3e73 656e 643c s of send<\n-00181000: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and recv for\n-00181020: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-001810e0: 6f61 703a 3a73 6f63 6b65 745f 666c 6167 oap::socket_flag\n-001810f0: 733c 2f61 3e3c 2f63 6f64 653e 2076 616c s val\n-00181100: 7565 7320 616e 6420 7365 6520 7468 6520 ues and see the \n-00181110: 6f70 6572 6174 696e 6720 7379 7374 656d operating system\n-00181120: 206d 616e 7561 6c20 7061 6765 7320 6f66 manual pages of\n-00181130: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop\n-00181140: 743c 2f63 6f64 653e 2066 6f72 203c 636f t for soap:\n-00181210: 3a63 6f6e 6e65 6374 5f66 6c61 6773 3c2f :connect_flags, soap::b\n-001812f0: 696e 645f 666c 6167 733c 2f61 3e3c 2f63 ind_flags, and \n-00181310: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ac\n-001813d0: 6365 7074 5f66 6c61 6773 3c2f 613e 3c2f cept_flags (level SOL_SOCKET) values. Th\n-00181410: 6573 6520 3c63 6f64 653e 534f 5f3c 2f63 ese SO_ socket opti\n-00181430: 6f6e 2066 6c61 6773 2028 7365 6520 3c63 on flags (see setsockopt manual pag\n-00181460: 6573 2920 6361 6e20 6265 2062 6974 2d77 es) can be bit-w\n-00181470: 6973 6520 6f72 2d65 6420 746f 2073 6574 ise or-ed to set\n-00181480: 206d 756c 7469 706c 6520 736f 636b 6574 multiple socket\n-00181490: 206f 7074 696f 6e73 2061 7420 6f6e 6365 options at once\n-001814a0: 2e3c 2f70 3e0a 3c70 3e54 6865 2063 6c69 .

    .

    The cli\n-001814b0: 656e 742d 7369 6465 2066 6c61 6720 3c63 ent-side flag soap\n-00181580: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags<\n-00181590: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_LINGER is supported\n-001815c0: 2077 6974 6820 7661 6c75 6573 203c 636f with values l_onoff = 1 and \n-001815f0: 6c5f 6c69 6e67 6572 3c2f 636f 6465 3e20 l_linger \n-00181600: 3d20 3c63 6f64 653e 3c61 2063 6c61 7373 = \n-001816c0: 736f 6170 3a3a 6c69 6e67 6572 5f74 696d soap::linger_tim\n-001816d0: 653c 2f61 3e3c 2f63 6f64 653e 2e20 5468 e. Th\n-001816e0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e \n-001817a0: 736f 6170 3a3a 6c69 6e67 6572 5f74 696d soap::linger_tim\n-001817b0: 653c 2f61 3e3c 2f63 6f64 653e 2064 6574 e det\n-001817c0: 6572 6d69 6e65 7320 7468 6520 7761 6974 ermines the wait\n-001817d0: 2074 696d 6520 2874 6865 2074 696d 6520 time (the time \n-001817e0: 7265 736f 6c75 7469 6f6e 2069 7320 7379 resolution is sy\n-001817f0: 7374 656d 2064 6570 656e 6465 6e74 2c20 stem dependent, \n-00181800: 7468 6f75 6768 2061 6363 6f72 6469 6e67 though according\n-00181810: 2074 6f20 736f 6d65 2065 7870 6572 7473 to some experts\n-00181820: 206f 6e6c 7920 7a65 726f 2061 6e64 206e only zero and n\n-00181830: 6f6e 7a65 726f 2076 616c 7565 7320 6d61 onzero values ma\n-00181840: 7474 6572 292e 2054 6865 206c 696e 6765 tter). The linge\n-00181850: 7220 6f70 7469 6f6e 2063 616e 2062 6520 r option can be \n-00181860: 7573 6564 2074 6f20 6d61 6e61 6765 2074 used to manage t\n-00181870: 6865 206e 756d 6265 7220 6f66 2063 6f6e he number of con\n-00181880: 6e65 6374 696f 6e73 2074 6861 7420 7265 nections that re\n-00181890: 6d61 696e 2069 6e20 3c63 6f64 653e 5449 main in TI\n-001818a0: 4d45 5f57 4149 543c 2f63 6f64 653e 2073 ME_WAIT s\n-001818b0: 7461 7465 2061 7420 7468 6520 7365 7276 tate at the serv\n-001818c0: 6572 2073 6964 652e 3c2f 703e 0a3c 703e er side.

    .

    \n-001818d0: 466f 7220 6578 616d 706c 652c 2074 6f20 For example, to \n-001818e0: 6469 7361 626c 6520 5349 4750 4950 4520 disable SIGPIPE \n-001818f0: 7369 676e 616c 7320 6f6e 2055 6e69 782f signals on Unix/\n-00181900: 4c69 6e75 7820 706c 6174 666f 726d 7320 Linux platforms \n-00181910: 7573 653a 203c 636f 6465 3e3c 6120 636c use: soap::socket_\n-001819e0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n-001819f0: 203d 203c 636f 6465 3e4d 5347 5f4e 4f53 = MSG_NOS\n-00181a00: 4947 4e41 4c3c 2f63 6f64 653e 2061 6e64 IGNAL and\n-00181a10: 2f6f 7220 3c63 6f64 653e 3c61 2063 6c61 /or soap::connect_\n-00181ae0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n-00181af0: 203d 203c 636f 6465 3e53 4f5f 4e4f 5349 = SO_NOSI\n-00181b00: 4750 4950 453c 2f63 6f64 653e 2028 692e GPIPE (i.\n-00181b10: 652e 2063 6c69 656e 742d 7369 6465 2063 e. client-side c\n-00181b20: 6f6e 6e65 6374 2920 6465 7065 6e64 696e onnect) dependin\n-00181b30: 6720 6f6e 2079 6f75 7220 706c 6174 666f g on your platfo\n-00181b40: 726d 2e3c 2f70 3e0a 3c70 3e55 7365 203c rm.

    .

    Use <\n-00181b50: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-00181c10: 703a 3a62 696e 645f 666c 6167 733c 2f61 p::bind_flags = SO_REUSEADDR to enable s\n-00181c50: 6572 7665 722d 7369 6465 2070 6f72 7420 erver-side port \n-00181c60: 7265 7573 6520 616e 6420 6c6f 6361 6c20 reuse and local \n-00181c70: 706f 7274 2073 6861 7269 6e67 2028 6275 port sharing (bu\n-00181c80: 7420 6265 2061 7761 7265 206f 6620 7468 t be aware of th\n-00181c90: 6520 706f 7373 6962 6c65 2073 6563 7572 e possible secur\n-00181ca0: 6974 7920 696d 706c 6963 6174 696f 6e73 ity implications\n-00181cb0: 2073 7563 6820 6173 2070 6f72 7420 6869 such as port hi\n-00181cc0: 6a61 636b 696e 6729 2e3c 2f70 3e0a 3c70 jacking).

    .Note that you h\n-00181ce0: 6176 6520 6163 6365 7373 2074 6f20 7468 ave access to th\n-00181cf0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap->\n-00181d50: 3b6d 6173 7465 723c 2f63 6f64 653e 2073 ;master s\n-00181d60: 6f63 6b65 7420 7661 6c75 6520 7265 7475 ocket value retu\n-00181d70: 726e 6564 2062 7920 3c63 6f64 653e 3c61 rned by s\n-00181df0: 6f61 705f 6269 6e64 3c2f 613e 3c2f 636f oap_bind so you can s\n-00181e10: 6574 206d 756c 7469 706c 6520 736f 636b et multiple sock\n-00181e20: 6574 206f 7074 696f 6e73 2062 7920 6361 et options by ca\n-00181e30: 6c6c 696e 6720 3c63 6f64 653e 7365 7473 lling sets\n-00181e40: 6f63 6b6f 7074 3c2f 636f 6465 3e20 6173 ockopt as\n-00181e50: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 follows:

    .
    \n-00181ea0: 696e 743c 2f73 7061 6e3e 2073 6f63 6b20 int sock \n-00181eb0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_bind(\n-00181f10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00181f40: 203c 6120 636c 6173 733d 2263 6f64 6522 host, por\n-00181fe0: 743c 2f61 3e2c 2062 6163 6b6c 6f67 293b t, backlog);\n-00181ff0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (<\n-00182030: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00182040: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00182050: 705f 5f73 6f61 702e 6874 6d6c 2367 6161 p__soap.html#gaa\n-00182060: 6165 3837 3437 6634 6364 6163 6565 3537 ae8747f4cdacee57\n-00182070: 3538 3735 6333 6132 3438 3864 3939 6322 5875c3a2488d99c\"\n-00182080: 3e73 6f61 705f 7661 6c69 645f 736f 636b >soap_valid_sock\n-00182090: 6574 3c2f 613e 2873 6f63 6b29 2920 3c2f et(sock)) .
    {
    .<\n-001820c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001820d0: 3e20 2073 6574 736f 636b 6f70 7428 736f > setsockopt(so\n-001820e0: 636b 2c20 2e2e 2e2c 202e 2e2e 2c20 2e2e ck, ..., ..., ..\n-001820f0: 2e2c 202e 2e2e 293b 3c2f 6469 763e 0a3c ., ...);
    .<\n-00182100: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00182110: 3e20 2073 6574 736f 636b 6f70 7428 736f > setsockopt(so\n-00182120: 636b 2c20 2e2e 2e2c 202e 2e2e 2c20 2e2e ck, ..., ..., ..\n-00182130: 2e2c 202e 2e2e 293b 3c2f 6469 763e 0a3c ., ...);
    .<\n-00182140: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

    .

    \n-00182190: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Over\n-001821c0: 7269 6469 6e67 2074 6865 2068 6f73 7420 riding the host \n-001821d0: 616e 6420 706f 7274 2074 6f20 636f 6e6e and port to conn\n-001821e0: 6563 743c 2f68 323e 0a3c 703e 546f 206f ect

    .

    To o\n-001821f0: 7665 7272 6964 6520 7468 6520 686f 7374 verride the host\n-00182200: 2061 6e64 2070 6f72 7420 6f66 2074 6865 and port of the\n-00182210: 2063 6c69 656e 7420 636f 6e6e 6563 7469 client connecti\n-00182220: 6e67 2074 6f20 6120 7365 7276 6572 2c20 ng to a server, \n-00182230: 7365 7420 3c63 6f64 653e 3c61 2063 6c61 set soap::override\n-00182300: 5f68 6f73 743c 2f61 3e3c 2f63 6f64 653e _host\n-00182310: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::overrid\n-001823e0: 655f 706f 7274 3c2f 613e 3c2f 636f 6465 e_port:

    .
    <\n-00182420: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00182430: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00182440: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00182450: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;over\n-001824a0: 7269 6465 5f68 6f73 743c 2f61 3e20 3d20 ride_host = \n-001824b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001824d0: 743b 6578 616d 706c 652e 636f 6d26 7175 t;example.com&qu\n-001824e0: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // host name o\n-00182510: 7220 4950 2061 6464 7265 7373 203c 2f73 r IP address
    .
    soap->\n-00182570: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;overri\n-001825c0: 6465 5f70 6f72 743c 2f61 3e20 3d20 3830 de_port = 80\n-001825d0: 3b20 2020 2020 2020 2020 2020 203c 7370 ; // port numbe\n-00182600: 7220 746f 2075 7365 2077 6865 6e20 6f76 r to use when ov\n-00182610: 6572 7269 6469 6e67 2074 6865 2061 6464 erriding the add\n-00182620: 7265 7373 3c2f 7370 616e 3e3c 2f64 6976 ress.
    <\n-00182690: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-001826a0: 6170 2e68 746d 6c23 6131 3636 3430 3533 ap.html#a1664053\n-001826b0: 3639 6164 3130 6263 3230 6239 3066 6239 69ad10bc20b90fb9\n-001826c0: 3238 3534 3230 6361 6522 3e73 6f61 703a 285420cae\">soap:\n-001826d0: 3a6f 7665 7272 6964 655f 686f 7374 3c2f :override_host
    cons\n-00182700: 7420 6368 6172 202a 206f 7665 7272 6964 t char * overrid\n-00182710: 655f 686f 7374 3c2f 6469 763e 3c64 6976 e_host
    U\n-00182730: 7365 722d 6465 6669 6e61 626c 6520 7374 ser-definable st\n-00182740: 7269 6e67 2074 6f20 6f76 6572 7269 6465 ring to override\n-00182750: 2074 6865 2068 6f73 7420 6e61 6d65 206f the host name o\n-00182760: 7220 4950 2061 6464 7265 7373 2069 6e20 r IP address in \n-00182770: 7468 6520 4854 5450 2068 6561 6465 7220 the HTTP header \n-00182780: 7768 656e 2063 6f6e 6e65 6374 696e 6720 when connecting \n-00182790: 6174 2074 2e2e 2e3c 2f64 6976 3e3c 6469 at t...
    \n-001827b0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:40\n-001827d0: 3534 3c2f 6469 763e 3c2f 6469 763e 0a3c 54
    .<\n-001827e0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-001827f0: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-00182800: 6874 6d6c 5f61 3931 3464 6362 3665 6230 html_a914dcb6eb0\n-00182810: 3637 6632 6664 3361 3437 6639 3230 3732 67f2fd3a47f92072\n-00182820: 3537 6236 3036 223e 3c64 6976 2063 6c61 57b606\">
    soap::ov\n-00182880: 6572 7269 6465 5f70 6f72 743c 2f61 3e3c erride_port<\n-00182890: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int ove\n-001828b0: 7272 6964 655f 706f 7274 3c2f 6469 763e rride_port
    \n-001828c0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl\n-001828e0: 6520 706f 7274 206e 756d 6265 7220 746f e port number to\n-001828f0: 206f 7665 7272 6964 6520 7468 6520 706f override the po\n-00182900: 7274 2061 6464 7265 7373 2069 6e20 7468 rt address in th\n-00182910: 6520 4854 5450 2068 6561 6465 7220 7768 e HTTP header wh\n-00182920: 656e 2063 6f6e 6e65 6374 696e 6720 6174 en connecting at\n-00182930: 2074 6865 2063 6c69 2e2e 2e3c 2f64 6976 the cli...
    Definitio\n-00182960: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-00182970: 683a 3430 3539 3c2f 6469 763e 3c2f 6469 h:4059
    .

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

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

    .Se\n-00182a00: 6375 7265 2057 6562 2073 6572 7669 6365 cure Web service\n-00182a10: 7320 7769 7468 2048 5454 5053 3c2f 6832 s with HTTPS.

    To enable S\n-00182a30: 534c 2066 6f72 2073 7461 6e64 2d61 6c6f SL for stand-alo\n-00182a40: 6e65 2067 534f 4150 2057 6562 2073 6572 ne gSOAP Web ser\n-00182a50: 7665 7273 2c20 6669 7273 7420 696e 7374 vers, first inst\n-00182a60: 616c 6c20 4f70 656e 5353 4c20 616e 6420 all OpenSSL and \n-00182a70: 7573 6520 6f70 7469 6f6e 2074 6865 2063 use option the c\n-00182a80: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag\n-00182a90: 203c 636f 6465 3e23 5749 5448 5f4f 5045 #WITH_OPE\n-00182aa0: 4e53 534c 3c2f 636f 6465 3e20 746f 2063 NSSL to c\n-00182ab0: 6f6d 7069 6c65 2074 6865 2073 6f75 7263 ompile the sourc\n-00182ac0: 6573 2077 6974 6820 796f 7572 2043 206f es with your C o\n-00182ad0: 7220 432b 2b20 636f 6d70 696c 6572 2028 r C++ compiler (\n-00182ae0: 6f72 2075 7365 2074 6865 2063 6f6d 7069 or use the compi\n-00182af0: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_GNUTLS<\n-00182b10: 2f63 6f64 653e 2069 6620 796f 7520 7072 /code> if you pr\n-00182b20: 6566 6572 2047 4e55 544c 5329 2c20 666f efer GNUTLS), fo\n-00182b30: 7220 6578 616d 706c 653a 203c 2f70 3e3c r example:

    <\n-00182b40: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-00182b50: 656e 7422 3e20 632b 2b20 2d44 5749 5448 ent\"> c++ -DWITH\n-00182b60: 5f4f 5045 4e53 534c 202d 6f20 6d79 7072 _OPENSSL -o mypr\n-00182b70: 6f67 206d 7970 726f 672e 6370 7020 7374 og myprog.cpp st\n-00182b80: 6473 6f61 7032 2e63 7070 2073 6f61 7043 dsoap2.cpp soapC\n-00182b90: 2e63 7070 2073 6f61 7053 6572 7665 722e .cpp soapServer.\n-00182ba0: 6370 7020 2d6c 7373 6c20 2d6c 6372 7970 cpp -lssl -lcryp\n-00182bb0: 746f 0a3c 2f70 7265 3e3c 703e 2057 6974 to.

    Wit\n-00182bc0: 6820 474e 5554 4c53 3a20 3c2f 703e 3c70 h GNUTLS:

    c++ -DWITH_\n-00182bf0: 474e 5554 4c53 202d 6f20 6d79 7072 6f67 GNUTLS -o myprog\n-00182c00: 206d 7970 726f 672e 6370 7020 7374 6473 myprog.cpp stds\n-00182c10: 6f61 7032 2e63 7070 2073 6f61 7043 2e63 oap2.cpp soapC.c\n-00182c20: 7070 2073 6f61 7053 6572 7665 722e 6370 pp soapServer.cp\n-00182c30: 7020 2d6c 676e 7574 6c73 202d 6c67 6372 p -lgnutls -lgcr\n-00182c40: 7970 7420 2d6c 6770 672d 6572 726f 720a ypt -lgpg-error.\n-00182c50: 3c2f 7072 653e 3c70 3e20 5353 4c20 7375

    SSL su\n-00182c60: 7070 6f72 7420 666f 7220 7374 616e 642d pport for stand-\n-00182c70: 616c 6f6e 6520 6753 4f41 5020 5765 6220 alone gSOAP Web \n-00182c80: 7365 7276 6963 6573 2069 7320 656e 6162 services is enab\n-00182c90: 6c65 6420 6279 2063 616c 6c69 6e67 203c led by calling <\n-00182ca0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ssl_\n-00182d20: 6163 6365 7074 3c2f 613e 3c2f 636f 6465 accept to perform the\n-00182d40: 2053 534c 2f54 4c53 2068 616e 6473 6861 SSL/TLS handsha\n-00182d50: 6b65 2061 6674 6572 203c 636f 6465 3e3c ke after <\n-00182d60: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00182d70: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00182d80: 5f69 6f2e 6874 6d6c 2367 6165 6330 6531 _io.html#gaec0e1\n-00182d90: 6165 6363 3264 3534 3739 6438 3039 3937 aecc2d5479d80997\n-00182da0: 3632 6665 6234 3731 3363 3622 2074 6974 62feb4713c6\" tit\n-00182db0: 6c65 3d22 4163 6365 7074 2061 2063 6f6e le=\"Accept a con\n-00182dc0: 6e65 6374 696f 6e20 7769 7468 2061 2063 nection with a c\n-00182dd0: 6c69 656e 742e 223e 736f 6170 5f61 6363 lient.\">soap_acc\n-00182de0: 6570 743c 2f61 3e3c 2f63 6f64 653e 2e20 ept. \n-00182df0: 496e 2061 6464 6974 696f 6e2c 2061 206b In addition, a k\n-00182e00: 6579 2066 696c 652c 2061 2043 4120 6669 ey file, a CA fi\n-00182e10: 6c65 2028 6f72 2070 6174 6820 746f 2063 le (or path to c\n-00182e20: 6572 7469 6669 6361 7465 7329 2c20 4448 ertificates), DH\n-00182e30: 2066 696c 6520 2869 6620 5253 4120 6973 file (if RSA is\n-00182e40: 206e 6f74 2075 7365 6429 2c20 616e 6420 not used), and \n-00182e50: 7061 7373 776f 7264 206e 6565 6420 746f password need to\n-00182e60: 2062 6520 7375 7070 6c69 6564 2e20 496e be supplied. In\n-00182e70: 7374 7275 6374 696f 6e73 206f 6e20 686f structions on ho\n-00182e80: 7720 746f 2064 6f20 7468 6973 2063 616e w to do this can\n-00182e90: 2062 6520 666f 756e 6420 696e 2074 6865 be found in the\n-00182ea0: 204f 7065 6e53 534c 2064 6f63 756d 656e OpenSSL documen\n-00182eb0: 7461 7469 6f6e 203c 6120 6872 6566 3d22 tation http://w\n-00182ee0: 7777 2e6f 7065 6e73 736c 2e6f 7267 3c2f ww.openssl.org. See also Sec\n-00182f00: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion SSL cer\n-00182f30: 7469 6669 6361 7465 7320 616e 6420 6b65 tificates and ke\n-00182f40: 7920 6669 6c65 733c 2f61 3e20 2e3c 2f70 y files ..

    Let's take \n-00182f60: 6120 6c6f 6f6b 2061 7420 616e 2065 7861 a look at an exa\n-00182f70: 6d70 6c65 2053 534c 2073 6563 7572 6520 mple SSL secure \n-00182f80: 6d75 6c74 692d 7468 7265 6164 6564 2073 multi-threaded s\n-00182f90: 7461 6e64 2d61 6c6f 6e65 2053 4f41 5020 tand-alone SOAP \n-00182fa0: 5765 6220 5365 7276 6963 653a 3c2f 703e Web Service:

    \n-00182fb0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ma\n-00183000: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .{<\n-00183020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP\n-00183090: 5f53 4f43 4b45 543c 2f61 3e20 6d2c 2073 _SOCKET m, s\n-001830a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..\n-00183140: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-00183160: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-00183190: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *\n-001831e0: 736f 6170 3c2f 613e 2c20 2a74 736f 6170 soap, *tsoap\n-001831f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    so\n-00183260: 6170 5f73 736c 5f69 6e69 743c 2f61 3e28 ap_ssl_init(\n-00183270: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); /* init\n-00183290: 204f 7065 6e53 534c 2028 736b 6970 7069 OpenSSL (skippi\n-001832a0: 6e67 2074 6869 7320 6f72 2063 616c 6c69 ng this or calli\n-001832b0: 6e67 206d 756c 7469 706c 6520 7469 6d65 ng multiple time\n-001832c0: 7320 6973 204f 4b2c 2073 696e 6365 2074 s is OK, since t\n-001832d0: 6865 2065 6e67 696e 6520 7769 6c6c 2069 he engine will i\n-001832e0: 6e69 7420 5353 4c20 6175 746f 6d61 7469 nit SSL automati\n-001832f0: 6361 6c6c 7929 202a 2f3c 2f73 7061 6e3e cally) */\n-00183300: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /* soap_ssl_noi\n-00183340: 6e69 7428 293b 202a 2f3c 2f73 7061 6e3e nit(); */\n-00183350: 203c 7370 616e 2063 6c61 7373 3d22 636f /* do not\n-00183370: 2069 6e69 7420 4f70 656e 5353 4c20 2869 init OpenSSL (i\n-00183380: 6620 5353 4c20 6973 2061 6c72 6561 6479 f SSL is already\n-00183390: 2069 6e69 7469 616c 697a 6564 2065 6c73 initialized els\n-001833a0: 6577 6865 7265 2069 6e20 7468 6973 2061 ewhere in this a\n-001833b0: 7070 6c69 6361 7469 6f6e 2920 2a2f 3c2f pplication) */
    . \n-001833e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (CRYPTO_thr\n-00183460: 6561 645f 7365 7475 703c 2f61 3e28 2929 ead_setup())\n-00183470: 203c 7370 616e 2063 6c61 7373 3d22 636f /* OpenSS\n-00183490: 4c20 7468 7265 6164 206d 7574 6578 2073 L thread mutex s\n-001834a0: 6574 7570 202a 2f3c 2f73 7061 6e3e 3c2f etup */.
    {
    \n-001834d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fprintf(s\n-001834f0: 7464 6572 722c 203c 7370 616e 2063 6c61 tderr, "Cannot \n-00183520: 7365 7475 7020 7468 7265 6164 206d 7574 setup thread mut\n-00183530: 6578 5c6e 2671 756f 743b 3c2f 7370 616e ex\\n");
    .
    \n-00183560: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n-00183570: 5245 293b 203c 2f64 6976 3e0a 3c64 6976 RE);
    . \n-00183590: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }

    .
    soap = <\n-001835e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001835f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00183600: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-00183610: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-00183620: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-00183630: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-00183640: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    <\n-00183660: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00183670: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_ssl_se\n-001836e0: 7276 6572 5f63 6f6e 7465 7874 3c2f 613e rver_context\n-001836f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00183720: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    <\n-00183740: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00183750: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00183760: 705f 5f73 736c 2e68 746d 6c23 6761 3633 p__ssl.html#ga63\n-00183770: 6431 3062 6463 6232 6236 3738 6439 6435 d10bdcb2b678d9d5\n-00183780: 3563 6162 3331 6531 6264 6166 3365 223e 5cab31e1bdaf3e\">\n-00183790: 534f 4150 5f53 534c 5f44 4546 4155 4c54 SOAP_SSL_DEFAULT\n-001837a0: 3c2f 613e 2c20 3c2f 6469 763e 0a3c 6469 ,
    . \n-001837c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 &\n-001837e0: 7175 6f74 3b73 6572 7665 722e 7065 6d26 quot;server.pem&\n-001837f0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-00183800: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* keyf\n-00183820: 696c 653a 2072 6571 7569 7265 6420 7768 ile: required wh\n-00183830: 656e 2073 6572 7665 7220 6d75 7374 2061 en server must a\n-00183840: 7574 6865 6e74 6963 6174 6520 746f 2063 uthenticate to c\n-00183850: 6c69 656e 7473 2028 7365 6520 5353 4c20 lients (see SSL \n-00183860: 646f 6373 206f 6e20 686f 7720 746f 206f docs on how to o\n-00183870: 6274 6169 6e20 7468 6973 2066 696c 6529 btain this file)\n-00183880: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    "passwo\n-001838d0: 7264 2671 756f 743b 3c2f 7370 616e 3e2c rd",\n-001838e0: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00183900: 2070 6173 7377 6f72 6420 746f 2072 6561 password to rea\n-00183910: 6420 7468 6520 6b65 7920 6669 6c65 2028 d the key file (\n-00183920: 6e6f 7420 7573 6564 2077 6974 6820 474e not used with GN\n-00183930: 5554 4c53 2920 2a2f 3c2f 7370 616e 3e20 UTLS) */ \n-00183940: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "c\n-00183980: 6163 6572 742e 7065 6d26 7175 6f74 3b3c acert.pem"<\n-00183990: 2f73 7061 6e3e 2c20 2020 2020 203c 7370 /span>, /* optional c\n-001839c0: 6163 6572 7420 6669 6c65 2074 6f20 7374 acert file to st\n-001839d0: 6f72 6520 7472 7573 7465 6420 6365 7274 ore trusted cert\n-001839e0: 6966 6963 6174 6573 202a 2f3c 2f73 7061 ificates */
    .
    \n-00183a10: 4e55 4c4c 2c20 2020 2020 2020 2020 2020 NULL, \n-00183a20: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* opti\n-00183a40: 6f6e 616c 2063 6170 6174 6820 746f 2064 onal capath to d\n-00183a50: 6972 6563 746f 7279 2077 6974 6820 7472 irectory with tr\n-00183a60: 7573 7465 6420 6365 7274 6966 6963 6174 usted certificat\n-00183a70: 6573 202a 2f3c 2f73 7061 6e3e 203c 2f64 es */ .
    "dh51\n-00183ac0: 322e 7065 6d26 7175 6f74 3b3c 2f73 7061 2.pem", \n-00183af0: 2f2a 2044 4820 6669 6c65 206e 616d 6520 /* DH file name \n-00183b00: 6f72 2044 4820 6b65 7920 6c65 6e20 6269 or DH key len bi\n-00183b10: 7473 2028 6d69 6e69 6d75 6d20 6973 2035 ts (minimum is 5\n-00183b20: 3132 2c20 652e 672e 2026 7175 6f74 3b35 12, e.g. "5\n-00183b30: 3132 2671 756f 743b 2920 746f 2067 656e 12") to gen\n-00183b40: 6572 6174 6520 4448 2070 6172 616d 2c20 erate DH param, \n-00183b50: 6966 204e 554c 4c20 7573 6520 5253 4120 if NULL use RSA \n-00183b60: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00183b70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL, \n-00183b90: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-00183bb0: 2f2a 2069 6620 7261 6e64 6669 6c65 213d /* if randfile!=\n-00183bc0: 4e55 4c4c 3a20 7573 6520 6120 6669 6c65 NULL: use a file\n-00183bd0: 2077 6974 6820 7261 6e64 6f6d 2064 6174 with random dat\n-00183be0: 6120 746f 2073 6565 6420 7261 6e64 6f6d a to seed random\n-00183bf0: 6e65 7373 202a 2f3c 2f73 7061 6e3e 2020 ness */ \n-00183c00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    NUL\n-00183c20: 4c20 2020 2020 2020 2020 2020 2020 2020 L \n-00183c30: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* optiona\n-00183c50: 6c20 7365 7276 6572 2069 6465 6e74 6966 l server identif\n-00183c60: 6963 6174 696f 6e20 746f 2065 6e61 626c ication to enabl\n-00183c70: 6520 5353 4c20 7365 7373 696f 6e20 6361 e SSL session ca\n-00183c80: 6368 696e 6720 746f 2073 7065 6564 2075 ching to speed u\n-00183c90: 7020 544c 5320 286d 7573 7420 6265 2061 p TLS (must be a\n-00183ca0: 2075 6e69 7175 6520 6e61 6d65 2920 2a2f unique name) */\n-00183cb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00183cd0: 2020 2929 203c 2f64 6976 3e0a 3c64 6976 ))
    . \n-00183cf0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap_print_faul\n-00183d70: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-00183da0: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n-00183db0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exi\n-00183dd0: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n-00183de0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    m = soa\n-00183e70: 705f 6269 6e64 3c2f 613e 283c 6120 636c p_bind(soap, NULL\n-00183eb0: 2c20 3138 3030 302c 2042 4143 4b4c 4f47 , 18000, BACKLOG\n-00183ec0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); /* use \n-00183ee0: 706f 7274 2031 3830 3030 202a 2f3c 2f73 port 18000 */
    .
    <\n-00183f10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00183f20: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!soap_vali\n-00183f90: 645f 736f 636b 6574 3c2f 613e 286d 2929 d_socket(m))\n-00183fa0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soa\n-00184030: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault(soap, stderr); .
    exit(EX\n-001840a0: 4954 5f46 4149 4c55 5245 293b 203c 2f64 IT_FAILURE); .
    }
    \n-001840d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fprintf(std\n-001840f0: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "Socket co\n-00184120: 6e6e 6563 7469 6f6e 2073 7563 6365 7373 nnection success\n-00184130: 6675 6c3a 206d 6173 7465 7220 736f 636b ful: master sock\n-00184140: 6574 203d 2025 645c 6e26 7175 6f74 3b3c et = %d\\n"<\n-00184150: 2f73 7061 6e3e 2c20 6d29 3b20 3c2f 6469 /span>, m); .
    while (1\n-001841a0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    s = so\n-00184230: 6170 5f61 6363 6570 743c 2f61 3e28 3c61 ap_accept(soap); \n-00184270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    fpr\n-00184290: 696e 7466 2873 7464 6572 722c 203c 7370 intf(stderr, "S\n-001842c0: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n-001842d0: 2073 7563 6365 7373 6675 6c3a 2073 6c61 successful: sla\n-001842e0: 7665 2073 6f63 6b65 7420 3d20 2564 5c6e ve socket = %d\\n\n-001842f0: 2671 756f 743b 3c2f 7370 616e 3e2c 2073 ", s\n-00184300: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-00184320: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!soap_val\n-001843a0: 6964 5f73 6f63 6b65 743c 2f61 3e28 7329 id_socket(s)\n-001843b0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {\n-001843d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-001843f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00184400: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n-00184440: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->errnum) /* accept fai\n-001844c0: 6c65 642c 2074 7279 2061 6761 696e 2061 led, try again a\n-001844d0: 6674 6572 2031 2073 6563 6f6e 6420 2a2f fter 1 second */\n-001844e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00184500: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    .\n-00184520: 2020 2020 2020 2020 3c61 2063 6c61 7373 soap_\n-00184580: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n-00184590: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001845c0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n-001845d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    sleep\n-001845f0: 2831 293b 3c2f 6469 763e 0a3c 6469 7620 (1);
    .
    \n-00184610: 2020 2020 203c 7370 616e 2063 6c61 7373 c\n-00184630: 6f6e 7469 6e75 653c 2f73 7061 6e3e 3b20 ontinue; \n-00184640: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* retry *\n-00184660: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n-00184670: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00184680: 3e20 2020 2020 207d 3c2f 6469 763e 0a3c > }
    .<\n-00184690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001846a0: 3e20 2020 2020 2066 7072 696e 7466 2873 > fprintf(s\n-001846b0: 7464 6572 722c 203c 7370 616e 2063 6c61 tderr, "Server \n-001846e0: 7469 6d65 6420 6f75 745c 6e26 7175 6f74 timed out\\n"\n-001846f0: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
    \n-00184700: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    break;\n-00184740: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } \n-00184760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n-00184820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00184850: 6966 3c2f 7370 616e 3e20 2821 7473 6f61 if (!tsoa\n-00184860: 7029 203c 2f64 6976 3e0a 3c64 6976 2063 p)
    .
    \n-00184880: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_force_clo\n-001848e0: 7365 736f 636b 3c2f 613e 283c 6120 636c sesock(soap);.
    else.
    while (THREAD\n-00184a00: 5f43 5245 4154 453c 2f61 3e28 2661 6d70 _CREATE(&\n-00184a10: 3b74 6964 2c20 283c 7370 616e 2063 6c61 ;tid, (void*(*)\n-00184a40: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (void<\n-00184a60: 2f73 7061 6e3e 2a29 2926 616d 703b 7072 /span>*))&pr\n-00184a70: 6f63 6573 735f 7265 7175 6573 742c 2028 ocess_request, (\n-00184a80: 3c73 7061 6e20 636c 6173 733d 226b 6579 void*)tsoap)).
    s\n-00184ad0: 6c65 6570 2831 293b 203c 7370 616e 2063 leep(1); /\n-00184af0: 2a20 6661 696c 6564 2c20 7472 7920 6167 * failed, try ag\n-00184b00: 6169 6e20 2a2f 3c2f 7370 616e 3e3c 2f64 ain */.
    }
    \n-00184b30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_f\n-00184ba0: 7265 653c 2f61 3e28 3c61 2063 6c61 7373 ree(s\n-00184bd0: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); \n-00184bf0: 2f2a 2064 6561 6c6c 6f63 6174 6573 2053 /* deallocates S\n-00184c00: 534c 2063 6f6e 7465 7874 202a 2f3c 2f73 SL context */
    .
    <\n-00184c30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00184c40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00184c50: 705f 5f73 736c 2e68 746d 6c23 6761 3862 p__ssl.html#ga8b\n-00184c60: 3239 6534 6561 3134 3139 6134 6166 3439 29e4ea1419a4af49\n-00184c70: 3832 3338 3632 3736 3566 3239 3138 223e 823862765f2918\">\n-00184c80: 4352 5950 544f 5f74 6872 6561 645f 636c CRYPTO_thread_cl\n-00184c90: 6561 6e75 703c 2f61 3e28 293b 203c 7370 eanup(); /* OpenSSL th\n-00184cc0: 7265 6164 206d 7574 6578 2063 6c65 616e read mutex clean\n-00184cd0: 7570 202a 2f3c 2f73 7061 6e3e 3c2f 6469 up */.
    return 0\n-00184d20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    .<\n-00184d60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00184d70: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n-00184d90: 2f73 7061 6e3e 202a 7072 6f63 6573 735f /span> *process_\n-00184da0: 7265 7175 6573 7428 3c73 7061 6e20 636c request(void *t\n-00184dd0: 736f 6170 2920 3c2f 6469 763e 0a3c 6469 soap)
    .{\n-00184df0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-00184e30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00184e40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00184e50: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-00184e60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00184e90: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (struct \n-00184eb0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-00184ee0: 6170 3c2f 613e 2a29 7473 6f61 703b 3c2f ap*)tsoap;.
    TH\n-00184f60: 5245 4144 5f44 4554 4143 483c 2f61 3e28 READ_DETACH(\n-00184f70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 THREAD_ID);
    . \n-00184ff0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_ssl_a\n-00185070: 6363 6570 743c 2f61 3e28 3c61 2063 6c61 ccept(soap)) .
    soap\n-00185120: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n-00185130: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00185160: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
    \n-001851a0: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .\n-00185260: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-001852d0: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .
    soa\n-00185380: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap); .
    soap\n-00185430: 5f66 7265 653c 2f61 3e28 3c61 2063 6c61 _free(soap);.
    \n-001854a0: 7265 7475 726e 3c2f 7370 616e 3e20 4e55 return NU\n-001854b0: 4c4c 3b20 3c2f 6469 763e 0a3c 6469 7620 LL;
    .
    }.
    <\n-001855a0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-001855b0: 6922 3e69 6e74 2073 6f61 705f 7373 6c5f i\">int soap_ssl_\n-001855c0: 7365 7276 6572 5f63 6f6e 7465 7874 2873 server_context(s\n-001855d0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001855e0: 2c20 736f 6170 5f73 736c 5f66 6c61 6773 , soap_ssl_flags\n-001855f0: 2066 6c61 6773 2c20 636f 6e73 7420 6368 flags, const ch\n-00185600: 6172 202a 6b65 7966 696c 652c 2063 6f6e ar *keyfile, con\n-00185610: 7374 2063 6861 7220 2a70 6173 7377 6f72 st char *passwor\n-00185620: 642c 2063 6f6e 7374 2063 6861 7220 2a63 d, const char *c\n-00185630: 6166 696c 652c 2063 6f6e 7374 2063 6861 afile, const cha\n-00185640: 7220 2a63 6170 6174 682c 2063 6f6e 7374 r *capath, const\n-00185650: 2063 6861 7220 2a64 6866 696c 652c 2063 char *dhfile, c\n-00185660: 6f6e 7374 2063 6861 7220 2a72 616e 6466 onst char *randf\n-00185670: 696c 652c 2063 6f6e 7374 2063 6861 7220 ile, const char \n-00185680: 2a73 6964 293c 2f64 6976 3e3c 6469 7620 *sid)
    In\n-001856a0: 6974 6961 6c69 7a65 2074 6865 2073 6572 itialize the ser\n-001856b0: 7665 722d 7369 6465 2053 534c 2f54 4c53 ver-side SSL/TLS\n-001856c0: 2063 6f6e 7465 7874 2e3c 2f64 6976 3e3c context.
    <\n-001856d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-00185780: 6f61 705f 7373 6c5f 696e 6974 3c2f 613e oap_ssl_init\n-00185790: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void s\n-001857b0: 6f61 705f 7373 6c5f 696e 6974 2876 6f69 oap_ssl_init(voi\n-001857c0: 6429 3c2f 6469 763e 3c64 6976 2063 6c61 d)
    Initi\n-001857e0: 616c 697a 6520 7468 6520 5353 4c2f 544c alize the SSL/TL\n-001857f0: 5320 6c69 6272 6172 792e 3c2f 6469 763e S library.
    \n-00185800: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #d\n-001858e0: 6566 696e 6520 534f 4150 5f53 534c 5f44 efine SOAP_SSL_D\n-001858f0: 4546 4155 4c54 3c2f 6469 763e 3c64 6976 EFAULT
    s\n-00185910: 6f61 705f 7373 6c5f 666c 6167 7320 666c oap_ssl_flags fl\n-00185920: 6167 2077 6974 6820 2353 4f41 505f 5353 ag with #SOAP_SS\n-00185930: 4c5f 5245 5155 4952 455f 5345 5256 4552 L_REQUIRE_SERVER\n-00185940: 5f41 5554 4845 4e54 4943 4154 494f 4e20 _AUTHENTICATION \n-00185950: 616e 6420 2353 4f41 505f 544c 5376 3120 and #SOAP_TLSv1 \n-00185960: 656e 6162 6c65 6420 6279 2064 6566 6175 enabled by defau\n-00185970: 6c74 3c2f 6469 763e 3c64 6976 2063 6c61 lt
    De\n-00185990: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-001859a0: 6473 6f61 7032 2e68 3a35 3832 363c 2f64 dsoap2.h:5826
    .
    <\n-00185a20: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-00185a30: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g\n-00185a40: 6138 6232 3965 3465 6131 3431 3961 3461 a8b29e4ea1419a4a\n-00185a50: 6634 3938 3233 3836 3237 3635 6632 3931 f49823862765f291\n-00185a60: 3822 3e43 5259 5054 4f5f 7468 7265 6164 8\">CRYPTO_thread\n-00185a70: 5f63 6c65 616e 7570 3c2f 613e 3c2f 6469 _cleanup
    int CRYPTO\n-00185aa0: 5f74 6872 6561 645f 636c 6561 6e75 7028 _thread_cleanup(\n-00185ab0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Cleanu\n-00185ad0: 7020 6675 6e63 7469 6f6e 2066 6f72 204f p function for O\n-00185ae0: 7065 6e53 534c 2076 6572 7369 6f6e 7320 penSSL versions \n-00185af0: 7072 696f 7220 746f 2031 2e31 2e31 2e3c prior to 1.1.1.<\n-00185b00: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .soap_ssl_ac\n-00185bc0: 6365 7074 3c2f 613e 3c2f 6469 763e 3c64 cept
    int soap_ssl_a\n-00185bf0: 6363 6570 7428 7374 7275 6374 2073 6f61 ccept(struct soa\n-00185c00: 7020 2a73 6f61 7029 3c2f 6469 763e 3c64 p *soap)
    Accept SSL/TLS \n-00185c30: 636f 6e6e 6563 7469 6f6e 2e3c 2f64 6976 connection.
    .
    int CRYPTO_thr\n-00185d30: 6561 645f 7365 7475 7028 293c 2f64 6976 ead_setup()
    Setup functi\n-00185d60: 6f6e 2066 6f72 204f 7065 6e53 534c 2076 on for OpenSSL v\n-00185d70: 6572 7369 6f6e 7320 7072 696f 7220 746f ersions prior to\n-00185d80: 2031 2e31 2e31 2074 6f20 7365 7420 6c6f 1.1.1 to set lo\n-00185d90: 636b 7320 666f 7220 6d75 6c74 692d 7468 cks for multi-th\n-00185da0: 7265 6164 6564 2053 534c 2f54 4c53 2061 readed SSL/TLS a\n-00185db0: 7070 6c69 6361 7469 6f2e 2e2e 3c2f 6469 pplicatio...
    .
    <\n-00185dd0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00185de0: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The \n-00185e70: 736f 6170 5f73 736c 5f73 6572 7665 725f soap_ssl_server_\n-00185e80: 636f 6e74 6578 743c 2f61 3e3c 2f63 6f64 context function init\n-00185ea0: 6961 6c69 7a65 7320 7468 6520 7365 7276 ializes the serv\n-00185eb0: 6572 2d73 6964 6520 5353 4c20 636f 6e74 er-side SSL cont\n-00185ec0: 6578 742e 2054 6865 203c 656d 3e3c 636f ext. The server.pem key fi\n-00185ef0: 6c65 2069 7320 7468 6520 7365 7276 6572 le is the server\n-00185f00: 2773 2070 7269 7661 7465 206b 6579 2063 's private key c\n-00185f10: 6f6e 6361 7465 6e61 7465 6420 7769 7468 oncatenated with\n-00185f20: 2069 7473 2063 6572 7469 6669 6361 7465 its certificate\n-00185f30: 2e20 5468 6520 3c65 6d3e 3c63 6f64 653e . The \n-00185f40: 6361 6365 7274 2e70 656d 3c2f 636f 6465 cacert.pem is used t\n-00185f60: 6f20 6175 7468 656e 7469 6361 7465 2063 o authenticate c\n-00185f70: 6c69 656e 7473 2061 6e64 2063 6f6e 7461 lients and conta\n-00185f80: 696e 7320 7468 6520 636c 6965 6e74 2063 ins the client c\n-00185f90: 6572 7469 6669 6361 7465 732e 2041 6c74 ertificates. Alt\n-00185fa0: 6572 6e61 7469 7665 6c79 2061 2064 6972 ernatively a dir\n-00185fb0: 6563 746f 7279 206e 616d 6520 6361 6e20 ectory name can \n-00185fc0: 6265 2073 7065 6369 6669 6564 2e20 5468 be specified. Th\n-00185fd0: 6973 2064 6972 6563 746f 7279 2069 7320 is directory is \n-00185fe0: 6173 7375 6d65 6420 746f 2063 6f6e 7461 assumed to conta\n-00185ff0: 696e 2074 6865 2063 6572 7469 6669 6361 in the certifica\n-00186000: 7465 732e 2054 6865 203c 656d 3e3c 636f tes. The dh512.pem file sp\n-00186030: 6563 6966 6965 7320 7468 6174 2044 4820 ecifies that DH \n-00186040: 7769 6c6c 2062 6520 7573 6564 2066 6f72 will be used for\n-00186050: 206b 6579 2061 6772 6565 6d65 6e74 2069 key agreement i\n-00186060: 6e73 7465 6164 206f 6620 5253 412e 2041 nstead of RSA. A\n-00186070: 206e 756d 6572 6963 2076 616c 7565 2067 numeric value g\n-00186080: 7265 6174 6572 2074 6861 6e20 3531 3220 reater than 512 \n-00186090: 6361 6e20 6265 2070 726f 7669 6465 6420 can be provided \n-001860a0: 696e 7374 6561 6420 6173 2061 2073 7472 instead as a str\n-001860b0: 696e 6720 636f 6e73 7461 6e74 2028 652e ing constant (e.\n-001860c0: 672e 203c 636f 6465 3e22 3531 3222 3c2f g. \"512\") to allow \n-001860e0: 7468 6520 656e 6769 6e65 2074 6f20 6765 the engine to ge\n-001860f0: 6e65 7261 7465 2074 6865 2044 4820 7061 nerate the DH pa\n-00186100: 7261 6d65 7465 7273 206f 6e20 7468 6520 rameters on the \n-00186110: 666c 7920 2874 6869 7320 6361 6e20 7461 fly (this can ta\n-00186120: 6b65 2061 2077 6869 6c65 2920 7261 7468 ke a while) rath\n-00186130: 6572 2074 6861 6e20 7265 7472 6965 7669 er than retrievi\n-00186140: 6e67 2074 6865 6d20 6672 6f6d 2061 2066 ng them from a f\n-00186150: 696c 652e 2054 6865 2072 616e 6466 696c ile. The randfil\n-00186160: 6520 656e 7472 7920 6361 6e20 6265 2075 e entry can be u\n-00186170: 7365 6420 746f 2073 6565 6420 7468 6520 sed to seed the \n-00186180: 5052 4e47 2e20 5468 6520 6c61 7374 2065 PRNG. The last e\n-00186190: 6e74 7279 2065 6e61 626c 6520 7365 7276 ntry enable serv\n-001861a0: 6572 2d73 6964 6520 7365 7373 696f 6e20 er-side session \n-001861b0: 6361 6368 696e 6720 746f 2073 7065 6564 caching to speed\n-001861c0: 2075 7020 544c 532e 2041 2075 6e69 7175 up TLS. A uniqu\n-001861d0: 6520 7365 7276 6572 206e 616d 6520 6973 e server name is\n-001861e0: 2072 6571 7569 7265 642e 3c2f 703e 0a3c required.

    .<\n-001861f0: 703e 596f 7520 6361 6e20 7370 6563 6966 p>You can specif\n-00186200: 7920 6120 6369 7068 6572 206c 6973 7420 y a cipher list \n-00186210: 746f 2075 7365 2077 6974 6820 544c 5376 to use with TLSv\n-00186220: 312e 3220 616e 6420 6265 6c6f 7720 7769 1.2 and below wi\n-00186230: 7468 203c 636f 6465 3e53 534c 5f43 5458 th SSL_CTX\n-00186240: 5f73 6574 5f63 6970 6865 725f 6c69 7374 _set_cipher_list\n-00186250: 2873 6f61 702d 2667 743b 6374 782c 2022 (soap->ctx, \"\n-00186260: 2e2e 2e22 293c 2f63 6f64 653e 2077 6865 ...\") whe\n-00186270: 7265 203c 636f 6465 3e73 6f61 702d 2667 re soap-&g\n-00186280: 743b 6374 783c 2f63 6f64 653e 2069 7320 t;ctx is \n-00186290: 7468 6520 5353 4c20 636f 6e74 6578 7420 the SSL context \n-001862a0: 6372 6561 7465 6420 6279 203c 636f 6465 created by soap_ssl_ser\n-00186340: 7665 725f 636f 6e74 6578 7428 293c 2f61 ver_context(). Likewi\n-00186360: 7365 2c20 7573 6520 3c63 6f64 653e 5353 se, use SS\n-00186370: 4c5f 4354 585f 7365 745f 6369 7068 6572 L_CTX_set_cipher\n-00186380: 7375 6974 6573 2873 6f61 702d 2667 743b suites(soap->\n-00186390: 6374 782c 2022 2e2e 2e22 293c 2f63 6f64 ctx, \"...\") to configure \n-001863b0: 7468 6520 6176 6169 6c61 626c 6520 544c the available TL\n-001863c0: 5376 312e 3320 6369 7068 6572 7375 6974 Sv1.3 ciphersuit\n-001863d0: 6573 2e3c 2f70 3e0a 3c70 3e57 6520 7265 es.

    .

    We re\n-001863e0: 6665 7220 746f 2074 6865 204f 7065 6e53 fer to the OpenS\n-001863f0: 534c 2064 6f63 756d 656e 7461 7469 6f6e SL documentation\n-00186400: 2061 6e64 206d 616e 7561 6c20 7061 6765 and manual page\n-00186410: 7320 6f66 203c 636f 6465 3e53 534c 5f43 s of SSL_C\n-00186420: 5458 5f73 6574 5f63 6970 6865 725f 6c69 TX_set_cipher_li\n-00186430: 7374 3c2f 636f 6465 3e20 616e 6420 3c63 st and .

    ];.
    <\n+0016c900: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+0016c910: 6170 2e68 746d 6c23 6131 3763 3735 3066 ap.html#a17c750f\n+0016c920: 3230 6461 6235 3739 6136 6132 3363 3330 20dab579a6a23c30\n+0016c930: 3139 3965 6431 3236 3322 3e73 6f61 703a 199ed1263\">soap:\n+0016c940: 3a6d 7573 7455 6e64 6572 7374 616e 643c :mustUnderstand<\n+0016c950: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    sho\n+0016c970: 7274 206d 7573 7455 6e64 6572 7374 616e rt mustUnderstan\n+0016c980: 643c 2f64 6976 3e3c 6469 7620 636c 6173 d
    The so\n+0016c9a0: 6170 3a3a 6d75 7374 556e 6465 7273 7461 ap::mustUndersta\n+0016c9b0: 6e64 2066 6c61 6720 6973 2073 6574 2077 nd flag is set w\n+0016c9c0: 6865 6e20 6120 534f 4150 2048 6561 6465 hen a SOAP Heade\n+0016c9d0: 7220 656c 656d 656e 7420 6361 7272 6965 r element carrie\n+0016c9e0: 7320 6120 534f 4150 2d45 4e56 3a6d 7573 s a SOAP-ENV:mus\n+0016c9f0: 7455 6e64 6572 7374 616e 6420 6174 742e tUnderstand att.\n+0016ca00: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De\n+0016ca20: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+0016ca30: 6473 6f61 7032 2e68 3a32 3936 313c 2f64 dsoap2.h:2961
    .
    \n+0016ca50: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n+0016d910: 703e f09f 949d 203c 6120 6872 6566 3d22 p>....
    Back to table\n+0016d930: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+0016d940: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .How\n+0016d970: 2074 6f20 6861 6e64 6c65 2048 5454 5020 to handle HTTP \n+0016d980: 3330 3720 7465 6d70 6f72 6172 7920 7265 307 temporary re\n+0016d990: 6469 7265 6374 3c2f 6832 3e0a 3c70 3e54 direct

    .

    T\n+0016d9a0: 6865 2063 6c69 656e 742d 7369 6465 2068 he client-side h\n+0016d9b0: 616e 646c 696e 6720 6f66 2048 5454 5020 andling of HTTP \n+0016d9c0: 3330 3720 636f 6465 2022 5465 6d70 6f72 307 code \"Tempor\n+0016d9d0: 6172 7920 5265 6469 7265 6374 2220 616e ary Redirect\" an\n+0016d9e0: 6420 616e 7920 6f66 2074 6865 2072 6564 d any of the red\n+0016d9f0: 6972 6563 7420 636f 6465 7320 3330 312c irect codes 301,\n+0016da00: 2033 3032 2c20 616e 6420 3330 3320 6172 302, and 303 ar\n+0016da10: 6520 6e6f 7420 6175 746f 6d61 7465 642e e not automated.\n+0016da20: 2043 6c69 656e 7420 6170 706c 6963 6174 Client applicat\n+0016da30: 696f 6e20 6465 7665 6c6f 7065 7273 206d ion developers m\n+0016da40: 6179 2077 616e 7420 746f 2063 6f6e 7369 ay want to consi\n+0016da50: 6465 7220 6164 6469 6e67 2061 2066 6577 der adding a few\n+0016da60: 206c 696e 6573 206f 6620 636f 6465 2074 lines of code t\n+0016da70: 6f20 7375 7070 6f72 7420 7265 6469 7265 o support redire\n+0016da80: 6374 732e 2049 7420 7761 7320 6465 6369 cts. It was deci\n+0016da90: 6465 6420 6e6f 7420 746f 2061 7574 6f6d ded not to autom\n+0016daa0: 6174 6963 616c 6c79 2073 7570 706f 7274 atically support\n+0016dab0: 2072 6564 6972 6563 7473 2066 6f72 2074 redirects for t\n+0016dac0: 6865 2066 6f6c 6c6f 7769 6e67 2072 6561 he following rea\n+0016dad0: 736f 6e73 3a3c 2f70 3e0a 3c75 6c3e 0a3c sons:

    .
      .<\n+0016dae0: 6c69 3e52 6564 6972 6563 7469 6e67 2061 li>Redirecting a\n+0016daf0: 2073 6563 7572 6520 4854 5450 5320 6164 secure HTTPS ad\n+0016db00: 6472 6573 7320 746f 2061 206e 6f6e 2d73 dress to a non-s\n+0016db10: 6563 7572 6520 4854 5450 2061 6464 7265 ecure HTTP addre\n+0016db20: 7373 2076 6961 2033 3037 2063 7265 6174 ss via 307 creat\n+0016db30: 6573 2061 2073 6563 7572 6974 7920 7675 es a security vu\n+0016db40: 6c6e 6572 6162 696c 6974 792e 3c2f 6c69 lnerability..
    • Cyclic red\n+0016db60: 6972 6563 7473 206d 7573 7420 6265 2064 irects must be d\n+0016db70: 6574 6563 7465 6420 2865 2e67 2e20 616c etected (e.g. al\n+0016db80: 6c6f 7769 6e67 206f 6e6c 7920 6120 6c69 lowing only a li\n+0016db90: 6d69 7465 6420 6e75 6d62 6572 206f 6620 mited number of \n+0016dba0: 7265 6469 7265 6374 206c 6576 656c 7329 redirect levels)\n+0016dbb0: 2e3c 2f6c 693e 0a3c 6c69 3e52 6564 6972 .
    • .
    • Redir\n+0016dbc0: 6563 7469 6e67 2048 5454 5020 504f 5354 ecting HTTP POST\n+0016dbd0: 2077 696c 6c20 7265 7375 6c74 2069 6e20 will result in \n+0016dbe0: 7265 2d73 6572 6961 6c69 7a61 7469 6f6e re-serialization\n+0016dbf0: 2061 6e64 2072 652d 706f 7374 206f 6620 and re-post of \n+0016dc00: 7468 6520 656e 7469 7265 2053 4f41 5020 the entire SOAP \n+0016dc10: 7265 7175 6573 742e 2054 6865 2053 4f41 request. The SOA\n+0016dc20: 5020 7265 7175 6573 7420 6d65 7373 6167 P request messag\n+0016dc30: 6520 6d75 7374 2062 6520 7265 2d70 6f73 e must be re-pos\n+0016dc40: 7465 6420 696e 2069 7473 2065 6e74 6972 ted in its entir\n+0016dc50: 6574 7920 7768 656e 2072 652d 6973 7375 ety when re-issu\n+0016dc60: 696e 6720 7468 6520 534f 4150 206f 7065 ing the SOAP ope\n+0016dc70: 7261 7469 6f6e 2074 6f20 6120 6e65 7720 ration to a new \n+0016dc80: 6164 6472 6573 732e 3c2f 6c69 3e0a 3c2f address.
    • ..

      To implem\n+0016dca0: 656e 7420 636c 6965 6e74 2d73 6964 6520 ent client-side \n+0016dcb0: 3330 3720 7265 6469 7265 6374 2c20 6164 307 redirect, ad\n+0016dcc0: 6420 7468 6520 666f 6c6c 6f77 696e 6720 d the following \n+0016dcd0: 6c69 6e65 7320 6f66 2063 6f64 653a 3c2f lines of code:.

      const char *endpoint = \n+0016dd60: 4e55 4c4c 3b20 3c73 7061 6e20 636c 6173 NULL; // u\n+0016dd80: 7365 2064 6566 6175 6c74 2065 6e64 706f se default endpo\n+0016dd90: 696e 7420 6769 7665 6e20 696e 2057 5344 int given in WSD\n+0016dda0: 4c20 6f72 2073 7065 6369 6679 206f 6e65 L or specify one\n+0016ddb0: 2068 6572 653c 2f73 7061 6e3e 3c2f 6469 here.
      i\n+0016ddf0: 6e74 3c2f 7370 616e 3e20 7265 6469 7265 nt redire\n+0016de00: 6374 7320 3d20 3130 3b20 2020 2020 2020 cts = 10; \n+0016de10: 2020 203c 7370 616e 2063 6c61 7373 3d22 // max \n+0016de30: 7265 6469 7265 6374 2063 6f75 6e74 203c redirect count <\n+0016de40: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+0016de60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016de70: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (redirects\n+0016de90: 2d2d 2920 3c2f 6469 763e 0a3c 6469 7620 --)
      .
      {.
      if (so\n+0016def0: 6170 5f63 616c 6c5f 6e73 315f 5f6d 794d ap_call_ns1__myM\n+0016df00: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa\n+0016df30: 703c 2f61 3e2c 2065 6e64 706f 696e 742c p, endpoint,\n+0016df40: 202e 2e2e 2929 203c 2f64 6976 3e0a 3c64 ...))
      .\n+0016df60: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
      .
      \n+0016df80: 3c73 7061 6e20 636c 6173 733d 226b 6579 if ((soa\n+0016dfd0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error >\n+0016e030: 3b3d 2033 3031 2026 616d 703b 2661 6d70 ;= 301 &&\n+0016e040: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; soap->e\n+0016e0c0: 7272 6f72 3c2f 613e 2026 6c74 3b3d 2033 rror <= 3\n+0016e0d0: 3033 2920 7c7c 203c 6120 636c 6173 733d 03) || so\n+0016e100: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->error ==\n+0016e160: 2033 3037 2920 3c2f 6469 763e 0a3c 6469 307)
      . \n+0016e180: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
      .
      \n+0016e1a0: 2020 2065 6e64 706f 696e 7420 3d20 3c61 endpoint = soap_strdup(soap, soap<\n+0016e270: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->endpoint); \n+0016e2d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // endpoin\n+0016e2f0: 7420 6672 6f6d 2048 5454 5020 3330 312c t from HTTP 301,\n+0016e300: 2033 3032 2c20 3330 332c 2033 3037 204c 302, 303, 307 L\n+0016e310: 6f63 6174 696f 6e20 6865 6164 6572 203c ocation header <\n+0016e320: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n+0016e340: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    \n+0016e360: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+0016e380: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n+0016e3a0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n+0016e3c0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+0016e3e0: 2068 616e 646c 6520 6572 726f 7220 3c2f handle error
    . \n+0016e410: 2020 2020 3c73 7061 6e20 636c 6173 733d br\n+0016e430: 6561 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 eak; .
    } .
    }
    .<\n+0016e480: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016e490: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > els\n+0016e4b0: 653c 2f73 7061 6e3e 203c 2f64 6976 3e0a e
    .\n+0016e4c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+0016e4f0: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n+0016e510: 6b3c 2f73 7061 6e3e 3b20 3c73 7061 6e20 k; \n+0016e530: 2f2f 2061 6c6c 204f 4b20 6e6f 773c 2f73 // all OK now
    .
    }\n+0016e560: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n+0016e580: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

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

    ..How to impleme\n+0016e600: 6e74 2048 5454 5020 4745 542c 2050 5554 nt HTTP GET, PUT\n+0016e610: 2c20 616e 6420 5041 5443 4820 7365 7276 , and PATCH serv\n+0016e620: 6963 6573 3c2f 6832 3e0a 3c70 3e54 6f20 ices.

    To \n+0016e630: 696d 706c 656d 656e 7420 4854 5450 2047 implement HTTP G\n+0016e640: 4554 2072 6571 7565 7374 2072 6573 706f ET request respo\n+0016e650: 6e73 6573 2c20 6465 6669 6e65 2074 6865 nses, define the\n+0016e660: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::f\n+0016e730: 6765 743c 2f61 3e3c 2f63 6f64 653e 2063 get c\n+0016e740: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function\n+0016e750: 2e20 5468 6520 6361 6c6c 6261 636b 2069 . The callback i\n+0016e760: 7320 7265 7175 6972 6564 2074 6f20 7072 s required to pr\n+0016e770: 6f64 7563 6520 6120 7265 7370 6f6e 7365 oduce a response\n+0016e780: 2074 6f20 7468 6520 7265 7175 6573 7420 to the request \n+0016e790: 696e 2074 6578 7475 616c 2066 6f72 6d2c in textual form,\n+0016e7a0: 2073 7563 6820 6173 2061 2057 6562 2070 such as a Web p\n+0016e7b0: 6167 6520 6f72 2061 6e20 584d 4c20 6f72 age or an XML or\n+0016e7c0: 204a 534f 4e20 7265 7370 6f6e 7365 2e3c JSON response.<\n+0016e7d0: 2f70 3e0a 3c70 3e59 6f75 2063 616e 2061 /p>.

    You can a\n+0016e7e0: 6c73 6f20 7573 6520 7468 6520 3c63 6f64 lso use the http_get<\n+0016e880: 2f63 6f64 653e 2070 6c75 6769 6e20 7768 /code> plugin wh\n+0016e890: 6963 6820 6573 7365 6e74 6961 6c6c 7920 ich essentially \n+0016e8a0: 7365 7473 2074 6865 203c 636f 6465 3e3c sets the <\n+0016e8b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0016e8c0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0016e8d0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0016e8e0: 6761 6530 3232 3230 3466 6637 3030 3464 gae022204ff7004d\n+0016e8f0: 6632 6435 6163 3965 3038 3363 6262 3562 f2d5ac9e083cbb5b\n+0016e900: 3136 2220 7469 746c 653d 2243 616c 6c62 16\" title=\"Callb\n+0016e910: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n+0016e920: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n+0016e930: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n+0016e940: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n+0016e950: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request\n+0016e960: 7320 6672 6f6d 2063 6c69 656e 7473 2e22 s from clients.\"\n+0016e970: 3e73 6f61 703a 3a66 6765 743c 2f61 3e3c >soap::fget<\n+0016e980: 2f63 6f64 653e 2063 616c 6c62 6163 6b20 /code> callback \n+0016e990: 616e 6420 616c 736f 206b 6565 7073 2074 and also keeps t\n+0016e9a0: 7261 636b 206f 6620 7468 6520 6e75 6d62 rack of the numb\n+0016e9b0: 6572 206f 6620 4854 5450 2047 4554 2061 er of HTTP GET a\n+0016e9c0: 6e64 2050 4f53 5420 7265 7175 6573 7473 nd POST requests\n+0016e9d0: 206d 6164 6520 6174 2074 6865 2073 6572 made at the ser\n+0016e9e0: 7665 7220 7369 6465 2e3c 2f70 3e0a 3c70 ver side.

    .The following e\n+0016ea00: 7861 6d70 6c65 2070 726f 6475 6365 7320 xample produces \n+0016ea10: 6120 5765 6220 7061 6765 2075 706f 6e20 a Web page upon \n+0016ea20: 6120 4854 5450 2047 4554 2072 6571 7565 a HTTP GET reque\n+0016ea30: 7374 2028 652e 672e 2066 726f 6d20 6120 st (e.g. from a \n+0016ea40: 6272 6f77 7365 7229 3a3c 2f70 3e0a 3c64 browser):

    .
    \n+0016ea90: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n+0016eaa0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    stru\n+0016eaf0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n+0016ebc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap->\n+0016ec10: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;fget\n+0016ec70: 203d 203c 6120 636c 6173 733d 2263 6f64 = http_get;\n+0016ecd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... \n+0016ecf0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //<\n+0016ed10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_s\n+0016ed80: 6572 7665 3c2f 613e 283c 6120 636c 6173 erve(\n+0016edb0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    ... \n+0016edf0: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    .\n+0016ee00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    \n+0016ee60: 696e 743c 2f73 7061 6e3e 203c 6120 636c int http_\n+0016eec0: 6765 743c 2f61 3e28 3c73 7061 6e20 636c get(st\n+0016eee0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap) .
    {
    .<\n+0016ef70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016ef80: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+0016efa0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_res\n+0016f000: 706f 6e73 653c 2f61 3e28 3c61 2063 6c61 ponse(soap, SOAP_\n+0016f090: 4854 4d4c 3c2f 613e 2920 3c73 7061 6e20 HTML) \n+0016f0b0: 2f2f 2048 5454 5020 7265 7370 6f6e 7365 // HTTP response\n+0016f0c0: 2068 6561 6465 7220 7769 7468 2074 6578 header with tex\n+0016f0d0: 742f 6874 6d6c 203c 2f73 7061 6e3e 3c2f t/html .
    || soa\n+0016f150: 705f 7365 6e64 3c2f 613e 283c 6120 636c p_send(soap, "&l\n+0016f1b0: 743b 4854 4d4c 2667 743b 4d79 2057 6562 t;HTML>My Web\n+0016f1c0: 2073 6572 7665 7220 6973 206f 7065 7261 server is opera\n+0016f1d0: 7469 6f6e 616c 2e26 6c74 3b2f 4854 4d4c tional.</HTML\n+0016f1e0: 2667 743b 2671 756f 743b 3c2f 7370 616e >")
    .
    ||\n+0016f210: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_end_send(soap))
    .
    \n+0016f2c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+0016f2e0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n soap_cl\n+0016f340: 6f73 6573 6f63 6b3c 2f61 3e28 3c61 2063 osesock(soap);.
    return \n+0016f3c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+0016f410: 736f 6170 5f63 6c6f 7365 736f 636b 3c2f soap_closesock(soap);
    .
    }.int(* fget)(st\n+0016f560: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n+0016f570: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac\n+0016f590: 6b20 746f 2069 6d70 6c65 6d65 6e74 206c k to implement l\n+0016f5a0: 6f67 6963 2061 7420 7468 6520 7365 7276 ogic at the serv\n+0016f5b0: 6572 2d73 6964 6520 746f 2073 6572 7665 er-side to serve\n+0016f5c0: 2072 6573 706f 6e73 6573 2074 6f20 4854 responses to HT\n+0016f5d0: 5450 2047 4554 2072 6571 7565 7374 7320 TP GET requests \n+0016f5e0: 6672 6f6d 2063 6c69 656e 7473 2e3c 2f64 from clients.
    Definit\n+0016f610: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+0016f620: 322e 683a 3433 3330 3c2f 6469 763e 3c2f 2.h:4330
    .
    soap\n+0016f6e0: 5f72 6573 706f 6e73 653c 2f61 3e3c 2f64 _response
    int soap_\n+0016f710: 7265 7370 6f6e 7365 2873 7472 7563 7420 response(struct \n+0016f720: 736f 6170 202a 736f 6170 2c20 696e 7420 soap *soap, int \n+0016f730: 7374 6174 7573 293c 2f64 6976 3e3c 6469 status)
    \n+0016f750: 496e 6974 6961 6c69 7a65 2074 6865 2063 Initialize the c\n+0016f760: 6f6e 7465 7874 2066 6f72 2073 6572 7665 ontext for serve\n+0016f770: 722d 7369 6465 2073 656e 6469 6e67 2061 r-side sending a\n+0016f780: 6e64 2073 656e 6420 6120 4854 5450 2072 nd send a HTTP r\n+0016f790: 6573 706f 6e73 6520 6865 6164 6572 2e3c esponse header.<\n+0016f7a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+0016f810: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_closesoc\n+0016f860: 6b3c 2f61 3e3c 2f64 6976 3e3c 6469 7620 k
    i\n+0016f880: 6e74 2073 6f61 705f 636c 6f73 6573 6f63 nt soap_closesoc\n+0016f890: 6b28 7374 7275 6374 2073 6f61 7020 2a73 k(struct soap *s\n+0016f8a0: 6f61 7029 3c2f 6469 763e 3c64 6976 2063 oap)
    Clo\n+0016f8c0: 7365 2074 6865 2073 6f63 6b65 7420 636f se the socket co\n+0016f8d0: 6e6e 6563 7469 6f6e 2e3c 2f64 6976 3e3c nnection.
    <\n+0016f8e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+0016f9a0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+0016f9b0: 6922 3e69 6e74 2068 7474 705f 6765 7428 i\">int http_get(\n+0016f9c0: 7374 7275 6374 2073 6f61 7020 2a2c 2073 struct soap *, s\n+0016f9d0: 7472 7563 7420 736f 6170 5f70 6c75 6769 truct soap_plugi\n+0016f9e0: 6e20 2a2c 2076 6f69 6420 2a29 3c2f 6469 n *, void *)
    The HTTP GE\n+0016fa10: 5420 706c 7567 696e 2072 6567 6973 7472 T plugin registr\n+0016fa20: 6174 696f 6e20 6675 6e63 7469 6f6e 2e3c ation function.<\n+0016fa30: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+0016faa0: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_HTML\n+0016faf0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    #defin\n+0016fb10: 6520 534f 4150 5f48 544d 4c3c 2f64 6976 e SOAP_HTML
    A special so\n+0016fb40: 6170 5f73 7461 7475 7320 6572 726f 7220 ap_status error \n+0016fb50: 636f 6465 2074 6f20 7369 676e 616c 2074 code to signal t\n+0016fb60: 6861 7420 6120 6375 7374 6f6d 2048 5454 hat a custom HTT\n+0016fb70: 5020 7265 7370 6f6e 7365 2069 7320 7072 P response is pr\n+0016fb80: 6573 656e 7420 616e 6420 6e6f 2048 5454 esent and no HTT\n+0016fb90: 5020 7265 7370 6f6e 732e 2e2e 3c2f 6469 P respons...
    Definiti\n+0016fbc0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0016fbd0: 2e68 3a32 3731 323c 2f64 6976 3e3c 2f64 .h:2712
    .
    soap_\n+0016fc90: 656e 645f 7365 6e64 3c2f 613e 3c2f 6469 end_send
    int soap_e\n+0016fcc0: 6e64 5f73 656e 6428 7374 7275 6374 2073 nd_send(struct s\n+0016fcd0: 6f61 7020 2a73 6f61 7029 3c2f 6469 763e oap *soap)
    \n+0016fce0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Finalize the \n+0016fd00: 636f 6e74 6578 7420 6166 7465 7220 7365 context after se\n+0016fd10: 6e64 696e 672e 3c2f 6469 763e 3c2f 6469 nding.
    .

    The\n+0016fd40: 2065 7861 6d70 6c65 2062 656c 6f77 2070 example below p\n+0016fd50: 726f 6475 6365 7320 6120 5753 444c 2066 roduces a WSDL f\n+0016fd60: 696c 6520 7570 6f6e 2061 2048 5454 5020 ile upon a HTTP \n+0016fd70: 4745 5420 7769 7468 2070 6174 6820 3c63 GET with path ?wsdl\n+0016fd90: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    ..{\n+0016fee0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    FILE \n+0016ff00: 2a66 6420 3d20 4e55 4c4c 3b3c 2f64 6976 *fd = NULL;.
    \n+0016ff40: 6368 6172 3c2f 7370 616e 3e20 2a73 203d char *s =\n+0016ff50: 2073 7472 6368 7228 3c61 2063 6c61 7373 strchr(s\n+0016ff80: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->path, <\n+0016ffe0: 7370 616e 2063 6c61 7373 3d22 6368 6172 span class=\"char\n+0016fff0: 6c69 7465 7261 6c22 3e26 2333 393b 3f26 literal\">'?&\n+00170000: 2333 393b 3c2f 7370 616e 3e29 3b20 3c2f #39;); .
    if (!s\n+00170050: 207c 7c20 7374 7263 6d70 2873 2c20 3c73 || strcmp(s, "\n+00170080: 3f77 7364 6c26 7175 6f74 3b3c 2f73 7061 ?wsdl"))
    . \n+001700b0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+001700d0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n+00170130: 4150 5f47 4554 5f4d 4554 484f 443c 2f61 AP_GET_METHOD;
    .
    fd\n+00170160: 203d 203c 6120 636c 6173 733d 2263 6f64 = fopen<\n+001701c0: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(\n+001701e0: 2671 756f 743b 6d79 7365 7276 6963 652e "myservice.\n+001701f0: 7773 646c 2671 756f 743b 3c2f 7370 616e wsdl", &\n+00170220: 7175 6f74 3b72 6226 7175 6f74 3b3c 2f73 quot;rb"); // \n+00170250: 6f70 656e 2057 5344 4c20 6669 6c65 2074 open WSDL file t\n+00170260: 6f20 636f 7079 203c 2f73 7061 6e3e 3c2f o copy .
    if (!f\n+001702b0: 6429 203c 2f64 6976 3e0a 3c64 6976 2063 d)
    .
    \n+001702d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001702f0: 3c2f 7370 616e 3e20 3430 343b 203c 7370 404; // return HTT\n+00170320: 5020 6e6f 7420 666f 756e 6420 6572 726f P not found erro\n+00170330: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    .\n+00170340: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . \n+00170690: 2020 2020 3c73 7061 6e20 636c 6173 733d si\n+001706b0: 7a65 5f74 3c2f 7370 616e 3e20 7220 3d20 ze_t r = \n+001706c0: 6672 6561 6428 3c61 2063 6c61 7373 3d22 fread(soa\n+001706f0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->tmpbuf, 1\n+00170750: 2c20 3c73 7061 6e20 636c 6173 733d 226b , sizeof(soa\n+001707a0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->tmpbuf), \n+00170800: 6664 293b 203c 2f64 6976 3e0a 3c64 6976 fd);
    . \n+00170820: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n+00170840: 3c2f 7370 616e 3e20 2821 7220 7c7c 203c (!r || <\n+00170850: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00170860: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00170870: 705f 5f69 6f2e 6874 6d6c 2367 6162 3362 p__io.html#gab3b\n+00170880: 3162 6136 3331 6130 6334 3764 3637 6665 1ba631a0c47d67fe\n+00170890: 3331 3437 3439 3832 6264 6538 3622 3e73 31474982bde86\">s\n+001708a0: 6f61 705f 7365 6e64 5f72 6177 3c2f 613e oap_send_raw\n+001708b0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001708e0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , soap->t\n+00170960: 6d70 6275 663c 2f61 3e2c 2072 2929 203c mpbuf, r)) <\n+00170970: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+00170990: 3c73 7061 6e20 636c 6173 733d 226b 6579 break<\n+001709b0: 2f73 7061 6e3e 3b3c 2f64 6976 3e0a 3c64 /span>;
    .\n+001709d0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . \n+001709f0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    fclose(f\n+00170a70: 6429 3b20 3c2f 6469 763e 0a3c 6469 7620 d);
    .
    <\n+00170a90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00170aa0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00170ab0: 705f 5f69 6f2e 6874 6d6c 2367 6132 3930 p__io.html#ga290\n+00170ac0: 6464 6234 3661 6664 6266 3565 6336 3636 ddb46afdbf5ec666\n+00170ad0: 3962 3661 6338 6461 6361 3563 3922 3e73 9b6ac8daca5c9\">s\n+00170ae0: 6f61 705f 656e 645f 7365 6e64 3c2f 613e oap_end_send\n+00170af0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00170b20: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    ..\n+00170c00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    SOAP_GE\n+00170cd0: 545f 4d45 5448 4f44 3c2f 613e 3c2f 6469 T_METHOD
    #define SO\n+00170d00: 4150 5f47 4554 5f4d 4554 484f 443c 2f64 AP_GET_METHOD
    A soap_sta\n+00170d30: 7475 7320 6572 726f 7220 636f 6465 3a20 tus error code: \n+00170d40: 616e 2048 5454 5020 4745 5420 7265 7175 an HTTP GET requ\n+00170d50: 6573 7420 7761 7320 7265 6365 6976 6564 est was received\n+00170d60: 2062 7920 7468 6520 7365 7276 6963 6520 by the service \n+00170d70: 6275 7420 7468 6520 4745 5420 7265 7175 but the GET requ\n+00170d80: 6573 7420 6361 6c6c 6261 632e 2e2e 3c2f est callbac...
    Defini\n+00170db0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00170dc0: 7032 2e68 3a32 3339 373c 2f64 6976 3e3c p2.h:2397
    <\n+00170dd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+00170e90: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n+00170eb0: 5f46 494c 453c 2f64 6976 3e3c 6469 7620 _FILE
    A \n+00170ed0: 7370 6563 6961 6c20 736f 6170 5f73 7461 special soap_sta\n+00170ee0: 7475 7320 6572 726f 7220 636f 6465 2074 tus error code t\n+00170ef0: 6f20 7369 676e 616c 2074 6861 7420 6120 o signal that a \n+00170f00: 6375 7374 6f6d 2066 696c 652d 6261 7365 custom file-base\n+00170f10: 6420 4854 5450 2072 6573 706f 6e73 6520 d HTTP response \n+00170f20: 6973 2070 7265 7365 6e74 2061 6e64 206e is present and n\n+00170f30: 6f20 482e 2e2e 3c2f 6469 763e 3c64 6976 o H...
    <\n+00170f50: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:271\n+00170f70: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .soap_send_r\n+00171030: 6177 3c2f 613e 3c2f 6469 763e 3c64 6976 aw
    \n+00171050: 696e 7420 736f 6170 5f73 656e 645f 7261 int soap_send_ra\n+00171060: 7728 7374 7275 6374 2073 6f61 7020 2a73 w(struct soap *s\n+00171070: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n+00171080: 2a73 2c20 7369 7a65 5f74 206e 293c 2f64 *s, size_t n)
    Send raw b\n+001710b0: 7974 6573 2e3c 2f64 6976 3e3c 2f64 6976 ytes.
    .
    <\n+00171120: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+00171130: 6170 2e68 746d 6c23 6131 3934 6263 6166 ap.html#a194bcaf\n+00171140: 6564 3063 3365 3336 3862 3932 6634 3532 ed0c3e368b92f452\n+00171150: 6663 3830 6232 6433 3122 3e73 6f61 703a fc80b2d31\">soap:\n+00171160: 3a74 6d70 6275 663c 2f61 3e3c 2f64 6976 :tmpbuf
    char tmpbuf\n+00171190: 5b53 4f41 505f 544d 504c 454e 5d3c 2f64 [SOAP_TMPLEN]
    Internal b\n+001711c0: 7566 6665 7220 746f 2068 6f6c 6420 7465 uffer to hold te\n+001711d0: 6d70 6f72 6172 7920 7374 7269 6e67 7320 mporary strings \n+001711e0: 7375 6368 2061 7320 7374 7269 6e67 2072 such as string r\n+001711f0: 6570 7265 7365 6e74 6174 696f 6e73 206f epresentations o\n+00171200: 6620 7072 696d 6974 6976 6520 7661 6c75 f primitive valu\n+00171210: 6573 2c2e 2e2e 3c2f 6469 763e 3c64 6976 es,...
    <\n+00171230: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:419\n+00171250: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .
    soap::htt\n+00171300: 705f 636f 6e74 656e 743c 2f61 3e3c 2f64 p_content
    const cha\n+00171330: 7220 2a20 6874 7470 5f63 6f6e 7465 6e74 r * http_content\n+00171340: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    String \n+00171360: 7769 7468 2048 5454 5020 636f 6e74 656e with HTTP conten\n+00171370: 7420 7479 7065 2068 6561 6465 7220 7661 t type header va\n+00171380: 6c75 6520 7265 6365 6976 6564 2c20 6361 lue received, ca\n+00171390: 6e20 616c 736f 2062 6520 6173 7369 676e n also be assign\n+001713a0: 6564 2074 6f20 7370 6563 6966 7920 6120 ed to specify a \n+001713b0: 636f 6e74 656e 7420 7479 7065 2068 2e2e content type h..\n+001713c0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+001713e0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+001713f0: 736f 6170 322e 683a 3239 3830 3c2f 6469 soap2.h:2980
    .
    <\n+00171410: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00171420: 3c70 3e54 6869 7320 6578 616d 706c 6520

    This example \n+00171430: 7368 6f77 7320 686f 7720 6f6e 6520 7072 shows how one pr\n+00171440: 6564 6574 6572 6d69 6e65 6420 6669 6c65 edetermined file\n+00171450: 2069 7320 7365 7276 6564 2e20 5468 6520 is served. The \n+00171460: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+00171470: 7361 6d70 6c65 732f 7765 6273 6572 7665 samples/webserve\n+00171480: 723c 2f63 6f64 653e 3c2f 656d 3e20 6465 r de\n+00171490: 6d6f 6e73 7472 6174 6573 2068 6f77 2066 monstrates how f\n+001714a0: 696c 6573 2073 686f 756c 6420 6265 2073 iles should be s\n+001714b0: 6572 7665 6420 696e 2067 656e 6572 616c erved in general\n+001714c0: 2c20 6279 2061 6464 696e 6720 7468 6520 , by adding the \n+001714d0: 6e65 6365 7373 6172 7920 6c6f 6769 6320 necessary logic \n+001714e0: 746f 2061 6464 206d 6564 6961 2074 7970 to add media typ\n+001714f0: 6573 2074 6f20 4854 5450 2068 6561 6465 es to HTTP heade\n+00171500: 7273 2061 6e64 2074 6f20 7265 7374 7269 rs and to restri\n+00171510: 6374 2074 6865 2073 656c 6563 7469 6f6e ct the selection\n+00171520: 206f 6620 6669 6c65 7320 7468 6174 2073 of files that s\n+00171530: 686f 756c 6420 6265 2073 6572 7665 642e hould be served.\n+00171540: 3c2f 703e 0a3c 646c 2063 6c61 7373 3d22

    .
    Warning
    When servin\n+00171580: 6720 6669 6c65 7320 6173 2072 6573 706f g files as respo\n+00171590: 6e73 6573 2074 6f20 7265 7175 6573 7473 nses to requests\n+001715a0: 2c20 7765 206e 6565 6420 746f 2062 6520 , we need to be \n+001715b0: 7661 7279 2063 6172 6566 756c 2c20 6265 vary careful, be\n+001715c0: 6361 7573 6520 7765 2064 6f6e 2774 2077 cause we don't w\n+001715d0: 616e 7420 7265 7175 6573 7473 2074 6f20 ant requests to \n+001715e0: 736e 6f6f 7020 6172 6f75 6e64 2069 6e20 snoop around in \n+001715f0: 6469 7265 6374 6f72 6965 7320 616e 6420 directories and \n+00171600: 7365 7276 6520 6669 6c65 7320 7468 6174 serve files that\n+00171610: 2073 686f 756c 6420 6265 2070 726f 7465 should be prote\n+00171620: 6374 6564 2066 726f 6d20 7075 626c 6963 cted from public\n+00171630: 2076 6965 772e 2054 6865 7265 666f 7265 view. Therefore\n+00171640: 2c20 7768 656e 2061 6464 696e 6720 6c6f , when adding lo\n+00171650: 6769 6320 746f 2073 6572 7665 2066 696c gic to serve fil\n+00171660: 6573 2c20 7765 206d 7573 7420 7265 6a65 es, we must reje\n+00171670: 6374 2072 6571 7565 7374 2074 6861 7420 ct request that \n+00171680: 6861 7665 203c 636f 6465 3e3c 6120 636c have soap::path\n+00171720: 3c2f 636f 6465 3e20 7661 6c75 6573 2077 values w\n+00171730: 6974 6820 6120 3c63 6f64 653e 2f3c 2f63 ith a / or a \n+00171750: 5c3c 2f63 6f64 653e 2028 3c63 6f64 653e \\ (\n+00171760: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::pat\n+001717f0: 683c 2f61 3e3c 2f63 6f64 653e 2069 7320 h is \n+00171800: 6120 7374 7269 6e67 2077 6974 6820 7468 a string with th\n+00171810: 6520 7061 7468 2070 6172 7420 6f66 2074 e path part of t\n+00171820: 6865 2055 524c 2c20 7374 6172 7469 6e67 he URL, starting\n+00171830: 2077 6974 6820 6120 3c63 6f64 653e 2f3c with a /<\n+00171840: 2f63 6f64 653e 292e 2049 6620 7468 6573 /code>). If thes\n+00171850: 6520 6172 6520 616c 6c6f 7765 642c 2074 e are allowed, t\n+00171860: 6865 6e20 7765 206d 7573 7420 6174 206c hen we must at l\n+00171870: 6561 7374 2063 6865 636b 2066 6f72 203c east check for <\n+00171880: 636f 6465 3e2e 2e3c 2f63 6f64 653e 2069 code>.. i\n+00171890: 6e20 7468 6520 7061 7468 2074 6f20 6176 n the path to av\n+001718a0: 6f69 6420 7265 7175 6573 7420 6672 6f6d oid request from\n+001718b0: 2073 6e6f 6f70 696e 6720 6172 6f75 6e64 snooping around\n+001718c0: 2069 6e20 6869 6768 6572 2064 6972 6563 in higher direc\n+001718d0: 746f 7269 6573 2061 6c6c 2074 6865 2077 tories all the w\n+001718e0: 6179 2075 7020 746f 2074 6865 2072 6f6f ay up to the roo\n+001718f0: 742e 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e t.
    .

    \n+00171900: 466f 7220 6120 6f6e 652d 7761 7920 534f For a one-way SO\n+00171910: 4150 2f58 4d4c 206d 6573 7361 6765 2c20 AP/XML message, \n+00171920: 796f 7520 6361 6e20 616c 736f 2072 6574 you can also ret\n+00171930: 7572 6e20 6120 534f 4150 2f58 4d4c 2072 urn a SOAP/XML r\n+00171940: 6573 706f 6e73 653a 3c2f 703e 0a3c 6469 esponse:

    .
    i\n+00171990: 6e74 3c2f 7370 616e 3e20 3c61 2063 6c61 nt http_g\n+001719f0: 6574 3c2f 613e 283c 7370 616e 2063 6c61 et(str\n+00171a10: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap) .
    {
    .\n+00171ab0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_response<\n+00171b10: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00171b40: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, SOAP_OK\n+00171ba0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+00171bc0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00171be0: 726e 3c2f 7370 616e 3e20 736f 6170 5f73 rn soap_s\n+00171bf0: 656e 645f 6e73 315f 5f6d 7953 656e 644d end_ns1__mySendM\n+00171c00: 6574 686f 6452 6573 706f 6e73 6528 3c61 ethodResponse(soap, <\n+00171c40: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00171c50: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00171c60: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 ;", \n+00171c70: 4e55 4c4c 2c20 2e2e 2e20 7061 7261 6d73 NULL, ... params\n+00171c80: 202e 2e2e 293b 203c 2f64 6976 3e0a 3c64 ...);
    .\n+00171ca0: 7d20 3c2f 6469 763e 0a3c 2f64 6976 3e3c }
    .
    <\n+00171cb0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00171cc0: 3c70 3e77 6865 7265 203c 636f 6465 3e6e

    where n\n+00171cd0: 7331 5f5f 6d79 5365 6e64 4d65 7468 6f64 s1__mySendMethod\n+00171ce0: 5265 7370 6f6e 7365 3c2f 636f 6465 3e20 Response \n+00171cf0: 6973 2061 206f 6e65 2d77 6179 206d 6573 is a one-way mes\n+00171d00: 7361 6765 2064 6563 6c61 7265 6420 696e sage declared in\n+00171d10: 2061 2069 6e74 6572 6661 6365 2068 6561 a interface hea\n+00171d20: 6465 7220 6669 6c65 2061 733a 3c2f 703e der file as:

    \n+00171d30: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ns\n+00171d80: 315f 5f6d 7953 656e 644d 6574 686f 6452 1__mySendMethodR\n+00171d90: 6573 706f 6e73 6528 2e2e 2e20 7061 7261 esponse(... para\n+00171da0: 6d73 202e 2e2e 2c20 3c73 7061 6e20 636c ms ..., void);<\n+00171dd0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+00171df0: 5468 6520 6765 6e65 7261 7465 6420 3c65 The generated soapClie\n+00171e10: 6e74 2e63 7070 3c2f 636f 6465 3e3c 2f65 nt.cpp includes the \n+00171e30: 7365 6e64 696e 672d 7369 6465 2073 7475 sending-side stu\n+00171e40: 6220 6675 6e63 7469 6f6e 2e3c 2f70 3e0a b function.

    .\n+00171e50: 3c70 3e54 6865 2065 7861 6d70 6c65 7320

    The examples \n+00171e60: 6162 6f76 6520 6172 6520 666f 7220 4854 above are for HT\n+00171e70: 5450 2047 4554 2e20 546f 2069 6d70 6c65 TP GET. To imple\n+00171e80: 6d65 6e74 2048 5454 5020 5055 5420 616e ment HTTP PUT an\n+00171e90: 6420 5041 5443 4820 7365 7420 7468 6520 d PATCH set the \n+00171ea0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fp\n+00171f70: 7574 3c2f 613e 3c2f 636f 6465 3e20 616e ut an\n+00171f80: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d so\n+00172050: 6170 3a3a 6670 6174 6368 3c2f 613e 3c2f ap::fpatch callback f\n+00172070: 756e 6374 696f 6e73 206f 7220 7573 6520 unctions or use \n+00172080: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the http\n+00172110: 5f70 6f73 743c 2f61 3e3c 2f63 6f64 653e _post\n+00172120: 2070 6c75 6769 6e20 7768 6963 6820 6973 plugin which is\n+00172130: 206d 6f72 6520 6361 7061 626c 652e 3c2f more capable..

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

    .

    .TCP and HTTP \n+001721b0: 6b65 6570 2d61 6c69 7665 3c2f 6832 3e0a keep-alive

    .\n+001721c0: 3c70 3e54 6f20 6163 7469 7661 7465 2048

    To activate H\n+001721d0: 5454 5020 6b65 6570 2d61 6c69 7665 2c20 TTP keep-alive, \n+001721e0: 7365 7420 7468 6520 3c63 6f64 653e 2353 set the #S\n+001721f0: 4f41 505f 494f 5f4b 4545 5041 4c49 5645 OAP_IO_KEEPALIVE\n+00172200: 3c2f 636f 6465 3e20 666c 6167 2066 6f72 flag for\n+00172210: 2062 6f74 6820 696e 7075 7420 616e 6420 both input and \n+00172220: 6f75 7470 7574 206d 6f64 6573 2c20 7365 output modes, se\n+00172230: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section \n+00172260: 5275 6e2d 7469 6d65 2066 6c61 6773 3c2f Run-time flags . For example\n+00172280: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n+00172300: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00172330: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..
    When a client o\n+00172480: 7220 6120 7365 7276 6963 6520 636f 6d6d r a service comm\n+00172490: 756e 6963 6174 6573 2077 6974 6820 616e unicates with an\n+001724a0: 6f74 6865 7220 636c 6965 6e74 206f 7220 other client or \n+001724b0: 7365 7276 6963 6520 7468 6174 2073 7570 service that sup\n+001724c0: 706f 7274 7320 6b65 6570 2061 6c69 7665 ports keep alive\n+001724d0: 2c20 7468 6520 3c63 6f64 653e 3c61 2063 , the soap::\n+00172590: 6b65 6570 5f61 6c69 7665 3c2f 613e 3c2f keep_alive variable w\n+001725b0: 696c 6c20 6265 2073 6574 2074 6f20 312c ill be set to 1,\n+001725c0: 206f 7468 6572 7769 7365 2069 7420 6973 otherwise it is\n+001725d0: 2072 6573 6574 2074 6f20 3020 696e 6469 reset to 0 indi\n+001725e0: 6361 7469 6e67 2074 6861 7420 7468 6520 cating that the \n+001725f0: 6f74 6865 7220 7061 7274 7920 7761 6e74 other party want\n+00172600: 7320 746f 2063 6c6f 7365 2074 6865 2063 s to close the c\n+00172610: 6f6e 6e65 6374 696f 6e2e 2054 6865 2063 onnection. The c\n+00172620: 6f6e 6e65 6374 696f 6e20 6d61 7962 6520 onnection maybe \n+00172630: 7465 726d 696e 6174 6564 206f 6e20 6569 terminated on ei\n+00172640: 7468 6572 2065 6e64 2062 6566 6f72 6520 ther end before \n+00172650: 7468 6520 636f 6d6d 756e 6963 6174 696f the communicatio\n+00172660: 6e20 636f 6d70 6c65 7465 642c 2066 6f72 n completed, for\n+00172670: 2065 7861 6d70 6c65 2077 6865 6e20 7468 example when th\n+00172680: 6520 7365 7276 6572 206b 6565 702d 616c e server keep-al\n+00172690: 6976 6520 636f 6e6e 6563 7469 6f6e 2068 ive connection h\n+001726a0: 6173 2074 696d 6564 206f 7574 2e20 5468 as timed out. Th\n+001726b0: 6973 206d 6179 2067 656e 6572 6174 6520 is may generate \n+001726c0: 6120 2242 726f 6b65 6e20 5069 7065 2220 a \"Broken Pipe\" \n+001726d0: 7369 676e 616c 206f 6e20 556e 6978 2f4c signal on Unix/L\n+001726e0: 696e 7578 2070 6c61 7466 6f72 6d73 2e20 inux platforms. \n+001726f0: 5468 6973 2073 6967 6e61 6c20 6361 6e20 This signal can \n+00172700: 6265 2063 6175 6768 7420 7769 7468 2061 be caught with a\n+00172710: 2073 6967 6e61 6c20 6861 6e64 6c65 723a signal handler:\n+00172720: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    sig\n+00172750: 6e61 6c28 5349 4750 4950 452c 2073 6967 nal(SIGPIPE, sig\n+00172760: 7069 7065 5f68 616e 646c 6529 3b3c 2f64 pipe_handle);.

    wh\n+00172790: 6572 652c 2066 6f72 2065 7861 6d70 6c65 ere, for example\n+001727a0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    void sigpipe_hand\n+00172800: 6c65 283c 7370 616e 2063 6c61 7373 3d22 le(int\n+00172820: 3c2f 7370 616e 3e20 7829 207b 207d 3c2f x) { }.

    A\n+00172850: 6c74 6572 6e61 7469 7665 6c79 2c20 6272 lternatively, br\n+00172860: 6f6b 656e 2070 6970 6573 2063 616e 2062 oken pipes can b\n+00172870: 6520 6b65 7074 2073 696c 656e 7420 6279 e kept silent by\n+00172880: 2073 6574 7469 6e67 3a3c 2f70 3e0a 3c64 setting:

    .
    soa\n+001728e0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.s\n+00172930: 6f63 6b65 745f 666c 6167 733c 2f61 3e20 ocket_flags \n+00172940: 3d20 4d53 475f 4e4f 5349 474e 414c 3b3c = MSG_NOSIGNAL;<\n+00172950: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+001729a0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+001729b0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+001729f0: 6f61 703a 3a73 6f63 6b65 745f 666c 6167 oap::socket_flag\n+00172a00: 733c 2f61 3e3c 2f64 6976 3e3c 6469 7620 s
    i\n+00172a20: 6e74 2073 6f63 6b65 745f 666c 6167 733c nt socket_flags<\n+00172a30: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n+00172a50: 696e 6162 6c65 2073 6f63 6b65 7420 7365 inable socket se\n+00172a60: 6e64 2061 6e64 2072 6563 7620 666c 6167 nd and recv flag\n+00172a70: 732c 2066 6f72 2065 7861 6d70 6c65 2061 s, for example a\n+00172a80: 7373 6967 6e20 4d53 475f 4e4f 5349 474e ssign MSG_NOSIGN\n+00172a90: 414c 2074 6f20 6469 7361 626c 6520 7369 AL to disable si\n+00172aa0: 6770 6970 6520 2874 6865 2076 612e 2e2e gpipe (the va...\n+00172ab0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+00172ad0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00172ae0: 6f61 7032 2e68 3a33 3335 393c 2f64 6976 oap2.h:3359
    .
    <\n+00172b10: 703e 5468 6973 2073 6574 7469 6e67 2077 p>This setting w\n+00172b20: 696c 6c20 6e6f 7420 6765 6e65 7261 7465 ill not generate\n+00172b30: 2061 2053 4947 5049 5045 2062 7574 2072 a SIGPIPE but r\n+00172b40: 6561 642f 7772 6974 6520 6f70 6572 6174 ead/write operat\n+00172b50: 696f 6e73 2072 6574 7572 6e20 3c63 6f64 ions return #SOAP_EOF instead. Note\n+00172b80: 2074 6861 7420 5769 6e64 6f77 7320 646f that Windows do\n+00172b90: 6573 206e 6f74 2073 7570 706f 7274 2073 es not support s\n+00172ba0: 6967 6e61 6c73 2061 6e64 206c 6163 6b20 ignals and lack \n+00172bb0: 7468 6520 3c63 6f64 653e 4d53 475f 4e4f the MSG_NO\n+00172bc0: 5349 474e 414c 3c2f 636f 6465 3e20 666c SIGNAL fl\n+00172bd0: 6167 2e3c 2f70 3e0a 3c70 3e49 6620 7468 ag.

    .

    If th\n+00172be0: 6520 636c 6965 6e74 2064 6f65 7320 6e6f e client does no\n+00172bf0: 7420 636c 6f73 6520 7468 6520 636f 6e6e t close the conn\n+00172c00: 6563 7469 6f6e 2c20 7468 6520 7365 7276 ection, the serv\n+00172c10: 6572 2077 696c 6c20 7761 6974 2066 6f72 er will wait for\n+00172c20: 6576 6572 2077 6865 6e20 6e6f 203c 636f ever when no so\n+00172ce0: 6170 3a3a 7265 6376 5f74 696d 656f 7574 ap::recv_timeout\n+00172cf0: 3c2f 613e 3c2f 636f 6465 3e20 6973 2073 is s\n+00172d00: 7065 6369 6669 6564 2c20 736f 2062 6520 pecified, so be \n+00172d10: 6361 7265 6675 6c20 746f 2073 6574 2074 careful to set t\n+00172d20: 696d 656f 7574 732c 2053 6565 2053 6563 imeouts, See Sec\n+00172d30: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Tim\n+00172d60: 656f 7574 206d 616e 6167 656d 656e 7420 eout management \n+00172d70: 666f 7220 6e6f 6e2d 626c 6f63 6b69 6e67 for non-blocking\n+00172d80: 206f 7065 7261 7469 6f6e 733c 2f61 3e2e operations.\n+00172d90: 2049 6e20 6164 6469 7469 6f6e 2c20 6f74 In addition, ot\n+00172da0: 6865 7220 636c 6965 6e74 7320 7769 6c6c her clients will\n+00172db0: 2062 6520 6465 6e69 6564 2073 6572 7669 be denied servi\n+00172dc0: 6365 2061 7320 6c6f 6e67 2061 7320 6120 ce as long as a \n+00172dd0: 636c 6965 6e74 206b 6565 7073 2074 6865 client keeps the\n+00172de0: 2063 6f6e 6e65 6374 696f 6e20 746f 2074 connection to t\n+00172df0: 6865 2073 6572 7665 7220 6f70 656e 2e20 he server open. \n+00172e00: 546f 2070 7265 7665 6e74 2074 6869 7320 To prevent this \n+00172e10: 6672 6f6d 2068 6170 7065 6e69 6e67 2c20 from happening, \n+00172e20: 7468 6520 7365 7276 6963 6520 7368 6f75 the service shou\n+00172e30: 6c64 2062 6520 6d75 6c74 692d 7468 7265 ld be multi-thre\n+00172e40: 6164 6564 2073 7563 6820 7468 6174 2065 aded such that e\n+00172e50: 6163 6820 7468 7265 6164 2068 616e 646c ach thread handl\n+00172e60: 6573 2074 6865 2063 6c69 656e 7420 636f es the client co\n+00172e70: 6e6e 6563 7469 6f6e 3a3c 2f70 3e0a 3c64 nnection:

    .
    \n+00172ec0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n+00172ed0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int argc, char\n+00172f20: 202a 2a61 7267 7629 203c 2f64 6976 3e0a **argv)
    .\n+00172f30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct soap soap, *tsoap; .
    THREA\n+00173060: 445f 5459 5045 3c2f 613e 2074 6964 3b20 D_TYPE tid; \n+00173070: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int \n+001730b0: 6d2c 2073 3b20 3c2f 6469 763e 0a3c 6469 m, s;
    . \n+001730d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init2\n+00173130: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap, SO\n+001731c0: 4150 5f49 4f5f 4b45 4550 414c 4956 453c AP_IO_KEEPALIVE<\n+001731d0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, SOAP_IO_\n+00173230: 4b45 4550 414c 4956 453c 2f61 3e29 3b20 KEEPALIVE); \n+00173240: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.max_keep_ali\n+001732e0: 7665 3c2f 613e 203d 2031 3030 3b20 3c73 ve = 100; // at most 1\n+00173310: 3030 2063 616c 6c73 2070 6572 206b 6565 00 calls per kee\n+00173320: 702d 616c 6976 6520 7365 7373 696f 6e20 p-alive session \n+00173330: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00173350: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.accep\n+001733d0: 745f 7469 6d65 6f75 743c 2f61 3e20 3d20 t_timeout = \n+001733e0: 3630 303b 203c 7370 616e 2063 6c61 7373 600; // op\n+00173400: 7469 6f6e 616c 3a20 6c65 7420 7365 7276 tional: let serv\n+00173410: 6572 2074 696d 6520 6f75 7420 6166 7465 er time out afte\n+00173420: 7220 7465 6e20 6d69 6e75 7465 7320 6f66 r ten minutes of\n+00173430: 2069 6e61 6374 6976 6974 7920 3c2f 7370 inactivity
    .
    m \n+00173460: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_bind(\n+001734c0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+001734f0: 3c2f 613e 2c20 4e55 4c4c 2c20 3138 3030 , NULL, 1800\n+00173500: 302c 2042 4143 4b4c 4f47 293b 203c 7370 0, BACKLOG); // use port 1\n+00173530: 3830 3030 206f 6e20 7468 6520 6375 7272 8000 on the curr\n+00173540: 656e 7420 6d61 6368 696e 6520 3c2f 7370 ent machine
    .
    if (!soap_valid\n+001735f0: 5f73 6f63 6b65 743c 2f61 3e28 6d29 2920 _socket(m)) \n+00173600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    soap\n+00173690: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+001736a0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+001736d0: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n+001736e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exi\n+00173700: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n+00173710: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    fprintf\n+00173750: 2873 7464 6572 722c 203c 7370 616e 2063 (stderr, "Socke\n+00173780: 7420 636f 6e6e 6563 7469 6f6e 2073 7563 t connection suc\n+00173790: 6365 7373 6675 6c20 2564 5c6e 2671 756f cessful %d\\n&quo\n+001737a0: 743b 3c2f 7370 616e 3e2c 206d 293b 203c t;, m); <\n+001737b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    for (\n+001737f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 count = 0; count >=\n+001738a0: 2030 3b20 3c61 2063 6c61 7373 3d22 636f 0; cou\n+001738f0: 6e74 3c2f 613e 2b2b 2920 3c2f 6469 763e nt++)
    \n+00173900: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+00173930: 2020 203c 6120 636c 6173 733d 2263 6f64 soap.sock\n+001739b0: 6574 5f66 6c61 6773 3c2f 613e 203d 204d et_flags = M\n+001739c0: 5347 5f4e 4f53 4947 4e41 4c3b 203c 7370 SG_NOSIGNAL; // use this <\n+001739f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00173a10: 2020 203c 6120 636c 6173 733d 2263 6f64 soap.acce\n+00173a90: 7074 5f66 6c61 6773 3c2f 613e 203d 2053 pt_flags = S\n+00173aa0: 4f5f 4e4f 5349 4750 4950 453b 203c 7370 O_NOSIGPIPE; // or this to\n+00173ad0: 2070 7265 7665 6e74 2053 4947 5049 5045 prevent SIGPIPE\n+00173ae0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00173af0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00173b00: 3e20 2020 2073 203d 203c 6120 636c 6173 > s = soap_ac\n+00173b60: 6365 7074 3c2f 613e 2826 616d 703b 3c61 cept(&soap); \n+00173ba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if\n+00173be0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_valid_s\n+00173c40: 6f63 6b65 743c 2f61 3e28 7329 2920 3c2f ocket(s)) .
    {.
    fprin\n+00173c90: 7466 2873 7464 6572 722c 203c 7370 616e tf(stderr, "Acc\n+00173cc0: 6570 7420 736f 636b 6574 2025 6420 636f ept socket %d co\n+00173cd0: 6e6e 6563 7469 6f6e 2066 726f 6d20 4950 nnection from IP\n+00173ce0: 2025 642e 2564 2e25 642e 2564 5c6e 2671 %d.%d.%d.%d\\n&q\n+00173cf0: 756f 743b 3c2f 7370 616e 3e2c 2073 2c20 uot;, s, \n+00173d00: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (int)(so\n+00173d50: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n+00173da0: 6970 3c2f 613e 2667 743b 2667 743b 3234 ip>>24\n+00173db0: 2926 616d 703b 3078 4646 2c20 283c 7370 )&0xFF, (int)(soap.ip>>16)&am\n+00173e70: 703b 3078 4646 2c20 283c 7370 616e 2063 p;0xFF, (int)(<\n+00173ea0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00173eb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00173ec0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+00173ed0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00173ee0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00173ef0: 6874 6d6c 2361 3435 3635 6130 6164 3465 html#a4565a0ad4e\n+00173f00: 6130 3861 6461 3732 3131 3535 6465 6438 a08ada721155ded8\n+00173f10: 6538 3033 3666 223e 6970 3c2f 613e 2667 e8036f\">ip&g\n+00173f20: 743b 2667 743b 3829 2661 6d70 3b30 7846 t;>8)&0xF\n+00173f30: 462c 2028 3c73 7061 6e20 636c 6173 733d F, (in\n+00173f50: 743c 2f73 7061 6e3e 293c 6120 636c 6173 t)\n+00173f80: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.ip&0xF\n+00173fe0: 4629 3b20 3c2f 6469 763e 0a3c 6469 7620 F);
    .
    \n+00174000: 2020 2074 736f 6170 203d 203c 6120 636c tsoap = \n+00174060: 736f 6170 5f63 6f70 793c 2f61 3e28 2661 soap_copy(&a\n+00174070: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    . \n+001740c0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n+001740e0: 3c2f 7370 616e 3e20 2821 7473 6f61 7029 (!tsoap)\n+001740f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00174110: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_force_clos\n+00174170: 6573 6f63 6b3c 2f61 3e28 2661 6d70 3b3c esock(&<\n+00174180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00174190: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001741a0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001741b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+001741d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001741e0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    ..
    \n+00174360: 2020 2020 736c 6565 7028 3129 3b20 3c73 sleep(1); // failed, t\n+00174390: 7279 2061 6761 696e 3c2f 7370 616e 3e3c ry again<\n+001743a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }.
    else \n+00174400: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap\n+00174450: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .er\n+001744a0: 726e 756d 3c2f 613e 2920 3c73 7061 6e20 rnum) \n+001744c0: 2f2f 2061 6363 6570 7420 6661 696c 6564 // accept failed\n+001744d0: 2c20 7472 7920 6167 6169 6e20 6166 7465 , try again afte\n+001744e0: 7220 3120 7365 636f 6e64 3c2f 7370 616e r 1 second
    .
    {<\n+00174510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_print_faul\n+00174590: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap, stde\n+001745d0: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
    . \n+001745f0: 2020 2020 736c 6565 7028 3129 3b3c 2f64 sleep(1);.
    }.
    else.
    {.
    fprint\n+001746a0: 6628 7374 6465 7272 2c20 3c73 7061 6e20 f(stderr, "Serv\n+001746d0: 6572 2074 696d 6564 206f 7574 5c6e 2671 er timed out\\n&q\n+001746e0: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    break;
    .
    \n+00174750: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    } \n+00174770: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return 0;
    .}\n+001747d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    vo\n+00174820: 6964 3c2f 7370 616e 3e20 2a70 726f 6365 id *proce\n+00174830: 7373 5f72 6571 7565 7374 283c 7370 616e ss_request(void\n+00174860: 202a 7473 6f61 7029 203c 2f64 6976 3e0a *tsoap)
    .\n+00174870: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct *soap = (stru\n+00174910: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap*)tsoap\n+00174950: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    ..<\n+00174a40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00174a50: 3e20 2028 283c 7370 616e 2063 6c61 7373 > ((struc\n+00174a70: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n+00174aa0: 736f 6170 3c2f 613e 2a29 3c61 2063 6c61 soap*)soap)->r\n+00174ae0: 6563 765f 7469 6d65 6f75 7420 3d20 3630 ecv_timeout = 60\n+00174af0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // Timeo\n+00174b10: 7574 2061 6674 6572 2031 206d 696e 7574 ut after 1 minut\n+00174b20: 6520 7374 616c 6c20 6f6e 2072 6563 7620 e stall on recv \n+00174b30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00174b50: 2020 2828 3c73 7061 6e20 636c 6173 733d ((struct\n+00174b70: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+00174ba0: 6f61 703c 2f61 3e2a 293c 6120 636c 6173 oap*)\n+00174bd0: 736f 6170 3c2f 613e 292d 2667 743b 7365 soap)->se\n+00174be0: 6e64 5f74 696d 656f 7574 203d 2031 303b nd_timeout = 10;\n+00174bf0: 203c 7370 616e 2063 6c61 7373 3d22 636f // Timeou\n+00174c10: 7420 6166 7465 7220 3130 2073 6563 6f6e t after 10 secon\n+00174c20: 6420 7374 616c 6c20 6f6e 2073 656e 6420 d stall on send \n+00174c30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00174c50: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_serve\n+00174cb0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00174ce0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_destroy<\n+00174d60: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00174d90: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n+00174db0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_end(soap);
    . \n+00174e60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_free(soap);
    . \n+00174f10: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+00174f30: 3c2f 7370 616e 3e20 4e55 4c4c 3b20 3c2f NULL; .
    }
    .<\n+00174f60: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00174f70: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+00174f80: 6874 6d6c 5f61 3430 3764 6165 3462 6338 html_a407dae4bc8\n+00174f90: 3464 3065 3762 3830 3964 3531 6133 6238 4d0e7b809d51a3b8\n+00174fa0: 3739 3865 3063 223e 3c64 6976 2063 6c61 798e0c\">
    ULONG64 count
    Message l\n+00175050: 656e 6774 6820 636f 756e 7465 7220 7661 ength counter va\n+00175060: 6c75 6520 6f66 2074 6865 206d 6573 7361 lue of the messa\n+00175070: 6765 2072 6563 6569 7665 6420 616e 6420 ge received and \n+00175080: 636f 756e 7465 7220 7661 6c75 6520 6f66 counter value of\n+00175090: 2074 6865 2048 5454 5020 636f 6e74 656e the HTTP conten\n+001750a0: 7420 6c65 6e67 7468 2068 6561 2e2e 2e3c t length hea...<\n+001750b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+001750d0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+001750e0: 6170 322e 683a 3432 3034 3c2f 6469 763e ap2.h:4204
    \n+001750f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00175140: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+001751c0: 696e 7420 6163 6365 7074 5f66 6c61 6773 int accept_flags\n+001751d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    User-de\n+001751f0: 6669 6e61 626c 6520 7365 7473 6f63 6b6f finable setsocko\n+00175200: 7074 206c 6576 656c 2053 4f4c 5f53 4f43 pt level SOL_SOC\n+00175210: 4b45 5420 666c 6167 7320 2830 2062 7920 KET flags (0 by \n+00175220: 6465 6661 756c 7429 2c20 7768 656e 206e default), when n\n+00175230: 6f6e 7a65 726f 2073 6574 7320 7468 6520 onzero sets the \n+00175240: 736f 6170 3a3a 736f 636b 6574 2066 2e2e soap::socket f..\n+00175250: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+00175270: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00175280: 736f 6170 322e 683a 3334 3533 3c2f 6469 soap2.h:3453
    .
    <\n+001752a0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001752b0: 3c70 3e41 2063 6c69 656e 7420 6361 6c6c

    A client call\n+001752c0: 2077 696c 6c20 6175 746f 6d61 7469 6361 will automatica\n+001752d0: 6c6c 7920 6174 7465 6d70 7420 746f 2072 lly attempt to r\n+001752e0: 652d 6573 7461 626c 6973 6820 6120 636f e-establish a co\n+001752f0: 6e6e 6563 7469 6f6e 2074 6f20 6120 7365 nnection to a se\n+00175300: 7276 6572 2077 6865 6e20 7468 6520 7365 rver when the se\n+00175310: 7276 6572 2068 6173 2074 6572 6d69 6e61 rver has termina\n+00175320: 7465 6420 7468 6520 636f 6e6e 6563 7469 ted the connecti\n+00175330: 6f6e 2066 6f72 2061 6e79 2072 6561 736f on for any reaso\n+00175340: 6e2e 2054 6869 7320 7761 792c 2061 2073 n. This way, a s\n+00175350: 6571 7565 6e63 6520 6f66 2063 616c 6c73 equence of calls\n+00175360: 2063 616e 2062 6520 6d61 6465 2074 6f20 can be made to \n+00175370: 7468 6520 7365 7276 6572 2077 6869 6c65 the server while\n+00175380: 206b 6565 7069 6e67 2074 6865 2063 6f6e keeping the con\n+00175390: 6e65 6374 696f 6e20 6f70 656e 2e20 436c nection open. Cl\n+001753a0: 6965 6e74 2073 7475 6220 6675 6e63 7469 ient stub functi\n+001753b0: 6f6e 7320 706f 6c6c 2074 6865 2073 6572 ons poll the ser\n+001753c0: 7665 7220 746f 2063 6865 636b 2069 6620 ver to check if \n+001753d0: 7468 6520 636f 6e6e 6563 7469 6f6e 2069 the connection i\n+001753e0: 7320 7374 696c 6c20 6f70 656e 2e20 5768 s still open. Wh\n+001753f0: 656e 2074 6865 2063 6f6e 6e65 6374 696f en the connectio\n+00175400: 6e20 7761 7320 7465 726d 696e 6174 6564 n was terminated\n+00175410: 2062 7920 7468 6520 7365 7276 6572 2c20 by the server, \n+00175420: 7468 6520 636c 6965 6e74 2077 696c 6c20 the client will \n+00175430: 6175 746f 6d61 7469 6361 6c6c 7920 7265 automatically re\n+00175440: 636f 6e6e 6563 742e 203c 6272 2020 2f3e connect.
    \n+00175450: 0a3c 2f70 3e0a 3c70 3e41 2063 6c69 656e .

    .

    A clien\n+00175460: 7420 6d61 7920 636c 6561 7220 7468 6520 t may clear the \n+00175470: 3c63 6f64 653e 2353 4f41 505f 494f 5f4b #SOAP_IO_K\n+00175480: 4545 5041 4c49 5645 3c2f 636f 6465 3e20 EEPALIVE \n+00175490: 666c 6167 206a 7573 7420 6265 666f 7265 flag just before\n+001754a0: 2074 6865 206c 6173 7420 6361 6c6c 2074 the last call t\n+001754b0: 6f20 6120 7365 7276 6572 2074 6f20 6c65 o a server to le\n+001754c0: 7420 7468 6520 7365 7276 6572 206b 6e6f t the server kno\n+001754d0: 7720 6974 2077 616e 7473 2074 6f20 636c w it wants to cl\n+001754e0: 6f73 6520 7468 6520 636f 6e6e 6563 7469 ose the connecti\n+001754f0: 6f6e 2061 6674 6572 2074 6869 7320 6c61 on after this la\n+00175500: 7374 2063 616c 6c2e 2054 6869 7320 7769 st call. This wi\n+00175510: 6c6c 2063 6c6f 7365 2074 6865 2073 6f63 ll close the soc\n+00175520: 6b65 7420 6166 7465 7220 7468 6520 6361 ket after the ca\n+00175530: 6c6c 2061 6e64 2061 6c73 6f20 696e 666f ll and also info\n+00175540: 726d 7320 7468 6520 7365 7276 6572 2074 rms the server t\n+00175550: 6f20 6772 6163 6566 756c 6c79 2063 6c6f o gracefully clo\n+00175560: 7365 2074 6865 2063 6f6e 6e65 6374 696f se the connectio\n+00175570: 6e2e 3c2f 703e 0a3c 703e 5468 6520 636c n.

    .

    The cl\n+00175580: 6965 6e74 2d73 6964 6520 6361 6e20 616c ient-side can al\n+00175590: 736f 2073 6574 2074 6865 2054 4350 206b so set the TCP k\n+001755a0: 6565 702d 616c 6976 6520 736f 636b 6574 eep-alive socket\n+001755b0: 2070 726f 7065 7274 6965 732c 2075 7369 properties, usi\n+001755c0: 6e67 2074 6865 203c 636f 6465 3e3c 6120 ng the soap::tcp_k\n+00175690: 6565 705f 616c 6976 653c 2f61 3e3c 2f63 eep_alive flag (set t\n+001756b0: 6f20 3120 746f 2065 6e61 626c 6529 2c20 o 1 to enable), \n+001756c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::tcp_k\n+00175770: 6565 705f 6964 6c65 3c2f 613e 3c2f 636f eep_idle to set the <\n+00175790: 636f 6465 3e54 4350 5f4b 4545 5049 444c code>TCP_KEEPIDL\n+001757a0: 453c 2f63 6f64 653e 2076 616c 7565 2c20 E value, \n+001757b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::tcp_\n+00175860: 6b65 6570 5f69 6e74 766c 3c2f 613e 3c2f keep_intvl to set the\n+00175880: 203c 636f 6465 3e54 4350 5f4b 4545 5049 TCP_KEEPI\n+00175890: 4e54 564c 3c2f 636f 6465 3e20 7661 6c75 NTVL valu\n+001758a0: 652c 2061 6e64 203c 636f 6465 3e3c 6120 e, and soap:\n+00175950: 3a74 6370 5f6b 6565 705f 636e 743c 2f61 :tcp_keep_cnt to set \n+00175970: 7468 6520 3c63 6f64 653e 5443 505f 4b45 the TCP_KE\n+00175980: 4550 434e 543c 2f63 6f64 653e 2076 616c EPCNT val\n+00175990: 7565 2e3c 2f70 3e0a 3c70 3e49 6620 6120 ue.

    .

    If a \n+001759a0: 636c 6965 6e74 2069 7320 696e 2074 6865 client is in the\n+001759b0: 206d 6964 646c 6520 6f66 2073 6f61 7020 middle of soap \n+001759c0: 6361 6c6c 2074 6861 7420 6d69 6768 7420 call that might \n+001759d0: 7461 6b65 2061 206c 6f6e 6720 7469 6d65 take a long time\n+001759e0: 2061 6e64 2074 6865 2073 6572 7665 7220 and the server \n+001759f0: 676f 6573 2061 7761 792f 646f 776e 2074 goes away/down t\n+00175a00: 6865 2063 616c 6c65 7220 646f 6573 206e he caller does n\n+00175a10: 6f74 2067 6574 2061 6e79 2066 6565 6462 ot get any feedb\n+00175a20: 6163 6b20 756e 7469 6c20 7468 6520 3c63 ack until the s\n+00175ae0: 6f61 703a 3a72 6563 765f 7469 6d65 6f75 oap::recv_timeou\n+00175af0: 743c 2f61 3e3c 2f63 6f64 653e 2069 7320 t is \n+00175b00: 7265 6163 6865 642e 2045 6e61 626c 696e reached. Enablin\n+00175b10: 6720 5443 5020 6b65 6570 2061 6c69 7665 g TCP keep alive\n+00175b20: 206f 6e20 7379 7374 656d 7320 7468 6174 on systems that\n+00175b30: 2073 7570 706f 7274 2069 7420 616c 6c6f support it allo\n+00175b40: 7773 2066 6f72 2061 2066 6173 7465 7220 ws for a faster \n+00175b50: 636f 6e6e 6563 7469 6f6e 2074 6561 7264 connection teard\n+00175b60: 6f77 6e20 6465 7465 6374 696f 6e20 666f own detection fo\n+00175b70: 7220 6170 706c 6963 6174 696f 6e73 2074 r applications t\n+00175b80: 6861 7420 6e65 6564 2069 742e 3c2f 703e hat need it.

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

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

    .

    .H\n+00175bf0: 5454 5020 6368 756e 6b65 6420 7472 616e TTP chunked tran\n+00175c00: 7366 6572 2065 6e63 6f64 696e 673c 2f68 sfer encoding.

    Outbound H\n+00175c20: 5454 5020 6d65 7373 6167 6573 2061 7265 TTP messages are\n+00175c30: 206e 6f74 2063 6875 6e6b 6564 2075 6e6c not chunked unl\n+00175c40: 6573 7320 7468 6520 3c63 6f64 653e 2353 ess the #S\n+00175c50: 4f41 505f 494f 5f43 4855 4e4b 3c2f 636f OAP_IO_CHUNK flag is enab\n+00175c70: 6c65 642e 2043 6875 6e6b 696e 6720 6d61 led. Chunking ma\n+00175c80: 7920 696d 7072 6f76 6520 7468 6520 7370 y improve the sp\n+00175c90: 6565 6420 6f66 206d 6573 7361 6765 2073 eed of message s\n+00175ca0: 656e 6469 6e67 2077 6974 6820 4854 5450 ending with HTTP\n+00175cb0: 2c20 6265 6361 7573 6520 7468 6520 6d65 , because the me\n+00175cc0: 7373 6167 6520 6c65 6e67 7468 2064 6f65 ssage length doe\n+00175cd0: 7320 6e6f 7420 6e65 6564 2074 6f20 6265 s not need to be\n+00175ce0: 2064 6574 6572 6d69 6e65 6420 696e 2061 determined in a\n+00175cf0: 6476 616e 6365 2066 6f72 2074 6865 2048 dvance for the H\n+00175d00: 5454 5020 636f 6e74 656e 7420 6c65 6e67 TTP content leng\n+00175d10: 7468 2068 6561 6465 722e 3c2f 703e 0a3c th header.

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

    .

    .HT\n+00175d80: 5450 2062 7566 6665 7265 6420 7365 6e64 TP buffered send\n+00175d90: 733c 2f68 323e 0a3c 703e 5468 6520 656e s

    .

    The en\n+00175da0: 7469 7265 206f 7574 626f 756e 6420 6d65 tire outbound me\n+00175db0: 7373 6167 6520 6361 6e20 6265 2073 746f ssage can be sto\n+00175dc0: 7265 6420 696e 2061 2062 7566 6665 7220 red in a buffer \n+00175dd0: 746f 2064 6574 6572 6d69 6e65 2074 6865 to determine the\n+00175de0: 2048 5454 5020 636f 6e74 656e 7420 6c65 HTTP content le\n+00175df0: 6e67 7468 2072 6174 6865 7220 7468 616e ngth rather than\n+00175e00: 2074 6865 2074 776f 2d70 6861 7365 2065 the two-phase e\n+00175e10: 6e63 6f64 696e 6720 7573 6564 2062 7920 ncoding used by \n+00175e20: 6753 4f41 5020 636c 6965 6e74 2d73 6964 gSOAP client-sid\n+00175e30: 6520 7374 7562 2066 756e 6374 696f 6e73 e stub functions\n+00175e40: 2061 6e64 2073 6572 7665 722d 7369 6465 and server-side\n+00175e50: 2073 6b65 6c65 746f 6e20 6675 6e63 7469 skeleton functi\n+00175e60: 6f6e 7320 6765 6e65 7261 7465 6420 6279 ons generated by\n+00175e70: 2073 6f61 7063 7070 322c 2077 6869 6368 soapcpp2, which\n+00175e80: 2070 6572 666f 726d 2061 2073 6570 6172 perform a separ\n+00175e90: 6174 6520 7061 7373 206f 7665 7220 7468 ate pass over th\n+00175ea0: 6520 6461 7461 2074 6f20 6465 7465 726d e data to determ\n+00175eb0: 696e 6520 7468 6520 6c65 6e67 7468 206f ine the length o\n+00175ec0: 6620 7468 6520 6f75 7462 6f75 6e64 206d f the outbound m\n+00175ed0: 6573 7361 6765 2e20 5365 7474 696e 6720 essage. Setting \n+00175ee0: 7468 6520 666c 6167 203c 636f 6465 3e23 the flag #\n+00175ef0: 534f 4150 5f49 4f5f 5354 4f52 453c 2f63 SOAP_IO_STORE for the out\n+00175f10: 7075 7420 6d6f 6465 2077 696c 6c20 6275 put mode will bu\n+00175f20: 6666 6572 2074 6865 2065 6e74 6972 6520 ffer the entire \n+00175f30: 6d65 7373 6167 652e 2054 6869 7320 6d61 message. This ma\n+00175f40: 7920 6f72 206d 6179 206e 6f74 2073 7065 y or may not spe\n+00175f50: 6564 2075 7020 7468 6520 7472 616e 736d ed up the transm\n+00175f60: 6973 7369 6f6e 206f 6620 6d65 7373 6167 ission of messag\n+00175f70: 6573 2c20 6465 7065 6e64 696e 6720 6f6e es, depending on\n+00175f80: 2074 6865 2063 6f6e 7465 6e74 2c20 6275 the content, bu\n+00175f90: 7420 6d61 7920 7265 7175 6972 6520 7369 t may require si\n+00175fa0: 676e 6966 6963 616e 7420 7374 6f72 6167 gnificant storag\n+00175fb0: 6520 7370 6163 6520 746f 2068 6f6c 6420 e space to hold \n+00175fc0: 6c61 7267 6520 6d65 7373 6167 6573 2074 large messages t\n+00175fd0: 656d 706f 7261 7269 6c79 2e3c 2f70 3e0a emporarily.

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

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

    .

    \n+00176040: 3c2f 613e 0a48 5454 5020 6175 7468 656e .HTTP authen\n+00176050: 7469 6361 7469 6f6e 3c2f 6832 3e0a 3c70 tication

    .The following s\n+00176070: 6563 7469 6f6e 7320 6578 706c 6169 6e20 ections explain \n+00176080: 686f 7720 746f 2061 7574 6865 6e74 6963 how to authentic\n+00176090: 6174 6520 7769 7468 2048 5454 5020 6265 ate with HTTP be\n+001760a0: 6172 6572 2c20 6261 7369 632c 2064 6967 arer, basic, dig\n+001760b0: 6573 742c 2061 6e64 204e 544c 4d2e 2050 est, and NTLM. P\n+001760c0: 726f 7879 2061 7574 6865 6e74 6963 6174 roxy authenticat\n+001760d0: 696f 6e20 6973 2061 6c73 6f20 636f 7665 ion is also cove\n+001760e0: 7265 642e 3c2f 703e 0a3c 703e 596f 7520 red.

    .

    You \n+001760f0: 636f 756c 6420 616c 736f 2075 7365 2074 could also use t\n+00176100: 6865 2057 696e 496e 6574 2070 6c75 6769 he WinInet plugi\n+00176110: 6e20 6176 6169 6c61 626c 6520 696e 2074 n available in t\n+00176120: 6865 203c 656d 3e3c 636f 6465 3e67 736f he gso\n+00176130: 6170 2f6d 6f64 5f67 736f 6170 3c2f 636f ap/mod_gsoap directo\n+00176150: 7279 206f 6620 7468 6520 6753 4f41 5020 ry of the gSOAP \n+00176160: 736f 7572 6365 2063 6f64 6520 7061 636b source code pack\n+00176170: 6167 6520 746f 2073 696d 706c 6966 7920 age to simplify \n+00176180: 496e 7465 726e 6574 2061 6363 6573 7320 Internet access \n+00176190: 666f 7220 6753 4f41 5020 636c 6965 6e74 for gSOAP client\n+001761a0: 2061 7070 6c69 6361 7469 6f6e 7320 616e applications an\n+001761b0: 6420 6465 616c 2077 6974 6820 656e 6372 d deal with encr\n+001761c0: 7970 7469 6f6e 2c20 7072 6f78 6965 732c yption, proxies,\n+001761d0: 2061 6e64 2061 7574 6865 6e74 6963 6174 and authenticat\n+001761e0: 696f 6e2c 2073 6565 2074 6865 2067 534f ion, see the gSO\n+001761f0: 4150 203c 6120 6872 6566 3d22 2e2e 2f2e AP WinIn\n+00176220: 6574 2070 6c75 6769 6e3c 2f61 3e20 646f et plugin do\n+00176230: 6375 6d65 6e74 6174 696f 6e2e 3c2f 703e cumentation.

    \n+00176240: 0a3c 703e 5468 6520 6753 4f41 5020 4355 .

    The gSOAP CU\n+00176250: 524c 2070 6c75 6769 6e20 6361 6e20 616c RL plugin can al\n+00176260: 736f 2062 6520 7573 6564 2074 6f20 6465 so be used to de\n+00176270: 7665 6c6f 7020 6753 4f41 5020 636c 6965 velop gSOAP clie\n+00176280: 6e74 2061 7070 6c69 6361 7469 6f6e 7320 nt applications \n+00176290: 616e 6420 4355 524c 2069 6d70 6c65 6d65 and CURL impleme\n+001762a0: 6e74 7320 7661 7269 6f75 7320 4854 5450 nts various HTTP\n+001762b0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+001762c0: 6d65 7468 6f64 732c 2073 6565 2074 6865 methods, see the\n+001762d0: 2067 534f 4150 203c 6120 6872 6566 3d22 gSOAP CURL\n+00176300: 2070 6c75 6769 6e3c 2f61 3e20 646f 6375 plugin docu\n+00176310: 6d65 6e74 6174 696f 6e2e 3c2f 703e 0a3c mentation.

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

    .

    .HTTP b\n+00176390: 6561 7265 7220 6175 7468 656e 7469 6361 earer authentica\n+001763a0: 7469 6f6e 3c2f 6833 3e0a 3c70 3e48 5454 tion

    .

    HTT\n+001763b0: 5020 6265 6172 6572 2061 7574 6865 6e74 P bearer authent\n+001763c0: 6963 6174 696f 6e20 6973 2065 6e61 626c ication is enabl\n+001763d0: 6564 2061 7420 7468 6520 636c 6965 6e74 ed at the client\n+001763e0: 2d73 6964 6520 6279 2073 6574 7469 6e67 -side by setting\n+001763f0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::bearer<\n+001764c0: 2f61 3e3c 2f63 6f64 653e 2073 7472 696e /a> strin\n+001764d0: 6720 746f 2074 6865 2062 6561 7265 7220 g to the bearer \n+001764e0: 746f 6b65 6e3a 3c2f 703e 0a3c 6469 7620 token:

    .
    struct \n+00176530: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+00176560: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+00176590: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n+001765f0: 6f61 705f 6e65 773c 2f61 3e28 293b 203c oap_new(); <\n+00176600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+00176640: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->bearer \n+001766a0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+001766c0: 756f 743b 2e2e 2e26 7175 6f74 3b3c 2f73 uot;...";
    .<\n+001766f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00176700: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n+00176720: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, ...\n+00176760: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
    .
    ...\n+00176780: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+001767a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001767c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001767d0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    .
    .\n+00176800: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // OK
    .
    c\n+001768f0: 6f6e 7374 2063 6861 7220 2a20 6265 6172 onst char * bear\n+00176900: 6572 3c2f 6469 763e 3c64 6976 2063 6c61 er
    User-\n+00176920: 6465 6669 6e61 626c 6520 4854 5450 2061 definable HTTP a\n+00176930: 7574 686f 7269 7a61 7469 6f6e 2062 6561 uthorization bea\n+00176940: 7265 7220 746f 6b65 6e20 7661 6c75 6520 rer token value \n+00176950: 746f 2062 6520 7365 6e74 2062 7920 7468 to be sent by th\n+00176960: 6520 636c 6965 6e74 2c20 7365 7276 6572 e client, server\n+00176970: 2073 6964 6520 7265 6365 6976 6573 2074 side receives t\n+00176980: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n+001769a0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+001769b0: 7464 736f 6170 322e 683a 3337 3532 3c2f tdsoap2.h:3752
    .

    A cli\n+00177670: 656e 7420 534f 4150 2072 6571 7565 7374 ent SOAP request\n+00177680: 2077 696c 6c20 6861 7665 2074 6865 2066 will have the f\n+00177690: 6f6c 6c6f 7769 6e67 2048 5454 5020 6865 ollowing HTTP he\n+001776a0: 6164 6572 3a20 3c2f 703e 3c70 7265 2063 ader:

    \n+001776c0: 504f 5354 202f 5858 5820 4854 5450 2f31  POST /XXX HTTP/1\n+001776d0: 2e31 200a 486f 7374 3a20 5959 5920 0a55  .1 .Host: YYY .U\n+001776e0: 7365 722d 4167 656e 743a 2067 534f 4150  ser-Agent: gSOAP\n+001776f0: 2f32 2e38 200a 436f 6e74 656e 742d 5479  /2.8 .Content-Ty\n+00177700: 7065 3a20 7465 7874 2f78 6d6c 3b20 6368  pe: text/xml; ch\n+00177710: 6172 7365 743d 7574 662d 3820 0a43 6f6e  arset=utf-8 .Con\n+00177720: 7465 6e74 2d4c 656e 6774 683a 205a 5a5a  tent-Length: ZZZ\n+00177730: 200a 4175 7468 6f72 697a 6174 696f 6e3a   .Authorization:\n+00177740: 2042 6173 6963 205a 3356 6c63 3351 365a   Basic Z3Vlc3Q6Z\n+00177750: 3356 6c63 3351 3d20 0a3c 2f70 7265 3e3c  3Vlc3Q= .
    <\n+00177760: 703e 2041 2063 6c69 656e 7420 6d75 7374 p> A client must\n+00177770: 2073 6574 2074 6865 203c 636f 6465 3e63 set the c\n+00177780: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::userid<\n+00177850: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+00177860: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char*\n+00177870: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::p\n+00177930: 6173 7377 643c 2f61 3e3c 2f63 6f64 653e asswd
    \n+00177940: 2073 7472 696e 6773 2066 6f72 2065 6163 strings for eac\n+00177950: 6820 6361 6c6c 2074 6861 7420 7265 7175 h call that requ\n+00177960: 6972 6573 2063 6c69 656e 7420 6175 7468 ires client auth\n+00177970: 656e 7469 6361 7469 6f6e 2e20 5468 6520 entication. The \n+00177980: 7374 7269 6e67 7320 6172 6520 7265 7365 strings are rese\n+00177990: 7420 6166 7465 7220 6561 6368 2073 7563 t after each suc\n+001779a0: 6365 7373 6675 6c20 6f72 2075 6e73 7563 cessful or unsuc\n+001779b0: 6365 7373 6675 6c20 6361 6c6c 2e3c 2f70 cessful call..

    When presen\n+001779d0: 742c 2074 6865 203c 636f 6465 3e57 5757 t, the WWW\n+001779e0: 2d41 7574 6865 6e74 6963 6174 653c 2f63 -Authenticate HTTP header\n+00177a00: 2072 6574 7572 6e65 6420 6279 2074 6865 returned by the\n+00177a10: 2073 6572 7665 7220 7769 7468 2074 6865 server with the\n+00177a20: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+00177a30: 7265 616c 6d20 6973 2073 746f 7265 6420 realm is stored \n+00177a40: 696e 2074 6865 2074 6865 203c 636f 6465 in the the soap::a\n+00177b10: 7574 6872 6561 6c6d 3c2f 613e 3c2f 636f uthrealm string. This\n+00177b30: 2069 7320 7573 6566 756c 2066 6f72 2063 is useful for c\n+00177b40: 6c69 656e 7473 2074 6f20 7573 6520 7468 lients to use th\n+00177b50: 6973 2064 6f6d 6169 6e20 696e 666f 726d is domain inform\n+00177b60: 6174 696f 6e20 746f 2072 6573 706f 6e64 ation to respond\n+00177b70: 2074 6f20 6175 7468 656e 7469 6361 7469 to authenticati\n+00177b80: 6f6e 2072 6571 7565 7374 732e 3c2f 703e on requests.

    \n+00177b90: 0a3c 703e 4120 7374 616e 642d 616c 6f6e .

    A stand-alon\n+00177ba0: 6520 6753 4f41 5020 5765 6220 5365 7276 e gSOAP Web Serv\n+00177bb0: 6963 6520 6170 706c 6963 6174 696f 6e20 ice application \n+00177bc0: 6361 6e20 656e 666f 7263 6520 4854 5450 can enforce HTTP\n+00177bd0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+00177be0: 6f6e 2063 6c69 656e 7473 2062 7920 6368 on clients by ch\n+00177bf0: 6563 6b69 6e67 2074 6865 203c 636f 6465 ecking the const char* soap::useri\n+00177cd0: 643c 2f61 3e3c 2f63 6f64 653e 2061 6e64 d and\n+00177ce0: 203c 636f 6465 3e63 6f6e 7374 2063 6861 const cha\n+00177cf0: 722a 203c 6120 636c 6173 733d 2265 6c22 r* soap:\n+00177db0: 3a70 6173 7377 643c 2f61 3e3c 2f63 6f64 :passwd strings. Thes\n+00177dd0: 6520 7374 7269 6e67 7320 6172 6520 7365 e strings are se\n+00177de0: 7420 7768 656e 2061 2063 6c69 656e 7420 t when a client \n+00177df0: 7265 7175 6573 7420 636f 6e74 6169 6e73 request contains\n+00177e00: 2048 5454 5020 6175 7468 656e 7469 6361 HTTP authentica\n+00177e10: 7469 6f6e 2068 6561 6465 7273 2e20 5468 tion headers. Th\n+00177e20: 6520 7374 7269 6e67 7320 7368 6f75 6c64 e strings should\n+00177e30: 2062 6520 6368 6563 6b65 6420 696e 2065 be checked in e\n+00177e40: 6163 6820 7365 7276 6963 6520 6d65 7468 ach service meth\n+00177e50: 6f64 2028 7468 6174 2072 6571 7569 7265 od (that require\n+00177e60: 7320 6175 7468 656e 7469 6361 7469 6f6e s authentication\n+00177e70: 2074 6f20 6578 6563 7574 6529 2e3c 2f70 to execute)..

    Here is an \n+00177e90: 6578 616d 706c 6520 7365 7276 6963 6520 example service \n+00177ea0: 6d65 7468 6f64 2069 6d70 6c65 6d65 6e74 method implement\n+00177eb0: 6174 696f 6e20 7468 6174 2065 6e66 6f72 ation that enfor\n+00177ec0: 6365 6420 636c 6965 6e74 2061 7574 6865 ced client authe\n+00177ed0: 6e74 6963 6174 696f 6e3a 3c2f 703e 0a3c ntication:

    .<\n+00177ee0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00177ef0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int ns__\n+00177f30: 7765 626d 6574 686f 6428 3c73 7061 6e20 webmethod(\n+00177f50: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00177f90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00177fa0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00177fb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00177fc0: 2e2e 2e29 203c 2f64 6976 3e0a 3c64 6976 ...)
    .{<\n+00177fe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (!\n+00178020: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00178050: 2667 743b 3c61 2063 6c61 7373 3d22 636f >use\n+001780a0: 7269 643c 2f61 3e3c 2f64 6976 3e0a 3c64 rid
    .\n+001780c0: 2020 207c 7c20 213c 6120 636c 6173 733d || !so\n+001780f0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->passwd.
    || str\n+00178170: 636d 7028 3c61 2063 6c61 7373 3d22 636f cmp(soap<\n+001781a0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->userid, "g\n+00178220: 7565 7374 2671 756f 743b 3c2f 7370 616e uest")
    .
    ||\n+00178250: 2073 7472 636d 7028 3c61 2063 6c61 7373 strcmp(s\n+00178280: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->passwd,\n+001782e0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00178300: 6f74 3b76 6973 6974 2671 756f 743b 3c2f ot;visit"))
    .<\n+00178320: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00178330: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {

    .
    \n+00178350: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00178380: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->au\n+001783d0: 7468 7265 616c 6d3c 2f61 3e20 3d20 3c73 threalm = "\n+00178400: 2e2e 2e26 7175 6f74 3b3c 2f73 7061 6e3e ..."\n+00178410: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // domai\n+00178430: 6e20 7265 616c 6d20 6163 6365 7373 6564 n realm accessed\n+00178440: 2028 6f70 7469 6f6e 616c 2c20 4e55 4c4c (optional, NULL\n+00178450: 2074 6f20 6f6d 6974 293c 2f73 7061 6e3e to omit)\n+00178460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return 401;
    \n+001784b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . \n+001784e0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // we\n+00178500: 626d 6574 686f 6420 6c6f 6769 633c 2f73 bmethod logic
    .
    <\n+00178530: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00178540: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00178550: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n+001785b0: 4f4b 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 OK;
    .\n+001785d0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    co\n+001786a0: 6e73 7420 6368 6172 202a 2061 7574 6872 nst char * authr\n+001786b0: 6561 6c6d 3c2f 6469 763e 3c64 6976 2063 ealm
    The\n+001786d0: 2048 5454 5020 616e 6420 4e54 4c4d 2061 HTTP and NTLM a\n+001786e0: 7574 686f 7269 7a61 7469 6f6e 2072 6561 uthorization rea\n+001786f0: 6c6d 2f64 6f6d 6169 6e20 7374 7269 6e67 lm/domain string\n+00178700: 2072 6563 6569 7665 6420 6279 2074 6865 received by the\n+00178710: 2063 6c69 656e 7420 7769 7468 2074 6865 client with the\n+00178720: 2057 5757 2d41 7574 6865 6e74 6963 6174 WWW-Authenticat\n+00178730: 6520 2e2e 2e3c 2f64 6976 3e3c 6469 7620 e ...
    Definition:\n+00178760: 2073 7464 736f 6170 322e 683a 3338 3332 stdsoap2.h:3832\n+00178770: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    When the \n+001787a0: 6175 7468 656e 7469 6361 7469 6f6e 2066 authentication f\n+001787b0: 6169 6c73 2c20 7468 6520 7365 7276 6963 ails, the servic\n+001787c0: 6520 7265 7370 6f6e 7365 2077 6974 6820 e response with \n+001787d0: 6120 534f 4150 2046 6175 6c74 206d 6573 a SOAP Fault mes\n+001787e0: 7361 6765 2061 6e64 2061 2048 5454 5020 sage and a HTTP \n+001787f0: 6572 726f 7220 636f 6465 2022 3430 3120 error code \"401 \n+00178800: 556e 6175 7468 6f72 697a 6564 222e 2054 Unauthorized\". T\n+00178810: 6865 2048 5454 5020 6572 726f 7220 636f he HTTP error co\n+00178820: 6465 7320 6172 6520 6465 7363 7269 6265 des are describe\n+00178830: 6420 696e 2053 6563 7469 6f6e 203c 6120 d in Section Run-time e\n+00178870: 7272 6f72 2063 6f64 6573 3c2f 613e 202e rror codes .\n+00178880: 3c2f 703e 0a3c 703e 546f 2072 6574 7572

    .

    To retur\n+00178890: 6e20 6120 6e6f 6e2d 534f 4150 2065 7272 n a non-SOAP err\n+001788a0: 6f72 2c20 7573 653a 3c2f 703e 0a3c 6469 or, use:

    .
    r\n+001788f0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn soa\n+00178950: 705f 7365 6e64 5f65 6d70 7479 5f72 6573 p_send_empty_res\n+00178960: 706f 6e73 653c 2f61 3e28 3c61 2063 6c61 ponse(soap, 401);\n+001789a0: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
    .
    <\n+001789c0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+001789e0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+001789f0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .HTTP NTL\n+00178a30: 4d20 6175 7468 656e 7469 6361 7469 6f6e M authentication\n+00178a40: 3c2f 6833 3e0a 3c70 3e48 5454 5020 4e54

    .

    HTTP NT\n+00178a50: 4c4d 2061 7574 6865 6e74 6963 6174 696f LM authenticatio\n+00178a60: 6e20 6973 2065 6e61 626c 6564 2061 7420 n is enabled at \n+00178a70: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n+00178a80: 6279 2069 6e73 7461 6c6c 696e 6720 3c63 by installing libntlm from \n+00178ad0: 6874 7470 3a2f 2f77 7777 2e6e 6f6e 676e http://www.nongn\n+00178ae0: 752e 6f72 672f 6c69 626e 746c 6d3c 2f61 u.org/libntlm and compiling \n+00178b00: 616c 6c20 7072 6f6a 6563 7420 736f 7572 all project sour\n+00178b10: 6365 2063 6f64 6573 2077 6974 6820 7468 ce codes with th\n+00178b20: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f\n+00178b30: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n+00178b40: 4e54 4c4d 3c2f 636f 6465 3e2e 3c2f 703e NTLM.

    \n+00178b50: 0a3c 703e 496e 2079 6f75 7220 6170 706c .

    In your appl\n+00178b60: 6963 6174 696f 6e20 636f 6465 2073 6574 ication code set\n+00178b70: 2074 6865 203c 636f 6465 3e63 6f6e 7374 the const\n+00178b80: 2063 6861 722a 203c 6120 636c 6173 733d char* s\n+00178c40: 6f61 703a 3a75 7365 7269 643c 2f61 3e3c oap::userid<\n+00178c50: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and const char* soap::passw\n+00178d30: 643c 2f61 3e3c 2f63 6f64 653e 2073 7472 d str\n+00178d40: 696e 6773 2074 6f20 6120 7573 6572 6e61 ings to a userna\n+00178d50: 6d65 2061 6e64 2070 6173 7377 6f72 642e me and password.\n+00178d60: 2041 2073 6572 7665 7220 6d61 7920 7265 A server may re\n+00178d70: 7175 6573 7420 4e54 4c4d 2061 7574 6865 quest NTLM authe\n+00178d80: 6e74 6963 6174 696f 6e20 616e 6420 6465 ntication and de\n+00178d90: 6e69 6573 2061 6363 6573 7320 2848 5454 nies access (HTT\n+00178da0: 5020 3430 3120 6175 7468 656e 7469 6361 P 401 authentica\n+00178db0: 7469 6f6e 2072 6571 7569 7265 6420 6f72 tion required or\n+00178dc0: 2048 5454 5020 3430 3720 4854 5450 2070 HTTP 407 HTTP p\n+00178dd0: 726f 7879 2061 7574 6865 6e74 6963 6174 roxy authenticat\n+00178de0: 696f 6e20 7265 7175 6972 6564 2920 7768 ion required) wh\n+00178df0: 656e 2074 6865 2063 6c69 656e 7420 7472 en the client tr\n+00178e00: 6965 7320 746f 2063 6f6e 6e65 6374 2077 ies to connect w\n+00178e10: 6974 686f 7574 2048 5454 5020 6175 7468 ithout HTTP auth\n+00178e20: 656e 7469 6361 7469 6f6e 2028 6f72 2077 entication (or w\n+00178e30: 6974 6820 7468 6520 7772 6f6e 6720 6175 ith the wrong au\n+00178e40: 7468 656e 7469 6361 7469 6f6e 2069 6e66 thentication inf\n+00178e50: 6f72 6d61 7469 6f6e 292e 3c2f 703e 0a3c ormation).

    .<\n+00178e60: 703e 4865 7265 2069 7320 616e 2065 7861 p>Here is an exa\n+00178e70: 6d70 6c65 2063 6c69 656e 7420 636f 6465 mple client code\n+00178e80: 2066 7261 676d 656e 7420 746f 2073 6574 fragment to set\n+00178e90: 2074 6865 204e 544c 4d20 6175 7468 656e the NTLM authen\n+00178ea0: 7469 6361 7469 6f6e 2075 7365 726e 616d tication usernam\n+00178eb0: 6520 616e 6420 7061 7373 776f 7264 3a3c e and password:<\n+00178ec0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    struct \n+00178f10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00178f40: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00178f70: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+00178fd0: 313c 2f61 3e28 3c61 2063 6c61 7373 3d22 1(SOAP_IO\n+00179030: 5f4b 4545 5041 4c49 5645 3c2f 613e 293b _KEEPALIVE);\n+00179040: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (s\n+00179080: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n+00179090: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n+001790c0: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
    {
    .<\n+001790f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00179100: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00179120: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n+00179150: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error =\n+001791b0: 3d20 3430 3129 203c 2f64 6976 3e0a 3c64 = 401)
    .\n+001791d0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+001791f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00179220: 2667 743b 3c61 2063 6c61 7373 3d22 636f >use\n+00179270: 7269 643c 2f61 3e20 3d20 3c73 7061 6e20 rid = "Zaph\n+001792a0: 6f64 2671 756f 743b 3c2f 7370 616e 3e3b od";\n+001792b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap-&g\n+00179300: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;passw\n+00179350: 643c 2f61 3e20 3d20 3c73 7061 6e20 636c d = "Beeble\n+00179380: 6272 6f78 2671 756f 743b 3c2f 7370 616e brox";
    .
    \n+001793b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n+001793e0: 735f 5f77 6562 6d65 7468 6f64 283c 6120 s__webmethod(soap, ..\n+00179420: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))
    .
    \n+00179440: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+00179460: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    else.
    ...\n+001794d0: 203c 7370 616e 2063 6c61 7373 3d22 636f // succes\n+001794f0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n+00179500: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00179510: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
    .
    }.

    T\n+00179550: 6865 2066 6f6c 6c6f 7769 6e67 204e 544c he following NTL\n+00179560: 4d20 6861 6e64 7368 616b 6520 6265 7477 M handshake betw\n+00179570: 6565 6e20 7468 6520 636c 6965 6e74 2043 een the client C\n+00179580: 2061 6e64 2073 6572 7665 7220 5320 6973 and server S is\n+00179590: 2070 6572 666f 726d 6564 3a20 3c2f 703e performed:

    \n+001795a0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    1: C  --&g\n+001795c0: 743b 2053 2026 616d 703b 2050 4f53 5420  t; S & POST \n+001795d0: 2e2e 2e20 0a20 2020 2020 2020 2020 2020  ... .           \n+001795e0: 2026 616d 703b 2043 6f6e 7465 6e74 2d54   & Content-T\n+001795f0: 7970 653a 2074 6578 742f 786d 6c3b 2063  ype: text/xml; c\n+00179600: 6861 7273 6574 3d75 7466 2d38 200a 0a32  harset=utf-8 ..2\n+00179610: 3a20 4320 266c 743b 2d2d 2020 5320 2661  : C <--  S &a\n+00179620: 6d70 3b20 3430 3120 556e 6175 7468 6f72  mp; 401 Unauthor\n+00179630: 697a 6564 200a 2020 2020 2020 2020 2020  ized .          \n+00179640: 2020 2661 6d70 3b20 5757 572d 4175 7468    & WWW-Auth\n+00179650: 656e 7469 6361 7465 3a20 4e54 4c4d 200a  enticate: NTLM .\n+00179660: 0a33 3a20 4320 202d 2d26 6774 3b20 5320  .3: C  --> S \n+00179670: 2661 6d70 3b20 4745 5420 2e2e 2e20 0a20  & GET ... . \n+00179680: 2020 2020 2020 2020 2020 2026 616d 703b             &\n+00179690: 2041 7574 686f 7269 7a61 7469 6f6e 3a20   Authorization: \n+001796a0: 4e54 4c4d 2026 6c74 3b62 6173 6536 342d  NTLM <base64-\n+001796b0: 656e 636f 6465 6420 7479 7065 2d31 2d6d  encoded type-1-m\n+001796c0: 6573 7361 6765 2667 743b 200a 0a34 3a20  essage> ..4: \n+001796d0: 4320 266c 743b 2d2d 2020 5320 2661 6d70  C <--  S &\n+001796e0: 3b20 3430 3120 556e 6175 7468 6f72 697a  ; 401 Unauthoriz\n+001796f0: 6564 200a 2020 2020 2020 2020 2020 2020  ed .            \n+00179700: 2661 6d70 3b20 5757 572d 4175 7468 656e  & WWW-Authen\n+00179710: 7469 6361 7465 3a20 4e54 4c4d 2026 6c74  ticate: NTLM <\n+00179720: 3b62 6173 6536 342d 656e 636f 6465 6420  ;base64-encoded \n+00179730: 7479 7065 2d32 2d6d 6573 7361 6765 2667  type-2-message&g\n+00179740: 743b 200a 0a35 3a20 4320 202d 2d26 6774  t; ..5: C  -->\n+00179750: 3b20 5320 2661 6d70 3b20 504f 5354 202e  ; S & POST .\n+00179760: 2e2e 200a 2020 2020 2020 2020 2020 2020  .. .            \n+00179770: 2661 6d70 3b20 436f 6e74 656e 742d 5479  & Content-Ty\n+00179780: 7065 3a20 7465 7874 2f78 6d6c 3b20 6368  pe: text/xml; ch\n+00179790: 6172 7365 743d 7574 662d 3820 0a20 2020  arset=utf-8 .   \n+001797a0: 2020 2020 2020 2020 2026 616d 703b 2041           & A\n+001797b0: 7574 686f 7269 7a61 7469 6f6e 3a20 4e54  uthorization: NT\n+001797c0: 4c4d 2026 6c74 3b62 6173 6536 342d 656e  LM <base64-en\n+001797d0: 636f 6465 6420 7479 7065 2d33 2d6d 6573  coded type-3-mes\n+001797e0: 7361 6765 2667 743b 200a 0a36 3a20 4320  sage> ..6: C \n+001797f0: 266c 743b 2d2d 2020 5320 2661 6d70 3b20  <--  S & \n+00179800: 3230 3020 4f4b 0a3c 2f70 7265 3e3c 703e  200 OK.

    \n+00179810: 2077 6865 7265 2073 7461 6765 7320 3120 where stages 1 \n+00179820: 616e 6420 3220 696e 6469 6361 7465 7320 and 2 indicates \n+00179830: 6120 636c 6965 6e74 2061 7474 656d 7074 a client attempt\n+00179840: 696e 6720 746f 2063 6f6e 6e65 6374 2077 ing to connect w\n+00179850: 6974 686f 7574 2061 7574 686f 7269 7a61 ithout authoriza\n+00179860: 7469 6f6e 2069 6e66 6f72 6d61 7469 6f6e tion information\n+00179870: 2c20 7768 6963 6820 6973 2074 6865 2066 , which is the f\n+00179880: 6972 7374 206d 6574 686f 6420 6361 6c6c irst method call\n+00179890: 2069 6e20 7468 6520 636f 6465 2061 626f in the code abo\n+001798a0: 7665 2e20 5374 6167 6520 3320 746f 2036 ve. Stage 3 to 6\n+001798b0: 2068 6170 7065 6e20 7769 7468 2074 6865 happen with the\n+001798c0: 2070 726f 7065 7220 636c 6965 6e74 2061 proper client a\n+001798d0: 7574 6865 6e74 6963 6174 696f 6e20 7365 uthentication se\n+001798e0: 7420 7769 7468 203c 636f 6465 3e63 6f6e t with con\n+001798f0: 7374 2063 6861 722a 203c 6120 636c 6173 st char* soap::userid and const char* <\n+001799e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001799f0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00179a00: 6d6c 2361 3232 6432 3139 6339 3866 3066 ml#a22d219c98f0f\n+00179a10: 6366 3435 3636 3431 3237 3763 6336 3431 cf456641277cc641\n+00179a20: 3734 6133 2220 7469 746c 653d 2255 7365 74a3\" title=\"Use\n+00179a30: 722d 6465 6669 6e61 626c 6520 4854 5450 r-definable HTTP\n+00179a40: 2061 6e64 204e 544c 4d20 6175 7468 6f72 and NTLM author\n+00179a50: 697a 6174 696f 6e20 7061 7373 776f 7264 ization password\n+00179a60: 2073 7472 696e 6720 7265 7175 6972 6564 string required\n+00179a70: 2066 6f72 2048 5454 5020 6261 7369 6320 for HTTP basic \n+00179a80: 616e 6420 4e54 4c4d 2061 7574 6865 6e74 and NTLM authent\n+00179a90: 6963 2e2e 2e22 3e73 6f61 703a 3a70 6173 ic...\">soap::pas\n+00179aa0: 7377 643c 2f61 3e3c 2f63 6f64 653e 2e20 swd. \n+00179ab0: 4f70 7469 6f6e 616c 6c79 2c20 7468 6520 Optionally, the \n+00179ac0: 3c63 6f64 653e 636f 6e73 7420 6368 6172 const char\n+00179ad0: 2a20 3c61 2063 6c61 7373 3d22 656c 2220 * soap::\n+00179b90: 6175 7468 7265 616c 6d3c 2f61 3e3c 2f63 authrealm string shou\n+00179bb0: 6c64 2062 6520 7365 7420 6173 2077 656c ld be set as wel\n+00179bc0: 6c20 746f 2069 6e64 6963 6174 6520 7468 l to indicate th\n+00179bd0: 6520 646f 6d61 696e 2061 6363 6573 7365 e domain accesse\n+00179be0: 6420 2874 6869 7320 7374 7269 6e67 2069 d (this string i\n+00179bf0: 7320 6e6f 726d 616c 6c79 2073 6574 2077 s normally set w\n+00179c00: 6865 6e20 7468 6520 7365 7276 6572 2072 hen the server r\n+00179c10: 6573 706f 6e64 7320 7769 7468 2048 5454 esponds with HTT\n+00179c20: 5020 3430 3120 736f 2074 6865 2063 6c69 P 401 so the cli\n+00179c30: 656e 7420 7265 6365 6976 6573 2074 6869 ent receives thi\n+00179c40: 7320 7365 7276 6572 2064 6f6d 6169 6e20 s server domain \n+00179c50: 696e 666f 726d 6174 696f 6e29 2e20 4e54 information). NT\n+00179c60: 4c4d 2061 7574 6865 6e74 6963 6174 6573 LM authenticates\n+00179c70: 2063 6f6e 6e65 6374 696f 6e73 2c20 6e6f connections, no\n+00179c80: 7420 7265 7175 6573 7473 2e20 5768 656e t requests. When\n+00179c90: 2074 6865 2063 6f6e 6e65 6374 696f 6e20 the connection \n+00179ca0: 6973 206b 6570 7420 616c 6976 652c 2073 is kept alive, s\n+00179cb0: 7562 7365 7175 656e 7420 6d65 7373 6167 ubsequent messag\n+00179cc0: 6573 2063 616e 2062 6520 6578 6368 616e es can be exchan\n+00179cd0: 6765 6420 7769 7468 6f75 7420 7265 2d61 ged without re-a\n+00179ce0: 7574 6865 6e74 6963 6174 696f 6e2e 3c2f uthentication..

    To avoid t\n+00179d00: 6865 206f 7665 7268 6561 6420 6f66 2074 he overhead of t\n+00179d10: 6865 2066 6972 7374 2072 656a 6563 7465 he first rejecte\n+00179d20: 6420 6361 6c6c 2c20 7573 653a 3c2f 703e d call, use:

    \n+00179d30: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+00179d70: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+00179de0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new1(SOAP_IO_KE\n+00179ea0: 4550 414c 4956 453c 2f61 3e29 3b20 3c2f EPALIVE); .\n+00179f90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap->\n+0017a020: 7573 6572 6964 3c2f 613e 203d 203c 7370 userid = "Z\n+0017a050: 6170 686f 6426 7175 6f74 3b3c 2f73 7061 aphod";
    .
    soap->\n+0017a0b0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;passwd\n+0017a100: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Beebleb\n+0017a130: 726f 7826 7175 6f74 3b3c 2f73 7061 6e3e rox"\n+0017a140: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n+0017a190: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017a1a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017a1b0: 6874 6d6c 2361 3864 6265 3537 6435 3966 html#a8dbe57d59f\n+0017a1c0: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7\n+0017a1d0: 3933 3962 6664 223e 6175 7468 7265 616c 939bfd\">authreal\n+0017a1e0: 6d3c 2f61 3e20 3d20 3c73 7061 6e20 636c m = "Ursa-M\n+0017a210: 696e 6f72 2671 756f 743b 3c2f 7370 616e inor";
    .
    if \n+0017a260: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f77 (soap_call_ns__w\n+0017a270: 6562 6d65 7468 6f64 283c 6120 636c 6173 ebmethod(\n+0017a2a0: 736f 6170 3c2f 613e 2c20 2e2e 2e29 2920 soap, ...)) \n+0017a2b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n+0017a2d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0017a2e0: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent\">// error
    .
    else
    .
    ...\n+0017a350: 203c 7370 616e 2063 6c61 7373 3d22 636f // succes\n+0017a370: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n+0017a380: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0017a390: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+0017a3a0: 6874 6d6c 5f61 6632 6339 6537 3736 3136 html_af2c9e77616\n+0017a3b0: 6331 3332 3833 3165 6266 3034 3164 3965 c132831ebf041d9e\n+0017a3c0: 3464 3138 6231 223e 3c64 6976 2063 6c61 4d18b1\">
    soap::nt\n+0017a420: 6c6d 5f63 6861 6c6c 656e 6765 3c2f 613e lm_challenge\n+0017a430: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const \n+0017a450: 6368 6172 202a 206e 746c 6d5f 6368 616c char * ntlm_chal\n+0017a460: 6c65 6e67 653c 2f64 6976 3e3c 6469 7620 lenge
    Us\n+0017a480: 6572 2d64 6566 696e 6162 6c65 204e 544c er-definable NTL\n+0017a490: 4d20 6175 7468 656e 7469 6361 7469 6f6e M authentication\n+0017a4a0: 2063 6861 6c6c 656e 6765 206b 6579 2073 challenge key s\n+0017a4b0: 7472 696e 672e 3c2f 6469 763e 3c64 6976 tring.
    <\n+0017a4d0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:387\n+0017a4f0: 383c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 8
    .

    When the\n+0017a520: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+0017a530: 6661 696c 7320 2873 7461 6765 2031 2061 fails (stage 1 a\n+0017a540: 6e64 2032 292c 2074 6865 2073 6572 7669 nd 2), the servi\n+0017a550: 6365 2072 6573 706f 6e73 6520 7769 7468 ce response with\n+0017a560: 2048 5454 5020 6572 726f 7220 636f 6465 HTTP error code\n+0017a570: 2022 3430 3120 556e 6175 7468 6f72 697a \"401 Unauthoriz\n+0017a580: 6564 2220 616e 6420 3c63 6f64 653e 3c61 ed\" and soap::error<\n+0017a640: 2f61 3e3c 2f63 6f64 653e 2069 7320 7365 /a> is se\n+0017a650: 7420 746f 2048 5454 5020 636f 6465 2034 t to HTTP code 4\n+0017a660: 3031 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 01.

    .

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

    ..HTTP proxy\n+0017a6e0: 204e 544c 4d20 6175 7468 656e 7469 6361 NTLM authentica\n+0017a6f0: 7469 6f6e 3c2f 6833 3e0a 3c70 3e46 6f72 tion.

    For\n+0017a700: 2048 5454 5020 3430 3720 5072 6f78 7920 HTTP 407 Proxy \n+0017a710: 4175 7468 656e 7469 6361 7469 6f6e 2052 Authentication R\n+0017a720: 6571 7569 7265 6420 7365 7420 7468 6520 equired set the \n+0017a730: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::proxy\n+0017a7f0: 5f75 7365 7269 643c 2f61 3e3c 2f63 6f64 _userid and soa\n+0017a8c0: 703a 3a70 726f 7879 5f70 6173 7377 643c p::proxy_passwd<\n+0017a8d0: 2f61 3e3c 2f63 6f64 653e 3a3c 2f70 3e0a /a>:

    .\n+0017a8e0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+0017a920: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n+0017a990: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017a9a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0017a9b0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+0017a9c0: 6761 3531 6364 6531 3338 3233 3465 6437 ga51cde138234ed7\n+0017a9d0: 6563 3863 3465 3235 6264 6636 3431 3836 ec8c4e25bdf64186\n+0017a9e0: 3538 223e 736f 6170 5f6e 6577 313c 2f61 58\">soap_new1(SOAP_IO_KEE\n+0017aa50: 5041 4c49 5645 3c2f 613e 293b 203c 2f64 PALIVE); ..<\n+0017ab40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0017ab50: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+0017ab80: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pr\n+0017abd0: 6f78 795f 706f 7274 3c2f 613e 203d 202e oxy_port = .\n+0017abe0: 2e2e 3b20 3c2f 6469 763e 0a3c 6469 7620 ..;
    .
    if\n+0017ac20: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__\n+0017ac30: 7765 626d 6574 686f 6428 3c61 2063 6c61 webmethod(soap, ...))\n+0017ac70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n+0017acc0: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap-><\n+0017ad00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017ad10: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017ad20: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n+0017ad30: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n+0017ad40: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error == 407)
    \n+0017ad60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+0017ad90: 2020 203c 6120 636c 6173 733d 2263 6f64 soap->\n+0017ae10: 7072 6f78 795f 7573 6572 6964 3c2f 613e proxy_userid\n+0017ae20: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+0017ae40: 7175 6f74 3b5a 6170 686f 6426 7175 6f74 quot;Zaphod"\n+0017ae50: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n+0017ae60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n+0017aea0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->proxy_passwd\n+0017af00: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Beebleb\n+0017af30: 726f 7826 7175 6f74 3b3c 2f73 7061 6e3e rox"\n+0017af40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+0017af60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017af70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017af80: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+0017af90: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;auth\n+0017afe0: 7265 616c 6d3c 2f61 3e20 3d20 3c73 7061 realm = "Ur\n+0017b010: 7361 2d4d 696e 6f72 2671 756f 743b 3c2f sa-Minor";
    .\n+0017b040: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n+0017b060: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n+0017b070: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n+0017b080: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0017b0b0: 2c20 2e2e 2e29 2920 3c2f 6469 763e 0a3c , ...))
    .<\n+0017b0c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0017b0d0: 3e20 2020 2020 202e 2e2e 203c 7370 616e > ... // error\n+0017b100: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else
    .
    \n+0017b160: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // su\n+0017b180: 6363 6573 733c 2f73 7061 6e3e 3c2f 6469 ccess.
    \n+0017b1f0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n+0017b230: 3a3a 7072 6f78 795f 706f 7274 3c2f 613e ::proxy_port\n+0017b240: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int pr\n+0017b260: 6f78 795f 706f 7274 3c2f 6469 763e 3c64 oxy_port
    User-definable \n+0017b290: 7072 6f78 7920 706f 7274 2077 6869 6368 proxy port which\n+0017b2a0: 2073 686f 756c 6420 6265 2073 6574 2074 should be set t\n+0017b2b0: 6f20 636f 6e6e 6563 7420 7468 726f 7567 o connect throug\n+0017b2c0: 6820 616e 2048 5454 5020 7072 6f78 7920 h an HTTP proxy \n+0017b2d0: 2874 6865 2076 616c 7565 2069 7320 3830 (the value is 80\n+0017b2e0: 3830 2062 7920 2e2e 2e3c 2f64 6976 3e3c 80 by ...
    <\n+0017b2f0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+0017b300: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+0017b310: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+0017b320: 3339 3036 3c2f 6469 763e 3c2f 6469 763e 3906
    \n+0017b330: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n+0017b3d0: 7072 6f78 795f 7573 6572 6964 3c2f 613e proxy_userid\n+0017b3e0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const \n+0017b400: 6368 6172 202a 2070 726f 7879 5f75 7365 char * proxy_use\n+0017b410: 7269 643c 2f64 6976 3e3c 6469 7620 636c rid
    User\n+0017b430: 2d64 6566 696e 6162 6c65 2070 726f 7879 -definable proxy\n+0017b440: 2061 7574 686f 7269 7a61 7469 6f6e 2075 authorization u\n+0017b450: 7365 7220 6964 2073 7472 696e 6720 746f ser id string to\n+0017b460: 2061 7574 6865 6e74 6963 6174 6520 616e authenticate an\n+0017b470: 6420 636f 6e6e 6563 7420 746f 2061 6e20 d connect to an \n+0017b480: 4854 5450 2070 726f 7879 2e3c 2f64 6976 HTTP proxy.
    Definitio\n+0017b4b0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+0017b4c0: 683a 3339 3131 3c2f 6469 763e 3c2f 6469 h:3911
    .
    \n+0017b530: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n+0017b570: 3a3a 7072 6f78 795f 686f 7374 3c2f 613e ::proxy_host\n+0017b580: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const \n+0017b5a0: 6368 6172 202a 2070 726f 7879 5f68 6f73 char * proxy_hos\n+0017b5b0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    User-d\n+0017b5d0: 6566 696e 6162 6c65 2070 726f 7879 2068 efinable proxy h\n+0017b5e0: 6f73 7420 6e61 6d65 2073 7472 696e 6720 ost name string \n+0017b5f0: 7768 6963 6820 7368 6f75 6c64 2062 6520 which should be \n+0017b600: 7365 7420 746f 2063 6f6e 6e65 6374 2074 set to connect t\n+0017b610: 6872 6f75 6768 2061 6e20 4854 5450 2070 hrough an HTTP p\n+0017b620: 726f 7879 2e3c 2f64 6976 3e3c 6469 7620 roxy.
    Definition:\n+0017b650: 2073 7464 736f 6170 322e 683a 3339 3031 stdsoap2.h:3901\n+0017b660: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    soap::prox\n+0017b710: 795f 7061 7373 7764 3c2f 613e 3c2f 6469 y_passwd
    const char\n+0017b740: 202a 2070 726f 7879 5f70 6173 7377 643c * proxy_passwd<\n+0017b750: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n+0017b770: 696e 6162 6c65 2070 726f 7879 2061 7574 inable proxy aut\n+0017b780: 686f 7269 7a61 7469 6f6e 2070 6173 7377 horization passw\n+0017b790: 6f72 6420 7374 7269 6e67 2074 6f20 6175 ord string to au\n+0017b7a0: 7468 656e 7469 6361 7465 2061 6e64 2063 thenticate and c\n+0017b7b0: 6f6e 6e65 6374 2074 6f20 616e 2048 5454 onnect to an HTT\n+0017b7c0: 5020 7072 6f78 792e 3c2f 6469 763e 3c64 P proxy.
    Definition:<\n+0017b7f0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n+0017b800: 3931 363c 2f64 6976 3e3c 2f64 6976 3e0a 916
    .\n+0017b810: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    To avo\n+0017b830: 6964 2074 6865 206f 7665 7268 6561 6420 id the overhead \n+0017b840: 6f66 2074 6865 2066 6972 7374 2072 656a of the first rej\n+0017b850: 6563 7465 6420 6361 6c6c 2c20 7573 653a ected call, use:\n+0017b860: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n+0017b8e0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+0017b970: 7731 3c2f 613e 283c 6120 636c 6173 733d w1(SOAP_I\n+0017b9d0: 4f5f 4b45 4550 414c 4956 453c 2f61 3e29 O_KEEPALIVE)\n+0017b9e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n+0017ba30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017ba40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017ba50: 6874 6d6c 2361 6331 3732 6264 3930 3139 html#ac172bd9019\n+0017ba60: 6166 6565 6262 3336 3335 6233 6139 6637 afeebb3635b3a9f7\n+0017ba70: 3261 3931 3031 223e 7072 6f78 795f 686f 2a9101\">proxy_ho\n+0017ba80: 7374 3c2f 613e 203d 203c 7370 616e 2063 st = "...&q\n+0017bab0: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; ..\n+0017bb70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->p\n+0017bc00: 726f 7879 5f75 7365 7269 643c 2f61 3e20 roxy_userid \n+0017bc10: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+0017bc30: 756f 743b 5a61 7068 6f64 2671 756f 743b uot;Zaphod"\n+0017bc40: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n+0017bc50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->p\n+0017bce0: 726f 7879 5f70 6173 7377 643c 2f61 3e20 roxy_passwd \n+0017bcf0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+0017bd10: 756f 743b 4265 6562 6c65 6272 6f78 2671 uot;Beeblebrox&q\n+0017bd20: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    soa\n+0017bd70: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->authrealm\n+0017bdd0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+0017bdf0: 7175 6f74 3b55 7273 612d 4d69 6e6f 7226 quot;Ursa-Minor&\n+0017be00: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .\n+0017bef0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n+0017bf20: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n+0017bf30: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n+0017bf40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+0017bf70: 202e 2e2e 2929 203c 2f64 6976 3e0a 3c64 ...))
    .\n+0017bf90: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n+0017bfb0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    el\n+0017bff0: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n+0017c000: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n+0017c030: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n+0017c040: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

    .HTTP prox\n+0017c0d0: 7920 6261 7369 6320 6175 7468 656e 7469 y basic authenti\n+0017c0e0: 6361 7469 6f6e 3c2f 6833 3e0a 3c70 3e48 cation

    .

    H\n+0017c0f0: 5454 5020 7072 6f78 7920 6175 7468 656e TTP proxy authen\n+0017c100: 7469 6361 7469 6f6e 2028 6261 7369 6329 tication (basic)\n+0017c110: 2069 7320 656e 6162 6c65 6420 6174 2074 is enabled at t\n+0017c120: 6865 2063 6c69 656e 742d 7369 6465 2062 he client-side b\n+0017c130: 7920 7365 7474 696e 6720 7468 6520 3c63 y setting the soap::proxy_u\n+0017c200: 7365 7269 643c 2f61 3e3c 2f63 6f64 653e serid\n+0017c210: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap:\n+0017c2d0: 3a70 726f 7879 5f70 6173 7377 643c 2f61 :proxy_passwd strings\n+0017c2f0: 2074 6f20 6120 7573 6572 6e61 6d65 2061 to a username a\n+0017c300: 6e64 2070 6173 7377 6f72 642c 2072 6573 nd password, res\n+0017c310: 7065 6374 6976 656c 792e 2046 6f72 2065 pectively. For e\n+0017c320: 7861 6d70 6c65 2c20 6120 7072 6f78 7920 xample, a proxy \n+0017c330: 7365 7276 6572 206d 6179 2072 6571 7565 server may reque\n+0017c340: 7374 2075 7365 7220 6175 7468 656e 7469 st user authenti\n+0017c350: 6361 7469 6f6e 2e20 4f74 6865 7277 6973 cation. Otherwis\n+0017c360: 652c 2061 6363 6573 7320 6973 2064 656e e, access is den\n+0017c370: 6965 6420 6279 2074 6865 2070 726f 7879 ied by the proxy\n+0017c380: 2028 4854 5450 2034 3037 2065 7272 6f72 (HTTP 407 error\n+0017c390: 292e 2045 7861 6d70 6c65 2063 6c69 656e ). Example clien\n+0017c3a0: 7420 636f 6465 2066 7261 676d 656e 7420 t code fragment \n+0017c3b0: 746f 2073 6574 2070 726f 7879 2073 6572 to set proxy ser\n+0017c3c0: 7665 722c 2075 7365 726e 616d 652c 2061 ver, username, a\n+0017c3d0: 6e64 2070 6173 7377 6f72 643a 3c2f 703e nd password:

    \n+0017c3e0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+0017c420: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+0017c490: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .soap-&g\n+0017c540: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;proxy\n+0017c590: 5f68 6f73 743c 2f61 3e20 3d20 3c73 7061 _host = "xx\n+0017c5c0: 2e78 782e 7878 2e78 7826 7175 6f74 3b3c .xx.xx.xx"<\n+0017c5d0: 2f73 7061 6e3e 3b20 3c73 7061 6e20 636c /span>; //\n+0017c5f0: 2049 5020 6f72 2064 6f6d 6169 6e20 3c2f IP or domain
    .soap-&g\n+0017c650: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;proxy\n+0017c6a0: 5f70 6f72 743c 2f61 3e20 3d20 3830 3830 _port = 8080\n+0017c6b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n+0017c700: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017c710: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017c720: 6874 6d6c 2361 3765 3765 3965 3964 3635 html#a7e7e9e9d65\n+0017c730: 6262 6136 3233 3732 3938 6366 3265 6437 bba6237298cf2ed7\n+0017c740: 6365 6335 3939 223e 7072 6f78 795f 7573 cec599\">proxy_us\n+0017c750: 6572 6964 3c2f 613e 203d 203c 7370 616e erid = "gue\n+0017c780: 7374 2671 756f 743b 3c2f 7370 616e 3e3b st";\n+0017c790: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->proxy_pas\n+0017c830: 7377 643c 2f61 3e20 3d20 3c73 7061 6e20 swd = "gues\n+0017c860: 7426 7175 6f74 3b3c 2f73 7061 6e3e 3b20 t"; \n+0017c870: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    A client SOAP r\n+0017c8a0: 6571 7565 7374 2077 696c 6c20 6861 7665 equest will have\n+0017c8b0: 2074 6865 2066 6f6c 6c6f 7769 6e67 2048 the following H\n+0017c8c0: 5454 5020 6865 6164 6572 3a20 3c2f 703e TTP header:

    \n+0017c8d0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    POST /XXX \n+0017c8f0: 4854 5450 2f31 2e31 200a 486f 7374 3a20  HTTP/1.1 .Host: \n+0017c900: 5959 5920 0a55 7365 722d 4167 656e 743a  YYY .User-Agent:\n+0017c910: 2067 534f 4150 2f32 2e38 200a 436f 6e74   gSOAP/2.8 .Cont\n+0017c920: 656e 742d 5479 7065 3a20 7465 7874 2f78  ent-Type: text/x\n+0017c930: 6d6c 3b20 6368 6172 7365 743d 7574 662d  ml; charset=utf-\n+0017c940: 3820 0a43 6f6e 7465 6e74 2d4c 656e 6774  8 .Content-Lengt\n+0017c950: 683a 205a 5a5a 200a 5072 6f78 792d 4175  h: ZZZ .Proxy-Au\n+0017c960: 7468 6f72 697a 6174 696f 6e3a 2042 6173  thorization: Bas\n+0017c970: 6963 205a 3356 6c63 3351 365a 3356 6c63  ic Z3Vlc3Q6Z3Vlc\n+0017c980: 3351 3d20 0a3c 2f70 7265 3e3c 703e 2057  3Q= .

    W\n+0017c990: 6865 6e20 582d 466f 7277 6172 6465 642d hen X-Forwarded-\n+0017c9a0: 466f 7220 6865 6164 6572 7320 6172 6520 For headers are \n+0017c9b0: 7265 7475 726e 6564 2062 7920 7468 6520 returned by the \n+0017c9c0: 7072 6f78 792c 2074 6865 2068 6561 6465 proxy, the heade\n+0017c9d0: 7220 6361 6e20 6265 2061 6363 6573 7365 r can be accesse\n+0017c9e0: 6420 696e 2074 6865 203c 636f 6465 3e3c d in the <\n+0017c9f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017ca00: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0017ca10: 6d6c 2361 3539 6237 6133 6337 3030 6664 ml#a59b7a3c700fd\n+0017ca20: 3534 6261 3137 3038 6639 3763 3762 3630 54ba1708f97c7b60\n+0017ca30: 3837 3662 2220 7469 746c 653d 2254 6865 876b\" title=\"The\n+0017ca40: 2058 2d46 6f72 7761 7264 696e 672d 466f X-Forwarding-Fo\n+0017ca50: 7220 4854 5450 2068 6561 6465 7220 7374 r HTTP header st\n+0017ca60: 7269 6e67 2076 616c 7565 2072 6563 6569 ring value recei\n+0017ca70: 7665 642e 223e 736f 6170 3a3a 7072 6f78 ved.\">soap::prox\n+0017ca80: 795f 6672 6f6d 3c2f 613e 3c2f 636f 6465 y_from string.

    .The CONNECT met\n+0017cab0: 686f 6420 6973 2075 7365 6420 666f 7220 hod is used for \n+0017cac0: 4854 5450 2070 726f 7879 2061 7574 6865 HTTP proxy authe\n+0017cad0: 6e74 6963 6174 696f 6e3a 203c 2f70 3e3c ntication:

    <\n+0017cae0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+0017caf0: 656e 7422 3e43 4f4e 4e45 4354 2073 6572 ent\">CONNECT ser\n+0017cb00: 7665 722e 6578 616d 706c 652e 636f 6d3a ver.example.com:\n+0017cb10: 3830 2048 5454 502f 312e 310a 3c2f 7072 80 HTTP/1.1.

    In some ca\n+0017cb30: 7365 732c 2079 6f75 2077 696c 6c20 6e6f ses, you will no\n+0017cb40: 7469 6365 2074 6861 7420 7468 6520 486f tice that the Ho\n+0017cb50: 7374 2048 5454 5020 6865 6164 6572 2075 st HTTP header u\n+0017cb60: 7365 7320 7468 6520 434f 4e4e 4543 5420 ses the CONNECT \n+0017cb70: 7072 6f74 6f63 6f6c 3a20 3c2f 703e 3c70 protocol:

    CONNECT serv\n+0017cba0: 6572 2e65 7861 6d70 6c65 2e63 6f6d 3a38 er.example.com:8\n+0017cbb0: 3020 4854 5450 2f31 2e31 200a 486f 7374 0 HTTP/1.1 .Host\n+0017cbc0: 3a20 7365 7276 6572 2e65 7861 6d70 6c65 : server.example\n+0017cbd0: 2e63 6f6d 3a38 300a 3c2f 7072 653e 3c70 .com:80. .... Back to table\n+0017cc00: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+0017cc10: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Perfor\n+0017cc40: 6d61 6e63 6520 696d 7072 6f76 656d 656e mance improvemen\n+0017cc50: 7420 7469 7073 3c2f 6832 3e0a 3c70 3e48 t tips

    .

    H\n+0017cc60: 6572 6520 6172 6520 736f 6d65 2074 6970 ere are some tip\n+0017cc70: 7320 796f 7520 6361 6e20 7573 6520 746f s you can use to\n+0017cc80: 2073 7065 6564 2075 7020 6753 4f41 502e speed up gSOAP.\n+0017cc90: 2054 6865 2064 6566 6175 6c74 2073 6574 The default set\n+0017cca0: 7469 6e67 7320 6172 6520 6368 6f73 656e tings are chosen\n+0017ccb0: 2074 6f20 6d61 7869 6d69 7a65 2070 6f72 to maximize por\n+0017ccc0: 7461 6269 6c69 7479 2061 6e64 2063 6f6d tability and com\n+0017ccd0: 7061 7469 6269 6c69 7479 2e20 5468 6520 patibility. The \n+0017cce0: 7365 7474 696e 6773 2063 616e 2062 6520 settings can be \n+0017ccf0: 7477 6561 6b65 6420 746f 206f 7074 696d tweaked to optim\n+0017cd00: 697a 6520 7468 6520 7065 7266 6f72 6d61 ize the performa\n+0017cd10: 6e63 6520 6173 2066 6f6c 6c6f 7773 3a3c nce as follows:<\n+0017cd20: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e49 6e63 /p>.

      .
    • Inc\n+0017cd30: 7265 6173 6520 7468 6520 6275 6666 6572 rease the buffer\n+0017cd40: 2073 697a 6520 3c63 6f64 653e 2353 4f41 size #SOA\n+0017cd50: 505f 4255 464c 454e 3c2f 636f 6465 3e20 P_BUFLEN \n+0017cd60: 6279 2063 6861 6e67 696e 6720 7468 6520 by changing the \n+0017cd70: 3c63 6f64 653e 2353 4f41 505f 4255 464c #SOAP_BUFL\n+0017cd80: 454e 3c2f 636f 6465 3e20 6d61 6372 6f20 EN macro \n+0017cd90: 696e 203c 656d 3e3c 636f 6465 3e67 736f in gso\n+0017cda0: 6170 2f73 7464 736f 6170 322e 683c 2f63 ap/stdsoap2.h. Use b\n+0017cdc0: 7566 6665 7220 7369 7a65 2032 5e31 383d uffer size 2^18=\n+0017cdd0: 3236 3231 3434 2066 6f72 2065 7861 6d70 262144 for examp\n+0017cde0: 6c65 2e3c 2f6c 693e 0a3c 6c69 3e55 7365 le.
    • .
    • Use\n+0017cdf0: 2048 5454 5020 6b65 6570 2d61 6c69 7665 HTTP keep-alive\n+0017ce00: 2061 7420 7468 6520 636c 6965 6e74 2d73 at the client-s\n+0017ce10: 6964 652c 2073 6565 2053 6563 7469 6f6e ide, see Section\n+0017ce20: 203c 6120 636c 6173 733d 2265 6c22 2068 TCP a\n+0017ce50: 6e64 2048 5454 5020 6b65 6570 2d61 6c69 nd HTTP keep-ali\n+0017ce60: 7665 3c2f 613e 202c 2077 6865 6e20 7468 ve , when th\n+0017ce70: 6520 636c 6965 6e74 206e 6565 6473 2074 e client needs t\n+0017ce80: 6f20 6d61 6b65 2061 2073 6572 6965 7320 o make a series \n+0017ce90: 6f66 2063 616c 6c73 2074 6f20 7468 6520 of calls to the \n+0017cea0: 7361 6d65 2073 6572 7665 722e 2053 6572 same server. Ser\n+0017ceb0: 7665 722d 7369 6465 206b 6565 702d 616c ver-side keep-al\n+0017cec0: 6976 6520 7375 7070 6f72 7420 6361 6e20 ive support can \n+0017ced0: 6772 6561 746c 7920 696d 7072 6f76 6520 greatly improve \n+0017cee0: 7065 7266 6f72 6d61 6e63 6520 6f66 2062 performance of b\n+0017cef0: 6f74 6820 636c 6965 6e74 2061 6e64 2073 oth client and s\n+0017cf00: 6572 7665 722e 2042 7574 2062 6520 6177 erver. But be aw\n+0017cf10: 6172 6520 7468 6174 2063 6c69 656e 7473 are that clients\n+0017cf20: 2061 6e64 2073 6572 7669 6365 7320 756e and services un\n+0017cf30: 6465 7220 556e 6978 2f4c 696e 7578 2072 der Unix/Linux r\n+0017cf40: 6571 7569 7265 2073 6967 6e61 6c20 6861 equire signal ha\n+0017cf50: 6e64 6c65 7273 2074 6f20 6361 7463 6820 ndlers to catch \n+0017cf60: 6472 6f70 7065 6420 636f 6e6e 6563 7469 dropped connecti\n+0017cf70: 6f6e 732e 3c2f 6c69 3e0a 3c6c 693e 5573 ons.
    • .
    • Us\n+0017cf80: 6520 4854 5450 2063 6875 6e6b 6564 2074 e HTTP chunked t\n+0017cf90: 7261 6e73 6665 7273 2c20 7365 6520 5365 ransfers, see Se\n+0017cfa0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction HT\n+0017cfd0: 5450 2063 6875 6e6b 6564 2074 7261 6e73 TP chunked trans\n+0017cfe0: 6665 7220 656e 636f 6469 6e67 3c2f 613e fer encoding\n+0017cff0: 202e 3c2f 6c69 3e0a 3c6c 693e 446f 206e .
    • .
    • Do n\n+0017d000: 6f74 2075 7365 2067 7a69 7020 636f 6d70 ot use gzip comp\n+0017d010: 7265 7373 696f 6e2c 2073 696e 6365 2074 ression, since t\n+0017d020: 6865 206f 7665 7268 6561 6420 6f66 2063 he overhead of c\n+0017d030: 6f6d 7072 6573 7369 6f6e 2069 7320 7479 ompression is ty\n+0017d040: 7069 6361 6c6c 7920 6869 6768 6572 2074 pically higher t\n+0017d050: 6861 6e20 7468 6520 6261 6e64 7769 6474 han the bandwidt\n+0017d060: 6820 6761 696e 732e 3c2f 6c69 3e0a 3c6c h gains.
    • .Set the \n+0017d080: 2353 4f41 505f 584d 4c5f 5452 4545 3c2f #SOAP_XML_TREE flag to di\n+0017d0a0: 7361 626c 6520 6964 2d72 6566 206d 756c sable id-ref mul\n+0017d0b0: 7469 2d72 6566 206f 626a 6563 7420 7365 ti-ref object se\n+0017d0c0: 7269 616c 697a 6174 696f 6e2e 2054 6869 rialization. Thi\n+0017d0d0: 7320 626f 6f73 7473 2070 6572 666f 726d s boosts perform\n+0017d0e0: 616e 6365 2073 6967 6e69 6669 6361 6e74 ance significant\n+0017d0f0: 6c79 2061 6e64 2077 6f72 6b73 2077 6974 ly and works wit\n+0017d100: 6820 534f 4150 2064 6f63 756d 656e 742f h SOAP document/\n+0017d110: 6c69 7465 7261 6c20 7374 796c 6520 2869 literal style (i\n+0017d120: 2e65 2e20 6e6f 2069 642d 7265 6620 6772 .e. no id-ref gr\n+0017d130: 6170 6820 7365 7269 616c 697a 6174 696f aph serializatio\n+0017d140: 6e20 6173 2072 6571 7569 7265 6420 7769 n as required wi\n+0017d150: 7468 2053 4f41 5020 656e 636f 6469 6e67 th SOAP encoding\n+0017d160: 2073 7479 6c65 292e 2044 6f20 6e6f 7420 style). Do not \n+0017d170: 7573 6520 7468 6973 2066 6f72 2053 4f41 use this for SOA\n+0017d180: 5020 5250 4320 656e 636f 6465 6420 6d65 P RPC encoded me\n+0017d190: 7373 6167 696e 672e 3c2f 6c69 3e0a 3c6c ssaging..Compile gsoap/stdsoa\n+0017d1c0: 7032 2e63 3c2f 636f 6465 3e3c 2f65 6d3e p2.c\n+0017d1d0: 2061 6e64 203c 656d 3e3c 636f 6465 3e67 and g\n+0017d1e0: 736f 6170 2f73 7464 736f 6170 322e 6370 soap/stdsoap2.cp\n+0017d1f0: 703c 2f63 6f64 653e 3c2f 656d 3e20 616e p an\n+0017d200: 6420 616c 6c20 6f74 6865 7220 736f 7572 d all other sour\n+0017d210: 6365 2063 6f64 6573 2077 6974 6820 7468 ce codes with th\n+0017d220: 6520 636f 6d70 696c 6520 7469 6d65 2066 e compile time f\n+0017d230: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n+0017d240: 4e4f 4944 5245 463c 2f63 6f64 653e 2074 NOIDREF t\n+0017d250: 6f20 696d 7072 6f76 6520 7065 7266 6f72 o improve perfor\n+0017d260: 6d61 6e63 6520 6576 656e 2062 6574 7465 mance even bette\n+0017d270: 7220 6279 2070 6572 6d61 6e65 6e74 6c79 r by permanently\n+0017d280: 2064 6973 6162 6c69 6e67 2069 642d 7265 disabling id-re\n+0017d290: 6620 6d75 6c74 692d 7265 6620 6f62 6a65 f multi-ref obje\n+0017d2a0: 6374 2073 6572 6961 6c69 7a61 7469 6f6e ct serialization\n+0017d2b0: 2e20 446f 206e 6f74 2075 7365 2074 6869 . Do not use thi\n+0017d2c0: 7320 666f 7220 534f 4150 2052 5043 2065 s for SOAP RPC e\n+0017d2d0: 6e63 6f64 6564 206d 6573 7361 6769 6e67 ncoded messaging\n+0017d2e0: 2e3c 2f6c 693e 0a3c 6c69 3e44 6f20 6e6f ..
    • Do no\n+0017d2f0: 7420 7573 6520 4445 4255 4720 6d6f 6465 t use DEBUG mode\n+0017d300: 2c20 7369 6e63 6520 7468 6520 6f76 6572 , since the over\n+0017d310: 6865 6164 206f 6620 6c6f 6767 696e 6720 head of logging \n+0017d320: 6973 2073 6967 6e69 6669 6361 6e74 2e3c is significant.<\n+0017d330: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e f09f /li>.
    .

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

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

    .Safety g\n+0017d3a0: 7561 7264 733c 2f68 323e 0a3c 703e 5468 uards

    .

    Th\n+0017d3b0: 6520 666f 6c6c 6f77 696e 6720 7365 7474 e following sett\n+0017d3c0: 696e 6773 2061 7265 2069 6d70 6f72 7461 ings are importa\n+0017d3d0: 6e74 2074 6f20 656e 7375 7265 2074 6861 nt to ensure tha\n+0017d3e0: 7420 584d 4c20 6d65 7373 6167 696e 6720 t XML messaging \n+0017d3f0: 6973 2073 6166 6520 6279 2064 6566 696e is safe by defin\n+0017d400: 696e 6720 7265 6173 6f6e 6162 6c65 2058 ing reasonable X\n+0017d410: 4d4c 206d 6573 7361 6765 2072 6573 7472 ML message restr\n+0017d420: 6963 7469 6f6e 732e 2041 6c73 6f20 6d65 ictions. Also me\n+0017d430: 7373 6167 696e 6720 7469 6d65 6f75 7473 ssaging timeouts\n+0017d440: 2073 686f 756c 6420 6265 2073 6574 2061 should be set a\n+0017d450: 7320 6578 706c 6169 6e65 6420 696e 2053 s explained in S\n+0017d460: 6563 7469 6f6e 203c 6120 636c 6173 733d ection T\n+0017d490: 696d 656f 7574 206d 616e 6167 656d 656e imeout managemen\n+0017d4a0: 7420 666f 7220 6e6f 6e2d 626c 6f63 6b69 t for non-blocki\n+0017d4b0: 6e67 206f 7065 7261 7469 6f6e 733c 2f61 ng operations.

    .

    The XM\n+0017d4d0: 4c20 7061 7273 6572 2069 7320 636f 6e66 L parser is conf\n+0017d4e0: 6967 7572 6564 2074 6f20 7265 7374 7269 igured to restri\n+0017d4f0: 6374 2074 6865 2058 4d4c 206e 6573 7469 ct the XML nesti\n+0017d500: 6e67 2064 6570 7468 206c 6576 656c 2074 ng depth level t\n+0017d510: 6f20 3c63 6f64 653e 2353 4f41 505f 4d41 o #SOAP_MA\n+0017d520: 584c 4556 454c 3c2f 636f 6465 3e20 616e XLEVEL an\n+0017d530: 6420 7265 7374 7269 6374 7320 7468 6520 d restricts the \n+0017d540: 7265 7065 6174 6564 206f 6363 7572 7265 repeated occurre\n+0017d550: 6e63 6520 6f66 2065 6c65 6d65 6e74 7320 nce of elements \n+0017d560: 7468 6174 2061 7265 2064 6573 6572 6961 that are deseria\n+0017d570: 6c69 7a65 6420 696e 746f 2061 7272 6179 lized into array\n+0017d580: 7320 616e 6420 636f 6e74 6169 6e65 7273 s and containers\n+0017d590: 2062 7920 3c63 6f64 653e 2353 4f41 505f by #SOAP_\n+0017d5a0: 4d41 584f 4343 5552 533c 2f63 6f64 653e MAXOCCURS\n+0017d5b0: 2e20 5468 6573 6520 6d61 6372 6f73 2063 . These macros c\n+0017d5c0: 616e 2062 6520 6368 616e 6765 642c 2062 an be changed, b\n+0017d5d0: 7574 2079 6f75 2063 616e 2061 6c73 6f20 ut you can also \n+0017d5e0: 6368 616e 6765 2074 6865 2066 6f6c 6c6f change the follo\n+0017d5f0: 7769 6e67 2063 6f6e 7465 7874 2061 7474 wing context att\n+0017d600: 7269 6275 7465 7320 6174 2072 756e 2d74 ributes at run-t\n+0017d610: 696d 652c 2065 2e67 2e20 746f 2065 6e68 ime, e.g. to enh\n+0017d620: 616e 6365 2074 6865 2073 6166 6574 7920 ance the safety \n+0017d630: 666f 7220 7370 6563 6966 6963 2073 6572 for specific ser\n+0017d640: 7669 6365 2061 6e64 2f6f 7220 636c 6965 vice and/or clie\n+0017d650: 6e74 206f 7065 7261 7469 6f6e 733a 3c2f nt operations:.

      .
    • soap::\n+0017d730: 6d61 786c 6576 656c 3c2f 613e 3c2f 636f maxlevel restricts th\n+0017d750: 6520 584d 4c20 6e65 7374 696e 6720 6465 e XML nesting de\n+0017d760: 7074 6820 6c65 7665 6c2c 2077 6865 7265 pth level, where\n+0017d770: 2074 6865 2064 6566 6175 6c74 2076 616c the default val\n+0017d780: 7565 2069 7320 3c63 6f64 653e 2353 4f41 ue is #SOA\n+0017d790: 505f 4d41 584c 4556 454c 3c2f 636f 6465 P_MAXLEVEL = 10000.
    • .\n+0017d7b0: 3c6c 693e 3c63 6f64 653e 3c61 2063 6c61
    • soap::maxoccur\n+0017d880: 733c 2f61 3e3c 2f63 6f64 653e 2072 6573 s res\n+0017d890: 7472 6963 7473 2074 6865 206e 756d 6265 tricts the numbe\n+0017d8a0: 7220 6f66 2072 6570 6561 7465 6420 6f63 r of repeated oc\n+0017d8b0: 6375 7272 656e 6365 7320 6f66 2065 6c65 currences of ele\n+0017d8c0: 6d65 6e74 7320 7468 6174 2061 7265 2064 ments that are d\n+0017d8d0: 6573 6572 6961 6c69 7a65 6420 696e 746f eserialized into\n+0017d8e0: 2061 7272 6179 7320 616e 6420 7374 7275 arrays and stru\n+0017d8f0: 6374 732c 2077 6865 7265 2074 6865 2064 cts, where the d\n+0017d900: 6566 6175 6c74 2076 616c 7565 2069 7320 efault value is \n+0017d910: 3c63 6f64 653e 2353 4f41 505f 4d41 584f #SOAP_MAXO\n+0017d920: 4343 5552 533c 2f63 6f64 653e 203d 2031 CCURS = 1\n+0017d930: 3030 3030 302e 3c2f 6c69 3e0a 3c6c 693e 00000.
    • .
    • \n+0017d940: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::m\n+0017da00: 6178 6c65 6e67 7468 3c2f 613e 3c2f 636f axlength restricts th\n+0017da20: 6520 6c65 6e67 7468 206f 6620 7374 7269 e length of stri\n+0017da30: 6e67 7320 6465 7365 7269 616c 697a 6564 ngs deserialized\n+0017da40: 2066 726f 6d20 584d 4c2e 2041 207a 6572 from XML. A zer\n+0017da50: 6f20 6f72 206e 6567 6174 6976 6520 7661 o or negative va\n+0017da60: 6c75 6520 6973 2075 6e72 6573 7472 6963 lue is unrestric\n+0017da70: 7465 6420 6c65 6e67 7468 2e20 5768 656e ted length. When\n+0017da80: 2072 6573 7472 6963 7465 642c 2074 6865 restricted, the\n+0017da90: 2058 4d4c 2073 6368 656d 6120 7661 6c69 XML schema vali\n+0017daa0: 6461 7469 6f6e 206d 6178 4c65 6e67 7468 dation maxLength\n+0017dab0: 2074 616b 6573 2070 7265 6365 6465 6e63 takes precedenc\n+0017dac0: 6520 6f76 6572 2074 6869 7320 6c65 6e67 e over this leng\n+0017dad0: 7468 2072 6573 7472 6963 7469 6f6e 2e20 th restriction. \n+0017dae0: 536f 2073 6574 7469 6e67 2061 2073 6d61 So setting a sma\n+0017daf0: 6c6c 6572 2076 616c 7565 2077 696c 6c20 ller value will \n+0017db00: 6e6f 7420 696e 7465 7266 6572 6520 7769 not interfere wi\n+0017db10: 7468 2074 6865 2058 4d4c 2076 616c 6964 th the XML valid\n+0017db20: 6174 696f 6e20 7275 6c65 732e 2054 6865 ation rules. The\n+0017db30: 2064 6566 6175 6c74 2076 616c 7565 2069 default value i\n+0017db40: 7320 3c63 6f64 653e 2353 4f41 505f 4d41 s #SOAP_MA\n+0017db50: 584c 454e 4754 483c 2f63 6f64 653e 203d XLENGTH =\n+0017db60: 2030 2e20 4e6f 7465 2074 6861 7420 7374 0. Note that st\n+0017db70: 7269 6e67 206c 656e 6774 6820 6973 2065 ring length is e\n+0017db80: 7870 7265 7373 6564 2069 6e20 6e75 6d62 xpressed in numb\n+0017db90: 6572 206f 6620 6368 6172 6163 7465 7273 er of characters\n+0017dba0: 2c20 6e6f 7420 6279 7465 732e 2053 6f20 , not bytes. So \n+0017dbb0: 5554 462d 3820 656e 636f 6469 6e67 7320 UTF-8 encodings \n+0017dbc0: 6172 6520 6e6f 7420 7472 756e 6361 7465 are not truncate\n+0017dbd0: 642e 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 d.
    • .
    • soap::\n+0017dca0: 7265 6376 5f6d 6178 6c65 6e67 7468 3c2f recv_maxlength the ma\n+0017dcc0: 7869 6d75 6d20 6c65 6e67 7468 206f 6620 ximum length of \n+0017dcd0: 6d65 7373 6167 6573 2072 6563 6569 7665 messages receive\n+0017dce0: 642c 2032 4742 2062 7920 6465 6661 756c d, 2GB by defaul\n+0017dcf0: 742e 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 t.
    • .
    .XML schema vali\n+0017dd10: 6461 7469 6f6e 2063 6f6e 7374 7261 696e dation constrain\n+0017dd20: 7473 2061 7265 2065 6e66 6f72 6365 6420 ts are enforced \n+0017dd30: 7769 7468 2074 6865 203c 636f 6465 3e23 with the #\n+0017dd40: 534f 4150 5f58 4d4c 5f53 5452 4943 543c SOAP_XML_STRICT<\n+0017dd50: 2f63 6f64 653e 2063 6f6e 7465 7874 2066 /code> context f\n+0017dd60: 6c61 672e 2054 6865 2073 6368 656d 6120 lag. The schema \n+0017dd70: 6d61 784c 656e 6774 6820 7661 6c69 6461 maxLength valida\n+0017dd80: 7469 6f6e 2063 6f6e 7374 7261 696e 7420 tion constraint \n+0017dd90: 6f76 6572 7275 6c65 7320 7468 6520 3c63 overrules the soap::max\n+0017de60: 6c65 6e67 7468 3c2f 613e 3c2f 636f 6465 length guard. The sch\n+0017de80: 656d 6120 6d61 784f 6363 7572 7320 7661 ema maxOccurs va\n+0017de90: 6c69 6461 7469 6f6e 2063 6f6e 7374 7261 lidation constra\n+0017dea0: 696e 7420 646f 6573 206e 6f74 206f 7665 int does not ove\n+0017deb0: 7272 756c 6520 7468 6520 3c63 6f64 653e rrule the \n+0017dec0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ma\n+0017df80: 786f 6363 7572 733c 2f61 3e3c 2f63 6f64 xoccurs guard, so arr\n+0017dfa0: 6179 7320 616e 6420 636f 6e74 6169 6e65 ays and containe\n+0017dfb0: 7273 2061 7265 2061 6c77 6179 7320 7265 rs are always re\n+0017dfc0: 7374 7269 6374 6564 2069 6e20 6c65 6e67 stricted in leng\n+0017dfd0: 7468 2062 7920 7468 6973 2067 7561 7264 th by this guard\n+0017dfe0: 2e3c 2f70 3e0a 3c70 3e4f 7468 6572 2063 .

    .

    Other c\n+0017dff0: 6f6d 7069 6c65 2d74 696d 6520 636f 6e66 ompile-time conf\n+0017e000: 6967 7572 6174 696f 6e20 7365 7474 696e iguration settin\n+0017e010: 6773 2061 7265 3a3c 2f70 3e0a 3c75 6c3e gs are:

    .
      \n+0017e020: 0a3c 6c69 3e3c 636f 6465 3e23 534f 4150 .
    • #SOAP\n+0017e030: 5f4d 4158 414c 4c4f 4353 495a 453c 2f63 _MAXALLOCSIZE the maximum\n+0017e050: 2073 697a 6520 6f66 2061 2062 6c6f 636b size of a block\n+0017e060: 206f 6620 6d65 6d6f 7279 2074 6861 7420 of memory that \n+0017e070: 3c63 6f64 653e 6d61 6c6c 6f63 3c2f 636f malloc can allocate\n+0017e090: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
    • .
    • #SOAP_MAXARRAYS\n+0017e0b0: 495a 453c 2f63 6f64 653e 2074 6865 206d IZE the m\n+0017e0c0: 6178 696d 756d 2061 6c6c 6f63 6174 696f aximum allocatio\n+0017e0d0: 6e20 7468 7265 7368 6f6c 6420 746f 2070 n threshold to p\n+0017e0e0: 7265 2d61 6c6c 6f63 6174 6520 534f 4150 re-allocate SOAP\n+0017e0f0: 2061 7272 6179 7320 696e 206d 656d 6f72 arrays in memor\n+0017e100: 792e 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 y.
    • .
    • #SOAP_MAXDIMES\n+0017e120: 495a 453c 2f63 6f64 653e 2074 6865 206d IZE the m\n+0017e130: 6178 696d 756d 2044 494d 4520 6174 7461 aximum DIME atta\n+0017e140: 6368 6d65 6e74 2073 697a 6520 616c 6c6f chment size allo\n+0017e150: 7765 6420 746f 2072 6563 6569 7665 2e3c wed to receive.<\n+0017e160: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e23 /li>.
    • #\n+0017e170: 534f 4150 5f4d 4158 4549 4e54 523c 2f63 SOAP_MAXEINTR maximum num\n+0017e190: 6265 7220 6f66 2045 494e 5452 2069 6e74 ber of EINTR int\n+0017e1a0: 6572 7275 7074 7320 746f 2069 676e 6f72 errupts to ignor\n+0017e1b0: 6520 7768 696c 6520 706f 6c6c 696e 6720 e while polling \n+0017e1c0: 6120 736f 636b 6574 2066 6f72 2070 656e a socket for pen\n+0017e1d0: 6469 6e67 2061 6374 6976 6974 792e 3c2f ding activity..
    .

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

    .\n+0017e220: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Timeout \n+0017e250: 6d61 6e61 6765 6d65 6e74 2066 6f72 206e management for n\n+0017e260: 6f6e 2d62 6c6f 636b 696e 6720 6f70 6572 on-blocking oper\n+0017e270: 6174 696f 6e73 3c2f 6832 3e0a 3c70 3e53 ations

    .

    S\n+0017e280: 6f63 6b65 7420 636f 6e6e 6563 742c 2061 ocket connect, a\n+0017e290: 6363 6570 742c 2073 656e 642c 2061 6e64 ccept, send, and\n+0017e2a0: 2072 6563 6569 7665 2074 696d 656f 7574 receive timeout\n+0017e2b0: 2076 616c 7565 7320 6361 6e20 6265 2073 values can be s\n+0017e2c0: 6574 2074 6f20 6d61 6e61 6765 2073 6f63 et to manage soc\n+0017e2d0: 6b65 7420 636f 6d6d 756e 6963 6174 696f ket communicatio\n+0017e2e0: 6e20 7469 6d65 6f75 7473 2e20 5468 6520 n timeouts. The \n+0017e2f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0017e3b0: 6170 3a3a 636f 6e6e 6563 745f 7469 6d65 ap::connect_time\n+0017e3c0: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2c20 out, \n+0017e3d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0017e490: 6170 3a3a 6163 6365 7074 5f74 696d 656f ap::accept_timeo\n+0017e4a0: 7574 3c2f 613e 3c2f 636f 6465 3e2c 203c ut, <\n+0017e4b0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0017e560: 703a 3a73 656e 645f 7469 6d65 6f75 743c p::send_timeout<\n+0017e570: 2f61 3e3c 2f63 6f64 653e 2c20 3c63 6f64 /a>, soa\n+0017e630: 703a 3a72 6563 765f 7469 6d65 6f75 743c p::recv_timeout<\n+0017e640: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+0017e650: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::t\n+0017e710: 7261 6e73 6665 725f 7469 6d65 6f75 743c ransfer_timeout<\n+0017e720: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n+0017e730: 7874 2061 7474 7269 6275 7465 7320 6f66 xt attributes of\n+0017e740: 2074 6865 2063 7572 7265 6e74 2063 6f6e the current con\n+0017e750: 7465 7874 203c 636f 6465 3e3c 6120 636c text soap<\n+0017e7b0: 2f63 6f64 653e 2063 616e 2062 6520 7365 /code> can be se\n+0017e7c0: 7420 746f 2074 6865 2061 7070 726f 7072 t to the appropr\n+0017e7d0: 6961 7465 2075 7365 722d 6465 6669 6e65 iate user-define\n+0017e7e0: 6420 736f 636b 6574 2073 656e 642c 2072 d socket send, r\n+0017e7f0: 6563 6569 7665 2c20 616e 6420 6163 6365 eceive, and acce\n+0017e800: 7074 2074 696d 656f 7574 2076 616c 7565 pt timeout value\n+0017e810: 732e 2041 2070 6f73 6974 6976 6520 7661 s. A positive va\n+0017e820: 6c75 6520 6d65 6173 7572 6573 2074 6865 lue measures the\n+0017e830: 2074 696d 656f 7574 2069 6e20 7365 636f timeout in seco\n+0017e840: 6e64 732e 2041 206e 6567 6174 6976 6520 nds. A negative \n+0017e850: 7469 6d65 6f75 7420 7661 6c75 6520 6d65 timeout value me\n+0017e860: 6173 7572 6573 2074 6865 2074 696d 656f asures the timeo\n+0017e870: 7574 2069 6e20 6d69 6372 6f73 6563 6f6e ut in microsecon\n+0017e880: 6473 2028 3130 5e2d 3620 7365 6329 2e3c ds (10^-6 sec).<\n+0017e890: 2f70 3e0a 3c70 3e54 6865 203c 636f 6465 /p>.

    The soap::c\n+0017e960: 6f6e 6e65 6374 5f74 696d 656f 7574 3c2f onnect_timeout specif\n+0017e980: 6965 7320 7468 6520 7469 6d65 6f75 7420 ies the timeout \n+0017e990: 666f 7220 3c63 6f64 653e 736f 6170 5f63 for soap_c\n+0017e9a0: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho\n+0017e9b0: 643c 2f63 6f64 653e 2073 7475 6220 6675 d stub fu\n+0017e9c0: 6e63 7469 6f6e 2063 616c 6c73 2061 6e64 nction calls and\n+0017e9d0: 2066 6f72 2043 2b2b 2070 726f 7879 2063 for C++ proxy c\n+0017e9e0: 6c61 7373 2063 616c 6c73 2e3c 2f70 3e0a lass calls.

    .\n+0017e9f0: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The soap::accep\n+0017eac0: 745f 7469 6d65 6f75 743c 2f61 3e3c 2f63 t_timeout specifies t\n+0017eae0: 6865 2074 696d 656f 7574 2066 6f72 203c he timeout for <\n+0017eaf0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>so\n+0017eb70: 6170 5f61 6363 6570 743c 2f61 3e3c 2f63 ap_accept calls.

    .\n+0017eb90: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The soap::send_\n+0017ec50: 7469 6d65 6f75 743c 2f61 3e3c 2f63 6f64 timeout and soap::re\n+0017ed20: 6376 5f74 696d 656f 7574 3c2f 613e 3c2f cv_timeout specify th\n+0017ed40: 6520 7469 6d65 6f75 7420 666f 7220 6e6f e timeout for no\n+0017ed50: 6e2d 626c 6f63 6b69 6e67 2073 6f63 6b65 n-blocking socke\n+0017ed60: 7420 492f 4f20 6f70 6572 6174 696f 6e73 t I/O operations\n+0017ed70: 2e20 5468 6973 2069 7320 7468 6520 6d61 . This is the ma\n+0017ed80: 7869 6d75 6d20 6465 6c61 7920 6f6e 2074 ximum delay on t\n+0017ed90: 6865 2073 6f63 6b65 7420 6f70 6572 6174 he socket operat\n+0017eda0: 696f 6e20 7065 726d 6974 7465 642e 3c2f ion permitted..

    The \n+0017edc0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::transf\n+0017ee80: 6572 5f74 696d 656f 7574 3c2f 613e 3c2f er_timeout is new sin\n+0017eea0: 6365 2032 2e38 2e34 3820 616e 6420 6c69 ce 2.8.48 and li\n+0017eeb0: 6d69 7473 2074 6865 2074 696d 6520 6120 mits the time a \n+0017eec0: 6d65 7373 6167 6520 7365 6e64 2061 6e64 message send and\n+0017eed0: 2061 206d 6573 7361 6765 2072 6563 6569 a message recei\n+0017eee0: 7665 206f 7065 7261 7469 6f6e 2063 616e ve operation can\n+0017eef0: 2074 616b 652e 2054 6869 7320 7661 6c75 take. This valu\n+0017ef00: 6520 7368 6f75 6c64 2062 6520 7573 6564 e should be used\n+0017ef10: 2069 6e20 636f 6d62 696e 6174 696f 6e20 in combination \n+0017ef20: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap::send_ti\n+0017efe0: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout\n+0017eff0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::recv\n+0017f0b0: 5f74 696d 656f 7574 3c2f 613e 3c2f 636f _timeout for accurate\n+0017f0d0: 2074 696d 656f 7574 2063 6f6e 7472 6f6c timeout control\n+0017f0e0: 2e20 5468 6520 3c63 6f64 653e 3c61 2063 . The soap::recv_m\n+0017f1b0: 6178 6c65 6e67 7468 3c2f 613e 3c2f 636f axlength value when n\n+0017f1d0: 6f6e 2d7a 6572 6f20 6c69 6d69 7473 2074 on-zero limits t\n+0017f1e0: 6865 206c 656e 6774 6820 6f66 206d 6573 he length of mes\n+0017f1f0: 7361 6765 7320 7468 6174 2063 616e 2062 sages that can b\n+0017f200: 6520 7265 6365 6976 6564 2069 6e20 6279 e received in by\n+0017f210: 7465 7320 696e 2074 6f74 616c 2069 6e20 tes in total in \n+0017f220: 6465 636f 6d70 7265 7373 6564 2066 6f72 decompressed for\n+0017f230: 6d20 286d 6573 7361 6765 206c 656e 6774 m (message lengt\n+0017f240: 6820 696e 636c 7564 6573 2048 5454 5020 h includes HTTP \n+0017f250: 6865 6164 6572 7320 616e 6420 4854 5450 headers and HTTP\n+0017f260: 2063 6875 6e6b 2073 697a 6520 6669 656c chunk size fiel\n+0017f270: 6473 292e 2054 6865 2076 616c 7565 206f ds). The value o\n+0017f280: 6620 3c63 6f64 653e 3c61 2063 6c61 7373 f \n+0017f340: 736f 6170 3a3a 7265 6376 5f6d 6178 6c65 soap::recv_maxle\n+0017f350: 6e67 7468 3c2f 613e 3c2f 636f 6465 3e20 ngth \n+0017f360: 6973 2032 4742 2062 7920 6465 6661 756c is 2GB by defaul\n+0017f370: 742e 3c2f 703e 0a3c 703e 4578 616d 706c t.

    .

    Exampl\n+0017f380: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    ..soap-&g\n+0017f640: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;recv_\n+0017f690: 7469 6d65 6f75 743c 2f61 3e20 3d20 3630 timeout = 60\n+0017f6a0: 3b20 3c2f 6469 763e 0a3c 2f64 6976 3e3c ;
    .
    <\n+0017f6b0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0017f6c0: 3c70 3e54 6869 7320 7769 6c6c 2072 6573

    This will res\n+0017f6d0: 756c 7420 696e 2061 2074 696d 656f 7574 ult in a timeout\n+0017f6e0: 2069 6620 6e6f 2064 6174 6120 6361 6e20 if no data can \n+0017f6f0: 6265 2073 656e 6420 696e 2031 3020 7365 be send in 10 se\n+0017f700: 636f 6e64 7320 616e 6420 6e6f 2064 6174 conds and no dat\n+0017f710: 6120 6973 2072 6563 6569 7665 6420 7769 a is received wi\n+0017f720: 7468 696e 2031 3020 7365 636f 6e64 7320 thin 10 seconds \n+0017f730: 6166 7465 7220 696e 6974 6961 7469 6e67 after initiating\n+0017f740: 2061 2073 656e 6420 6f72 2072 6563 6569 a send or recei\n+0017f750: 7665 206f 7065 7261 7469 6f6e 206f 7665 ve operation ove\n+0017f760: 7220 7468 6520 736f 636b 6574 2e20 4120 r the socket. A \n+0017f770: 7661 6c75 6520 6f66 207a 6572 6f20 6469 value of zero di\n+0017f780: 7361 626c 6573 2074 696d 656f 7574 2c20 sables timeout, \n+0017f790: 666f 7220 6578 616d 706c 653a 3c2f 703e for example:

    \n+0017f7a0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+0017f7e0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+0017f850: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .soap-&g\n+0017f900: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;send_\n+0017f950: 7469 6d65 6f75 743c 2f61 3e20 3d20 303b timeout = 0;\n+0017f960: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->recv_time\n+0017fa00: 6f75 743c 2f61 3e20 3d20 303b 2020 3c2f out = 0; .\n+0017fac0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    When \n+0017fae0: 6120 7469 6d65 6f75 7420 6f63 6375 7273 a timeout occurs\n+0017faf0: 2069 6e20 7468 6520 7365 6e64 206f 7220 in the send or \n+0017fb00: 7265 6365 6976 6520 6f70 6572 6174 696f receive operatio\n+0017fb10: 6e73 2c20 6120 3c63 6f64 653e 2353 4f41 ns, a #SOA\n+0017fb20: 505f 454f 463c 2f63 6f64 653e 2065 7863 P_EOF exc\n+0017fb30: 6570 7469 6f6e 2077 696c 6c20 6265 2072 eption will be r\n+0017fb40: 6169 7365 6420 2822 656e 6420 6f66 2066 aised (\"end of f\n+0017fb50: 696c 6520 6f72 206e 6f20 696e 7075 7422 ile or no input\"\n+0017fb60: 292e 204e 6567 6174 6976 6520 7469 6d65 ). Negative time\n+0017fb70: 6f75 7420 7661 6c75 6573 206d 6561 7375 out values measu\n+0017fb80: 7265 2074 696d 656f 7574 7320 696e 206d re timeouts in m\n+0017fb90: 6963 726f 7365 636f 6e64 732c 2066 6f72 icroseconds, for\n+0017fba0: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

    .
    #define uSec *-\n+0017fc00: 3120 3c2f 7370 616e 3e3c 2f64 6976 3e0a 1
    .\n+0017fc10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #de\n+0017fc40: 6669 6e65 206d 5365 6320 2a2d 3130 3030 fine mSec *-1000\n+0017fc50: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0017fc60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0017fc70: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    struct <\n+0017fcb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017fcc0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017fcd0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+0017fce0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+0017fd10: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+0017fd70: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n+0017fd90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0017fdc0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >acc\n+0017fe10: 6570 745f 7469 6d65 6f75 743c 2f61 3e20 ept_timeout \n+0017fe20: 3d20 3130 2075 5365 633b 203c 2f64 6976 = 10 uSec; .
    soap<\n+0017fe70: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->send_timeout = 20 mSec; .
    soa\n+0017ff20: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->recv_timeout<\n+0017ff80: 2f61 3e20 3d20 3230 206d 5365 633b 203c /a> = 20 mSec; <\n+0017ff90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Warning\n+00180080: 3c2f 6474 3e3c 6464 3e4d 616e 7920 4c69
    Many Li\n+00180090: 6e75 7820 7665 7273 696f 6e73 2064 6f20 nux versions do \n+001800a0: 6e6f 7420 7375 7070 6f72 7420 6e6f 6e2d not support non-\n+001800b0: 626c 6f63 6b69 6e67 203c 636f 6465 3e63 blocking c\n+001800c0: 6f6e 6e65 6374 2829 3c2f 636f 6465 3e2e onnect().\n+001800d0: 2054 6865 7265 666f 7265 2c20 7365 7474 Therefore, sett\n+001800e0: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing soap::connect_\n+001801b0: 7469 6d65 6f75 743c 2f61 3e3c 2f63 6f64 timeout for non-block\n+001801d0: 696e 6720 3c63 6f64 653e 736f 6170 5f63 ing soap_c\n+001801e0: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho\n+001801f0: 643c 2f63 6f64 653e 2063 616c 6c73 206d d calls m\n+00180200: 6179 206e 6f74 2077 6f72 6b20 756e 6465 ay not work unde\n+00180210: 7220 4c69 6e75 782e 3c2f 6464 3e0a 3c64 r Linux.
    ..Interrupts (E\n+00180230: 494e 5452 2920 6361 6e20 6166 6665 6374 INTR) can affect\n+00180240: 2074 6865 2062 6c6f 636b 696e 6720 7469 the blocking ti\n+00180250: 6d65 2069 6e20 492f 4f20 6f70 6572 6174 me in I/O operat\n+00180260: 696f 6e73 2e20 5468 6520 6d61 7869 6d75 ions. The maximu\n+00180270: 6d20 6e75 6d62 6572 206f 6620 4549 4e54 m number of EINT\n+00180280: 5220 7468 6174 2077 696c 6c20 6e6f 7420 R that will not \n+00180290: 7472 6967 6765 7220 616e 2065 7272 6f72 trigger an error\n+001802a0: 2069 7320 7365 7420 6279 203c 636f 6465 is set by #SOAP_MAXEINTR<\n+001802c0: 2f63 6f64 653e 2069 6e20 3c65 6d3e 3c63 /code> in gsoap/stdsoa\n+001802e0: 7032 2e68 3c2f 636f 6465 3e3c 2f65 6d3e p2.h\n+001802f0: 2c20 7768 6963 6820 6973 2031 3020 6279 , which is 10 by\n+00180300: 2064 6566 6175 6c74 2e20 4561 6368 2045 default. Each E\n+00180310: 494e 5452 206d 6179 2069 6e63 7265 6173 INTR may increas\n+00180320: 6520 7468 6520 626c 6f63 6b69 6e67 2074 e the blocking t\n+00180330: 696d 6520 6279 2075 7020 746f 206f 6e65 ime by up to one\n+00180340: 2073 6563 6f6e 642c 2075 7020 746f 203c second, up to <\n+00180350: 636f 6465 3e23 534f 4150 5f4d 4158 4549 code>#SOAP_MAXEI\n+00180360: 4e54 523c 2f63 6f64 653e 2073 6563 6f6e NTR
    secon\n+00180370: 6473 2074 6f74 616c 2e3c 2f64 643e 3c2f ds total..

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

    .

    \n+001803e0: 3c2f 613e 0a43 6c6f 7369 6e67 2063 6f6e .Closing con\n+001803f0: 6e65 6374 696f 6e73 2062 7920 666f 7263 nections by forc\n+00180400: 653c 2f68 323e 0a3c 703e 546f 2063 6c6f e

    .

    To clo\n+00180410: 7365 2061 2073 6f63 6b65 7420 636f 6e6e se a socket conn\n+00180420: 6563 7469 6f6e 2062 7920 666f 7263 652c ection by force,\n+00180430: 2079 6f75 2063 616e 2075 7365 203c 636f you can use soap_force_cl\n+00180450: 6f73 6573 6f63 6b28 736f 6170 293c 2f63 osesock(soap), which clos\n+00180470: 6573 2074 6865 2063 6f6e 6e65 6374 696f es the connectio\n+00180480: 6e20 7265 6761 7264 6c65 7373 2069 6620 n regardless if \n+00180490: 6b65 6570 2d61 6c69 7665 2069 7320 6163 keep-alive is ac\n+001804a0: 7469 7665 2e20 4279 2063 6f6e 7472 6173 tive. By contras\n+001804b0: 742c 203c 636f 6465 3e73 6f61 705f 636c t, soap_cl\n+001804c0: 6f73 6573 6f63 6b28 736f 6170 293c 2f63 osesock(soap) only closes\n+001804e0: 2074 6865 2063 6f6e 6e65 6374 696f 6e20 the connection \n+001804f0: 7768 656e 206b 6565 702d 616c 6976 6520 when keep-alive \n+00180500: 6973 206e 6f74 2061 6374 6976 652e 3c2f is not active..

    To force-c\n+00180520: 6c6f 7365 2061 2063 6f6e 6e65 6374 696f lose a connectio\n+00180530: 6e20 6672 6f6d 2061 6e6f 7468 6572 2074 n from another t\n+00180540: 6872 6561 642c 2063 6f6d 7069 6c65 2073 hread, compile s\n+00180550: 7464 736f 6170 322e 6320 6f72 2073 7464 tdsoap2.c or std\n+00180560: 736f 6170 322e 6370 7020 616e 6420 796f soap2.cpp and yo\n+00180570: 7572 2070 726f 6a65 6374 2073 6f75 7263 ur project sourc\n+00180580: 6520 636f 6465 2077 6974 6820 3c63 6f64 e code with #WITH_SELF_PIP\n+001805a0: 453c 2f63 6f64 653e 2074 6f20 656e 6162 E to enab\n+001805b0: 6c65 2074 6869 7320 6665 6174 7572 652e le this feature.\n+001805c0: 2055 7365 203c 636f 6465 3e73 6f61 705f Use soap_\n+001805d0: 636c 6f73 655f 636f 6e6e 6563 7469 6f6e close_connection\n+001805e0: 2873 6f61 7029 3c2f 636f 6465 3e20 6f6e (soap) on\n+001805f0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap<\n+00180650: 2f63 6f64 653e 2063 6f6e 7465 7874 2074 /code> context t\n+00180660: 6861 7420 6d75 7374 2063 6c6f 7365 2e20 hat must close. \n+00180670: 596f 7520 6361 6e20 6d61 6b65 2074 6869 You can make thi\n+00180680: 7320 6361 6c6c 2066 726f 6d20 616e 6f74 s call from anot\n+00180690: 6865 7220 7468 7265 6164 2061 6e64 2070 her thread and p\n+001806a0: 6173 7320 7468 6520 3c63 6f64 653e 3c61 ass the soap contex\n+00180710: 7420 746f 2074 6869 7320 6675 6e63 7469 t to this functi\n+00180720: 6f6e 206f 6620 7468 6520 7468 7265 6164 on of the thread\n+00180730: 2074 6861 7420 6d75 7374 2063 6c6f 7365 that must close\n+00180740: 2063 6f6e 6e65 6374 696f 6e73 2e3c 2f70 connections..

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

    .

    .Socket options\n+001807c0: 2061 6e64 2066 6c61 6773 3c2f 6832 3e0a and flags

    .\n+001807d0: 3c70 3e53 6f63 6b65 7420 636f 6d6d 756e

    Socket commun\n+001807e0: 6963 6174 696f 6e73 2063 616e 2062 6520 ications can be \n+001807f0: 636f 6e74 726f 6c6c 6564 2077 6974 6820 controlled with \n+00180800: 736f 636b 6574 206f 7074 696f 6e73 2061 socket options a\n+00180810: 6e64 2066 6c61 6773 2e20 5468 6520 3c63 nd flags. The \n+00180870: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+00180880: 636f 6e74 6578 7420 666c 6167 7320 6172 context flags ar\n+00180890: 653a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e e:

    .
      .
    • \n+001808a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+00180960: 6170 3a3a 736f 636b 6574 5f66 6c61 6773 ap::socket_flags\n+00180970: 3c2f 613e 3c2f 636f 6465 3e20 746f 2073 to s\n+00180980: 6574 2066 6c61 6773 2066 6f72 2074 6865 et flags for the\n+00180990: 2073 6f63 6b65 7420 3c63 6f64 653e 7365 socket se\n+001809a0: 6e64 3c2f 636f 6465 3e20 616e 6420 3c63 nd and recv \n+001809c0: 6361 6c6c 732e 3c2f 6c69 3e0a 3c6c 693e calls.
    • .
    • \n+001809d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+00180a90: 6170 3a3a 636f 6e6e 6563 745f 666c 6167 ap::connect_flag\n+00180aa0: 733c 2f61 3e3c 2f63 6f64 653e 2074 6f20 s to \n+00180ab0: 7365 7420 636c 6965 6e74 2d73 6964 6520 set client-side \n+00180ac0: 3c63 6f64 653e 7365 7473 6f63 6b6f 7074 setsockopt\n+00180ad0: 3c2f 636f 6465 3e20 3c63 6f64 653e 534f SO\n+00180ae0: 4c5f 534f 434b 4554 3c2f 636f 6465 3e20 L_SOCKET \n+00180af0: 736f 636b 6574 206f 7074 696f 6e73 2077 socket options w\n+00180b00: 6865 6e20 636f 6e6e 6563 7469 6e67 2e3c hen connecting.<\n+00180b10: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e3c /li>.
    • <\n+00180b20: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00180b30: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00180b40: 6d6c 2361 3662 3138 6230 3137 6365 3263 ml#a6b18b017ce2c\n+00180b50: 3737 6163 3262 3633 3331 3436 3930 3934 77ac2b6331469094\n+00180b60: 6465 3539 2220 7469 746c 653d 2255 7365 de59\" title=\"Use\n+00180b70: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n+00180b80: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n+00180b90: 5f53 4f43 4b45 5420 666c 6167 7320 7768 _SOCKET flags wh\n+00180ba0: 656e 2062 696e 6469 6e67 2073 6f61 703a en binding soap:\n+00180bb0: 3a6d 6173 7465 7220 736f 636b 6574 2028 :master socket (\n+00180bc0: 7468 6520 7661 6c75 6520 6973 2030 2062 the value is 0 b\n+00180bd0: 7920 2e2e 2e22 3e73 6f61 703a 3a62 696e y ...\">soap::bin\n+00180be0: 645f 666c 6167 733c 2f61 3e3c 2f63 6f64 d_flags to set server\n+00180c00: 2d73 6964 6520 3c63 6f64 653e 7365 7473 -side sets\n+00180c10: 6f63 6b6f 7074 3c2f 636f 6465 3e20 3c63 ockopt SOL_SOCKET socket opt\n+00180c40: 696f 6e73 2077 6865 6e20 6578 6563 7574 ions when execut\n+00180c50: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing soap_\n+00180cd0: 6269 6e64 3c2f 613e 3c2f 636f 6465 3e2e bind.\n+00180ce0: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
    • .
    • \n+00180cf0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::bi\n+00180db0: 6e64 5f76 366f 6e6c 793c 2f61 3e3c 2f63 nd_v6only set to 1 to\n+00180dd0: 2073 6574 203c 636f 6465 3e73 6574 736f set setso\n+00180de0: 636b 6f70 743c 2f63 6f64 653e 203c 636f ckopt IPPROTO_IPV6<\n+00180e00: 2f63 6f64 653e 203c 636f 6465 3e49 5056 /code> IPV\n+00180e10: 365f 5636 4f4e 4c59 3c2f 636f 6465 3e2e 6_V6ONLY.\n+00180e20: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
    • .
    • \n+00180e30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ac\n+00180ef0: 6365 7074 5f66 6c61 6773 3c2f 613e 3c2f cept_flags to set fla\n+00180f10: 6773 2074 6f20 7468 6520 3c63 6f64 653e gs to the \n+00180f20: 7365 7473 6f63 6b6f 7074 3c2f 636f 6465 setsockopt socket options\n+00180f40: 2077 6865 6e20 6578 6563 7574 696e 6720 when executing \n+00180f50: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s\n+00180fd0: 6f61 705f 6163 6365 7074 3c2f 613e 3c2f oap_accept.
    • ..

      See the ope\n+00181000: 7261 7469 6e67 2073 7973 7465 6d20 6d61 rating system ma\n+00181010: 6e75 616c 2070 6167 6573 206f 6620 3c63 nual pages of send \n+00181030: 616e 6420 3c63 6f64 653e 7265 6376 3c2f and recv for \n+00181050: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::so\n+00181110: 636b 6574 5f66 6c61 6773 3c2f 613e 3c2f cket_flags values and\n+00181130: 2073 6565 2074 6865 206f 7065 7261 7469 see the operati\n+00181140: 6e67 2073 7973 7465 6d20 6d61 6e75 616c ng system manual\n+00181150: 2070 6167 6573 206f 6620 3c63 6f64 653e pages of \n+00181160: 7365 7473 6f63 6b6f 7074 3c2f 636f 6465 setsockopt for soap::connec\n+00181240: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags, soap::bind_fla\n+00181320: 6773 3c2f 613e 3c2f 636f 6465 3e2c 2061 gs, a\n+00181330: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::accept_fl\n+00181400: 6167 733c 2f61 3e3c 2f63 6f64 653e 2028 ags (\n+00181410: 6c65 7665 6c20 3c63 6f64 653e 534f 4c5f level SOL_\n+00181420: 534f 434b 4554 3c2f 636f 6465 3e29 2076 SOCKET) v\n+00181430: 616c 7565 732e 2054 6865 7365 203c 636f alues. These SO_ so\n+00181450: 636b 6574 206f 7074 696f 6e20 666c 6167 cket option flag\n+00181460: 7320 2873 6565 203c 636f 6465 3e73 6574 s (see set\n+00181470: 736f 636b 6f70 743c 2f63 6f64 653e 206d sockopt m\n+00181480: 616e 7561 6c20 7061 6765 7329 2063 616e anual pages) can\n+00181490: 2062 6520 6269 742d 7769 7365 206f 722d be bit-wise or-\n+001814a0: 6564 2074 6f20 7365 7420 6d75 6c74 6970 ed to set multip\n+001814b0: 6c65 2073 6f63 6b65 7420 6f70 7469 6f6e le socket option\n+001814c0: 7320 6174 206f 6e63 652e 3c2f 703e 0a3c s at once.

      .<\n+001814d0: 703e 5468 6520 636c 6965 6e74 2d73 6964 p>The client-sid\n+001814e0: 6520 666c 6167 203c 636f 6465 3e3c 6120 e flag soap::conne\n+001815b0: 6374 5f66 6c61 6773 3c2f 613e 3c2f 636f ct_flags = SO_L\n+001815d0: 494e 4745 523c 2f63 6f64 653e 2069 7320 INGER is \n+001815e0: 7375 7070 6f72 7465 6420 7769 7468 2076 supported with v\n+001815f0: 616c 7565 7320 3c63 6f64 653e 6c5f 6f6e alues l_on\n+00181600: 6f66 663c 2f63 6f64 653e 203d 2031 2061 off = 1 a\n+00181610: 6e64 203c 636f 6465 3e6c 5f6c 696e 6765 nd l_linge\n+00181620: 723c 2f63 6f64 653e 203d 203c 636f 6465 r = soap::l\n+001816f0: 696e 6765 725f 7469 6d65 3c2f 613e 3c2f inger_time. The soap::l\n+001817d0: 696e 6765 725f 7469 6d65 3c2f 613e 3c2f inger_time determines\n+001817f0: 2074 6865 2077 6169 7420 7469 6d65 2028 the wait time (\n+00181800: 7468 6520 7469 6d65 2072 6573 6f6c 7574 the time resolut\n+00181810: 696f 6e20 6973 2073 7973 7465 6d20 6465 ion is system de\n+00181820: 7065 6e64 656e 742c 2074 686f 7567 6820 pendent, though \n+00181830: 6163 636f 7264 696e 6720 746f 2073 6f6d according to som\n+00181840: 6520 6578 7065 7274 7320 6f6e 6c79 207a e experts only z\n+00181850: 6572 6f20 616e 6420 6e6f 6e7a 6572 6f20 ero and nonzero \n+00181860: 7661 6c75 6573 206d 6174 7465 7229 2e20 values matter). \n+00181870: 5468 6520 6c69 6e67 6572 206f 7074 696f The linger optio\n+00181880: 6e20 6361 6e20 6265 2075 7365 6420 746f n can be used to\n+00181890: 206d 616e 6167 6520 7468 6520 6e75 6d62 manage the numb\n+001818a0: 6572 206f 6620 636f 6e6e 6563 7469 6f6e er of connection\n+001818b0: 7320 7468 6174 2072 656d 6169 6e20 696e s that remain in\n+001818c0: 203c 636f 6465 3e54 494d 455f 5741 4954 TIME_WAIT\n+001818d0: 3c2f 636f 6465 3e20 7374 6174 6520 6174 state at\n+001818e0: 2074 6865 2073 6572 7665 7220 7369 6465 the server side\n+001818f0: 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 7861 .

      .

      For exa\n+00181900: 6d70 6c65 2c20 746f 2064 6973 6162 6c65 mple, to disable\n+00181910: 2053 4947 5049 5045 2073 6967 6e61 6c73 SIGPIPE signals\n+00181920: 206f 6e20 556e 6978 2f4c 696e 7578 2070 on Unix/Linux p\n+00181930: 6c61 7466 6f72 6d73 2075 7365 3a20 3c63 latforms use: soap\n+00181a00: 3a3a 736f 636b 6574 5f66 6c61 6773 3c2f ::socket_flags = MSG_NOSIGNAL and/or soap:\n+00181b00: 3a63 6f6e 6e65 6374 5f66 6c61 6773 3c2f :connect_flags = SO_NOSIGPIPE (i.e. clie\n+00181b40: 6e74 2d73 6964 6520 636f 6e6e 6563 7429 nt-side connect)\n+00181b50: 2064 6570 656e 6469 6e67 206f 6e20 796f depending on yo\n+00181b60: 7572 2070 6c61 7466 6f72 6d2e 3c2f 703e ur platform.

      \n+00181b70: 0a3c 703e 5573 6520 3c63 6f64 653e 3c61 .

      Use soap::bind\n+00181c40: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = SO_REU\n+00181c60: 5345 4144 4452 3c2f 636f 6465 3e20 746f SEADDR to\n+00181c70: 2065 6e61 626c 6520 7365 7276 6572 2d73 enable server-s\n+00181c80: 6964 6520 706f 7274 2072 6575 7365 2061 ide port reuse a\n+00181c90: 6e64 206c 6f63 616c 2070 6f72 7420 7368 nd local port sh\n+00181ca0: 6172 696e 6720 2862 7574 2062 6520 6177 aring (but be aw\n+00181cb0: 6172 6520 6f66 2074 6865 2070 6f73 7369 are of the possi\n+00181cc0: 626c 6520 7365 6375 7269 7479 2069 6d70 ble security imp\n+00181cd0: 6c69 6361 7469 6f6e 7320 7375 6368 2061 lications such a\n+00181ce0: 7320 706f 7274 2068 696a 6163 6b69 6e67 s port hijacking\n+00181cf0: 292e 3c2f 703e 0a3c 703e 4e6f 7465 2074 ).

      .

      Note t\n+00181d00: 6861 7420 796f 7520 6861 7665 2061 6363 hat you have acc\n+00181d10: 6573 7320 746f 2074 6865 203c 636f 6465 ess to the soa\n+00181d70: 703c 2f61 3e2d 2667 743b 6d61 7374 6572 p->master\n+00181d80: 3c2f 636f 6465 3e20 736f 636b 6574 2076 socket v\n+00181d90: 616c 7565 2072 6574 7572 6e65 6420 6279 alue returned by\n+00181da0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_bin\n+00181e20: 643c 2f61 3e3c 2f63 6f64 653e 2073 6f20 d so \n+00181e30: 796f 7520 6361 6e20 7365 7420 6d75 6c74 you can set mult\n+00181e40: 6970 6c65 2073 6f63 6b65 7420 6f70 7469 iple socket opti\n+00181e50: 6f6e 7320 6279 2063 616c 6c69 6e67 203c ons by calling <\n+00181e60: 636f 6465 3e73 6574 736f 636b 6f70 743c code>setsockopt<\n+00181e70: 2f63 6f64 653e 2061 7320 666f 6c6c 6f77 /code> as follow\n+00181e80: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

      .
      <\n+00181eb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00181ec0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int sock = soap_\n+00181f30: 6269 6e64 3c2f 613e 283c 6120 636c 6173 bind(\n+00181f60: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, host, port, \n+00182010: 6261 636b 6c6f 6729 3b20 3c2f 6469 763e backlog);
      \n+00182020: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      if<\n+00182050: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_v\n+001820b0: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket(\n+001820c0: 736f 636b 2929 203c 2f64 6976 3e0a 3c64 sock))
      .\n+001820e0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    sets\n+00182100: 6f63 6b6f 7074 2873 6f63 6b2c 202e 2e2e ockopt(sock, ...\n+00182110: 2c20 2e2e 2e2c 202e 2e2e 2c20 2e2e 2e29 , ..., ..., ...)\n+00182120: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    sets\n+00182140: 6f63 6b6f 7074 2873 6f63 6b2c 202e 2e2e ockopt(sock, ...\n+00182150: 2c20 2e2e 2e2c 202e 2e2e 2c20 2e2e 2e29 , ..., ..., ...)\n+00182160: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+00182180: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table\n+001821a0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+001821b0: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    \n+001821e0: 3c2f 613e 0a4f 7665 7272 6964 696e 6720 .Overriding \n+001821f0: 7468 6520 686f 7374 2061 6e64 2070 6f72 the host and por\n+00182200: 7420 746f 2063 6f6e 6e65 6374 3c2f 6832 t to connect.

    To override\n+00182220: 2074 6865 2068 6f73 7420 616e 6420 706f the host and po\n+00182230: 7274 206f 6620 7468 6520 636c 6965 6e74 rt of the client\n+00182240: 2063 6f6e 6e65 6374 696e 6720 746f 2061 connecting to a\n+00182250: 2073 6572 7665 722c 2073 6574 203c 636f server, set soap:\n+00182320: 3a6f 7665 7272 6964 655f 686f 7374 3c2f :override_host and soap\n+00182400: 3a3a 6f76 6572 7269 6465 5f70 6f72 743c ::override_port<\n+00182410: 2f61 3e3c 2f63 6f64 653e 3a3c 2f70 3e0a /a>:

    .\n+00182420: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    s\n+00182470: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->override_ho\n+001824d0: 7374 3c2f 613e 203d 203c 7370 616e 2063 st = "examp\n+00182500: 6c65 2e63 6f6d 2671 756f 743b 3c2f 7370 le.com"; // ho\n+00182530: 7374 206e 616d 6520 6f72 2049 5020 6164 st name or IP ad\n+00182540: 6472 6573 7320 3c2f 7370 616e 3e3c 2f64 dress .
    soa\n+00182590: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->override_port\n+001825f0: 3c2f 613e 203d 2038 303b 2020 2020 2020 = 80; \n+00182600: 2020 2020 2020 3c73 7061 6e20 636c 6173 // p\n+00182620: 6f72 7420 6e75 6d62 6572 2074 6f20 7573 ort number to us\n+00182630: 6520 7768 656e 206f 7665 7272 6964 696e e when overridin\n+00182640: 6720 7468 6520 6164 6472 6573 733c 2f73 g the address
    .
    soap::overri\n+00182700: 6465 5f68 6f73 743c 2f61 3e3c 2f64 6976 de_host
    const char \n+00182730: 2a20 6f76 6572 7269 6465 5f68 6f73 743c * override_host<\n+00182740: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n+00182760: 696e 6162 6c65 2073 7472 696e 6720 746f inable string to\n+00182770: 206f 7665 7272 6964 6520 7468 6520 686f override the ho\n+00182780: 7374 206e 616d 6520 6f72 2049 5020 6164 st name or IP ad\n+00182790: 6472 6573 7320 696e 2074 6865 2048 5454 dress in the HTT\n+001827a0: 5020 6865 6164 6572 2077 6865 6e20 636f P header when co\n+001827b0: 6e6e 6563 7469 6e67 2061 7420 742e 2e2e nnecting at t...\n+001827c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+001827e0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+001827f0: 6f61 7032 2e68 3a34 3035 343c 2f64 6976 oap2.h:4054
    .
    int override_p\n+001828e0: 6f72 743c 2f64 6976 3e3c 6469 7620 636c ort
    User\n+00182900: 2d64 6566 696e 6162 6c65 2070 6f72 7420 -definable port \n+00182910: 6e75 6d62 6572 2074 6f20 6f76 6572 7269 number to overri\n+00182920: 6465 2074 6865 2070 6f72 7420 6164 6472 de the port addr\n+00182930: 6573 7320 696e 2074 6865 2048 5454 5020 ess in the HTTP \n+00182940: 6865 6164 6572 2077 6865 6e20 636f 6e6e header when conn\n+00182950: 6563 7469 6e67 2061 7420 7468 6520 636c ecting at the cl\n+00182960: 692e 2e2e 3c2f 6469 763e 3c64 6976 2063 i...
    \n+00182980: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00182990: 7374 6473 6f61 7032 2e68 3a34 3035 393c stdsoap2.h:4059<\n+001829a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    .... Back to t\n+001829e0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n+001829f0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .Secure We\n+00182a30: 6220 7365 7276 6963 6573 2077 6974 6820 b services with \n+00182a40: 4854 5450 533c 2f68 323e 0a3c 703e 546f HTTPS

    .

    To\n+00182a50: 2065 6e61 626c 6520 5353 4c20 666f 7220 enable SSL for \n+00182a60: 7374 616e 642d 616c 6f6e 6520 6753 4f41 stand-alone gSOA\n+00182a70: 5020 5765 6220 7365 7276 6572 732c 2066 P Web servers, f\n+00182a80: 6972 7374 2069 6e73 7461 6c6c 204f 7065 irst install Ope\n+00182a90: 6e53 534c 2061 6e64 2075 7365 206f 7074 nSSL and use opt\n+00182aa0: 696f 6e20 7468 6520 636f 6d70 696c 652d ion the compile-\n+00182ab0: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag \n+00182ac0: 2357 4954 485f 4f50 454e 5353 4c3c 2f63 #WITH_OPENSSL to compile \n+00182ae0: 7468 6520 736f 7572 6365 7320 7769 7468 the sources with\n+00182af0: 2079 6f75 7220 4320 6f72 2043 2b2b 2063 your C or C++ c\n+00182b00: 6f6d 7069 6c65 7220 286f 7220 7573 6520 ompiler (or use \n+00182b10: 7468 6520 636f 6d70 696c 652d 7469 6d65 the compile-time\n+00182b20: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT\n+00182b30: 485f 474e 5554 4c53 3c2f 636f 6465 3e20 H_GNUTLS \n+00182b40: 6966 2079 6f75 2070 7265 6665 7220 474e if you prefer GN\n+00182b50: 5554 4c53 292c 2066 6f72 2065 7861 6d70 UTLS), for examp\n+00182b60: 6c65 3a20 3c2f 703e 3c70 7265 2063 6c61 le:

     c\n+00182b80: 2b2b 202d 4457 4954 485f 4f50 454e 5353  ++ -DWITH_OPENSS\n+00182b90: 4c20 2d6f 206d 7970 726f 6720 6d79 7072  L -o myprog mypr\n+00182ba0: 6f67 2e63 7070 2073 7464 736f 6170 322e  og.cpp stdsoap2.\n+00182bb0: 6370 7020 736f 6170 432e 6370 7020 736f  cpp soapC.cpp so\n+00182bc0: 6170 5365 7276 6572 2e63 7070 202d 6c73  apServer.cpp -ls\n+00182bd0: 736c 202d 6c63 7279 7074 6f0a 3c2f 7072  sl -lcrypto.

    With GNUTL\n+00182bf0: 533a 203c 2f70 3e3c 7072 6520 636c 6173 S:

     c+\n+00182c10: 2b20 2d44 5749 5448 5f47 4e55 544c 5320  + -DWITH_GNUTLS \n+00182c20: 2d6f 206d 7970 726f 6720 6d79 7072 6f67  -o myprog myprog\n+00182c30: 2e63 7070 2073 7464 736f 6170 322e 6370  .cpp stdsoap2.cp\n+00182c40: 7020 736f 6170 432e 6370 7020 736f 6170  p soapC.cpp soap\n+00182c50: 5365 7276 6572 2e63 7070 202d 6c67 6e75  Server.cpp -lgnu\n+00182c60: 746c 7320 2d6c 6763 7279 7074 202d 6c67  tls -lgcrypt -lg\n+00182c70: 7067 2d65 7272 6f72 0a3c 2f70 7265 3e3c  pg-error.
    <\n+00182c80: 703e 2053 534c 2073 7570 706f 7274 2066 p> SSL support f\n+00182c90: 6f72 2073 7461 6e64 2d61 6c6f 6e65 2067 or stand-alone g\n+00182ca0: 534f 4150 2057 6562 2073 6572 7669 6365 SOAP Web service\n+00182cb0: 7320 6973 2065 6e61 626c 6564 2062 7920 s is enabled by \n+00182cc0: 6361 6c6c 696e 6720 3c63 6f64 653e 3c61 calling \n+00182d40: 736f 6170 5f73 736c 5f61 6363 6570 743c soap_ssl_accept<\n+00182d50: 2f61 3e3c 2f63 6f64 653e 2074 6f20 7065 /a> to pe\n+00182d60: 7266 6f72 6d20 7468 6520 5353 4c2f 544c rform the SSL/TL\n+00182d70: 5320 6861 6e64 7368 616b 6520 6166 7465 S handshake afte\n+00182d80: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap_accept\n+00182e10: 3c2f 636f 6465 3e2e 2049 6e20 6164 6469 . In addi\n+00182e20: 7469 6f6e 2c20 6120 6b65 7920 6669 6c65 tion, a key file\n+00182e30: 2c20 6120 4341 2066 696c 6520 286f 7220 , a CA file (or \n+00182e40: 7061 7468 2074 6f20 6365 7274 6966 6963 path to certific\n+00182e50: 6174 6573 292c 2044 4820 6669 6c65 2028 ates), DH file (\n+00182e60: 6966 2052 5341 2069 7320 6e6f 7420 7573 if RSA is not us\n+00182e70: 6564 292c 2061 6e64 2070 6173 7377 6f72 ed), and passwor\n+00182e80: 6420 6e65 6564 2074 6f20 6265 2073 7570 d need to be sup\n+00182e90: 706c 6965 642e 2049 6e73 7472 7563 7469 plied. Instructi\n+00182ea0: 6f6e 7320 6f6e 2068 6f77 2074 6f20 646f ons on how to do\n+00182eb0: 2074 6869 7320 6361 6e20 6265 2066 6f75 this can be fou\n+00182ec0: 6e64 2069 6e20 7468 6520 4f70 656e 5353 nd in the OpenSS\n+00182ed0: 4c20 646f 6375 6d65 6e74 6174 696f 6e20 L documentation \n+00182ee0: 3c61 2068 7265 663d 2268 7474 703a 2f2f http://www.open\n+00182f10: 7373 6c2e 6f72 673c 2f61 3e2e 2053 6565 ssl.org. See\n+00182f20: 2061 6c73 6f20 5365 6374 696f 6e20 3c61 also Section SSL certificat\n+00182f60: 6573 2061 6e64 206b 6579 2066 696c 6573 es and key files\n+00182f70: 3c2f 613e 202e 3c2f 703e 0a3c 703e 4c65 .

    .

    Le\n+00182f80: 7427 7320 7461 6b65 2061 206c 6f6f 6b20 t's take a look \n+00182f90: 6174 2061 6e20 6578 616d 706c 6520 5353 at an example SS\n+00182fa0: 4c20 7365 6375 7265 206d 756c 7469 2d74 L secure multi-t\n+00182fb0: 6872 6561 6465 6420 7374 616e 642d 616c hreaded stand-al\n+00182fc0: 6f6e 6520 534f 4150 2057 6562 2053 6572 one SOAP Web Ser\n+00182fd0: 7669 6365 3a3c 2f70 3e0a 3c64 6976 2063 vice:

    .
    \n+00182ff0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n+00183020: 2f73 7061 6e3e 206d 6169 6e28 2920 3c2f /span> main() .
    {
    .<\n+00183050: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00183060: 3e20 203c 6120 636c 6173 733d 2263 6f64 > SOAP_SOCKET\n+001830c0: 3c2f 613e 206d 2c20 733b 203c 2f64 6976 m, s; .
    THREA\n+00183140: 445f 5459 5045 3c2f 613e 2074 6964 3b20 D_TYPE tid; \n+00183150: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n+00183190: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001831a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001831b0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001831c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, *tsoap; .
    soap_ssl_\n+00183290: 696e 6974 3c2f 613e 2829 3b20 3c73 7061 init(); /* init OpenSS\n+001832c0: 4c20 2873 6b69 7070 696e 6720 7468 6973 L (skipping this\n+001832d0: 206f 7220 6361 6c6c 696e 6720 6d75 6c74 or calling mult\n+001832e0: 6970 6c65 2074 696d 6573 2069 7320 4f4b iple times is OK\n+001832f0: 2c20 7369 6e63 6520 7468 6520 656e 6769 , since the engi\n+00183300: 6e65 2077 696c 6c20 696e 6974 2053 534c ne will init SSL\n+00183310: 2061 7574 6f6d 6174 6963 616c 6c79 2920 automatically) \n+00183320: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
    .\n+00183330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    /* soa\n+00183360: 705f 7373 6c5f 6e6f 696e 6974 2829 3b20 p_ssl_noinit(); \n+00183370: 2a2f 3c2f 7370 616e 3e20 3c73 7061 6e20 */ \n+00183390: 2f2a 2064 6f20 6e6f 7420 696e 6974 204f /* do not init O\n+001833a0: 7065 6e53 534c 2028 6966 2053 534c 2069 penSSL (if SSL i\n+001833b0: 7320 616c 7265 6164 7920 696e 6974 6961 s already initia\n+001833c0: 6c69 7a65 6420 656c 7365 7768 6572 6520 lized elsewhere \n+001833d0: 696e 2074 6869 7320 6170 706c 6963 6174 in this applicat\n+001833e0: 696f 6e29 202a 2f3c 2f73 7061 6e3e 3c2f ion) */.
    if (C\n+00183480: 5259 5054 4f5f 7468 7265 6164 5f73 6574 RYPTO_thread_set\n+00183490: 7570 3c2f 613e 2829 2920 3c73 7061 6e20 up()) \n+001834b0: 2f2a 204f 7065 6e53 534c 2074 6872 6561 /* OpenSSL threa\n+001834c0: 6420 6d75 7465 7820 7365 7475 7020 2a2f d mutex setup */\n+001834d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001834f0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+00183510: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n+00183520: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00183540: 743b 4361 6e6e 6f74 2073 6574 7570 2074 t;Cannot setup t\n+00183550: 6872 6561 6420 6d75 7465 785c 6e26 7175 hread mutex\\n&qu\n+00183560: 6f74 3b3c 2f73 7061 6e3e 293b 203c 2f64 ot;); .
    exit(E\n+00183590: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    } .
    soa\n+00183600: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+00183660: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); .
    if (so\n+00183700: 6170 5f73 736c 5f73 6572 7665 725f 636f ap_ssl_server_co\n+00183710: 6e74 6578 743c 2f61 3e28 3c61 2063 6c61 ntext(soap, .
    SOAP_SS\n+001837c0: 4c5f 4445 4641 554c 543c 2f61 3e2c 203c L_DEFAULT, <\n+001837d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    "se\n+00183810: 7276 6572 2e70 656d 2671 756f 743b 3c2f rver.pem", /* keyfile: re\n+00183850: 7175 6972 6564 2077 6865 6e20 7365 7276 quired when serv\n+00183860: 6572 206d 7573 7420 6175 7468 656e 7469 er must authenti\n+00183870: 6361 7465 2074 6f20 636c 6965 6e74 7320 cate to clients \n+00183880: 2873 6565 2053 534c 2064 6f63 7320 6f6e (see SSL docs on\n+00183890: 2068 6f77 2074 6f20 6f62 7461 696e 2074 how to obtain t\n+001838a0: 6869 7320 6669 6c65 2920 2a2f 3c2f 7370 his file) */
    .
    \n+001838d0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+001838f0: 6f74 3b70 6173 7377 6f72 6426 7175 6f74 ot;password"\n+00183900: 3b3c 2f73 7061 6e3e 2c20 2020 2020 2020 ;, \n+00183910: 203c 7370 616e 2063 6c61 7373 3d22 636f /* passwo\n+00183930: 7264 2074 6f20 7265 6164 2074 6865 206b rd to read the k\n+00183940: 6579 2066 696c 6520 286e 6f74 2075 7365 ey file (not use\n+00183950: 6420 7769 7468 2047 4e55 544c 5329 202a d with GNUTLS) *\n+00183960: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n+00183970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    "cacert.p\n+001839b0: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em",\n+001839c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* o\n+001839e0: 7074 696f 6e61 6c20 6361 6365 7274 2066 ptional cacert f\n+001839f0: 696c 6520 746f 2073 746f 7265 2074 7275 ile to store tru\n+00183a00: 7374 6564 2063 6572 7469 6669 6361 7465 sted certificate\n+00183a10: 7320 2a2f 3c2f 7370 616e 3e20 3c2f 6469 s */ .
    NULL, \n+00183a40: 2020 2020 2020 2020 2020 2020 3c73 7061 /* optional ca\n+00183a70: 7061 7468 2074 6f20 6469 7265 6374 6f72 path to director\n+00183a80: 7920 7769 7468 2074 7275 7374 6564 2063 y with trusted c\n+00183a90: 6572 7469 6669 6361 7465 7320 2a2f 3c2f ertificates */
    . \n+00183ac0: 2020 203c 7370 616e 2063 6c61 7373 3d22 &\n+00183ae0: 7175 6f74 3b64 6835 3132 2e70 656d 2671 quot;dh512.pem&q\n+00183af0: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n+00183b00: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* DH f\n+00183b20: 696c 6520 6e61 6d65 206f 7220 4448 206b ile name or DH k\n+00183b30: 6579 206c 656e 2062 6974 7320 286d 696e ey len bits (min\n+00183b40: 696d 756d 2069 7320 3531 322c 2065 2e67 imum is 512, e.g\n+00183b50: 2e20 2671 756f 743b 3531 3226 7175 6f74 . "512"\n+00183b60: 3b29 2074 6f20 6765 6e65 7261 7465 2044 ;) to generate D\n+00183b70: 4820 7061 7261 6d2c 2069 6620 4e55 4c4c H param, if NULL\n+00183b80: 2075 7365 2052 5341 202a 2f3c 2f73 7061 use RSA */
    .
    \n+00183bb0: 4e55 4c4c 2c20 2020 2020 2020 2020 2020 NULL, \n+00183bc0: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* if r\n+00183be0: 616e 6466 696c 6521 3d4e 554c 4c3a 2075 andfile!=NULL: u\n+00183bf0: 7365 2061 2066 696c 6520 7769 7468 2072 se a file with r\n+00183c00: 616e 646f 6d20 6461 7461 2074 6f20 7365 andom data to se\n+00183c10: 6564 2072 616e 646f 6d6e 6573 7320 2a2f ed randomness */\n+00183c20: 3c2f 7370 616e 3e20 203c 2f64 6976 3e0a
    .\n+00183c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    NULL \n+00183c50: 2020 2020 2020 2020 203c 7370 616e 2063 /\n+00183c70: 2a20 6f70 7469 6f6e 616c 2073 6572 7665 * optional serve\n+00183c80: 7220 6964 656e 7469 6669 6361 7469 6f6e r identification\n+00183c90: 2074 6f20 656e 6162 6c65 2053 534c 2073 to enable SSL s\n+00183ca0: 6573 7369 6f6e 2063 6163 6869 6e67 2074 ession caching t\n+00183cb0: 6f20 7370 6565 6420 7570 2054 4c53 2028 o speed up TLS (\n+00183cc0: 6d75 7374 2062 6520 6120 756e 6971 7565 must be a unique\n+00183cd0: 206e 616d 6529 202a 2f3c 2f73 7061 6e3e name) */\n+00183ce0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    )) .
    {
    \n+00183d20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n+00183d90: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n+00183da0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00183db0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00183dc0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00183dd0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n+00183de0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXIT_\n+00183e00: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
    \n+00183e10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+00183e40: 2020 6d20 3d20 3c61 2063 6c61 7373 3d22 m = soap_bind<\n+00183ea0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00183ed0: 2f61 3e2c 204e 554c 4c2c 2031 3830 3030 /a>, NULL, 18000\n+00183ee0: 2c20 4241 434b 4c4f 4729 3b20 3c73 7061 , BACKLOG); /* use port 18\n+00183f10: 3030 3020 2a2f 3c2f 7370 616e 3e3c 2f64 000 */.\n+00183fd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+00184000: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print\n+00184060: 5f66 6175 6c74 3c2f 613e 283c 6120 636c _fault(soap, stde\n+001840a0: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
    . \n+001840c0: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL\n+001840d0: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
    . \n+001840f0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    fp\n+00184110: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, "\n+00184140: 536f 636b 6574 2063 6f6e 6e65 6374 696f Socket connectio\n+00184150: 6e20 7375 6363 6573 7366 756c 3a20 6d61 n successful: ma\n+00184160: 7374 6572 2073 6f63 6b65 7420 3d20 2564 ster socket = %d\n+00184170: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n+00184180: 206d 293b 203c 2f64 6976 3e0a 3c64 6976 m);
    . \n+001841a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 while<\n+001841c0: 2f73 7061 6e3e 2028 3129 3c2f 6469 763e /span> (1)
    \n+001841d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n+00184200: 2020 2073 203d 203c 6120 636c 6173 733d s = soap_acce\n+00184260: 7074 3c2f 613e 283c 6120 636c 6173 733d pt(so\n+00184290: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
    .\n+001842a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    fprintf(st\n+001842c0: 6465 7272 2c20 3c73 7061 6e20 636c 6173 derr, "Socket c\n+001842f0: 6f6e 6e65 6374 696f 6e20 7375 6363 6573 onnection succes\n+00184300: 7366 756c 3a20 736c 6176 6520 736f 636b sful: slave sock\n+00184310: 6574 203d 2025 645c 6e26 7175 6f74 3b3c et = %d\\n"<\n+00184320: 2f73 7061 6e3e 2c20 7329 3b20 3c2f 6469 /span>, s); .
    if (!<\n+00184370: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00184380: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00184390: 705f 5f73 6f61 702e 6874 6d6c 2367 6161 p__soap.html#gaa\n+001843a0: 6165 3837 3437 6634 6364 6163 6565 3537 ae8747f4cdacee57\n+001843b0: 3538 3735 6333 6132 3438 3864 3939 6322 5875c3a2488d99c\"\n+001843c0: 3e73 6f61 705f 7661 6c69 645f 736f 636b >soap_valid_sock\n+001843d0: 6574 3c2f 613e 2873 2929 203c 2f64 6976 et(s)) .
    {
    .\n+00184400: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (soap->\n+00184470: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;errnum\n+001844c0: 3c2f 613e 2920 3c73 7061 6e20 636c 6173 ) /* a\n+001844e0: 6363 6570 7420 6661 696c 6564 2c20 7472 ccept failed, tr\n+001844f0: 7920 6167 6169 6e20 6166 7465 7220 3120 y again after 1 \n+00184500: 7365 636f 6e64 202a 2f3c 2f73 7061 6e3e second */\n+00184510: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {\n+00184530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+00184550: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+001845b0: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n+001845e0: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n+001845f0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+00184610: 2020 2020 736c 6565 7028 3129 3b3c 2f64 sleep(1);.
    continue\n+00184660: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; /\n+00184680: 2a20 7265 7472 7920 2a2f 3c2f 7370 616e * retry */
    .
    \n+001846b0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    \n+001846d0: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n+001846e0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00184700: 743b 5365 7276 6572 2074 696d 6564 206f t;Server timed o\n+00184710: 7574 5c6e 2671 756f 743b 3c2f 7370 616e ut\\n");
    .
    \n+00184740: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n+00184760: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
    \n+00184770: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+00184790: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    tsoap = soap_copy\n+00184810: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00184840: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    ..\n+001849a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+001849c0: 7768 696c 653c 2f73 7061 6e3e 2028 3c61 while (THREAD_CREATE\n+00184a30: 3c2f 613e 2826 616d 703b 7469 642c 2028 (&tid, (\n+00184a40: 3c73 7061 6e20 636c 6173 733d 226b 6579 void*(*)(void*\n+00184a90: 2929 2661 6d70 3b70 726f 6365 7373 5f72 ))&process_r\n+00184aa0: 6571 7565 7374 2c20 283c 7370 616e 2063 equest, (void*)\n+00184ad0: 7473 6f61 7029 293c 2f64 6976 3e0a 3c64 tsoap))
    .\n+00184af0: 2020 2020 2020 2020 736c 6565 7028 3129 sleep(1)\n+00184b00: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; /* faile\n+00184b20: 642c 2074 7279 2061 6761 696e 202a 2f3c d, try again */<\n+00184b30: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00184b50: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    ..
    void \n+00184dc0: 2a70 726f 6365 7373 5f72 6571 7565 7374 *process_request\n+00184dd0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (void<\n+00184df0: 2f73 7061 6e3e 202a 7473 6f61 7029 203c /span> *tsoap) <\n+00184e00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+00184e20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n+00184e50: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+00184e80: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+00184eb0: 736f 6170 3c2f 613e 203d 2028 3c73 7061 soap = (struct \n+00184ee0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap*\n+00184f10: 2974 736f 6170 3b3c 2f64 6976 3e0a 3c64 )tsoap;
    .\n+00184f30: 2020 3c61 2063 6c61 7373 3d22 636f 6465 THREAD_DE\n+00184f90: 5441 4348 3c2f 613e 283c 6120 636c 6173 TACH(TH\n+00184ff0: 5245 4144 5f49 443c 2f61 3e29 3b20 3c2f READ_ID); .
    if (s\n+00185090: 6f61 705f 7373 6c5f 6163 6365 7074 3c2f oap_ssl_accept(soap))
    . \n+001850f0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n+00185150: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap, stder\n+00185190: 7229 3b20 3c2f 6469 763e 0a3c 6469 7620 r);
    .
    <\n+001851b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001851c0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n+001851f0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_serve\n+00185250: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00185280: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_destroy<\n+00185300: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00185330: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n+00185350: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_end(soap);
    . \n+00185400: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_free(soap);
    .
    int \n+001855e0: 736f 6170 5f73 736c 5f73 6572 7665 725f soap_ssl_server_\n+001855f0: 636f 6e74 6578 7428 7374 7275 6374 2073 context(struct s\n+00185600: 6f61 7020 2a73 6f61 702c 2073 6f61 705f oap *soap, soap_\n+00185610: 7373 6c5f 666c 6167 7320 666c 6167 732c ssl_flags flags,\n+00185620: 2063 6f6e 7374 2063 6861 7220 2a6b 6579 const char *key\n+00185630: 6669 6c65 2c20 636f 6e73 7420 6368 6172 file, const char\n+00185640: 202a 7061 7373 776f 7264 2c20 636f 6e73 *password, cons\n+00185650: 7420 6368 6172 202a 6361 6669 6c65 2c20 t char *cafile, \n+00185660: 636f 6e73 7420 6368 6172 202a 6361 7061 const char *capa\n+00185670: 7468 2c20 636f 6e73 7420 6368 6172 202a th, const char *\n+00185680: 6468 6669 6c65 2c20 636f 6e73 7420 6368 dhfile, const ch\n+00185690: 6172 202a 7261 6e64 6669 6c65 2c20 636f ar *randfile, co\n+001856a0: 6e73 7420 6368 6172 202a 7369 6429 3c2f nst char *sid)
    Initializ\n+001856d0: 6520 7468 6520 7365 7276 6572 2d73 6964 e the server-sid\n+001856e0: 6520 5353 4c2f 544c 5320 636f 6e74 6578 e SSL/TLS contex\n+001856f0: 742e 3c2f 6469 763e 3c2f 6469 763e 0a3c t.
    .<\n+00185700: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00185710: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+00185720: 705f 5f73 736c 5f68 746d 6c5f 6761 3537 p__ssl_html_ga57\n+00185730: 3062 3236 3261 6339 6435 3566 6335 3039 0b262ac9d55fc509\n+00185740: 6631 6635 3939 3964 6561 6131 3866 223e f1f5999deaa18f\">\n+00185750: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 <\n+001857c0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+001857d0: 6922 3e76 6f69 6420 736f 6170 5f73 736c i\">void soap_ssl\n+001857e0: 5f69 6e69 7428 766f 6964 293c 2f64 6976 _init(void)
    Initialize t\n+00185810: 6865 2053 534c 2f54 4c53 206c 6962 7261 he SSL/TLS libra\n+00185820: 7279 2e3c 2f64 6976 3e3c 2f64 6976 3e0a ry.
    .\n+00185830: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    SOAP_SS\n+001858e0: 4c5f 4445 4641 554c 543c 2f61 3e3c 2f64 L_DEFAULT
    #define S\n+00185910: 4f41 505f 5353 4c5f 4445 4641 554c 543c OAP_SSL_DEFAULT<\n+00185920: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_ssl\n+00185940: 5f66 6c61 6773 2066 6c61 6720 7769 7468 _flags flag with\n+00185950: 2023 534f 4150 5f53 534c 5f52 4551 5549 #SOAP_SSL_REQUI\n+00185960: 5245 5f53 4552 5645 525f 4155 5448 454e RE_SERVER_AUTHEN\n+00185970: 5449 4341 5449 4f4e 2061 6e64 2023 534f TICATION and #SO\n+00185980: 4150 5f54 4c53 7631 2065 6e61 626c 6564 AP_TLSv1 enabled\n+00185990: 2062 7920 6465 6661 756c 743c 2f64 6976 by default
    Definitio\n+001859c0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+001859d0: 683a 3538 3236 3c2f 6469 763e 3c2f 6469 h:5826
    .
    i\n+00185ac0: 6e74 2043 5259 5054 4f5f 7468 7265 6164 nt CRYPTO_thread\n+00185ad0: 5f63 6c65 616e 7570 2829 3c2f 6469 763e _cleanup()
    \n+00185ae0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Cleanup funct\n+00185b00: 696f 6e20 666f 7220 4f70 656e 5353 4c20 ion for OpenSSL \n+00185b10: 7665 7273 696f 6e73 2070 7269 6f72 2074 versions prior t\n+00185b20: 6f20 312e 312e 312e 3c2f 6469 763e 3c2f o 1.1.1.
    .\n+00185c70: 0a3c 6469 7620 636c 6173 733d 2274 7463 .

    The \n+00185e10: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_ss\n+00185ea0: 6c5f 7365 7276 6572 5f63 6f6e 7465 7874 l_server_context\n+00185eb0: 3c2f 613e 3c2f 636f 6465 3e20 6675 6e63 func\n+00185ec0: 7469 6f6e 2069 6e69 7469 616c 697a 6573 tion initializes\n+00185ed0: 2074 6865 2073 6572 7665 722d 7369 6465 the server-side\n+00185ee0: 2053 534c 2063 6f6e 7465 7874 2e20 5468 SSL context. Th\n+00185ef0: 6520 3c65 6d3e 3c63 6f64 653e 7365 7276 e serv\n+00185f00: 6572 2e70 656d 3c2f 636f 6465 3e3c 2f65 er.pem key file is t\n+00185f20: 6865 2073 6572 7665 7227 7320 7072 6976 he server's priv\n+00185f30: 6174 6520 6b65 7920 636f 6e63 6174 656e ate key concaten\n+00185f40: 6174 6564 2077 6974 6820 6974 7320 6365 ated with its ce\n+00185f50: 7274 6966 6963 6174 652e 2054 6865 203c rtificate. The <\n+00185f60: 656d 3e3c 636f 6465 3e63 6163 6572 742e em>cacert.\n+00185f70: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e20 pem \n+00185f80: 6973 2075 7365 6420 746f 2061 7574 6865 is used to authe\n+00185f90: 6e74 6963 6174 6520 636c 6965 6e74 7320 nticate clients \n+00185fa0: 616e 6420 636f 6e74 6169 6e73 2074 6865 and contains the\n+00185fb0: 2063 6c69 656e 7420 6365 7274 6966 6963 client certific\n+00185fc0: 6174 6573 2e20 416c 7465 726e 6174 6976 ates. Alternativ\n+00185fd0: 656c 7920 6120 6469 7265 6374 6f72 7920 ely a directory \n+00185fe0: 6e61 6d65 2063 616e 2062 6520 7370 6563 name can be spec\n+00185ff0: 6966 6965 642e 2054 6869 7320 6469 7265 ified. This dire\n+00186000: 6374 6f72 7920 6973 2061 7373 756d 6564 ctory is assumed\n+00186010: 2074 6f20 636f 6e74 6169 6e20 7468 6520 to contain the \n+00186020: 6365 7274 6966 6963 6174 6573 2e20 5468 certificates. Th\n+00186030: 6520 3c65 6d3e 3c63 6f64 653e 6468 3531 e dh51\n+00186040: 322e 7065 6d3c 2f63 6f64 653e 3c2f 656d 2.pem file specifies\n+00186060: 2074 6861 7420 4448 2077 696c 6c20 6265 that DH will be\n+00186070: 2075 7365 6420 666f 7220 6b65 7920 6167 used for key ag\n+00186080: 7265 656d 656e 7420 696e 7374 6561 6420 reement instead \n+00186090: 6f66 2052 5341 2e20 4120 6e75 6d65 7269 of RSA. A numeri\n+001860a0: 6320 7661 6c75 6520 6772 6561 7465 7220 c value greater \n+001860b0: 7468 616e 2035 3132 2063 616e 2062 6520 than 512 can be \n+001860c0: 7072 6f76 6964 6564 2069 6e73 7465 6164 provided instead\n+001860d0: 2061 7320 6120 7374 7269 6e67 2063 6f6e as a string con\n+001860e0: 7374 616e 7420 2865 2e67 2e20 3c63 6f64 stant (e.g. \"512\") \n+00186100: 746f 2061 6c6c 6f77 2074 6865 2065 6e67 to allow the eng\n+00186110: 696e 6520 746f 2067 656e 6572 6174 6520 ine to generate \n+00186120: 7468 6520 4448 2070 6172 616d 6574 6572 the DH parameter\n+00186130: 7320 6f6e 2074 6865 2066 6c79 2028 7468 s on the fly (th\n+00186140: 6973 2063 616e 2074 616b 6520 6120 7768 is can take a wh\n+00186150: 696c 6529 2072 6174 6865 7220 7468 616e ile) rather than\n+00186160: 2072 6574 7269 6576 696e 6720 7468 656d retrieving them\n+00186170: 2066 726f 6d20 6120 6669 6c65 2e20 5468 from a file. Th\n+00186180: 6520 7261 6e64 6669 6c65 2065 6e74 7279 e randfile entry\n+00186190: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n+001861a0: 7365 6564 2074 6865 2050 524e 472e 2054 seed the PRNG. T\n+001861b0: 6865 206c 6173 7420 656e 7472 7920 656e he last entry en\n+001861c0: 6162 6c65 2073 6572 7665 722d 7369 6465 able server-side\n+001861d0: 2073 6573 7369 6f6e 2063 6163 6869 6e67 session caching\n+001861e0: 2074 6f20 7370 6565 6420 7570 2054 4c53 to speed up TLS\n+001861f0: 2e20 4120 756e 6971 7565 2073 6572 7665 . A unique serve\n+00186200: 7220 6e61 6d65 2069 7320 7265 7175 6972 r name is requir\n+00186210: 6564 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 ed.

    .

    You c\n+00186220: 616e 2073 7065 6369 6679 2061 2063 6970 an specify a cip\n+00186230: 6865 7220 6c69 7374 2074 6f20 7573 6520 her list to use \n+00186240: 7769 7468 2054 4c53 7631 2e32 2061 6e64 with TLSv1.2 and\n+00186250: 2062 656c 6f77 2077 6974 6820 3c63 6f64 below with SSL_CTX_set_ci\n+00186270: 7068 6572 5f6c 6973 7428 736f 6170 2d26 pher_list(soap-&\n+00186280: 6774 3b63 7478 2c20 222e 2e2e 2229 3c2f gt;ctx, \"...\") where soap->ctx is the SSL\n+001862c0: 2063 6f6e 7465 7874 2063 7265 6174 6564 context created\n+001862d0: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soa\n+00186360: 705f 7373 6c5f 7365 7276 6572 5f63 6f6e p_ssl_server_con\n+00186370: 7465 7874 2829 3c2f 613e 3c2f 636f 6465 text(). Likewise, use\n+00186390: 203c 636f 6465 3e53 534c 5f43 5458 5f73 SSL_CTX_s\n+001863a0: 6574 5f63 6970 6865 7273 7569 7465 7328 et_ciphersuites(\n+001863b0: 736f 6170 2d26 6774 3b63 7478 2c20 222e soap->ctx, \".\n+001863c0: 2e2e 2229 3c2f 636f 6465 3e20 746f 2063 ..\") to c\n+001863d0: 6f6e 6669 6775 7265 2074 6865 2061 7661 onfigure the ava\n+001863e0: 696c 6162 6c65 2054 4c53 7631 2e33 2063 ilable TLSv1.3 c\n+001863f0: 6970 6865 7273 7569 7465 732e 3c2f 703e iphersuites.

    \n+00186400: 0a3c 703e 5765 2072 6566 6572 2074 6f20 .

    We refer to \n+00186410: 7468 6520 4f70 656e 5353 4c20 646f 6375 the OpenSSL docu\n+00186420: 6d65 6e74 6174 696f 6e20 616e 6420 6d61 mentation and ma\n+00186430: 6e75 616c 2070 6167 6573 206f 6620 3c63 nual pages of SSL_CTX_set_\n-00186450: 6369 7068 6572 7375 6974 6573 3c2f 636f ciphersuites for details \n-00186470: 6f6e 2074 6865 206c 6174 6573 7420 6369 on the latest ci\n-00186480: 7068 6572 206c 6973 7473 2061 6e64 2073 pher lists and s\n-00186490: 7569 7465 7320 6176 6169 6c61 626c 6520 uites available \n-001864a0: 746f 2075 7365 2e3c 2f70 3e0a 3c70 3e54 to use.

    .

    T\n-001864b0: 6865 2047 4e55 544c 5320 6d75 7465 7820 he GNUTLS mutex \n-001864c0: 6c6f 636b 2073 6574 7570 2069 7320 6175 lock setup is au\n-001864d0: 746f 6d61 7469 6361 6c6c 7920 7065 7266 tomatically perf\n-001864e0: 6f72 6d65 6420 696e 2074 6865 2065 6e67 ormed in the eng\n-001864f0: 696e 652c 2062 7574 206f 6e6c 7920 7768 ine, but only wh\n-00186500: 656e 2050 4f53 4958 2074 6872 6561 6473 en POSIX threads\n-00186510: 2061 7265 2064 6574 6563 7465 6420 616e are detected an\n-00186520: 6420 6176 6169 6c61 626c 652e 3c2f 703e d available.

    \n-00186530: 0a3c 703e 416c 6c20 4f70 656e 5353 4c20 .

    All OpenSSL \n-00186540: 7665 7273 696f 6e73 2070 7269 6f72 2074 versions prior t\n-00186550: 6f20 312e 312e 3020 7265 7175 6972 6520 o 1.1.0 require \n-00186560: 6d75 7465 7820 6c6f 636b 7320 746f 2062 mutex locks to b\n-00186570: 6520 6578 706c 6963 6974 6c79 2073 6574 e explicitly set\n-00186580: 2075 7020 696e 2079 6f75 7220 636f 6465 up in your code\n-00186590: 2066 6f72 206d 756c 7469 2d74 6872 6561 for multi-threa\n-001865a0: 6465 6420 6170 706c 6963 6174 696f 6e73 ded applications\n-001865b0: 2062 7920 6361 6c6c 696e 6720 3c63 6f64 by calling CRYPTO_thread_\n-00186690: 7365 7475 7028 293c 2f61 3e3c 2f63 6f64 setup() and CRYPTO\n-00186740: 5f74 6872 6561 645f 636c 6561 6e75 7028 _thread_cleanup(\n-00186750: 293c 2f61 3e3c 2f63 6f64 653e 2061 7320 ) as \n-00186760: 7761 7320 7368 6f77 6e20 696e 2074 6865 was shown in the\n-00186770: 2063 6f64 6520 6162 6f76 652e 204f 7065 code above. Ope\n-00186780: 6e53 534c 2031 2e31 2e30 2061 6e64 2067 nSSL 1.1.0 and g\n-00186790: 7265 6174 6572 2064 6f65 7320 6e6f 7420 reater does not \n-001867a0: 7265 7175 6972 6520 7468 6573 6520 6c6f require these lo\n-001867b0: 636b 7320 746f 2062 6520 7365 7420 7570 cks to be set up\n-001867c0: 2e20 4966 2079 6f75 2061 7265 206e 6f74 . If you are not\n-001867d0: 2073 7572 6520 7768 6963 6820 7665 7273 sure which vers\n-001867e0: 696f 6e20 6f66 204f 7065 6e53 534c 2079 ion of OpenSSL y\n-001867f0: 6f75 206d 6179 2062 6520 7573 696e 6720 ou may be using \n-00186800: 7769 7468 2079 6f75 7220 6d75 6c74 692d with your multi-\n-00186810: 7468 7265 6164 6564 2061 7070 6c69 6361 threaded applica\n-00186820: 7469 6f6e 2c20 7468 656e 2073 6574 2075 tion, then set u\n-00186830: 7020 7468 6520 6c6f 636b 732e 3c2f 703e p the locks.

    \n-00186840: 0a3c 703e 466f 7220 556e 6978 2061 6e64 .

    For Unix and\n-00186850: 204c 696e 7578 2c20 6d61 6b65 2073 7572 Linux, make sur\n-00186860: 6520 796f 7520 6861 7665 2073 6967 6e61 e you have signa\n-00186870: 6c20 6861 6e64 6c65 7273 2073 6574 2069 l handlers set i\n-00186880: 6e20 796f 7572 2073 6572 7669 6365 2061 n your service a\n-00186890: 6e64 2f6f 7220 636c 6965 6e74 2061 7070 nd/or client app\n-001868a0: 6c69 6361 7469 6f6e 7320 746f 2063 6174 lications to cat\n-001868b0: 6368 2062 726f 6b65 6e20 636f 6e6e 6563 ch broken connec\n-001868c0: 7469 6f6e 7320 283c 636f 6465 3e53 4947 tions (SIG\n-001868d0: 5049 5045 3c2f 636f 6465 3e29 3a3c 2f70 PIPE):.

    signal\n-00186910: 2853 4947 5049 5045 2c20 7369 6770 6970 (SIGPIPE, sigpip\n-00186920: 655f 6861 6e64 6c65 293b 3c2f 6469 763e e_handle);
    \n-00186930: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    where\n-00186950: 2c20 666f 7220 6578 616d 706c 653a 3c2f , for example:.

    void\n-001869b0: 2073 6967 7069 7065 5f68 616e 646c 6528 sigpipe_handle(\n-001869c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int x) { }.

    By d\n-00186a10: 6566 6175 6c74 2c20 636c 6965 6e74 7320 efault, clients \n-00186a20: 6172 6520 6e6f 7420 7265 7175 6972 6564 are not required\n-00186a30: 2074 6f20 6175 7468 656e 7469 6361 7465 to authenticate\n-00186a40: 2e20 546f 2072 6571 7569 7265 2063 6c69 . To require cli\n-00186a50: 656e 7420 6175 7468 656e 7469 6361 7469 ent authenticati\n-00186a60: 6f6e 2075 7365 2074 6865 2066 6f6c 6c6f on use the follo\n-00186a70: 7769 6e67 3a3c 2f70 3e0a 3c64 6976 2063 wing:

    .
    \n-00186a90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n-00186b70: 0a3c 6469 7620 636c 6173 733d 226c 696e ...}\n-00186ef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00186fd0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n-00186ff0: 5f53 534c 5f52 4551 5549 5245 5f43 4c49 _SSL_REQUIRE_CLI\n-00187000: 454e 545f 4155 5448 454e 5449 4341 5449 ENT_AUTHENTICATI\n-00187010: 4f4e 3c2f 6469 763e 3c64 6976 2063 6c61 ON
    soap_\n-00187030: 7373 6c5f 666c 6167 7320 666c 6167 2066 ssl_flags flag f\n-00187040: 6f72 2073 6572 7665 7273 2074 6f20 7265 or servers to re\n-00187050: 7175 6972 6520 636c 6965 6e74 7320 746f quire clients to\n-00187060: 2061 7574 6865 6e74 6963 6174 6520 746f authenticate to\n-00187070: 2073 6572 7665 7273 2064 7572 696e 6720 servers during \n-00187080: 7468 6520 4854 5450 5320 6861 6e64 7368 the HTTPS handsh\n-00187090: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-001870b0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-001870c0: 7464 736f 6170 322e 683a 3538 3534 3c2f tdsoap2.h:5854
    .

    and comp\n-00187fe0: 696c 6520 7769 7468 2063 6f6d 7069 6c65 ile with compile\n-00187ff0: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_SOAPDEFS_\n-00188010: 483c 2f63 6f64 653e 2074 6f20 696e 636c H to incl\n-00188020: 7564 6520 3c65 6d3e 3c63 6f64 653e 736f ude so\n-00188030: 6170 6465 6673 2e68 3c2f 636f 6465 3e3c apdefs.h<\n-00188040: 2f65 6d3e 2069 6e20 796f 7572 2070 726f /em> in your pro\n-00188050: 6a65 6374 2e20 416c 7465 726e 6174 6976 ject. Alternativ\n-00188060: 656c 792c 2063 6f6d 7069 6c65 2077 6974 ely, compile wit\n-00188070: 6820 474e 5554 4c53 3a20 3c2f 703e 3c70 h GNUTLS:

    c++ -DWITH_\n-001880a0: 474e 5554 4c53 206d 7963 6c69 656e 742e GNUTLS myclient.\n-001880b0: 6370 7020 7374 6473 6f61 702e 6370 7020 cpp stdsoap.cpp \n-001880c0: 736f 6170 432e 6370 7020 736f 6170 436c soapC.cpp soapCl\n-001880d0: 6965 6e74 2e63 7070 202d 6c67 6e75 746c ient.cpp -lgnutl\n-001880e0: 7320 2d6c 6763 7279 7074 202d 6c67 7067 s -lgcrypt -lgpg\n-001880f0: 2d65 7272 6f72 0a3c 2f70 7265 3e3c 703e -error.

    \n-00188100: 4120 636c 6965 6e74 2070 726f 6772 616d A client program\n-00188110: 2073 696d 706c 7920 7573 6573 2074 6865 simply uses the\n-00188120: 2070 7265 6669 7820 3c65 6d3e 3c63 6f64 prefix https:<\n-00188140: 2f65 6d3e 2069 6e73 7465 6164 206f 6620 /em> instead of \n-00188150: 3c65 6d3e 3c63 6f64 653e 6874 7470 3a3c http:<\n-00188160: 2f63 6f64 653e 3c2f 656d 3e20 696e 2074 /code> in t\n-00188170: 6865 2065 6e64 706f 696e 7420 5552 4c20 he endpoint URL \n-00188180: 6f66 2061 2073 6572 7669 6365 206f 7065 of a service ope\n-00188190: 7261 7469 6f6e 2063 616c 6c20 746f 2061 ration call to a\n-001881a0: 2057 6562 2053 6572 7669 6365 2074 6f20 Web Service to \n-001881b0: 7573 6520 656e 6372 7970 7465 6420 7472 use encrypted tr\n-001881c0: 616e 7366 6572 7320 2869 6620 7468 6520 ansfers (if the \n-001881d0: 7365 7276 6963 6520 7375 7070 6f72 7473 service supports\n-001881e0: 2048 5454 5053 292e 2059 6f75 206e 6565 HTTPS). You nee\n-001881f0: 6420 746f 2073 7065 6369 6679 2074 6865 d to specify the\n-00188200: 2063 6c69 656e 742d 7369 6465 206b 6579 client-side key\n-00188210: 2066 696c 6520 616e 6420 7061 7373 776f file and passwo\n-00188220: 7264 206f 6620 7468 6520 6b65 7966 696c rd of the keyfil\n-00188230: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n-00188260: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00188270: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap soap;
    .
    soa\n-00188350: 705f 7373 6c5f 696e 6974 3c2f 613e 2829 p_ssl_init()\n-00188360: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; /* init \n-00188380: 4f70 656e 5353 4c20 2873 6b69 7070 696e OpenSSL (skippin\n-00188390: 6720 7468 6973 206f 7220 6361 6c6c 696e g this or callin\n-001883a0: 6720 6d75 6c74 6970 6c65 2074 696d 6573 g multiple times\n-001883b0: 2069 7320 4f4b 2c20 7369 6e63 6520 7468 is OK, since th\n-001883c0: 6520 656e 6769 6e65 2077 696c 6c20 696e e engine will in\n-001883d0: 6974 2053 534c 2061 7574 6f6d 6174 6963 it SSL automatic\n-001883e0: 616c 6c79 2920 2a2f 3c2f 7370 616e 3e3c ally) */<\n-001883f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    /*\n-00188420: 2073 6f61 705f 7373 6c5f 6e6f 696e 6974 soap_ssl_noinit\n-00188430: 2829 3b20 2a2f 3c2f 7370 616e 3e20 3c73 (); */ /* do not in\n-00188460: 6974 204f 7065 6e53 534c 2028 6966 2053 it OpenSSL (if S\n-00188470: 534c 2069 7320 616c 7265 6164 7920 696e SL is already in\n-00188480: 6974 6961 6c69 7a65 6420 656c 7365 7768 itialized elsewh\n-00188490: 6572 6520 696e 2074 6869 7320 6170 706c ere in this appl\n-001884a0: 6963 6174 696f 6e29 202a 2f3c 2f73 7061 ication) */
    .
    \n-00188520: 736f 6170 5f69 6e69 743c 2f61 3e28 2661 soap_init(&a\n-00188530: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .. \n-00188660: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_SSL_DEFAUL\n-001886c0: 543c 2f61 3e2c 203c 2f64 6976 3e0a 3c64 T,
    .\n-001886e0: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q\n-00188700: 756f 743b 636c 6965 6e74 2e70 656d 2671 uot;client.pem&q\n-00188710: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n-00188720: 2020 2020 3c73 7061 6e20 636c 6173 733d /* key\n-00188740: 6669 6c65 3a20 7265 7175 6972 6564 206f file: required o\n-00188750: 6e6c 7920 7768 656e 2063 6c69 656e 7420 nly when client \n-00188760: 6d75 7374 2061 7574 6865 6e74 6963 6174 must authenticat\n-00188770: 6520 746f 2073 6572 7665 7220 2873 6565 e to server (see\n-00188780: 2053 534c 2064 6f63 7320 6f6e 2068 6f77 SSL docs on how\n-00188790: 2074 6f20 6f62 7461 696e 2074 6869 7320 to obtain this \n-001887a0: 6669 6c65 2920 2a2f 3c2f 7370 616e 3e20 file) */ \n-001887b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "pas\n-001887f0: 7377 6f72 6426 7175 6f74 3b3c 2f73 7061 sword", /* password t\n-00188830: 6f20 7265 6164 2074 6865 206b 6579 2066 o read the key f\n-00188840: 696c 6520 286e 6f74 2075 7365 6420 7769 ile (not used wi\n-00188850: 7468 2047 4e55 544c 5329 202a 2f3c 2f73 th GNUTLS) */
    . \n-00188880: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001888a0: 743b 6361 6365 7274 732e 7065 6d26 7175 t;cacerts.pem&qu\n-001888b0: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n-001888c0: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* cacer\n-001888e0: 7420 6669 6c65 2074 6f20 7374 6f72 6520 t file to store \n-001888f0: 7472 7573 7465 6420 6365 7274 6966 6963 trusted certific\n-00188900: 6174 6573 2028 6e65 6564 6564 2074 6f20 ates (needed to \n-00188910: 7665 7269 6679 2073 6572 7665 7229 202a verify server) *\n-00188920: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00188930: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    NULL, \n-00188950: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-00188970: 2a20 6361 7061 7468 2074 6f20 6469 7265 * capath to dire\n-00188980: 6374 6f72 7920 7769 7468 2074 7275 7374 ctory with trust\n-00188990: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates \n-001889a0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-001889b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL \n-001889d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* if ra\n-001889f0: 6e64 6669 6c65 213d 4e55 4c4c 3a20 7573 ndfile!=NULL: us\n-00188a00: 6520 6120 6669 6c65 2077 6974 6820 7261 e a file with ra\n-00188a10: 6e64 6f6d 2064 6174 6120 746f 2073 6565 ndom data to see\n-00188a20: 6420 7261 6e64 6f6d 6e65 7373 202a 2f3c d randomness */<\n-00188a30: 2f73 7061 6e3e 2020 3c2f 6469 763e 0a3c /span>
    .<\n-00188a40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00188a50: 3e29 2920 3c2f 6469 763e 0a3c 6469 7620 >))
    .
    {.
    soap\n-00188ae0: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n-00188af0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-00188b20: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n-00188b30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exit(\n-00188b50: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); <\n-00188b60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n-00188b80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_call_ns_\n-00188ba0: 5f6d 796d 6574 686f 6428 2661 6d70 3b3c _mymethod(&<\n-00188bb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00188bc0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00188bd0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00188be0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00188c00: 743b 6874 7470 733a 2f2f 646f 6d61 696e t;https://domain\n-00188c10: 2f70 6174 682f 7365 6375 7265 2e63 6769 /path/secure.cgi\n-00188c20: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-00188c30: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00188c40: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00188c50: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 ;", \n-00188c60: 2e2e 2e29 3b3c 2f64 6976 3e0a 3c64 6976 ...);
    .soap_ssl_cl\n-00188d20: 6965 6e74 5f63 6f6e 7465 7874 3c2f 613e ient_context\n-00188d30: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so\n-00188d50: 6170 5f73 736c 5f63 6c69 656e 745f 636f ap_ssl_client_co\n-00188d60: 6e74 6578 7428 7374 7275 6374 2073 6f61 ntext(struct soa\n-00188d70: 7020 2a73 6f61 702c 2073 6f61 705f 7373 p *soap, soap_ss\n-00188d80: 6c5f 666c 6167 7320 666c 6167 732c 2063 l_flags flags, c\n-00188d90: 6f6e 7374 2063 6861 7220 2a6b 6579 6669 onst char *keyfi\n-00188da0: 6c65 2c20 636f 6e73 7420 6368 6172 202a le, const char *\n-00188db0: 7061 7373 776f 7264 2c20 636f 6e73 7420 password, const \n-00188dc0: 6368 6172 202a 6361 6669 6c65 2c20 636f char *cafile, co\n-00188dd0: 6e73 7420 6368 6172 202a 6361 7061 7468 nst char *capath\n-00188de0: 2c20 636f 6e73 7420 6368 6172 202a 7261 , const char *ra\n-00188df0: 6e64 6669 6c65 293c 2f64 6976 3e3c 6469 ndfile)
    \n-00188e10: 496e 6974 6961 6c69 7a65 2074 6865 2063 Initialize the c\n-00188e20: 6c69 656e 742d 7369 6465 2053 534c 2f54 lient-side SSL/T\n-00188e30: 4c53 2063 6f6e 7465 7874 2e3c 2f64 6976 LS context.
    .
    <\n-00188e60: 703e 4279 2064 6566 6175 6c74 2c20 7365 p>By default, se\n-00188e70: 7276 6572 2061 7574 6865 6e74 6963 6174 rver authenticat\n-00188e80: 696f 6e20 6973 2065 6e61 626c 6564 2061 ion is enabled a\n-00188e90: 6e64 2074 6865 203c 656d 3e3c 636f 6465 nd the cacerts.pem or capath \n-00188ed0: 286e 6f74 2075 7365 6420 7769 7468 2047 (not used with G\n-00188ee0: 4e55 544c 5329 206d 7573 7420 6265 2073 NUTLS) must be s\n-00188ef0: 6574 2073 6f20 7468 6174 2074 6865 2043 et so that the C\n-00188f00: 4120 6365 7274 6966 6963 6174 6573 206f A certificates o\n-00188f10: 6620 7468 6520 7365 7276 6572 2873 2920 f the server(s) \n-00188f20: 6172 6520 6163 6365 7373 6962 6c65 2061 are accessible a\n-00188f30: 7420 7275 6e20 7469 6d65 2e20 5468 6520 t run time. The \n-00188f40: 3c65 6d3e 3c63 6f64 653e 6361 6365 7274 cacert\n-00188f50: 732e 7065 6d3c 2f63 6f64 653e 3c2f 656d s.pem file included \n-00188f70: 696e 2074 6865 2067 534f 4150 2073 6f75 in the gSOAP sou\n-00188f80: 7263 6520 636f 6465 2070 6163 6b61 6765 rce code package\n-00188f90: 2063 6f6e 7461 696e 7320 7468 6520 6365 contains the ce\n-00188fa0: 7274 6966 6963 6174 6573 206f 6620 636f rtificates of co\n-00188fb0: 6d6d 6f6e 2043 4173 2e20 5468 6973 2066 mmon CAs. This f\n-00188fc0: 696c 6520 6d75 7374 2062 6520 7375 7070 ile must be supp\n-00188fd0: 6c69 6564 2077 6974 6820 7468 6520 636c lied with the cl\n-00188fe0: 6965 6e74 2c20 6966 2073 6572 7665 7220 ient, if server \n-00188ff0: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n-00189000: 7320 7265 7175 6972 6564 2e20 416c 7465 s required. Alte\n-00189010: 726e 6174 6976 656c 792c 2079 6f75 2063 rnatively, you c\n-00189020: 616e 2075 7365 2074 6865 203c 656d 3e3c an use the <\n-00189030: 636f 6465 3e67 736f 6170 2f70 6c75 6769 code>gsoap/plugi\n-00189040: 6e2f 6361 6365 7274 732e 683c 2f63 6f64 n/cacerts.h and \n-00189060: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug\n-00189070: 696e 2f63 6163 6572 7473 2e63 3c2f 636f in/cacerts.c code to\n-00189090: 2065 6d62 6564 2043 4120 6365 7274 6966 embed CA certif\n-001890a0: 6963 6174 6573 2069 6e20 796f 7572 2063 icates in your c\n-001890b0: 6c69 656e 7420 636f 6465 2e3c 2f70 3e0a lient code.

    .\n-001890c0: 3c70 3e59 6f75 2063 616e 2073 7065 6369

    You can speci\n-001890d0: 6679 2061 2063 6970 6865 7220 6c69 7374 fy a cipher list\n-001890e0: 2074 6f20 7573 6520 7769 7468 2054 4c53 to use with TLS\n-001890f0: 7631 2e32 2061 6e64 2062 656c 6f77 2077 v1.2 and below w\n-00189100: 6974 6820 3c63 6f64 653e 5353 4c5f 4354 ith SSL_CT\n-00189110: 585f 7365 745f 6369 7068 6572 5f6c 6973 X_set_cipher_lis\n-00189120: 7428 736f 6170 2d26 6774 3b63 7478 2c20 t(soap->ctx, \n-00189130: 222e 2e2e 2229 3c2f 636f 6465 3e20 7768 \"...\") wh\n-00189140: 6572 6520 3c63 6f64 653e 736f 6170 2d26 ere soap-&\n-00189150: 6774 3b63 7478 3c2f 636f 6465 3e20 6973 gt;ctx is\n-00189160: 2074 6865 2053 534c 2063 6f6e 7465 7874 the SSL context\n-00189170: 2063 7265 6174 6564 2062 7920 3c63 6f64 created by soap_ssl_cl\n-00189210: 6965 6e74 5f63 6f6e 7465 7874 2829 3c2f ient_context(). Likew\n-00189230: 6973 652c 2075 7365 203c 636f 6465 3e53 ise, use S\n-00189240: 534c 5f43 5458 5f73 6574 5f63 6970 6865 SL_CTX_set_ciphe\n-00189250: 7273 7569 7465 7328 736f 6170 2d26 6774 rsuites(soap->\n-00189260: 3b63 7478 2c20 222e 2e2e 2229 3c2f 636f ;ctx, \"...\") to configure\n-00189280: 2074 6865 2061 7661 696c 6162 6c65 2054 the available T\n-00189290: 4c53 7631 2e33 2063 6970 6865 7273 7569 LSv1.3 ciphersui\n-001892a0: 7465 732e 3c2f 703e 0a3c 703e 5765 2072 tes.

    .

    We r\n-001892b0: 6566 6572 2074 6f20 7468 6520 4f70 656e efer to the Open\n-001892c0: 5353 4c20 646f 6375 6d65 6e74 6174 696f SSL documentatio\n-001892d0: 6e20 616e 6420 6d61 6e75 616c 2070 6167 n and manual pag\n-001892e0: 6573 206f 6620 3c63 6f64 653e 5353 4c5f es of SSL_\n-001892f0: 4354 585f 7365 745f 6369 7068 6572 5f6c CTX_set_cipher_l\n-00189300: 6973 743c 2f63 6f64 653e 2061 6e64 203c ist and <\n+00186450: 6369 7068 6572 5f6c 6973 743c 2f63 6f64 cipher_list and SSL\n+00186470: 5f43 5458 5f73 6574 5f63 6970 6865 7273 _CTX_set_ciphers\n+00186480: 7569 7465 733c 2f63 6f64 653e 2066 6f72 uites for\n+00186490: 2064 6574 6169 6c73 206f 6e20 7468 6520 details on the \n+001864a0: 6c61 7465 7374 2063 6970 6865 7220 6c69 latest cipher li\n+001864b0: 7374 7320 616e 6420 7375 6974 6573 2061 sts and suites a\n+001864c0: 7661 696c 6162 6c65 2074 6f20 7573 652e vailable to use.\n+001864d0: 3c2f 703e 0a3c 703e 5468 6520 474e 5554

    .

    The GNUT\n+001864e0: 4c53 206d 7574 6578 206c 6f63 6b20 7365 LS mutex lock se\n+001864f0: 7475 7020 6973 2061 7574 6f6d 6174 6963 tup is automatic\n+00186500: 616c 6c79 2070 6572 666f 726d 6564 2069 ally performed i\n+00186510: 6e20 7468 6520 656e 6769 6e65 2c20 6275 n the engine, bu\n+00186520: 7420 6f6e 6c79 2077 6865 6e20 504f 5349 t only when POSI\n+00186530: 5820 7468 7265 6164 7320 6172 6520 6465 X threads are de\n+00186540: 7465 6374 6564 2061 6e64 2061 7661 696c tected and avail\n+00186550: 6162 6c65 2e3c 2f70 3e0a 3c70 3e41 6c6c able.

    .

    All\n+00186560: 204f 7065 6e53 534c 2076 6572 7369 6f6e OpenSSL version\n+00186570: 7320 7072 696f 7220 746f 2031 2e31 2e30 s prior to 1.1.0\n+00186580: 2072 6571 7569 7265 206d 7574 6578 206c require mutex l\n+00186590: 6f63 6b73 2074 6f20 6265 2065 7870 6c69 ocks to be expli\n+001865a0: 6369 746c 7920 7365 7420 7570 2069 6e20 citly set up in \n+001865b0: 796f 7572 2063 6f64 6520 666f 7220 6d75 your code for mu\n+001865c0: 6c74 692d 7468 7265 6164 6564 2061 7070 lti-threaded app\n+001865d0: 6c69 6361 7469 6f6e 7320 6279 2063 616c lications by cal\n+001865e0: 6c69 6e67 203c 636f 6465 3e3c 6120 636c ling CRYPT\n+001866b0: 4f5f 7468 7265 6164 5f73 6574 7570 2829 O_thread_setup()\n+001866c0: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+001866d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 CRYPTO_thread\n+00186770: 5f63 6c65 616e 7570 2829 3c2f 613e 3c2f _cleanup() as was sho\n+00186790: 776e 2069 6e20 7468 6520 636f 6465 2061 wn in the code a\n+001867a0: 626f 7665 2e20 4f70 656e 5353 4c20 312e bove. OpenSSL 1.\n+001867b0: 312e 3020 616e 6420 6772 6561 7465 7220 1.0 and greater \n+001867c0: 646f 6573 206e 6f74 2072 6571 7569 7265 does not require\n+001867d0: 2074 6865 7365 206c 6f63 6b73 2074 6f20 these locks to \n+001867e0: 6265 2073 6574 2075 702e 2049 6620 796f be set up. If yo\n+001867f0: 7520 6172 6520 6e6f 7420 7375 7265 2077 u are not sure w\n+00186800: 6869 6368 2076 6572 7369 6f6e 206f 6620 hich version of \n+00186810: 4f70 656e 5353 4c20 796f 7520 6d61 7920 OpenSSL you may \n+00186820: 6265 2075 7369 6e67 2077 6974 6820 796f be using with yo\n+00186830: 7572 206d 756c 7469 2d74 6872 6561 6465 ur multi-threade\n+00186840: 6420 6170 706c 6963 6174 696f 6e2c 2074 d application, t\n+00186850: 6865 6e20 7365 7420 7570 2074 6865 206c hen set up the l\n+00186860: 6f63 6b73 2e3c 2f70 3e0a 3c70 3e46 6f72 ocks.

    .

    For\n+00186870: 2055 6e69 7820 616e 6420 4c69 6e75 782c Unix and Linux,\n+00186880: 206d 616b 6520 7375 7265 2079 6f75 2068 make sure you h\n+00186890: 6176 6520 7369 676e 616c 2068 616e 646c ave signal handl\n+001868a0: 6572 7320 7365 7420 696e 2079 6f75 7220 ers set in your \n+001868b0: 7365 7276 6963 6520 616e 642f 6f72 2063 service and/or c\n+001868c0: 6c69 656e 7420 6170 706c 6963 6174 696f lient applicatio\n+001868d0: 6e73 2074 6f20 6361 7463 6820 6272 6f6b ns to catch brok\n+001868e0: 656e 2063 6f6e 6e65 6374 696f 6e73 2028 en connections (\n+001868f0: 3c63 6f64 653e 5349 4750 4950 453c 2f63 SIGPIPE):

    .
    signal(SIGPIP\n+00186940: 452c 2073 6967 7069 7065 5f68 616e 646c E, sigpipe_handl\n+00186950: 6529 3b3c 2f64 6976 3e0a 3c2f 6469 763e e);
    .
    \n+00186960: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Th\n+00187120: 6973 2072 6571 7569 7265 7320 6561 6368 is requires each\n+00187130: 2063 6c69 656e 7420 746f 2061 7574 6865 client to authe\n+00187140: 6e74 6963 6174 6520 7769 7468 2069 7473 nticate with its\n+00187150: 2063 6572 7469 6669 6361 7465 2c20 696e certificate, in\n+00187160: 2061 6464 6974 696f 6e20 666f 7220 7468 addition for th\n+00187170: 6520 7365 7276 6572 2074 6f20 6175 7468 e server to auth\n+00187180: 656e 7469 6361 7465 2074 6f20 7468 6520 enticate to the \n+00187190: 636c 6965 6e74 2e3c 2f70 3e0a 3c70 3e53 client.

    .

    S\n+001871a0: 696e 6365 2072 656c 6561 7365 2076 6572 ince release ver\n+001871b0: 7369 6f6e 2032 2e38 2e32 302c 2053 534c sion 2.8.20, SSL\n+001871c0: 2076 3320 6973 2064 6973 6162 6c65 642e v3 is disabled.\n+001871d0: 2054 6f20 656e 6162 6c65 2053 534c 2076 To enable SSL v\n+001871e0: 3320 746f 6765 7468 6572 2077 6974 6820 3 together with \n+001871f0: 544c 5320 312e 3020 616e 6420 6869 6768 TLS 1.0 and high\n+00187200: 6572 2c20 7573 6520 3c63 6f64 653e 2353 er, use #S\n+00187210: 4f41 505f 5353 4c76 335f 544c 5376 313c OAP_SSLv3_TLSv1<\n+00187220: 2f63 6f64 653e 2077 6974 6820 3c63 6f64 /code> with soap_ssl_se\n+001872c0: 7276 6572 5f63 6f6e 7465 7874 3c2f 613e rver_context\n+001872d0: 3c2f 636f 6465 3e2e 2054 6f20 7573 6520 . To use \n+001872e0: 544c 5320 312e 3120 616e 6420 312e 3220 TLS 1.1 and 1.2 \n+001872f0: 7573 6520 3c63 6f64 653e 534f 4150 5f54 use SOAP_T\n+00187300: 4c53 7631 5f31 207c 2053 4f41 505f 544c LSv1_1 | SOAP_TL\n+00187310: 5376 315f 323c 2f63 6f64 653e 2e20 546f Sv1_2. To\n+00187320: 2075 7365 2054 4c53 2031 2e32 206f 6e6c use TLS 1.2 onl\n+00187330: 7920 7573 6520 3c63 6f64 653e 2353 4f41 y use #SOA\n+00187340: 505f 544c 5376 315f 323c 2f63 6f64 653e P_TLSv1_2\n+00187350: 2e20 546f 2075 7365 2053 534c 2076 3320 . To use SSL v3 \n+00187360: 6f6e 6c79 2075 7365 203c 636f 6465 3e23 only use #\n+00187370: 534f 4150 5f53 534c 7633 3c2f 636f 6465 SOAP_SSLv3.

    .

    The cacert file and capath a\n+001873c0: 7265 206f 7074 696f 6e61 6c2e 2045 6974 re optional. Eit\n+001873d0: 6865 7220 6f6e 6520 6361 6e20 6265 2073 her one can be s\n+001873e0: 7065 6369 6669 6564 2077 6865 6e20 636c pecified when cl\n+001873f0: 6965 6e74 7320 6d75 7374 2072 756e 206f ients must run o\n+00187400: 6e20 6e6f 6e2d 7472 7573 7465 6420 7379 n non-trusted sy\n+00187410: 7374 656d 7320 283c 636f 6465 3e63 6170 stems (cap\n+00187420: 6174 683c 2f63 6f64 653e 2069 7320 6e6f ath is no\n+00187430: 7420 7573 6564 2077 6974 6820 474e 5554 t used with GNUT\n+00187440: 4c53 292e 2057 6520 7761 6e74 2074 6f20 LS). We want to \n+00187450: 6176 6f69 6420 7374 6f72 696e 6720 7472 avoid storing tr\n+00187460: 7573 7465 6420 6365 7274 6966 6963 6174 usted certificat\n+00187470: 6573 2069 6e20 7468 6520 6465 6661 756c es in the defaul\n+00187480: 7420 6c6f 6361 7469 6f6e 206f 6e20 7468 t location on th\n+00187490: 6520 6669 6c65 2073 7973 7465 6d20 7768 e file system wh\n+001874a0: 656e 2074 6861 7420 6973 206e 6f74 2073 en that is not s\n+001874b0: 6563 7572 652e 2054 6865 7265 666f 7265 ecure. Therefore\n+001874c0: 2c20 6120 666c 6174 203c 656d 3e3c 636f , a flat cacert.pem file o\n+001874f0: 7220 6469 7265 6374 6f72 7920 6361 6e20 r directory can \n+00187500: 6265 2073 7065 6369 6669 6564 2074 6f20 be specified to \n+00187510: 7374 6f72 6520 7472 7573 7465 6420 6365 store trusted ce\n+00187520: 7274 6966 6963 6174 6573 2e3c 2f70 3e0a rtificates.

    .\n+00187530: 3c70 3e54 6865 2067 534f 4150 2070 6163

    The gSOAP pac\n+00187540: 6b61 6765 2069 6e63 6c75 6465 7320 6120 kage includes a \n+00187550: 3c65 6d3e 3c63 6f64 653e 6361 6365 7274 cacert\n+00187560: 732e 7065 6d3c 2f63 6f64 653e 3c2f 656d s.pem file with the \n+00187580: 6365 7274 6966 6963 6174 6573 206f 6620 certificates of \n+00187590: 616c 6c20 6365 7274 6966 6963 6174 6520 all certificate \n+001875a0: 6175 7468 6f72 6974 6965 732e 2059 6f75 authorities. You\n+001875b0: 2063 616e 2075 7365 2074 6869 7320 6669 can use this fi\n+001875c0: 6c65 2074 6f20 7665 7269 6679 2074 6865 le to verify the\n+001875d0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+001875e0: 6f66 2073 6572 7665 7273 2074 6861 7420 of servers that \n+001875f0: 7072 6f76 6964 6520 6365 7274 6966 6963 provide certific\n+00187600: 6174 6573 2069 7373 7565 6420 6279 2074 ates issued by t\n+00187610: 6865 7365 2043 4173 2e3c 2f70 3e0a 3c70 hese CAs.

    .The c\n+00187630: 6163 6572 742e 7065 6d3c 2f63 6f64 653e acert.pem\n+00187640: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , client.pem, and server.pe\n+00187680: 6d3c 2f63 6f64 653e 3c2f 656d 3e20 6669 m fi\n+00187690: 6c65 7320 696e 2074 6865 2067 534f 4150 les in the gSOAP\n+001876a0: 2070 6163 6b61 6765 2061 7265 2065 7861 package are exa\n+001876b0: 6d70 6c65 7320 6f66 2073 656c 662d 7369 mples of self-si\n+001876c0: 676e 6564 2063 6572 7469 6669 6361 7465 gned certificate\n+001876d0: 732e 2054 6865 203c 656d 3e3c 636f 6465 s. The client.pem and \n+00187700: 3c63 6f64 653e 7365 7276 6572 2e70 656d server.pem\n+00187710: 3c2f 636f 6465 3e3c 2f65 6d3e 2063 6f6e con\n+00187720: 7461 696e 2074 6865 2063 6c69 656e 742f tain the client/\n+00187730: 7365 7276 6572 2070 7269 7661 7465 206b server private k\n+00187740: 6579 2063 6f6e 6361 7465 6e61 7465 6420 ey concatenated \n+00187750: 7769 7468 2074 6865 2063 6572 7469 6669 with the certifi\n+00187760: 6361 7465 2e20 5468 6520 6b65 7966 696c cate. The keyfil\n+00187770: 6573 2028 3c65 6d3e 3c63 6f64 653e 636c es (cl\n+00187780: 6965 6e74 2e70 656d 3c2f 636f 6465 3e3c ient.pem<\n+00187790: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and server.pem) are c\n+001877c0: 7265 6174 6564 2062 7920 636f 6e63 6174 reated by concat\n+001877d0: 656e 6174 696e 6720 7468 6520 7072 6976 enating the priv\n+001877e0: 6174 6520 6b65 7920 5045 4d20 7769 7468 ate key PEM with\n+001877f0: 2074 6865 2063 6572 7469 6669 6361 7465 the certificate\n+00187800: 2050 454d 2e20 5468 6520 6b65 7966 696c PEM. The keyfil\n+00187810: 6520 7368 6f75 6c64 206e 6f74 2062 6520 e should not be \n+00187820: 7368 6172 6564 2077 6974 6820 616e 7920 shared with any \n+00187830: 7061 7274 792e 2057 6974 6820 4f70 656e party. With Open\n+00187840: 5353 4c2c 2079 6f75 2063 616e 2065 6e63 SSL, you can enc\n+00187850: 7279 7074 2074 6865 206b 6579 6669 6c65 rypt the keyfile\n+00187860: 7320 7769 7468 2061 2070 6173 7377 6f72 s with a passwor\n+00187870: 6420 746f 206f 6666 6572 2073 6f6d 6520 d to offer some \n+00187880: 7072 6f74 6563 7469 6f6e 2061 6e64 2074 protection and t\n+00187890: 6865 2070 6173 7377 6f72 6420 6973 2075 he password is u\n+001878a0: 7365 6420 696e 2074 6865 2063 6c69 656e sed in the clien\n+001878b0: 742f 7365 7276 6572 2063 6f64 6520 746f t/server code to\n+001878c0: 2072 6561 6420 7468 6520 6b65 7966 696c read the keyfil\n+001878d0: 652e 2047 4e55 544c 5320 646f 6573 206e e. GNUTLS does n\n+001878e0: 6f74 2073 7570 706f 7274 2074 6869 7320 ot support this \n+001878f0: 6665 6174 7572 6520 616e 6420 6361 6e6e feature and cann\n+00187900: 6f74 2065 6e63 7279 7074 206f 7220 6465 ot encrypt or de\n+00187910: 6372 7970 7420 6120 6b65 7966 696c 652e crypt a keyfile.\n+00187920: 3c2f 703e 0a3c 646c 2063 6c61 7373 3d22

    .
    Warning
    It is impor\n+00187960: 7461 6e74 2074 6861 7420 7468 6520 3c63 tant that the #WITH_OPENSS\n+00187980: 4c3c 2f63 6f64 653e 206d 6163 726f 206d L macro m\n+00187990: 7573 7420 6265 2063 6f6e 7369 7374 656e ust be consisten\n+001879a0: 746c 7920 6465 6669 6e65 6420 746f 2063 tly defined to c\n+001879b0: 6f6d 7069 6c65 2074 6865 2073 6f75 7263 ompile the sourc\n+001879c0: 6573 2c20 7375 6368 2061 7320 3c65 6d3e es, such as \n+001879d0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n+001879e0: 6f61 7032 2e63 7070 3c2f 636f 6465 3e3c oap2.cpp<\n+001879f0: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n+00187a00: 736f 6170 432e 6370 703c 2f63 6f64 653e soapC.cpp\n+00187a10: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , soapClient.cpp<\n+00187a30: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, soapServe\n+00187a50: 722e 6370 703c 2f63 6f64 653e 3c2f 656d r.cpp, and all appli\n+00187a70: 6361 7469 6f6e 2073 6f75 7263 6573 2074 cation sources t\n+00187a80: 6861 7420 696e 636c 7564 6520 3c65 6d3e hat include \n+00187a90: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n+00187aa0: 6f61 7032 2e68 3c2f 636f 6465 3e3c 2f65 oap2.h or \n+00187ac0: 736f 6170 482e 683c 2f63 6f64 653e 3c2f soapH.h. If the macr\n+00187ae0: 6f73 2061 7265 206e 6f74 2063 6f6e 7369 os are not consi\n+00187af0: 7374 656e 746c 7920 7573 6564 2c20 7468 stently used, th\n+00187b00: 6520 6170 706c 6963 6174 696f 6e20 7769 e application wi\n+00187b10: 6c6c 2063 7261 7368 2064 7565 2074 6f20 ll crash due to \n+00187b20: 6120 6d69 736d 6174 6368 6573 2069 6e20 a mismatches in \n+00187b30: 7468 6520 6465 636c 6172 6174 696f 6e20 the declaration \n+00187b40: 616e 6420 6163 6365 7373 206f 6620 7468 and access of th\n+00187b50: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context.
    .

    See al\n+00187bd0: 736f 2041 5049 2064 6f63 756d 656e 7461 so API documenta\n+00187be0: 7469 6f6e 204d 6f64 756c 6520 3c61 2063 tion Module SSL/TLS \n+00187c20: 636f 6e74 6578 7420 616e 6420 6675 6e63 context and func\n+00187c30: 7469 6f6e 733c 2f61 3e20 666f 7220 6d6f tions for mo\n+00187c40: 7265 2064 6574 6169 6c73 206f 6e20 7468 re details on th\n+00187c50: 6520 5353 4c2f 544c 5320 6675 6e63 7469 e SSL/TLS functi\n+00187c60: 6f6e 732e 3c2f 703e 0a3c 703e f09f 949d ons.

    .

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

    .<\n+00187ca0: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Sec\n+00187cd0: 7572 6520 636c 6965 6e74 7320 7769 7468 ure clients with\n+00187ce0: 2048 5454 5053 3c2f 6832 3e0a 3c70 3e54 HTTPS

    .

    T\n+00187cf0: 6f20 7574 696c 697a 6520 4854 5450 532f o utilize HTTPS/\n+00187d00: 5353 4c2c 2079 6f75 206e 6565 6420 746f SSL, you need to\n+00187d10: 2069 6e73 7461 6c6c 2074 6865 204f 7065 install the Ope\n+00187d20: 6e53 534c 206c 6962 7261 7279 206f 6e20 nSSL library on \n+00187d30: 796f 7572 2070 6c61 7466 6f72 6d20 6f72 your platform or\n+00187d40: 2047 4e55 544c 5320 666f 7220 6120 6c69 GNUTLS for a li\n+00187d50: 6768 742d 7765 6967 6874 2053 534c 2f54 ght-weight SSL/T\n+00187d60: 4c53 206c 6962 7261 7279 2e20 4166 7465 LS library. Afte\n+00187d70: 7220 696e 7374 616c 6c61 7469 6f6e 2c20 r installation, \n+00187d80: 636f 6d70 696c 6520 616c 6c20 7468 6520 compile all the \n+00187d90: 736f 7572 6365 7320 6f66 2079 6f75 7220 sources of your \n+00187da0: 6170 706c 6963 6174 696f 6e20 7769 7468 application with\n+00187db0: 2063 6f6d 7069 6c65 2d74 696d 6520 666c compile-time fl\n+00187dc0: 6167 203c 636f 6465 3e23 5749 5448 5f4f ag #WITH_O\n+00187dd0: 5045 4e53 534c 3c2f 636f 6465 3e20 286f PENSSL (o\n+00187de0: 7220 3c63 6f64 653e 2357 4954 485f 474e r #WITH_GN\n+00187df0: 5554 4c53 3c2f 636f 6465 3e20 7768 656e UTLS when\n+00187e00: 2075 7369 6e67 2047 4e55 544c 5329 2e20 using GNUTLS). \n+00187e10: 466f 7220 6578 616d 706c 6520 6f6e 204c For example on L\n+00187e20: 696e 7578 3a20 3c2f 703e 3c70 7265 2063 inux:

    \n+00187e40: 2063 2b2b 202d 4457 4954 485f 4f50 454e   c++ -DWITH_OPEN\n+00187e50: 5353 4c20 6d79 636c 6965 6e74 2e63 7070  SSL myclient.cpp\n+00187e60: 2073 7464 736f 6170 2e63 7070 2073 6f61   stdsoap.cpp soa\n+00187e70: 7043 2e63 7070 2073 6f61 7043 6c69 656e  pC.cpp soapClien\n+00187e80: 742e 6370 7020 2d6c 7373 6c20 2d6c 6372  t.cpp -lssl -lcr\n+00187e90: 7970 746f 0a3c 2f70 7265 3e3c 703e 206f  ypto.

    o\n+00187ea0: 7220 556e 6978 3a20 3c2f 703e 3c70 7265 r Unix:

    c++ -DWITH_OP\n+00187ed0: 454e 5353 4c20 6d79 636c 6965 6e74 2e63 ENSSL myclient.c\n+00187ee0: 7070 2073 7464 736f 6170 2e63 7070 2073 pp stdsoap.cpp s\n+00187ef0: 6f61 7043 2e63 7070 2073 6f61 7043 6c69 oapC.cpp soapCli\n+00187f00: 656e 742e 6370 7020 2d6c 786e 6574 202d ent.cpp -lxnet -\n+00187f10: 6c73 6f63 6b65 7420 2d6c 6e73 6c20 2d6c lsocket -lnsl -l\n+00187f20: 7373 6c20 2d6c 6372 7970 746f 0a3c 2f70 ssl -lcrypto.

    or you ca\n+00187f40: 6e20 6164 6420 7468 6520 666f 6c6c 6f77 n add the follow\n+00187f50: 696e 6720 6c69 6e65 2074 6f20 3c65 6d3e ing line to \n+00187f60: 3c63 6f64 653e 736f 6170 6465 6673 2e68 soapdefs.h\n+00187f70: 3c2f 636f 6465 3e3c 2f65 6d3e 3a3c 2f70 :.

    #define WIT\n+00187fd0: 485f 4f50 454e 5353 4c3c 2f73 7061 6e3e H_OPENSSL\n+00187fe0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    and compile wit\n+00188010: 6820 636f 6d70 696c 652d 7469 6d65 2066 h compile-time f\n+00188020: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n+00188030: 534f 4150 4445 4653 5f48 3c2f 636f 6465 SOAPDEFS_H to include soapdefs.\n+00188060: 683c 2f63 6f64 653e 3c2f 656d 3e20 696e h
    in\n+00188070: 2079 6f75 7220 7072 6f6a 6563 742e 2041 your project. A\n+00188080: 6c74 6572 6e61 7469 7665 6c79 2c20 636f lternatively, co\n+00188090: 6d70 696c 6520 7769 7468 2047 4e55 544c mpile with GNUTL\n+001880a0: 533a 203c 2f70 3e3c 7072 6520 636c 6173 S:

     c+\n+001880c0: 2b20 2d44 5749 5448 5f47 4e55 544c 5320  + -DWITH_GNUTLS \n+001880d0: 6d79 636c 6965 6e74 2e63 7070 2073 7464  myclient.cpp std\n+001880e0: 736f 6170 2e63 7070 2073 6f61 7043 2e63  soap.cpp soapC.c\n+001880f0: 7070 2073 6f61 7043 6c69 656e 742e 6370  pp soapClient.cp\n+00188100: 7020 2d6c 676e 7574 6c73 202d 6c67 6372  p -lgnutls -lgcr\n+00188110: 7970 7420 2d6c 6770 672d 6572 726f 720a  ypt -lgpg-error.\n+00188120: 3c2f 7072 653e 3c70 3e41 2063 6c69 656e  

    A clien\n+00188130: 7420 7072 6f67 7261 6d20 7369 6d70 6c79 t program simply\n+00188140: 2075 7365 7320 7468 6520 7072 6566 6978 uses the prefix\n+00188150: 203c 656d 3e3c 636f 6465 3e68 7474 7073 https\n+00188160: 3a3c 2f63 6f64 653e 3c2f 656d 3e20 696e : in\n+00188170: 7374 6561 6420 6f66 203c 656d 3e3c 636f stead of http:<\n+00188190: 2f65 6d3e 2069 6e20 7468 6520 656e 6470 /em> in the endp\n+001881a0: 6f69 6e74 2055 524c 206f 6620 6120 7365 oint URL of a se\n+001881b0: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n+001881c0: 6361 6c6c 2074 6f20 6120 5765 6220 5365 call to a Web Se\n+001881d0: 7276 6963 6520 746f 2075 7365 2065 6e63 rvice to use enc\n+001881e0: 7279 7074 6564 2074 7261 6e73 6665 7273 rypted transfers\n+001881f0: 2028 6966 2074 6865 2073 6572 7669 6365 (if the service\n+00188200: 2073 7570 706f 7274 7320 4854 5450 5329 supports HTTPS)\n+00188210: 2e20 596f 7520 6e65 6564 2074 6f20 7370 . You need to sp\n+00188220: 6563 6966 7920 7468 6520 636c 6965 6e74 ecify the client\n+00188230: 2d73 6964 6520 6b65 7920 6669 6c65 2061 -side key file a\n+00188240: 6e64 2070 6173 7377 6f72 6420 6f66 2074 nd password of t\n+00188250: 6865 206b 6579 6669 6c65 3a3c 2f70 3e0a he keyfile:

    .\n+00188260: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n+001882a0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap;.
    soap_ssl_i\n+00188380: 6e69 743c 2f61 3e28 293b 203c 7370 616e nit(); /* init OpenSSL\n+001883b0: 2028 736b 6970 7069 6e67 2074 6869 7320 (skipping this \n+001883c0: 6f72 2063 616c 6c69 6e67 206d 756c 7469 or calling multi\n+001883d0: 706c 6520 7469 6d65 7320 6973 204f 4b2c ple times is OK,\n+001883e0: 2073 696e 6365 2074 6865 2065 6e67 696e since the engin\n+001883f0: 6520 7769 6c6c 2069 6e69 7420 5353 4c20 e will init SSL \n+00188400: 6175 746f 6d61 7469 6361 6c6c 7929 202a automatically) *\n+00188410: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n+00188420: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00188430: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* soap_s\n+00188450: 736c 5f6e 6f69 6e69 7428 293b 202a 2f3c sl_noinit(); */<\n+00188460: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> /* \n+00188480: 646f 206e 6f74 2069 6e69 7420 4f70 656e do not init Open\n+00188490: 5353 4c20 2869 6620 5353 4c20 6973 2061 SSL (if SSL is a\n+001884a0: 6c72 6561 6479 2069 6e69 7469 616c 697a lready initializ\n+001884b0: 6564 2065 6c73 6577 6865 7265 2069 6e20 ed elsewhere in \n+001884c0: 7468 6973 2061 7070 6c69 6361 7469 6f6e this application\n+001884d0: 2920 2a2f 3c2f 7370 616e 3e3c 2f64 6976 ) */.
    soap_in\n+00188550: 6974 3c2f 613e 2826 616d 703b 3c61 2063 it(&soap);.
    \n+001885c0: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap\n+00188620: 5f73 736c 5f63 6c69 656e 745f 636f 6e74 _ssl_client_cont\n+00188630: 6578 743c 2f61 3e28 2661 6d70 3b3c 6120 ext(&soap, .
    SOAP_S\n+001886e0: 534c 5f44 4546 4155 4c54 3c2f 613e 2c20 SL_DEFAULT, \n+001886f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "cli\n+00188730: 656e 742e 7065 6d26 7175 6f74 3b3c 2f73 ent.pem", /* keyfile: r\n+00188770: 6571 7569 7265 6420 6f6e 6c79 2077 6865 equired only whe\n+00188780: 6e20 636c 6965 6e74 206d 7573 7420 6175 n client must au\n+00188790: 7468 656e 7469 6361 7465 2074 6f20 7365 thenticate to se\n+001887a0: 7276 6572 2028 7365 6520 5353 4c20 646f rver (see SSL do\n+001887b0: 6373 206f 6e20 686f 7720 746f 206f 6274 cs on how to obt\n+001887c0: 6169 6e20 7468 6973 2066 696c 6529 202a ain this file) *\n+001887d0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n+001887e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00188810: 2671 756f 743b 7061 7373 776f 7264 2671 "password&q\n+00188820: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, \n+00188830: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* p\n+00188850: 6173 7377 6f72 6420 746f 2072 6561 6420 assword to read \n+00188860: 7468 6520 6b65 7920 6669 6c65 2028 6e6f the key file (no\n+00188870: 7420 7573 6564 2077 6974 6820 474e 5554 t used with GNUT\n+00188880: 4c53 2920 2a2f 3c2f 7370 616e 3e20 3c2f LS) */ .
    "cacer\n+001888d0: 7473 2e70 656d 2671 756f 743b 3c2f 7370 ts.pem", /* cacert file \n+00188910: 746f 2073 746f 7265 2074 7275 7374 6564 to store trusted\n+00188920: 2063 6572 7469 6669 6361 7465 7320 286e certificates (n\n+00188930: 6565 6465 6420 746f 2076 6572 6966 7920 eeded to verify \n+00188940: 7365 7276 6572 2920 2a2f 3c2f 7370 616e server) */
    .
    NUL\n+00188970: 4c2c 2020 2020 2020 2020 2020 2020 2020 L, \n+00188980: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* capat\n+001889a0: 6820 746f 2064 6972 6563 746f 7279 2077 h to directory w\n+001889b0: 6974 6820 7472 7573 7465 6420 6365 7274 ith trusted cert\n+001889c0: 6966 6963 6174 6573 202a 2f3c 2f73 7061 ificates */
    .
    NU\n+001889f0: 4c4c 2020 2020 2020 2020 203c 7370 616e LL /* if randfile!\n+00188a20: 3d4e 554c 4c3a 2075 7365 2061 2066 696c =NULL: use a fil\n+00188a30: 6520 7769 7468 2072 616e 646f 6d20 6461 e with random da\n+00188a40: 7461 2074 6f20 7365 6564 2072 616e 646f ta to seed rando\n+00188a50: 6d6e 6573 7320 2a2f 3c2f 7370 616e 3e20 mness */ \n+00188a60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    )) .
    {
    .\n+00188ab0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n+00188b10: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n+00188b20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00188b30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00188b40: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00188b50: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n+00188b60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXIT_FA\n+00188b80: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .<\n+00188b90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00188ba0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    soap\n+00188bc0: 5f63 616c 6c5f 6e73 5f5f 6d79 6d65 7468 _call_ns__mymeth\n+00188bd0: 6f64 2826 616d 703b 3c61 2063 6c61 7373 od(&s\n+00188c00: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "https\n+00188c30: 3a2f 2f64 6f6d 6169 6e2f 7061 7468 2f73 ://domain/path/s\n+00188c40: 6563 7572 652e 6367 6926 7175 6f74 3b3c ecure.cgi"<\n+00188c50: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, ""\n+00188c80: 3c2f 7370 616e 3e2c 202e 2e2e 293b 3c2f , ...);.
    <\n+00188d60: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00188d70: 6922 3e69 6e74 2073 6f61 705f 7373 6c5f i\">int soap_ssl_\n+00188d80: 636c 6965 6e74 5f63 6f6e 7465 7874 2873 client_context(s\n+00188d90: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00188da0: 2c20 736f 6170 5f73 736c 5f66 6c61 6773 , soap_ssl_flags\n+00188db0: 2066 6c61 6773 2c20 636f 6e73 7420 6368 flags, const ch\n+00188dc0: 6172 202a 6b65 7966 696c 652c 2063 6f6e ar *keyfile, con\n+00188dd0: 7374 2063 6861 7220 2a70 6173 7377 6f72 st char *passwor\n+00188de0: 642c 2063 6f6e 7374 2063 6861 7220 2a63 d, const char *c\n+00188df0: 6166 696c 652c 2063 6f6e 7374 2063 6861 afile, const cha\n+00188e00: 7220 2a63 6170 6174 682c 2063 6f6e 7374 r *capath, const\n+00188e10: 2063 6861 7220 2a72 616e 6466 696c 6529 char *randfile)\n+00188e20: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Initial\n+00188e40: 697a 6520 7468 6520 636c 6965 6e74 2d73 ize the client-s\n+00188e50: 6964 6520 5353 4c2f 544c 5320 636f 6e74 ide SSL/TLS cont\n+00188e60: 6578 742e 3c2f 6469 763e 3c2f 6469 763e ext.
    \n+00188e70: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    By de\n+00188e90: 6661 756c 742c 2073 6572 7665 7220 6175 fault, server au\n+00188ea0: 7468 656e 7469 6361 7469 6f6e 2069 7320 thentication is \n+00188eb0: 656e 6162 6c65 6420 616e 6420 7468 6520 enabled and the \n+00188ec0: 3c65 6d3e 3c63 6f64 653e 6361 6365 7274 cacert\n+00188ed0: 732e 7065 6d3c 2f63 6f64 653e 3c2f 656d s.pem or capat\n+00188ef0: 683c 2f63 6f64 653e 2028 6e6f 7420 7573 h (not us\n+00188f00: 6564 2077 6974 6820 474e 5554 4c53 2920 ed with GNUTLS) \n+00188f10: 6d75 7374 2062 6520 7365 7420 736f 2074 must be set so t\n+00188f20: 6861 7420 7468 6520 4341 2063 6572 7469 hat the CA certi\n+00188f30: 6669 6361 7465 7320 6f66 2074 6865 2073 ficates of the s\n+00188f40: 6572 7665 7228 7329 2061 7265 2061 6363 erver(s) are acc\n+00188f50: 6573 7369 626c 6520 6174 2072 756e 2074 essible at run t\n+00188f60: 696d 652e 2054 6865 203c 656d 3e3c 636f ime. The cacerts.pem file \n+00188f90: 696e 636c 7564 6564 2069 6e20 7468 6520 included in the \n+00188fa0: 6753 4f41 5020 736f 7572 6365 2063 6f64 gSOAP source cod\n+00188fb0: 6520 7061 636b 6167 6520 636f 6e74 6169 e package contai\n+00188fc0: 6e73 2074 6865 2063 6572 7469 6669 6361 ns the certifica\n+00188fd0: 7465 7320 6f66 2063 6f6d 6d6f 6e20 4341 tes of common CA\n+00188fe0: 732e 2054 6869 7320 6669 6c65 206d 7573 s. This file mus\n+00188ff0: 7420 6265 2073 7570 706c 6965 6420 7769 t be supplied wi\n+00189000: 7468 2074 6865 2063 6c69 656e 742c 2069 th the client, i\n+00189010: 6620 7365 7276 6572 2061 7574 6865 6e74 f server authent\n+00189020: 6963 6174 696f 6e20 6973 2072 6571 7569 ication is requi\n+00189030: 7265 642e 2041 6c74 6572 6e61 7469 7665 red. Alternative\n+00189040: 6c79 2c20 796f 7520 6361 6e20 7573 6520 ly, you can use \n+00189050: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n+00189060: 6f61 702f 706c 7567 696e 2f63 6163 6572 oap/plugin/cacer\n+00189070: 7473 2e68 3c2f 636f 6465 3e3c 2f65 6d3e ts.h\n+00189080: 2061 6e64 203c 656d 3e3c 636f 6465 3e67 and g\n+00189090: 736f 6170 2f70 6c75 6769 6e2f 6361 6365 soap/plugin/cace\n+001890a0: 7274 732e 633c 2f63 6f64 653e 3c2f 656d rts.c code to embed \n+001890c0: 4341 2063 6572 7469 6669 6361 7465 7320 CA certificates \n+001890d0: 696e 2079 6f75 7220 636c 6965 6e74 2063 in your client c\n+001890e0: 6f64 652e 3c2f 703e 0a3c 703e 596f 7520 ode.

    .

    You \n+001890f0: 6361 6e20 7370 6563 6966 7920 6120 6369 can specify a ci\n+00189100: 7068 6572 206c 6973 7420 746f 2075 7365 pher list to use\n+00189110: 2077 6974 6820 544c 5376 312e 3220 616e with TLSv1.2 an\n+00189120: 6420 6265 6c6f 7720 7769 7468 203c 636f d below with SSL_CTX_set_c\n+00189140: 6970 6865 725f 6c69 7374 2873 6f61 702d ipher_list(soap-\n+00189150: 2667 743b 6374 782c 2022 2e2e 2e22 293c >ctx, \"...\")<\n+00189160: 2f63 6f64 653e 2077 6865 7265 203c 636f /code> where soap->ctx<\n+00189180: 2f63 6f64 653e 2069 7320 7468 6520 5353 /code> is the SS\n+00189190: 4c20 636f 6e74 6578 7420 6372 6561 7465 L context create\n+001891a0: 6420 6279 203c 636f 6465 3e3c 6120 636c d by so\n+00189230: 6170 5f73 736c 5f63 6c69 656e 745f 636f ap_ssl_client_co\n+00189240: 6e74 6578 7428 293c 2f61 3e3c 2f63 6f64 ntext(). Likewise, us\n+00189260: 6520 3c63 6f64 653e 5353 4c5f 4354 585f e SSL_CTX_\n+00189270: 7365 745f 6369 7068 6572 7375 6974 6573 set_ciphersuites\n+00189280: 2873 6f61 702d 2667 743b 6374 782c 2022 (soap->ctx, \"\n+00189290: 2e2e 2e22 293c 2f63 6f64 653e 2074 6f20 ...\") to \n+001892a0: 636f 6e66 6967 7572 6520 7468 6520 6176 configure the av\n+001892b0: 6169 6c61 626c 6520 544c 5376 312e 3320 ailable TLSv1.3 \n+001892c0: 6369 7068 6572 7375 6974 6573 2e3c 2f70 ciphersuites..

    We refer to\n+001892e0: 2074 6865 204f 7065 6e53 534c 2064 6f63 the OpenSSL doc\n+001892f0: 756d 656e 7461 7469 6f6e 2061 6e64 206d umentation and m\n+00189300: 616e 7561 6c20 7061 6765 7320 6f66 203c anual pages of <\n 00189310: 636f 6465 3e53 534c 5f43 5458 5f73 6574 code>SSL_CTX_set\n-00189320: 5f63 6970 6865 7273 7569 7465 733c 2f63 _ciphersuites for details\n-00189340: 206f 6e20 7468 6520 6c61 7465 7374 2063 on the latest c\n-00189350: 6970 6865 7220 6c69 7374 7320 616e 6420 ipher lists and \n-00189360: 7375 6974 6573 2061 7661 696c 6162 6c65 suites available\n-00189370: 2074 6f20 7573 652e 3c2f 703e 0a3c 703e to use.

    .

    \n-00189380: 4f74 6865 7220 636c 6965 6e74 2d73 6964 Other client-sid\n-00189390: 6520 5353 4c20 6f70 7469 6f6e 7320 6172 e SSL options ar\n-001893a0: 6520 3c63 6f64 653e 2353 4f41 505f 5353 e #SOAP_SS\n-001893b0: 4c5f 534b 4950 5f48 4f53 545f 4348 4543 L_SKIP_HOST_CHEC\n-001893c0: 4b3c 2f63 6f64 653e 2074 6f20 736b 6970 K to skip\n-001893d0: 2074 6865 2068 6f73 7420 6e61 6d65 2076 the host name v\n-001893e0: 6572 6966 6963 6174 696f 6e20 6368 6563 erification chec\n-001893f0: 6b20 616e 6420 3c63 6f64 653e 2353 4f41 k and #SOA\n-00189400: 505f 5353 4c5f 414c 4c4f 575f 4558 5049 P_SSL_ALLOW_EXPI\n-00189410: 5245 445f 4345 5254 4946 4943 4154 453c RED_CERTIFICATE<\n-00189420: 2f63 6f64 653e 2074 6f20 616c 6c6f 7720 /code> to allow \n-00189430: 636f 6e6e 6563 7469 6e67 2074 6f20 6120 connecting to a \n-00189440: 686f 7374 2077 6974 6820 616e 2065 7870 host with an exp\n-00189450: 6972 6564 2063 6572 7469 6669 6361 7465 ired certificate\n-00189460: 2e20 466f 7220 6578 616d 706c 652c 3c2f . For example,.

    struct <\n-001894c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001894d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001894e0: 6874 6d6c 223e 736f 6170 3c2f 613e 203c html\">soap <\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 3b3c html\">soap;<\n-00189520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_ss\n-00189590: 6c5f 696e 6974 3c2f 613e 2829 3b20 3c73 l_init(); /* init Open\n-001895c0: 5353 4c20 2873 6b69 7070 696e 6720 7468 SSL (skipping th\n-001895d0: 6973 206f 7220 6361 6c6c 696e 6720 6d75 is or calling mu\n-001895e0: 6c74 6970 6c65 2074 696d 6573 2069 7320 ltiple times is \n-001895f0: 4f4b 2c20 7369 6e63 6520 7468 6520 656e OK, since the en\n-00189600: 6769 6e65 2077 696c 6c20 696e 6974 2053 gine will init S\n-00189610: 534c 2061 7574 6f6d 6174 6963 616c 6c79 SL automatically\n-00189620: 2920 2a2f 3c2f 7370 616e 3e3c 2f64 6976 ) */.
    /* soa\n-00189660: 705f 7373 6c5f 6e6f 696e 6974 2829 3b20 p_ssl_noinit(); \n-00189670: 2a2f 3c2f 7370 616e 3e20 3c73 7061 6e20 */ \n-00189690: 2f2a 2064 6f20 6e6f 7420 696e 6974 204f /* do not init O\n-001896a0: 7065 6e53 534c 2028 6966 2053 534c 2069 penSSL (if SSL i\n-001896b0: 7320 616c 7265 6164 7920 696e 6974 6961 s already initia\n-001896c0: 6c69 7a65 6420 656c 7365 7768 6572 6520 lized elsewhere \n-001896d0: 696e 2074 6869 7320 6170 706c 6963 6174 in this applicat\n-001896e0: 696f 6e29 202a 2f3c 2f73 7061 6e3e 3c2f ion) */.
    soap\n-00189760: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&<\n-00189770: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00189780: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00189790: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-001897a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (s\n-00189830: 6f61 705f 7373 6c5f 636c 6965 6e74 5f63 oap_ssl_client_c\n-00189840: 6f6e 7465 7874 3c2f 613e 2826 616d 703b ontext(&\n-00189850: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00189880: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..\n-00189920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . \n-001899c0: 7c20 3c61 2063 6c61 7373 3d22 636f 6465 | SOAP_SSL_ALLO\n-00189a20: 575f 4558 5049 5245 445f 4345 5254 4946 W_EXPIRED_CERTIF\n-00189a30: 4943 4154 453c 2f61 3e2c 203c 2f64 6976 ICATE, .
    "client.p\n-00189a80: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em",\n-00189a90: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00189ab0: 206b 6579 6669 6c65 3a20 7265 7175 6972 keyfile: requir\n-00189ac0: 6564 206f 6e6c 7920 7768 656e 2063 6c69 ed only when cli\n-00189ad0: 656e 7420 6d75 7374 2061 7574 6865 6e74 ent must authent\n-00189ae0: 6963 6174 6520 746f 2073 6572 7665 7220 icate to server \n-00189af0: 2873 6565 2053 534c 2064 6f63 7320 6f6e (see SSL docs on\n-00189b00: 2068 6f77 2074 6f20 6f62 7461 696e 2074 how to obtain t\n-00189b10: 6869 7320 6669 6c65 2920 2a2f 3c2f 7370 his file) */
    .
    <\n-00189b40: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00189b50: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00189b60: 3b70 6173 7377 6f72 6426 7175 6f74 3b3c ;password"<\n-00189b70: 2f73 7061 6e3e 2c20 2020 2020 2020 2020 /span>, \n-00189b80: 203c 7370 616e 2063 6c61 7373 3d22 636f /* passwo\n-00189ba0: 7264 2074 6f20 7265 6164 2074 6865 206b rd to read the k\n-00189bb0: 6579 2066 696c 6520 286e 6f74 2075 7365 ey file (not use\n-00189bc0: 6420 7769 7468 2047 4e55 544c 5329 202a d with GNUTLS) *\n-00189bd0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00189be0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00189c10: 2671 756f 743b 6361 6365 7274 732e 7065 "cacerts.pe\n-00189c20: 6d26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 m", \n-00189c30: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* c\n-00189c50: 6163 6572 7420 6669 6c65 2074 6f20 7374 acert file to st\n-00189c60: 6f72 6520 7472 7573 7465 6420 6365 7274 ore trusted cert\n-00189c70: 6966 6963 6174 6573 2028 6e65 6564 6564 ificates (needed\n-00189c80: 2074 6f20 7665 7269 6679 2073 6572 7665 to verify serve\n-00189c90: 7229 202a 2f3c 2f73 7061 6e3e 3c2f 6469 r) */.
    NULL, \n-00189cc0: 2020 2020 2020 2020 2020 2020 3c73 7061 /* capath to d\n-00189cf0: 6972 6563 746f 7279 2077 6974 6820 7472 irectory with tr\n-00189d00: 7573 7465 6420 6365 7274 6966 6963 6174 usted certificat\n-00189d10: 6573 202a 2f3c 2f73 7061 6e3e 203c 2f64 es */ .
    NULL \n-00189d40: 2020 2020 203c 7370 616e 2063 6c61 7373 /* if\n-00189d60: 2072 616e 6466 696c 6521 3d4e 554c 4c3a randfile!=NULL:\n-00189d70: 2075 7365 2061 2066 696c 6520 7769 7468 use a file with\n-00189d80: 2072 616e 646f 6d20 6461 7461 2074 6f20 random data to \n-00189d90: 7365 6564 2072 616e 646f 6d6e 6573 7320 seed randomness \n-00189da0: 2a2f 3c2f 7370 616e 3e20 203c 2f64 6976 */ .
    ))
    .\n-00189de0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..
    ex\n-00189ec0: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE)\n-00189ed0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } ..<\n-00189fe0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00189ff0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-0018a000: 705f 5f73 736c 5f68 746d 6c5f 6761 3264 p__ssl_html_ga2d\n-0018a010: 3764 3434 6630 6236 3564 6139 3934 3166 7d44f0b65da9941f\n-0018a020: 3032 3732 6230 6637 3337 3435 6635 223e 0272b0f73745f5\">\n-0018a030: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    #d\n-0018a0c0: 6566 696e 6520 534f 4150 5f53 534c 5f53 efine SOAP_SSL_S\n-0018a0d0: 4b49 505f 484f 5354 5f43 4845 434b 3c2f KIP_HOST_CHECK
    soap_ssl_\n-0018a100: 666c 6167 7320 666c 6167 2066 6f72 2063 flags flag for c\n-0018a110: 6c69 656e 7473 2074 6f20 616c 6c6f 7720 lients to allow \n-0018a120: 636c 6965 6e74 7320 746f 2073 6b69 7020 clients to skip \n-0018a130: 636f 6d6d 6f6e 206e 616d 6520 6368 6563 common name chec\n-0018a140: 6b73 2061 6761 696e 7374 2074 6865 2068 ks against the h\n-0018a150: 6f73 7420 6e61 6d65 206f 6620 2e2e 2e3c ost name of ...<\n-0018a160: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0018a180: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0018a190: 6170 322e 683a 3538 3638 3c2f 6469 763e ap2.h:5868
    \n-0018a1a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0018a280: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n-0018a2a0: 5f53 534c 5f52 4551 5549 5245 5f53 4552 _SSL_REQUIRE_SER\n-0018a2b0: 5645 525f 4155 5448 454e 5449 4341 5449 VER_AUTHENTICATI\n-0018a2c0: 4f4e 3c2f 6469 763e 3c64 6976 2063 6c61 ON
    soap_\n-0018a2e0: 7373 6c5f 666c 6167 7320 666c 6167 2066 ssl_flags flag f\n-0018a2f0: 6f72 2063 6c69 656e 7473 2074 6f20 7265 or clients to re\n-0018a300: 7175 6972 6520 7365 7276 6572 7320 746f quire servers to\n-0018a310: 2061 7574 6865 6e74 6963 6174 6520 746f authenticate to\n-0018a320: 2063 6c69 656e 7473 2064 7572 696e 6720 clients during \n-0018a330: 7468 6520 4854 5450 5320 6861 6e64 7368 the HTTPS handsh\n-0018a340: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-0018a360: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0018a370: 7464 736f 6170 322e 683a 3538 3632 3c2f tdsoap2.h:5862
    .\n-0018a460: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP\n-0018a480: 5f53 534c 5f41 4c4c 4f57 5f45 5850 4952 _SSL_ALLOW_EXPIR\n-0018a490: 4544 5f43 4552 5449 4649 4341 5445 3c2f ED_CERTIFICATE
    soap_ssl_\n-0018a4c0: 666c 6167 7320 666c 6167 2076 616c 7565 flags flag value\n-0018a4d0: 2074 6f20 616c 6c6f 7720 7365 6c66 2d73 to allow self-s\n-0018a4e0: 6967 6e65 6420 616e 6420 6578 7069 7265 igned and expire\n-0018a4f0: 6420 6365 7274 6966 6963 6174 6573 2061 d certificates a\n-0018a500: 6e64 2074 686f 7365 2077 6974 686f 7574 nd those without\n-0018a510: 2043 524c 2074 6f20 6265 2075 2e2e 2e3c CRL to be u...<\n-0018a520: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0018a540: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0018a550: 6170 322e 683a 3538 3332 3c2f 6469 763e ap2.h:5832
    \n-0018a560: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    For systems bas\n-0018a590: 6564 206f 6e20 4d69 6372 6f73 6f66 7420 ed on Microsoft \n-0018a5a0: 7769 6e64 6f77 732c 2074 6865 2057 696e windows, the Win\n-0018a5b0: 496e 6574 206d 6f64 756c 6520 6361 6e20 Inet module can \n-0018a5c0: 6265 2075 7365 6420 696e 7374 6561 642c be used instead,\n-0018a5d0: 2073 6565 203c 636f 6465 3e6d 6f64 5f67 see mod_g\n-0018a5e0: 736f 6170 2f67 736f 6170 5f77 696e 2f77 soap/gsoap_win/w\n-0018a5f0: 696e 696e 6574 3c2f 636f 6465 3e2e 3c2f ininet..

    Since rele\n-0018a610: 6173 6520 7665 7273 696f 6e20 322e 382e ase version 2.8.\n-0018a620: 3230 2053 534c 2076 3320 6973 2064 6973 20 SSL v3 is dis\n-0018a630: 6162 6c65 642e 2054 6f20 656e 6162 6c65 abled. To enable\n-0018a640: 2053 534c 2076 3320 746f 6765 7468 6572 SSL v3 together\n-0018a650: 2077 6974 6820 544c 5320 312e 3020 616e with TLS 1.0 an\n-0018a660: 6420 6869 6768 6572 2c20 7573 6520 3c63 d higher, use #SOAP_SSLv3_\n-0018a680: 544c 5376 313c 2f63 6f64 653e 2077 6974 TLSv1 wit\n-0018a690: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap_\n-0018a720: 7373 6c5f 7365 7276 6572 5f63 6f6e 7465 ssl_server_conte\n-0018a730: 7874 3c2f 613e 3c2f 636f 6465 3e2e 2054 xt. T\n-0018a740: 6f20 7573 6520 544c 5320 312e 3120 616e o use TLS 1.1 an\n-0018a750: 6420 312e 3220 7573 6520 3c63 6f64 653e d 1.2 use \n-0018a760: 534f 4150 5f54 4c53 7631 5f31 207c 2053 SOAP_TLSv1_1 | S\n-0018a770: 4f41 505f 544c 5376 315f 323c 2f63 6f64 OAP_TLSv1_2. To use TLS 1\n-0018a790: 2e32 206f 6e6c 7920 7573 6520 3c63 6f64 .2 only use #SOAP_TLSv1_2<\n-0018a7b0: 2f63 6f64 653e 2e20 546f 2075 7365 2053 /code>. To use S\n-0018a7c0: 534c 2076 3320 6f6e 6c79 2075 7365 203c SL v3 only use <\n-0018a7d0: 636f 6465 3e23 534f 4150 5f53 534c 7633 code>#SOAP_SSLv3\n-0018a7e0: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 703e .

    .

    \n-0018a7f0: 546f 2064 6973 6162 6c65 2073 6572 7665 To disable serve\n-0018a800: 7220 6175 7468 656e 7469 6361 7469 6f6e r authentication\n-0018a810: 2066 6f72 2074 6573 7469 6e67 2070 7572 for testing pur\n-0018a820: 706f 7365 732c 2075 7365 2074 6865 2066 poses, use the f\n-0018a830: 6f6c 6c6f 7769 6e67 3a3c 2f70 3e0a 3c64 ollowing:

    .
    \n-0018a880: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap\n-0018a8e0: 5f73 736c 5f63 6c69 656e 745f 636f 6e74 _ssl_client_cont\n-0018a8f0: 6578 743c 2f61 3e28 2661 6d70 3b3c 6120 ext(&soap, .\n-0018a9c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL, .
    NULL, .
    NULL, .
    NULL, .
    NULL .
    ))
    \n-0018aa80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-0018aab0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0018aac0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0018aad0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-0018aae0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n-0018aaf0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n-0018ab00: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n-0018ab10: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n-0018ab50: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    . \n-0018ab70: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU\n-0018ab80: 5245 293b 203c 2f64 6976 3e0a 3c64 6976 RE);
    .} \n-0018aba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0018ac50: 534f 4150 5f53 534c 5f4e 4f5f 4155 5448 SOAP_SSL_NO_AUTH\n-0018ac60: 454e 5449 4341 5449 4f4e 3c2f 613e 3c2f ENTICATION
    #define \n-0018ac90: 534f 4150 5f53 534c 5f4e 4f5f 4155 5448 SOAP_SSL_NO_AUTH\n-0018aca0: 454e 5449 4341 5449 4f4e 3c2f 6469 763e ENTICATION
    \n-0018acb0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    soap_ssl_flag\n-0018acd0: 7320 666c 6167 2076 616c 7565 2074 6f20 s flag value to \n-0018ace0: 6469 7361 626c 6520 6175 7468 656e 7469 disable authenti\n-0018acf0: 6361 7469 6f6e 206f 6620 7468 6520 7065 cation of the pe\n-0018ad00: 6572 3c2f 6469 763e 3c64 6976 2063 6c61 er
    De\n-0018ad20: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-0018ad30: 6473 6f61 7032 2e68 3a35 3834 303c 2f64 dsoap2.h:5840
    .
    \n-0018ad50: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    where\n-0018aeb0: 2c20 666f 7220 6578 616d 706c 653a 3c2f , for example:.

    void\n-0018af10: 2073 6967 7069 7065 5f68 616e 646c 6528 sigpipe_handle(\n-0018af20: 3c73 7061 6e20 636c 6173 733d 226b 6579 int x) { }.
    Warning\n-0018af90: 3c2f 6474 3e3c 6464 3e49 7420 6973 2069
    It is i\n-0018afa0: 6d70 6f72 7461 6e74 2074 6861 7420 7468 mportant that th\n-0018afb0: 6520 3c63 6f64 653e 2357 4954 485f 4f50 e #WITH_OP\n-0018afc0: 454e 5353 4c3c 2f63 6f64 653e 206d 6163 ENSSL mac\n-0018afd0: 726f 2069 7320 636f 6e73 6973 7465 6e74 ro is consistent\n-0018afe0: 6c79 2064 6566 696e 6564 2074 6f20 636f ly defined to co\n-0018aff0: 6d70 696c 6520 7468 6520 736f 7572 6365 mpile the source\n-0018b000: 732c 2073 7563 6820 6173 203c 656d 3e3c s, such as <\n-0018b010: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-0018b020: 6170 322e 6370 703c 2f63 6f64 653e 3c2f ap2.cpp, s\n-0018b040: 6f61 7043 2e63 7070 3c2f 636f 6465 3e3c oapC.cpp<\n-0018b050: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n-0018b060: 736f 6170 436c 6965 6e74 2e63 7070 3c2f soapClient.cpp, \n-0018b080: 3c63 6f64 653e 736f 6170 5365 7276 6572 soapServer\n-0018b090: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-0018b0a0: 2c20 616e 6420 616c 6c20 6170 706c 6963 , and all applic\n-0018b0b0: 6174 696f 6e20 736f 7572 6365 7320 7468 ation sources th\n-0018b0c0: 6174 2069 6e63 6c75 6465 203c 656d 3e3c at include <\n-0018b0d0: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-0018b0e0: 6170 322e 683c 2f63 6f64 653e 3c2f 656d ap2.h or s\n-0018b100: 6f61 7048 2e68 3c2f 636f 6465 3e3c 2f65 oapH.h. If the macro\n-0018b120: 7320 6172 6520 6e6f 7420 636f 6e73 6973 s are not consis\n-0018b130: 7465 6e74 6c79 2075 7365 642c 2074 6865 tently used, the\n-0018b140: 2061 7070 6c69 6361 7469 6f6e 2077 696c application wil\n-0018b150: 6c20 6372 6173 6820 6475 6520 746f 2061 l crash due to a\n-0018b160: 206d 6973 6d61 7463 6865 7320 696e 2074 mismatches in t\n-0018b170: 6865 2064 6563 6c61 7261 7469 6f6e 2061 he declaration a\n-0018b180: 6e64 2061 6363 6573 7320 6f66 2074 6865 nd access of the\n-0018b190: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context. Alte\n-0018b200: 726e 6174 6976 656c 792c 2075 7365 206c rnatively, use l\n-0018b210: 6962 7261 7279 203c 623e 3c63 6f64 653e ibrary \n-0018b220: 2d6c 6773 6f61 7073 736c 3c2f 636f 6465 -lgsoapssl or -lgsoapssl++ and co\n-0018b260: 6d70 696c 6520 6576 6572 7974 6869 6e67 mpile everything\n-0018b270: 2065 6c73 6520 7769 7468 203c 636f 6465 else with #WITH_OPENSSL.
    .
    \n-0018b2a0: 0a43 6f6e 6375 7272 656e 7420 636c 6965 .Concurrent clie\n-0018b2b0: 6e74 2063 616c 6c73 2077 6974 6820 7468 nt calls with th\n-0018b2c0: 7265 6164 7320 7368 6f75 6c64 2075 7365 reads should use\n-0018b2d0: 2073 6570 6172 6174 6520 3c63 6f64 653e separate \n-0018b2e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-0018b330: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-0018b340: 6578 7473 2049 6e20 6164 6469 7469 6f6e exts In addition\n-0018b350: 2c20 7468 6520 7468 7265 6164 2069 6e69 , the thread ini\n-0018b360: 7469 616c 697a 6174 696f 6e20 636f 6465 tialization code\n-0018b370: 2064 6973 6375 7373 6564 2069 6e20 5365 discussed in Se\n-0018b380: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Secure Web s\n-0018b3c0: 6572 7669 6365 7320 7769 7468 2048 5454 ervices with HTT\n-0018b3d0: 5053 3c2f 613e 206d 7573 7420 6265 2075 PS must be u\n-0018b3e0: 7365 6420 746f 2070 726f 7065 726c 7920 sed to properly \n-0018b3f0: 7365 7475 7020 4f70 656e 5353 4c20 696e setup OpenSSL in\n-0018b400: 2061 206d 756c 7469 2d74 6872 6561 6465 a multi-threade\n-0018b410: 6420 636c 6965 6e74 2061 7070 6c69 6361 d client applica\n-0018b420: 7469 6f6e 2e3c 2f64 643e 3c2f 646c 3e0a tion.
    .\n-0018b430: 3c70 3e53 6565 2061 6c73 6f20 4150 4920

    See also API \n-0018b440: 646f 6375 6d65 6e74 6174 696f 6e20 4d6f documentation Mo\n-0018b450: 6475 6c65 203c 6120 636c 6173 733d 2265 dule SSL/TLS context\n-0018b490: 2061 6e64 2066 756e 6374 696f 6e73 3c2f and functions for more deta\n-0018b4b0: 696c 7320 6f6e 2074 6865 2053 534c 2f54 ils on the SSL/T\n-0018b4c0: 4c53 2066 756e 6374 696f 6e73 2e3c 2f70 LS functions..

    You can als\n-0018b4e0: 6f20 7573 6520 7468 6520 5769 6e49 6e65 o use the WinIne\n-0018b4f0: 7420 696e 7465 7266 6163 6520 746f 2065 t interface to e\n-0018b500: 7374 6162 6c69 7368 2073 6563 7572 6520 stablish secure \n-0018b510: 4854 5450 5320 636f 6e6e 6563 7469 6f6e HTTPS connection\n-0018b520: 7320 6f6e 2057 696e 646f 7773 206d 6163 s on Windows mac\n-0018b530: 6869 6e65 732c 2061 7661 696c 6162 6c65 hines, available\n-0018b540: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/mod_gsoa\n-0018b560: 703c 2f63 6f64 653e 3c2f 656d 3e20 6469 p di\n-0018b570: 7265 6374 6f72 7920 6f66 2074 6865 2067 rectory of the g\n-0018b580: 534f 4150 2073 6f75 7263 6520 636f 6465 SOAP source code\n-0018b590: 2070 6163 6b61 6765 2c20 7365 6520 616c package, see al\n-0018b5a0: 736f 2053 6563 7469 6f6e 203c 6120 636c so Section The Win\n-0018b5e0: 496e 6574 2070 6c75 6769 6e3c 2f61 3e2e Inet plugin.\n-0018b5f0: 204f 7220 796f 7520 6361 6e20 7573 6520 Or you can use \n-0018b600: 7468 6520 4355 524c 2070 6c75 6769 6e20 the CURL plugin \n-0018b610: 746f 2075 7365 2043 5552 4c20 746f 2065 to use CURL to e\n-0018b620: 7374 6162 6c69 7368 2073 6563 7572 6520 stablish secure \n-0018b630: 4854 5450 5320 636f 6e6e 6563 7469 6f6e HTTPS connection\n-0018b640: 732c 2073 6565 2053 6563 7469 6f6e 203c s, see Section <\n-0018b650: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0018b660: 663d 2269 6e64 6578 2e68 746d 6c23 6375 f=\"index.html#cu\n-0018b670: 726c 706c 7567 696e 223e 5468 6520 4355 rlplugin\">The CU\n-0018b680: 524c 2070 6c75 6769 6e3c 2f61 3e2e 3c2f RL plugin..

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

    .

    <\n-0018b700: 2f61 3e0a 5353 4c20 6175 7468 656e 7469 /a>.SSL authenti\n-0018b710: 6361 7469 6f6e 2063 616c 6c62 6163 6b73 cation callbacks\n-0018b720: 3c2f 6832 3e0a 3c70 3e54 6865 203c 636f

    .

    The fsslauth callback func\n-0018b750: 7469 6f6e 2063 6f6e 7472 6f6c 7320 4f70 tion controls Op\n-0018b760: 656e 5353 4c2f 474e 5554 4c53 2061 7574 enSSL/GNUTLS aut\n-0018b770: 6865 6e74 6963 6174 696f 6e20 696e 6974 hentication init\n-0018b780: 6961 6c69 7a61 7469 6f6e 3a3c 2f70 3e0a ialization:

    .\n-0018b790: 3c75 6c3e 0a3c 6c69 3e3c 636f 6465 3e69
    .
    ENGIN\n-0018e280: 4520 2a65 3b20 3c2f 6469 763e 0a3c 6469 E *e;
    . \n-0018e2a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!(e = ENGI\n-0018e2d0: 4e45 5f62 795f 6964 2865 6e67 696e 6529 NE_by_id(engine)\n-0018e2e0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n-0018e300: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n-0018e310: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0018e330: 743b 4572 726f 7220 6669 6e64 696e 6720 t;Error finding \n-0018e340: 656e 6769 6e65 2025 735c 6e26 7175 6f74 engine %s\\n"\n-0018e350: 3b3c 2f73 7061 6e3e 2c20 656e 6769 6e65 ;, engine\n-0018e360: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    else if\n-0018e3c0: 3c2f 7370 616e 3e20 2821 454e 4749 4e45 (!ENGINE\n-0018e3d0: 5f73 6574 5f64 6566 6175 6c74 2865 2c20 _set_default(e, \n-0018e3e0: 454e 4749 4e45 5f4d 4554 484f 445f 414c ENGINE_METHOD_AL\n-0018e3f0: 4c29 2920 3c2f 6469 763e 0a3c 6469 7620 L))
    .
    \n-0018e410: 2066 7072 696e 7466 2873 7464 6572 722c fprintf(stderr,\n-0018e420: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0018e440: 6f74 3b45 7272 6f72 2075 7369 6e67 2065 ot;Error using e\n-0018e450: 6e67 696e 6520 2573 5c6e 2671 756f 743b ngine %s\\n"\n-0018e460: 3c2f 7370 616e 3e2c 2065 6e67 696e 6529 , engine)\n-0018e470: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    ...\n-0018e490: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n-0018e4b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-0018e4d0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The f\n-0018e4f0: 6f6c 6c6f 7769 6e67 2074 6162 6c65 206c ollowing table l\n-0018e500: 6973 7473 2074 6865 206e 616d 6573 206f ists the names o\n-0018e510: 6620 7468 6520 6861 7264 7761 7265 2061 f the hardware a\n-0018e520: 6e64 2073 6f66 7477 6172 6520 656e 6769 nd software engi\n-0018e530: 6e65 733a 3c2f 703e 0a3c 7461 626c 6520 nes:

    .....\n-0018e620: 3c63 6f64 653e 6f70 656e 7373 6c3c 2f63 openssl <\n-0018e6a0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n-0018e710: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n-0018e860: 636f 6465 3e63 6869 6c3c 2f63 6f64 653e code>chil\n-0018e870: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....<\n-0018e9a0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0018e9b0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0018e9c0: 3e3c 636f 6465 3e6e 7572 6f6e 3c2f 636f >nuron .....<\n-0018eb80: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-0018eb90: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-0018eba0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-0018ebe0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0018ebf0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0018ec00: 3e53 7572 6557 6172 6520 6163 6365 6c65 >SureWare accele\n-0018ec10: 7261 7469 6f6e 2068 6172 6477 6172 6520 ration hardware \n-0018ec20: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 ..

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

    .

    \n-0018ec70: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .SSL on Window\n-0018eca0: 733c 2f68 323e 0a3c 703e 5365 7420 7468 s

    .

    Set th\n-0018ecb0: 6520 6675 6c6c 2070 6174 6820 746f 203c e full path to <\n-0018ecc0: 656d 3e3c 636f 6465 3e6c 6962 7373 6c2e em>libssl.\n-0018ecd0: 6c69 623c 2f63 6f64 653e 3c2f 656d 3e20 lib \n-0018ece0: 616e 6420 3c65 6d3e 3c63 6f64 653e 6c69 and li\n-0018ecf0: 6263 7279 7074 6f2e 6c69 623c 2f63 6f64 bcrypto.lib under th\n-0018ed10: 6520 4d53 5643 2b2b 2022 5072 6f6a 6563 e MSVC++ \"Projec\n-0018ed20: 7473 2220 6d65 6e75 2c20 7468 656e 2063 ts\" menu, then c\n-0018ed30: 686f 6f73 6520 224c 696e 6b22 3a20 224f hoose \"Link\": \"O\n-0018ed40: 626a 6563 742f 4d6f 6475 6c65 7322 2e20 bject/Modules\". \n-0018ed50: 506c 6561 7365 206d 616b 6520 7375 7265 Please make sure\n-0018ed60: 203c 656d 3e3c 636f 6465 3e6c 6962 7373 libss\n-0018ed70: 6c33 322e 646c 6c3c 2f63 6f64 653e 3c2f l32.dll and libeay32.dll can b\n-0018edb0: 6520 6c6f 6164 6564 2062 7920 796f 7572 e loaded by your\n-0018edc0: 2061 7070 6c69 6361 7469 6f6e 732c 2074 applications, t\n-0018edd0: 6875 7320 7468 6579 206d 7573 7420 6265 hus they must be\n-0018ede0: 2069 6e73 7461 6c6c 6564 2070 726f 7065 installed prope\n-0018edf0: 726c 7920 6f6e 2074 6865 2074 6172 6765 rly on the targe\n-0018ee00: 7420 6d61 6368 696e 652e 3c2f 703e 0a3c t machine.

    .<\n-0018ee10: 703e 4966 2079 6f75 2772 6520 7573 696e p>If you're usin\n-0018ee20: 6720 636f 6d70 696c 6174 696f 6e20 7365 g compilation se\n-0018ee30: 7474 696e 6773 2073 7563 6820 6173 203c ttings such as <\n-0018ee40: 636f 6465 3e2f 4d54 643c 2f63 6f64 653e code>/MTd\n-0018ee50: 2074 6865 6e20 6c69 6e6b 2074 6f20 7468 then link to th\n-0018ee60: 6520 636f 7272 6563 7420 3c65 6d3e 3c63 e correct libeay32MTd.\n-0018ee80: 6c69 623c 2f63 6f64 653e 3c2f 656d 3e20 lib
    \n-0018ee90: 616e 6420 3c65 6d3e 3c63 6f64 653e 7373 and ss\n-0018eea0: 6c65 6179 3332 4d54 642e 6c69 623c 2f63 leay32MTd.lib librar\n-0018eec0: 6965 732e 3c2f 703e 0a3c 703e 416c 7465 ies.

    .

    Alte\n-0018eed0: 726e 6174 6976 656c 792c 2079 6f75 2063 rnatively, you c\n-0018eee0: 616e 2075 7365 2074 6865 2057 696e 496e an use the WinIn\n-0018eef0: 6574 2069 6e74 6572 6661 6365 2066 6f72 et interface for\n-0018ef00: 2073 6563 7572 6520 636f 6e6e 6563 7469 secure connecti\n-0018ef10: 6f6e 732c 2061 7661 696c 6162 6c65 2069 ons, available i\n-0018ef20: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n-0018ef30: 6773 6f61 702f 6d6f 645f 6773 6f61 703c gsoap/mod_gsoap<\n-0018ef40: 2f63 6f64 653e 3c2f 656d 3e20 6469 7265 /code> dire\n-0018ef50: 6374 6f72 7920 6f66 2074 6865 2067 534f ctory of the gSO\n-0018ef60: 4150 2070 6163 6b61 6765 2c20 7365 6520 AP package, see \n-0018ef70: 616c 736f 2053 6563 7469 6f6e 203c 6120 also Section The W\n-0018efb0: 696e 496e 6574 2070 6c75 6769 6e3c 2f61 inInet plugin. Or you can us\n-0018efd0: 6520 7468 6520 4355 524c 2070 6c75 6769 e the CURL plugi\n-0018efe0: 6e20 746f 2075 7365 2043 5552 4c20 666f n to use CURL fo\n-0018eff0: 7220 7365 6375 7265 2063 6f6e 6e65 6374 r secure connect\n-0018f000: 696f 6e73 2c20 7365 6520 5365 6374 696f ions, see Sectio\n-0018f010: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n The\n-0018f040: 2043 5552 4c20 706c 7567 696e 3c2f 613e CURL plugin\n-0018f050: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-0018f090: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Zlib com\n-0018f0c0: 7072 6573 7369 6f6e 3c2f 6832 3e0a 3c70 pression

    .To enable defla\n-0018f0e0: 7465 2061 6e64 2067 7a69 7020 636f 6d70 te and gzip comp\n-0018f0f0: 7265 7373 696f 6e20 7769 7468 205a 6c69 ression with Zli\n-0018f100: 622c 2069 6e73 7461 6c6c 205a 6c69 6220 b, install Zlib \n-0018f110: 6672 6f6d 203c 6120 6872 6566 3d22 6874 from http://www.zl\n-0018f140: 6962 2e6f 7267 3c2f 613e 2069 6620 6e6f ib.org if no\n-0018f150: 7420 616c 7265 6164 7920 696e 7374 616c t already instal\n-0018f160: 6c65 6420 6f6e 2079 6f75 7220 7379 7374 led on your syst\n-0018f170: 656d 2e20 436f 6d70 696c 6520 3c65 6d3e em. Compile \n-0018f180: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n-0018f190: 6f61 7032 2e63 7070 3c2f 636f 6465 3e3c oap2.cpp<\n-0018f1a0: 2f65 6d3e 2028 6f72 203c 656d 3e3c 636f /em> (or gsoap/stdsoap\n-0018f1c0: 322e 633c 2f63 6f64 653e 3c2f 656d 3e29 2.c
    )\n-0018f1d0: 2061 6e64 2061 6c6c 2079 6f75 7220 736f and all your so\n-0018f1e0: 7572 6365 7320 7468 6174 2069 6e63 6c75 urces that inclu\n-0018f1f0: 6465 203c 656d 3e3c 636f 6465 3e67 736f de gso\n-0018f200: 6170 2f73 7464 736f 6170 322e 683c 2f63 ap/stdsoap2.h or soapH.h with \n-0018f240: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n-0018f250: 6720 3c63 6f64 653e 2357 4954 485f 475a g #WITH_GZ\n-0018f260: 4950 3c2f 636f 6465 3e20 616e 6420 6c69 IP and li\n-0018f270: 6e6b 2079 6f75 7220 636f 6465 2077 6974 nk your code wit\n-0018f280: 6820 7468 6520 5a6c 6962 206c 6962 7261 h the Zlib libra\n-0018f290: 7279 2c20 652e 672e 203c 623e 3c63 6f64 ry, e.g. -lz\n-0018f2b0: 206f 6e20 556e 6978 2f4c 696e 7578 2070 on Unix/Linux p\n-0018f2c0: 6c61 7466 6f72 6d73 2e3c 2f70 3e0a 3c70 latforms.

    .The gzip compre\n-0018f2e0: 7373 696f 6e20 6973 206f 7274 686f 676f ssion is orthogo\n-0018f2f0: 6e61 6c20 746f 2061 6c6c 2074 7261 6e73 nal to all trans\n-0018f300: 706f 7274 2065 6e63 6f64 696e 6773 2073 port encodings s\n-0018f310: 7563 6820 6173 2048 5454 502c 2053 534c uch as HTTP, SSL\n-0018f320: 2c20 4449 4d45 2c20 616e 6420 6361 6e20 , DIME, and can \n-0018f330: 6265 2075 7365 6420 7769 7468 206f 7468 be used with oth\n-0018f340: 6572 2074 7261 6e73 706f 7274 206c 6179 er transport lay\n-0018f350: 6572 732e 2059 6f75 2063 616e 2065 7665 ers. You can eve\n-0018f360: 6e20 7361 7665 2061 6e64 206c 6f61 6420 n save and load \n-0018f370: 636f 6d70 7265 7373 6564 2058 4d4c 2064 compressed XML d\n-0018f380: 6174 6120 746f 2f66 726f 6d20 6669 6c65 ata to/from file\n-0018f390: 732e 3c2f 703e 0a3c 703e 5477 6f20 636f s.

    .

    Two co\n-0018f3a0: 6d70 7265 7373 696f 6e20 666f 726d 6174 mpression format\n-0018f3b0: 7320 6172 6520 7375 7070 6f72 7465 6420 s are supported \n-0018f3c0: 6279 2074 6865 2065 6e67 696e 653a 2064 by the engine: d\n-0018f3d0: 6566 6c61 7465 2061 6e64 2067 7a69 702e eflate and gzip.\n-0018f3e0: 2054 6865 2067 7a69 7020 666f 726d 6174 The gzip format\n-0018f3f0: 2069 7320 7573 6564 2062 7920 6465 6661 is used by defa\n-0018f400: 756c 742e 2054 6865 2067 7a69 7020 666f ult. The gzip fo\n-0018f410: 726d 6174 2068 6173 2073 6576 6572 616c rmat has several\n-0018f420: 2062 656e 6566 6974 7320 6f76 6572 2064 benefits over d\n-0018f430: 6566 6c61 7465 2e20 4669 7273 746c 792c eflate. Firstly,\n-0018f440: 2074 6865 2065 6e67 696e 6520 6175 746f the engine auto\n-0018f450: 6d61 7469 6361 6c6c 7920 6465 7465 6374 matically detect\n-0018f460: 7320 677a 6970 2063 6f6d 7072 6573 7365 s gzip compresse\n-0018f470: 6420 696e 626f 756e 6420 6d65 7373 6167 d inbound messag\n-0018f480: 6573 2c20 6576 656e 2077 6974 686f 7574 es, even without\n-0018f490: 2048 5454 5020 6865 6164 6572 732c 2062 HTTP headers, b\n-0018f4a0: 7920 6368 6563 6b69 6e67 2066 6f72 2074 y checking for t\n-0018f4b0: 6865 2070 7265 7365 6e63 6520 6f66 2061 he presence of a\n-0018f4c0: 2067 7a69 7020 6865 6164 6572 2069 6e20 gzip header in \n-0018f4d0: 7468 6520 6d65 7373 6167 6520 636f 6e74 the message cont\n-0018f4e0: 656e 742e 2053 6563 6f6e 646c 792c 2067 ent. Secondly, g\n-0018f4f0: 7a69 7020 696e 636c 7564 6573 2061 2043 zip includes a C\n-0018f500: 5243 3332 2063 6865 636b 7375 6d20 746f RC32 checksum to\n-0018f510: 2065 6e73 7572 6520 6d65 7373 6167 6573 ensure messages\n-0018f520: 2068 6176 6520 6265 656e 2063 6f72 7265 have been corre\n-0018f530: 6374 6c79 2072 6563 6569 7665 642e 2054 ctly received. T\n-0018f540: 6869 7264 6c79 2c20 677a 6970 2063 6f6d hirdly, gzip com\n-0018f550: 7072 6573 7365 6420 636f 6e74 656e 7420 pressed content \n-0018f560: 6361 6e20 6265 2064 6563 6f6d 7072 6573 can be decompres\n-0018f570: 7365 6420 7769 7468 206f 7468 6572 2063 sed with other c\n-0018f580: 6f6d 7072 6573 7369 6f6e 2073 6f66 7477 ompression softw\n-0018f590: 6172 652c 2073 6f20 796f 7520 6361 6e20 are, so you can \n-0018f5a0: 6465 636f 6d70 7265 7373 2058 4d4c 2064 decompress XML d\n-0018f5b0: 6174 6120 7361 7665 6420 6279 2061 2067 ata saved by a g\n-0018f5c0: 534f 4150 2061 7070 6c69 6361 7469 6f6e SOAP application\n-0018f5d0: 2069 6e20 677a 6970 2066 6f72 6d61 742e in gzip format.\n-0018f5e0: 3c2f 703e 0a3c 703e 477a 6970 2063 6f6d

    .

    Gzip com\n-0018f5f0: 7072 6573 7369 6f6e 2069 7320 656e 6162 pression is enab\n-0018f600: 6c65 6420 6279 2063 6f6d 7069 6c69 6e67 led by compiling\n-0018f610: 2074 6865 2073 6f75 7263 6573 2077 6974 the sources wit\n-0018f620: 6820 636f 6d70 696c 652d 7469 6d65 2066 h compile-time f\n-0018f630: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n-0018f640: 475a 4950 3c2f 636f 6465 3e2e 2054 6f20 GZIP. To \n-0018f650: 7472 616e 736d 6974 2067 7a69 7020 636f transmit gzip co\n-0018f660: 6d70 7265 7373 6564 2053 4f41 502f 584d mpressed SOAP/XM\n-0018f670: 4c20 6461 7461 2c20 7365 7420 7468 6520 L data, set the \n-0018f680: 6f75 7470 7574 206d 6f64 6520 666c 6167 output mode flag\n-0018f690: 7320 746f 203c 636f 6465 3e23 534f 4150 s to #SOAP\n-0018f6a0: 5f45 4e43 5f5a 4c49 423c 2f63 6f64 653e _ENC_ZLIB\n-0018f6b0: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

    \n-0018f740: 736f 6170 5f69 6e69 743c 2f61 3e28 2661 soap_init(&a\n-0018f750: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .soap_set_omod\n-0018f800: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap, S\n-0018f890: 4f41 505f 454e 435f 5a4c 4942 3c2f 613e OAP_ENC_ZLIB\n-0018f8a0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // enab\n-0018f8c0: 6c65 205a 6c69 6226 2333 393b 7320 677a le Zlib's gz\n-0018f8d0: 6970 203c 2f73 7061 6e3e 3c2f 6469 763e ip
    \n-0018f8e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n-0018f910: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n-0018f920: 6c5f 6e73 5f5f 6d79 4d65 7468 6f64 2826 l_ns__myMethod(&\n-0018f930: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-0018f960: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...)) .
    ... \n-0018f9a0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-0018f9b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else.
    ... // success
    .
    soap_clr_omode<\n-0018fab0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0018fae0: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, SOA\n-0018fb40: 505f 454e 435f 5a4c 4942 3c2f 613e 293b P_ENC_ZLIB);\n-0018fb50: 203c 7370 616e 2063 6c61 7373 3d22 636f // disabl\n-0018fb70: 6520 5a6c 6962 2623 3339 3b73 2067 7a69 e Zlib's gzi\n-0018fb80: 7020 3c2f 7370 616e 3e3c 2f64 6976 3e0a p
    .\n-0018fb90: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    SOA\n-0018fc40: 505f 454e 435f 5a4c 4942 3c2f 613e 3c2f P_ENC_ZLIB
    #define \n-0018fc70: 534f 4150 5f45 4e43 5f5a 4c49 423c 2f64 SOAP_ENC_ZLIB
    soap_mode \n-0018fca0: 454e 4320 6f75 7470 7574 2066 6c61 6720 ENC output flag \n-0018fcb0: 7661 6c75 6520 746f 2063 6f6d 7072 6573 value to compres\n-0018fcc0: 7320 6d65 7373 6167 6573 2073 656e 742c s messages sent,\n-0018fcd0: 2072 6571 7569 7265 7320 7a6c 6962 2065 requires zlib e\n-0018fce0: 6e61 626c 6564 2077 6974 6820 636f 6d70 nabled with comp\n-0018fcf0: 696c 652d 7469 6d65 2066 6c2e 2e2e 3c2f ile-time fl...
    Defini\n-0018fd20: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-0018fd30: 7032 2e68 3a31 3738 383c 2f64 6976 3e3c p2.h:1788
    <\n-0018fd40: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-0018fd60: 5468 6973 2077 696c 6c20 7365 6e64 2061 This will send a\n-0018fd70: 2063 6f6d 7072 6573 7365 6420 534f 4150 compressed SOAP\n-0018fd80: 2f58 4d4c 2072 6571 7565 7374 2074 6f20 /XML request to \n-0018fd90: 6120 7365 7276 6963 652c 2070 726f 7669 a service, provi\n-0018fda0: 6465 6420 7468 6174 205a 6c69 6220 6973 ded that Zlib is\n-0018fdb0: 2069 6e73 7461 6c6c 6564 2061 6e64 206c installed and l\n-0018fdc0: 696e 6b65 6420 7769 7468 2074 6865 2061 inked with the a\n-0018fdd0: 7070 6c69 6361 7469 6f6e 2061 6e64 2074 pplication and t\n-0018fde0: 6865 2063 6f6d 7069 6c65 2d74 696d 6520 he compile-time \n-0018fdf0: 666c 6167 203c 636f 6465 3e23 5749 5448 flag #WITH\n-0018fe00: 5f47 5a49 503c 2f63 6f64 653e 206f 7074 _GZIP opt\n-0018fe10: 696f 6e20 7761 7320 7573 6564 2074 6f20 ion was used to \n-0018fe20: 636f 6d70 696c 6520 7468 6520 736f 7572 compile the sour\n-0018fe30: 6365 732e 2052 6563 6569 7669 6e67 2063 ces. Receiving c\n-0018fe40: 6f6d 7072 6573 7365 6420 534f 4150 2f58 ompressed SOAP/X\n-0018fe50: 4d4c 206f 7665 7220 4854 5450 2065 6974 ML over HTTP eit\n-0018fe60: 6865 7220 696e 2067 7a69 7020 6f72 2064 her in gzip or d\n-0018fe70: 6566 6c61 7465 2066 6f72 6d61 7473 2069 eflate formats i\n-0018fe80: 7320 6175 746f 6d61 7469 632e 2054 6865 s automatic. The\n-0018fe90: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC\n-0018fea0: 5f5a 4c49 423c 2f63 6f64 653e 2066 6c61 _ZLIB fla\n-0018feb0: 6720 646f 6573 206e 6f74 2068 6176 6520 g does not have \n-0018fec0: 746f 2062 6520 7365 7420 6174 2074 6865 to be set at the\n-0018fed0: 2073 6572 7665 7220 7369 6465 2074 6f20 server side to \n-0018fee0: 6163 6365 7074 2063 6f6d 7072 6573 7365 accept compresse\n-0018fef0: 6420 6d65 7373 6167 6573 2e20 5265 6164 d messages. Read\n-0018ff00: 696e 6720 616e 6420 7265 6365 6976 696e ing and receivin\n-0018ff10: 6720 677a 6970 2063 6f6d 7072 6573 7365 g gzip compresse\n-0018ff20: 6420 534f 4150 2f58 4d4c 2077 6974 686f d SOAP/XML witho\n-0018ff30: 7574 2048 5454 5020 6865 6164 6572 7320 ut HTTP headers \n-0018ff40: 2865 2e67 2e20 7769 7468 206f 7468 6572 (e.g. with other\n-0018ff50: 2074 7261 6e73 706f 7274 2070 726f 746f transport proto\n-0018ff60: 636f 6c73 2920 6973 2061 6c73 6f20 6175 cols) is also au\n-0018ff70: 746f 6d61 7469 632e 3c2f 703e 0a3c 703e tomatic.

    .

    \n-0018ff80: 546f 2063 6f6e 7472 6f6c 2074 6865 206c To control the l\n-0018ff90: 6576 656c 206f 6620 636f 6d70 7265 7373 evel of compress\n-0018ffa0: 696f 6e20 666f 7220 6f75 7462 6f75 6e64 ion for outbound\n-0018ffb0: 206d 6573 7361 6765 732c 2079 6f75 2063 messages, you c\n-0018ffc0: 616e 2073 6574 2074 6865 203c 636f 6465 an set the soap::z_lev\n-00190090: 656c 3c2f 613e 3c2f 636f 6465 3e20 746f el to\n-001900a0: 2061 2076 616c 7565 2062 6574 7765 656e a value between\n-001900b0: 2031 2061 6e64 2039 2c20 7768 6572 6520 1 and 9, where \n-001900c0: 3120 6973 2074 6865 2062 6573 7420 7370 1 is the best sp\n-001900d0: 6565 6420 616e 6420 3920 6973 2074 6865 eed and 9 is the\n-001900e0: 2062 6573 7420 636f 6d70 7265 7373 696f best compressio\n-001900f0: 6e20 2864 6566 6175 6c74 2069 7320 3629 n (default is 6)\n-00190100: 2e20 466f 7220 6578 616d 706c 653c 2f70 . For example.

    s\n-00190190: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n-001901a0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    ..
    soap.z_level \n-00190390: 3d20 393b 203c 7370 616e 2063 6c61 7373 = 9; // be\n-001903b0: 7374 2063 6f6d 7072 6573 7369 6f6e 203c st compression <\n-001903c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .unsigned short \n-001904a0: 7a5f 6c65 7665 6c3c 2f64 6976 3e3c 6469 z_level
    \n-001904c0: 5573 6572 2d64 6566 696e 6162 6c65 2063 User-definable c\n-001904d0: 6f6d 7072 6573 7369 6f6e 206c 6576 656c ompression level\n-001904e0: 2066 6f72 2067 7a69 7020 636f 6d70 7265 for gzip compre\n-001904f0: 7373 696f 6e20 2830 3d6e 6f6e 652c 2031 ssion (0=none, 1\n-00190500: 3d66 6173 7420 746f 2039 3d62 6573 7429 =fast to 9=best)\n-00190510: 2064 6566 6175 6c74 206c 6576 656c 2069 default level i\n-00190520: 7320 362e 3c2f 6469 763e 3c64 6976 2063 s 6.
    \n-00190540: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-00190550: 7374 6473 6f61 7032 2e68 3a33 3730 343c stdsoap2.h:3704<\n-00190560: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    To verify \n-00190590: 616e 6420 6d6f 6e69 746f 7220 636f 6d70 and monitor comp\n-001905a0: 7265 7373 696f 6e20 7261 7465 732c 2079 ression rates, y\n-001905b0: 6f75 2063 616e 2075 7365 2074 6865 2076 ou can use the v\n-001905c0: 616c 7565 7320 3c63 6f64 653e 3c61 2063 alues soap::z\n-00190680: 5f72 6174 696f 5f69 6e3c 2f61 3e3c 2f63 _ratio_in and <\n-001906a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001906b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001906c0: 6d6c 2361 6239 6430 6161 6230 6638 3965 ml#ab9d0aab0f89e\n-001906d0: 3231 3039 6261 3032 6361 3436 3063 3231 2109ba02ca460c21\n-001906e0: 3935 3431 2220 7469 746c 653d 2254 6865 9541\" title=\"The\n-001906f0: 2063 6f6d 7072 6573 7369 6f6e 2072 6174 compression rat\n-00190700: 696f 203d 2063 6f6d 7072 6573 7365 642e io = compressed.\n-00190710: 7369 7a65 2f75 6e63 6f6d 7072 6573 7365 size/uncompresse\n-00190720: 642e 7369 7a65 206f 6620 7468 6520 636f d.size of the co\n-00190730: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message\n-00190740: 2073 656e 742e 223e 736f 6170 3a3a 7a5f sent.\">soap::z_\n-00190750: 7261 7469 6f5f 6f75 743c 2f61 3e3c 2f63 ratio_out. These two \n-00190770: 666c 6f61 7420 7661 6c75 6573 206c 6965 float values lie\n-00190780: 2062 6574 7765 656e 2030 2e30 2061 6e64 between 0.0 and\n-00190790: 2031 2e30 2061 6e64 2065 7870 7265 7373 1.0 and express\n-001907a0: 2074 6865 2072 6174 696f 206f 6620 7468 the ratio of th\n-001907b0: 6520 636f 6d70 7265 7373 6564 206d 6573 e compressed mes\n-001907c0: 7361 6765 206c 656e 6774 6820 6f76 6572 sage length over\n-001907d0: 2075 6e63 6f6d 7072 6573 7365 6420 6d65 uncompressed me\n-001907e0: 7373 6167 6520 6c65 6e67 7468 2e3c 2f70 ssage length..

    if (s\n-00190840: 6f61 705f 6361 6c6c 5f6e 735f 5f6d 794d oap_call_ns__myM\n-00190850: 6574 686f 6428 2661 6d70 3b3c 6120 636c ethod(&soap, ...)\n-00190890: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    ... \n-001908e0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-001908f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n-00190910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    else\n-00190940: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00190960: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    prin\n-00190980: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n-001909a0: 7175 6f74 3b43 6f6d 7072 6573 7369 6f6e quot;Compression\n-001909b0: 2072 6174 696f 3a20 2566 2525 2028 696e ratio: %f%% (in\n-001909c0: 2920 2566 2525 2028 6f75 7429 5c6e 2671 ) %f%% (out)\\n&q\n-001909d0: 756f 743b 3c2f 7370 616e 3e2c 2031 3030 uot;, 100\n-001909e0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00190a10: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .z_rati\n-00190a60: 6f5f 6f75 743c 2f61 3e2c 2031 3030 2a3c o_out, 100*<\n-00190a70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00190a80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00190a90: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-00190aa0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00190ab0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00190ac0: 6874 6d6c 2361 3663 6331 3561 3131 6138 html#a6cc15a11a8\n-00190ad0: 3937 6364 6538 3166 3433 3033 3836 3664 97cde81f4303866d\n-00190ae0: 6637 3437 6163 223e 7a5f 7261 7469 6f5f f747ac\">z_ratio_\n-00190af0: 696e 3c2f 613e 293b 203c 2f64 6976 3e0a in);
    .\n-00190b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-00190b30: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success<\n-00190b40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n-00190b60: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::z\n-00190c00: 5f72 6174 696f 5f69 6e3c 2f61 3e3c 2f64 _ratio_in
    float z_r\n-00190c30: 6174 696f 5f69 6e3c 2f64 6976 3e3c 6469 atio_in
    \n-00190c50: 5468 6520 636f 6d70 7265 7373 696f 6e20 The compression \n-00190c60: 7261 7469 6f20 3d20 636f 6d70 7265 7373 ratio = compress\n-00190c70: 6564 2e73 697a 652f 756e 636f 6d70 7265 ed.size/uncompre\n-00190c80: 7373 6564 2e73 697a 6520 6f66 2074 6865 ssed.size of the\n-00190c90: 2063 6f6d 7072 6573 7365 6420 6d65 7373 compressed mess\n-00190ca0: 6167 6520 7265 6365 6976 6564 2e3c 2f64 age received.
    Definit\n-00190cd0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-00190ce0: 322e 683a 3337 3039 3c2f 6469 763e 3c2f 2.h:3709
    .<\n-00190ea0: 703e 4e6f 7465 3a20 6c6f 7765 7220 7261 p>Note: lower ra\n-00190eb0: 7469 6f73 206d 6561 6e20 6869 6768 6572 tios mean higher\n-00190ec0: 2063 6f6d 7072 6573 7369 6f6e 2072 6174 compression rat\n-00190ed0: 6573 2e3c 2f70 3e0a 3c70 3e43 6f6d 7072 es.

    .

    Compr\n-00190ee0: 6573 7365 6420 7472 616e 7366 6572 7320 essed transfers \n-00190ef0: 7265 7175 6972 6520 6275 6666 6572 696e require bufferin\n-00190f00: 6720 7468 6520 656e 7469 7265 206f 7574 g the entire out\n-00190f10: 7075 7420 6d65 7373 6167 6520 746f 2064 put message to d\n-00190f20: 6574 6572 6d69 6e65 2048 5454 5020 6d65 etermine HTTP me\n-00190f30: 7373 6167 6520 6c65 6e67 7468 2e20 5468 ssage length. Th\n-00190f40: 6973 206d 6561 6e73 2074 6861 7420 7468 is means that th\n-00190f50: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO\n-00190f60: 5f53 544f 5245 3c2f 636f 6465 3e20 666c _STORE fl\n-00190f70: 6167 2069 7320 6175 746f 6d61 7469 6361 ag is automatica\n-00190f80: 6c6c 7920 7365 7420 7768 656e 2074 6865 lly set when the\n-00190f90: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC\n-00190fa0: 5f5a 4c49 423c 2f63 6f64 653e 2066 6c61 _ZLIB fla\n-00190fb0: 6720 6973 2073 6574 2074 6f20 7365 6e64 g is set to send\n-00190fc0: 2063 6f6d 7072 6573 7365 6420 6d65 7373 compressed mess\n-00190fd0: 6167 6573 2e20 5468 6520 7573 6520 6f66 ages. The use of\n-00190fe0: 2048 5454 5020 6368 756e 6b69 6e67 2073 HTTP chunking s\n-00190ff0: 6967 6e69 6669 6361 6e74 6c79 2072 6564 ignificantly red\n-00191000: 7563 6573 206d 656d 6f72 7920 7573 6167 uces memory usag\n-00191010: 6520 616e 6420 6d61 7920 7370 6565 6420 e and may speed \n-00191020: 7570 2074 6865 2074 7261 6e73 6d69 7373 up the transmiss\n-00191030: 696f 6e20 6f66 2063 6f6d 7072 6573 7365 ion of compresse\n-00191040: 6420 534f 4150 2f58 4d4c 206d 6573 7361 d SOAP/XML messa\n-00191050: 6765 732e 2054 6869 7320 6973 2061 6363 ges. This is acc\n-00191060: 6f6d 706c 6973 6865 6420 6279 2073 6574 omplished by set\n-00191070: 7469 6e67 2074 6865 203c 636f 6465 3e23 ting the #\n-00191080: 534f 4150 5f49 4f5f 4348 554e 4b3c 2f63 SOAP_IO_CHUNK flag with <\n-001910a0: 636f 6465 3e23 534f 4150 5f45 4e43 5f5a code>#SOAP_ENC_Z\n-001910b0: 4c49 423c 2f63 6f64 653e 2066 6f72 2074 LIB for t\n-001910c0: 6865 206f 7574 7075 7420 6d6f 6465 2e20 he output mode. \n-001910d0: 486f 7765 7665 722c 2073 6f6d 6520 5765 However, some We\n-001910e0: 6220 7365 7276 6572 7320 646f 206e 6f74 b servers do not\n-001910f0: 2061 6363 6570 7420 4854 5450 2063 6875 accept HTTP chu\n-00191100: 6e6b 6564 2072 6571 7565 7374 206d 6573 nked request mes\n-00191110: 7361 6765 7320 2865 7665 6e20 7768 656e sages (even when\n-00191120: 2074 6865 7920 7265 7475 726e 2048 5454 they return HTT\n-00191130: 5020 6368 756e 6b65 6420 6d65 7373 6167 P chunked messag\n-00191140: 6573 2129 2e20 5374 616e 642d 616c 6f6e es!). Stand-alon\n-00191150: 6520 6753 4f41 5020 7365 7276 6963 6573 e gSOAP services\n-00191160: 2061 6c77 6179 7320 6163 6365 7074 2063 always accept c\n-00191170: 6875 6e6b 6564 2072 6571 7565 7374 206d hunked request m\n-00191180: 6573 7361 6765 732e 3c2f 703e 0a3c 703e essages.

    .

    \n-00191190: 546f 2072 6573 7472 6963 7420 7468 6520 To restrict the \n-001911a0: 636f 6d70 7265 7373 696f 6e20 746f 2074 compression to t\n-001911b0: 6865 2064 6566 6c61 7465 2066 6f72 6d61 he deflate forma\n-001911c0: 7420 6f6e 6c79 2c20 636f 6d70 696c 6520 t only, compile \n-001911d0: 7468 6520 736f 7572 6365 7320 7769 7468 the sources with\n-001911e0: 2074 6865 2063 6f6d 7069 6c65 2d74 696d the compile-tim\n-001911f0: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI\n-00191200: 5448 5f5a 4c49 423c 2f63 6f64 653e 2e20 TH_ZLIB. \n-00191210: 5468 6973 206c 696d 6974 7320 636f 6d70 This limits comp\n-00191220: 7265 7373 696f 6e20 616e 6420 6465 636f ression and deco\n-00191230: 6d70 7265 7373 696f 6e20 746f 2074 6865 mpression to the\n-00191240: 2064 6566 6c61 7465 2066 6f72 6d61 742e deflate format.\n-00191250: 204f 6e6c 7920 706c 6169 6e20 616e 6420 Only plain and \n-00191260: 6465 666c 6174 6564 206d 6573 7361 6765 deflated message\n-00191270: 7320 6361 6e20 6265 2065 7863 6861 6e67 s can be exchang\n-00191280: 6564 2c20 677a 6970 2069 7320 6e6f 7420 ed, gzip is not \n-00191290: 7375 7070 6f72 7465 6420 7769 7468 2074 supported with t\n-001912a0: 6869 7320 6f70 7469 6f6e 2e20 5265 6365 his option. Rece\n-001912b0: 6976 696e 6720 677a 6970 2063 6f6d 7072 iving gzip compr\n-001912c0: 6573 7365 6420 636f 6e74 656e 7420 6973 essed content is\n-001912d0: 2061 7574 6f6d 6174 6963 2c20 6576 656e automatic, even\n-001912e0: 2069 6e20 7468 6520 6162 7365 6e63 6520 in the absence \n-001912f0: 6f66 2048 5454 5020 6865 6164 6572 732e of HTTP headers.\n-00191300: 2052 6563 6569 7669 6e67 2064 6566 6c61 Receiving defla\n-00191310: 7465 2063 6f6d 7072 6573 7365 6420 636f te compressed co\n-00191320: 6e74 656e 7420 6973 206e 6f74 2061 7574 ntent is not aut\n-00191330: 6f6d 6174 6963 2069 6e20 7468 6520 6162 omatic in the ab\n-00191340: 7365 6e63 6520 6f66 2048 5454 5020 6865 sence of HTTP he\n-00191350: 6164 6572 7320 616e 6420 7265 7175 6972 aders and requir\n-00191360: 6573 2074 6865 2066 6c61 6720 3c63 6f64 es the flag #SOAP_ENC_ZLIB\n-00191380: 3c2f 636f 6465 3e20 746f 2062 6520 7365 to be se\n-00191390: 7420 666f 7220 7468 6520 696e 7075 7420 t for the input \n-001913a0: 6d6f 6465 2074 6f20 6465 636f 6d70 7265 mode to decompre\n-001913b0: 7373 2064 6566 6c61 7465 6420 6461 7461 ss deflated data\n-001913c0: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

    .
    Warning
    It is impo\n-00191400: 7274 616e 7420 7468 6174 2074 6865 203c rtant that the <\n-00191410: 636f 6465 3e23 5749 5448 5f47 5a49 503c code>#WITH_GZIP<\n-00191420: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and #WITH_ZLIB macros must b\n-00191450: 6520 636f 6e73 6973 7465 6e74 6c79 2064 e consistently d\n-00191460: 6566 696e 6564 2074 6f20 636f 6d70 696c efined to compil\n-00191470: 6520 7468 6520 736f 7572 6365 732c 2073 e the sources, s\n-00191480: 7563 6820 6173 203c 656d 3e3c 636f 6465 uch as gsoap/stdsoap2.\n-001914a0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2c cpp,\n-001914b0: 203c 656d 3e3c 636f 6465 3e73 6f61 7043 soapC\n-001914c0: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-001914d0: 2c20 3c65 6d3e 3c63 6f64 653e 736f 6170 , soap\n-001914e0: 436c 6965 6e74 2e63 7070 3c2f 636f 6465 Client.cpp, soapServer.cpp\n-00191510: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 616e , an\n-00191520: 6420 616c 6c20 6170 706c 6963 6174 696f d all applicatio\n-00191530: 6e20 736f 7572 6365 7320 7468 6174 2069 n sources that i\n-00191540: 6e63 6c75 6465 203c 656d 3e3c 636f 6465 nclude gsoap/stdsoap2.\n-00191560: 683c 2f63 6f64 653e 3c2f 656d 3e20 6f72 h or\n-00191570: 203c 656d 3e3c 636f 6465 3e73 6f61 7048 soapH\n-00191580: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 .h. \n-00191590: 4966 2074 6865 206d 6163 726f 7320 6172 If the macros ar\n-001915a0: 6520 6e6f 7420 636f 6e73 6973 7465 6e74 e not consistent\n-001915b0: 6c79 2075 7365 642c 2074 6865 2061 7070 ly used, the app\n-001915c0: 6c69 6361 7469 6f6e 2077 696c 6c20 6372 lication will cr\n-001915d0: 6173 6820 6475 6520 746f 2061 206d 6973 ash due to a mis\n-001915e0: 6d61 7463 6865 7320 696e 2074 6865 2064 matches in the d\n-001915f0: 6563 6c61 7261 7469 6f6e 2061 6e64 2061 eclaration and a\n-00191600: 6363 6573 7320 6f66 2074 6865 203c 636f ccess of the s\n-00191660: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n-00191670: 6f6e 7465 7874 2e3c 2f64 643e 3c2f 646c ontext.
    .

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

    .

    \n-001916e0: 3c2f 613e 0a43 6c69 656e 742d 7369 6465 .Client-side\n-001916f0: 2063 6f6f 6b69 6520 7375 7070 6f72 743c cookie support<\n-00191700: 2f68 323e 0a3c 703e 436c 6965 6e74 2d73 /h2>.

    Client-s\n-00191710: 6964 6520 636f 6f6b 6965 2073 7570 706f ide cookie suppo\n-00191720: 7274 2069 7320 6f70 7469 6f6e 616c 2e20 rt is optional. \n-00191730: 546f 2065 6e61 626c 6520 636f 6f6b 6965 To enable cookie\n-00191740: 2073 7570 706f 7274 2c20 636f 6d70 696c support, compil\n-00191750: 6520 616c 6c20 736f 7572 6365 7320 7769 e all sources wi\n-00191760: 7468 2074 6865 2063 6f6d 7069 6c65 2d74 th the compile-t\n-00191770: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n-00191780: 5749 5448 5f43 4f4f 4b49 4553 3c2f 636f WITH_COOKIES, for example\n-001917a0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     c++\n-001917c0: 202d 4457 4954 485f 434f 4f4b 4945 5320   -DWITH_COOKIES \n-001917d0: 2d6f 206d 7963 6c69 656e 7420 7374 6473  -o myclient stds\n-001917e0: 6f61 7032 2e63 7070 2073 6f61 7043 2e63  oap2.cpp soapC.c\n-001917f0: 7070 2073 6f61 7043 6c69 656e 742e 6370  pp soapClient.cp\n-00191800: 700a 3c2f 7072 653e 3c70 3e20 6f72 2061  p.

    or a\n-00191810: 6464 2074 6865 2066 6f6c 6c6f 7769 6e67 dd the following\n-00191820: 206c 696e 6520 746f 203c 656d 3e3c 636f line to stdsoap.h:

    .
    #define WITH_CO\n-001918a0: 4f4b 4945 533c 2f73 7061 6e3e 3c2f 6469 OKIES.

    Cli\n-001918d0: 656e 742d 7369 6465 2063 6f6f 6b69 6520 ent-side cookie \n-001918e0: 7375 7070 6f72 7420 6973 2066 756c 6c79 support is fully\n-001918f0: 2061 7574 6f6d 6174 6963 2e20 536f 206a automatic. So j\n-00191900: 7573 7420 636f 6d70 696c 6520 3c65 6d3e ust compile \n-00191910: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n-00191920: 6f61 7032 2e63 7070 3c2f 636f 6465 3e3c oap2.cpp<\n-00191930: 2f65 6d3e 2077 6974 6820 7468 6520 636f /em> with the co\n-00191940: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n-00191950: 3c63 6f64 653e 2357 4954 485f 434f 4f4b #WITH_COOK\n-00191960: 4945 533c 2f63 6f64 653e 2074 6f20 656e IES to en\n-00191970: 6162 6c65 2063 6f6f 6b69 652d 6261 7365 able cookie-base\n-00191980: 6420 7365 7373 696f 6e20 636f 6e74 726f d session contro\n-00191990: 6c20 696e 2079 6f75 7220 636c 6965 6e74 l in your client\n-001919a0: 2e3c 2f70 3e0a 3c70 3e41 2063 6f6f 6b69 .

    .

    A cooki\n-001919b0: 6520 7374 6f72 6520 7769 7468 2063 6f6f e store with coo\n-001919c0: 6b69 6573 2069 7320 6b65 7074 2061 6e64 kies is kept and\n-001919d0: 2072 6574 7572 6e65 6420 746f 2074 6865 returned to the\n-001919e0: 2061 7070 726f 7072 6961 7465 2073 6572 appropriate ser\n-001919f0: 7665 7273 2077 6865 6e20 7468 6520 636c vers when the cl\n-00191a00: 6965 6e74 2063 6f6e 6e65 6374 7320 746f ient connects to\n-00191a10: 2074 6865 7365 2073 6572 7665 7273 2e20 these servers. \n-00191a20: 436f 6f6b 6965 7320 6172 6520 6e6f 7420 Cookies are not \n-00191a30: 6175 746f 6d61 7469 6361 6c6c 7920 7361 automatically sa\n-00191a40: 7665 6420 746f 2061 2066 696c 6520 6279 ved to a file by\n-00191a50: 2061 2063 6c69 656e 742e 2041 6e20 6578 a client. An ex\n-00191a60: 616d 706c 6520 636f 6f6b 6965 2066 696c ample cookie fil\n-00191a70: 6520 6d61 6e61 6765 7220 6973 2069 6e63 e manager is inc\n-00191a80: 6c75 6465 6420 6173 2061 6e20 6578 7472 luded as an extr\n-00191a90: 6173 2069 6e20 7468 6520 6753 4f41 5020 as in the gSOAP \n-00191aa0: 7061 636b 6167 652e 2059 6f75 2063 616e package. You can\n-00191ab0: 2072 656d 6f76 6520 616c 6c20 636f 6f6b remove all cook\n-00191ac0: 6965 7320 6672 6f6d 2061 203c 636f 6465 ies from a soa\n-00191b20: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n-00191b30: 7465 7874 2062 7920 6361 6c6c 696e 6720 text by calling \n-00191b40: 3c63 6f64 653e 736f 6170 5f66 7265 655f soap_free_\n-00191b50: 636f 6f6b 6965 7328 736f 6170 293c 2f63 cookies(soap), which also\n-00191b70: 2068 6170 7065 6e73 2077 6865 6e20 796f happens when yo\n-00191b80: 7520 6361 6c6c 203c 636f 6465 3e73 6f61 u call soa\n-00191b90: 705f 646f 6e65 2873 6f61 7029 3c2f 636f p_done(soap).

    .

    To a\n-00191bb0: 766f 6964 2022 636f 6f6b 6965 2073 746f void \"cookie sto\n-00191bc0: 726d 7322 2063 6175 7365 6420 6279 206d rms\" caused by m\n-00191bd0: 616c 6963 696f 7573 2073 6572 7665 7273 alicious servers\n-00191be0: 2074 6861 7420 7265 7475 726e 2061 6e20 that return an \n-00191bf0: 756e 7265 6173 6f6e 6162 6c65 2061 6d6f unreasonable amo\n-00191c00: 756e 7420 6f66 2063 6f6f 6b69 6573 2c20 unt of cookies, \n-00191c10: 6753 4f41 5020 636c 6965 6e74 732f 7365 gSOAP clients/se\n-00191c20: 7276 6572 7320 6172 6520 6c69 6d69 7465 rvers are limite\n-00191c30: 6420 746f 2061 2063 6f6f 6b69 6520 7374 d to a cookie st\n-00191c40: 6f72 6520 7369 7a65 206f 6620 3c63 6f64 ore size of soap::\n-00191d10: 636f 6f6b 6965 5f6d 6178 3c2f 613e 3c2f cookie_max that the u\n-00191d30: 7365 7220 6361 6e20 6368 616e 6765 2c20 ser can change, \n-00191d40: 666f 7220 6578 616d 706c 653a 3c2f 703e for example:

    \n-00191d50: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n-00191d90: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n-00191e00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .soap-&g\n-00191eb0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;cooki\n-00191f00: 655f 6d61 783c 2f61 3e20 3d20 3130 3b3c e_max = 10;<\n-00191f10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-00191f60: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00191f70: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-00191fb0: 6f61 703a 3a63 6f6f 6b69 655f 6d61 783c oap::cookie_max<\n-00191fc0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    int\n-00191fe0: 2063 6f6f 6b69 655f 6d61 783c 2f64 6976 cookie_max
    User-definab\n-00192010: 6c65 206d 6178 696d 756d 206e 756d 6265 le maximum numbe\n-00192020: 7220 6f66 2061 6374 6976 6520 636f 6f6b r of active cook\n-00192030: 6965 7320 616c 6c6f 7765 6420 746f 2062 ies allowed to b\n-00192040: 6520 7365 7420 7769 7468 2073 6f61 705f e set with soap_\n-00192050: 7365 745f 636f 6f6b 6965 2062 6566 6f72 set_cookie befor\n-00192060: 6520 636f 6f6b 6965 202e 2e2e 3c2f 6469 e cookie ...
    Definiti\n-00192090: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-001920a0: 2e68 3a32 3937 333c 2f64 6976 3e3c 2f64 .h:2973
    .

    Th\n-001920d0: 6520 636f 6f6b 6965 2073 746f 7265 2069 e cookie store i\n-001920e0: 7320 6120 6c69 6e6b 6564 206c 6973 7420 s a linked list \n-001920f0: 6f66 203c 636f 6465 3e3c 6120 636c 6173 of \n-00192140: 736f 6170 5f63 6f6f 6b69 653c 2f61 3e3c soap_cookie<\n-00192150: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure\n-00192160: 7320 706f 696e 7465 6420 746f 2062 7920 s pointed to by \n-00192170: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::cookies\n-00192200: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 703e .

    \n-00192210: 0a3c 703e 5369 6e63 6520 7468 6520 636f .

    Since the co\n-00192220: 6f6b 6965 2073 746f 7265 2069 7320 6c69 okie store is li\n-00192230: 6e6b 6564 2074 6f20 7468 6520 6375 7272 nked to the curr\n-00192240: 656e 7420 3c63 6f64 653e 3c61 2063 6c61 ent soap context, a\n-001922b0: 6e64 2065 6163 6820 7468 7265 6164 206d nd each thread m\n-001922c0: 7573 7420 7573 6520 6974 7320 6f77 6e20 ust use its own \n-001922d0: 636f 6e74 6578 742c 2065 6163 6820 7468 context, each th\n-001922e0: 7265 6164 2061 6c73 6f20 6861 7320 6974 read also has it\n-001922f0: 7320 6f77 6e20 636f 6f6b 6965 2073 746f s own cookie sto\n-00192300: 7265 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 re.

    .

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

    ..Serve\n-00192370: 722d 7369 6465 2063 6f6f 6b69 6520 7375 r-side cookie su\n-00192380: 7070 6f72 743c 2f68 323e 0a3c 703e 5468 pport

    .

    Th\n-00192390: 6973 2066 6561 7475 7265 2069 7320 6e6f is feature is no\n-001923a0: 7420 7265 636f 6d6d 656e 6465 6420 746f t recommended to\n-001923b0: 2069 6d70 6c65 6d65 6e74 2073 7461 7465 implement state\n-001923c0: 2069 6e20 7374 616e 642d 616c 6f6e 6520 in stand-alone \n-001923d0: 7365 7276 6572 732e 2043 6f6f 6b69 6573 servers. Cookies\n-001923e0: 206d 6179 2072 6571 7569 7265 2061 2066 may require a f\n-001923f0: 6169 7220 616d 6f75 6e74 206f 6620 7072 air amount of pr\n-00192400: 6f63 6573 7369 6e67 206f 7665 7268 6561 ocessing overhea\n-00192410: 6420 616e 6420 6172 6520 6e6f 7420 696e d and are not in\n-00192420: 2066 6163 7420 6e65 6564 6564 2074 6f20 fact needed to \n-00192430: 696d 706c 656d 656e 7420 7374 6174 6566 implement statef\n-00192440: 756c 2073 6572 7669 6365 732c 2077 6869 ul services, whi\n-00192450: 6368 2069 7320 7479 7069 6361 6c6c 7920 ch is typically \n-00192460: 7065 7266 6f72 6d65 6420 7769 7468 2073 performed with s\n-00192470: 6573 7369 6f6e 2049 4473 2069 6e20 584d ession IDs in XM\n-00192480: 4c2f 4a53 4f4e 206d 6573 7361 6765 7320 L/JSON messages \n-00192490: 6f72 2062 7920 7061 7373 696e 6720 7468 or by passing th\n-001924a0: 6520 7365 7373 696f 6e20 4944 7320 7669 e session IDs vi\n-001924b0: 6120 7468 6520 5552 4c2e 3c2f 703e 0a3c a the URL.

    .<\n-001924c0: 703e 5365 7276 6572 2d73 6964 6520 636f p>Server-side co\n-001924d0: 6f6b 6965 2073 7570 706f 7274 2069 7320 okie support is \n-001924e0: 6f70 7469 6f6e 616c 2e20 546f 2065 6e61 optional. To ena\n-001924f0: 626c 6520 636f 6f6b 6965 2073 7570 706f ble cookie suppo\n-00192500: 7274 2c20 636f 6d70 696c 6520 616c 6c20 rt, compile all \n-00192510: 736f 7572 6365 7320 7769 7468 2063 6f6d sources with com\n-00192520: 7069 6c65 2d74 696d 6520 666c 6167 203c pile-time flag <\n-00192530: 636f 6465 3e23 5749 5448 5f43 4f4f 4b49 code>#WITH_COOKI\n-00192540: 4553 3c2f 636f 6465 3e3a 203c 2f70 3e3c ES
    :

    <\n-00192550: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-00192560: 656e 7422 3e20 632b 2b20 2d44 5749 5448 ent\"> c++ -DWITH\n-00192570: 5f43 4f4f 4b49 4553 202d 6f20 6d79 7365 _COOKIES -o myse\n-00192580: 7276 6572 202e 2e2e 0a3c 2f70 7265 3e3c rver ....<\n-00192590: 703e 2053 6565 2041 5049 2064 6f63 756d p> See API docum\n-001925a0: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module \n-001925b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n-001925e0: 4854 5450 2063 6f6f 6b69 6520 6675 6e63 HTTP cookie func\n-001925f0: 7469 6f6e 733c 2f61 3e20 666f 7220 7468 tions for th\n-00192600: 6520 636f 6f6b 6965 2041 5049 2066 756e e cookie API fun\n-00192610: 6374 696f 6e73 2e20 5365 6520 7468 6520 ctions. See the \n-00192620: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f73 HTTP se\n-00192650: 7373 696f 6e73 2070 6c75 6769 6e3c 2f61 ssions plugin for HTTP sessi\n-00192670: 6f6e 206d 616e 6167 656d 656e 7420 7769 on management wi\n-00192680: 7468 2063 6f6f 6b69 6573 2074 6861 7420 th cookies that \n-00192690: 6973 2072 6571 7569 7265 6420 666f 7220 is required for \n-001926a0: 7365 7276 6572 2d73 6964 6520 7365 7373 server-side sess\n-001926b0: 696f 6e20 636f 6e74 726f 6c2e 2054 6865 ion control. The\n-001926c0: 203c 636f 6465 3e23 5749 5448 5f43 4f4f #WITH_COO\n-001926d0: 4b49 4553 3c2f 636f 6465 3e20 666c 6167 KIES flag\n-001926e0: 2069 7320 7573 656c 6573 7320 7769 7468 is useless with\n-001926f0: 6f75 7420 7365 7276 6572 2d73 6964 6520 out server-side \n-00192700: 7365 7373 696f 6e20 6d61 6e61 6765 6d65 session manageme\n-00192710: 6e74 2061 6e64 2063 6f6e 7472 6f6c 2e3c nt and control.<\n-00192720: 2f70 3e0a 3c70 3e48 6572 6520 6973 2061 /p>.

    Here is a\n-00192730: 6e20 6f76 6572 7669 6577 206f 6620 7468 n overview of th\n-00192740: 6520 636f 6f6b 6965 2041 5049 2066 756e e cookie API fun\n-00192750: 6374 696f 6e73 3a3c 2f70 3e0a 3c75 6c3e ctions:

    .
      \n-00192760: 0a3c 6c69 3e3c 636f 6465 3e73 7472 7563 .
    • struc\n-00192770: 7420 3c61 2063 6c61 7373 3d22 656c 2220 t soap_co\n-001927c0: 6f6b 6965 3c2f 613e 202a 736f 6170 5f73 okie *soap_s\n-001927d0: 6574 5f63 6f6f 6b69 6528 7374 7275 6374 et_cookie(struct\n-001927e0: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n-001927f0: 7374 2063 6861 7220 2a6e 616d 652c 2063 st char *name, c\n-00192800: 6f6e 7374 2063 6861 7220 2a76 616c 7565 onst char *value\n-00192810: 2c20 636f 6e73 7420 6368 6172 202a 646f , const char *do\n-00192820: 6d61 696e 2c20 636f 6e73 7420 6368 6172 main, const char\n-00192830: 202a 7061 7468 293b 3c2f 636f 6465 3e20 *path); \n-00192840: 5468 6973 2066 756e 6374 696f 6e20 6164 This function ad\n-00192850: 6473 2061 2063 6f6f 6b69 6520 746f 2074 ds a cookie to t\n-00192860: 6865 2063 6f6f 6b69 6520 7374 6f72 6520 he cookie store \n-00192870: 6174 2074 6865 2073 6572 7665 7220 7369 at the server si\n-00192880: 6465 2c20 6966 206e 6f74 2061 6c72 6561 de, if not alrea\n-00192890: 6479 2074 6865 7265 2c20 7769 7468 2074 dy there, with t\n-001928a0: 6865 2073 7065 6369 6669 6564 203c 636f he specified name a\n-001928c0: 6e64 203c 636f 6465 3e76 616c 7565 3c2f nd value. The domain a\n-001928f0: 6e64 203c 636f 6465 3e70 6174 683c 2f63 nd path parameters \n-00192910: 6361 6e20 6265 2073 7065 6369 6669 6564 can be specified\n-00192920: 206f 7220 6361 6e20 6265 204e 554c 4c20 or can be NULL \n-00192930: 746f 2075 7365 2074 6865 2063 7572 7265 to use the curre\n-00192940: 6e74 2064 6f6d 6169 6e20 616e 6420 7061 nt domain and pa\n-00192950: 7468 2067 6976 656e 2062 7920 3c63 6f64 th given by soap::cookie\n-00192a10: 5f64 6f6d 6169 6e3c 2f61 3e3c 2f63 6f64 _domain and soa\n-00192ad0: 703a 3a63 6f6f 6b69 655f 7061 7468 3c2f p::cookie_path. Retur\n-00192af0: 6e73 2070 6f69 6e74 6572 2074 6f20 7468 ns pointer to th\n-00192b00: 6520 636f 6f6b 6965 2073 7472 7563 7475 e cookie structu\n-00192b10: 7265 2069 6e20 7468 6520 6461 7461 6261 re in the databa\n-00192b20: 7365 206f 7220 4e55 4c4c 2077 6865 6e20 se or NULL when \n-00192b30: 616e 2065 7272 6f72 206f 6363 7572 7265 an error occurre\n-00192b40: 642e 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 d.
    • .
    • int soap_set\n-00192bd0: 5f63 6f6f 6b69 655f 6578 7069 7265 2873 _cookie_expire(s\n-00192be0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-00192bf0: 2c20 636f 6e73 7420 6368 6172 202a 6e61 , const char *na\n-00192c00: 6d65 2c20 6c6f 6e67 2065 7870 6972 652c me, long expire,\n-00192c10: 2063 6f6e 7374 2063 6861 7220 2a64 6f6d const char *dom\n-00192c20: 6169 6e2c 2063 6f6e 7374 2063 6861 7220 ain, const char \n-00192c30: 2a70 6174 6829 3c2f 613e 3b3c 2f63 6f64 *path); This function\n-00192c50: 2073 6574 7320 7468 6520 6578 7069 7261 sets the expira\n-00192c60: 7469 6f6e 206f 6620 7468 6520 7370 6563 tion of the spec\n-00192c70: 6966 6965 6420 636f 6f6b 6965 203c 636f ified cookie name i\n-00192c90: 6e20 7365 636f 6e64 7320 616e 6420 7570 n seconds and up\n-00192ca0: 6461 7465 7320 7468 6520 636f 6f6b 6965 dates the cookie\n-00192cb0: 2073 746f 7265 2061 7420 7468 6520 7365 store at the se\n-00192cc0: 7276 6572 2073 6964 652e 2054 6865 203c rver side. The <\n-00192cd0: 636f 6465 3e64 6f6d 6169 6e3c 2f63 6f64 code>domain and pat\n-00192cf0: 683c 2f63 6f64 653e 2070 6172 616d 6574 h paramet\n-00192d00: 6572 7320 6361 6e20 6265 2073 7065 6369 ers can be speci\n-00192d10: 6669 6564 206f 7220 6361 6e20 6265 204e fied or can be N\n-00192d20: 554c 4c20 746f 2075 7365 2074 6865 2063 ULL to use the c\n-00192d30: 7572 7265 6e74 2064 6f6d 6169 6e20 616e urrent domain an\n-00192d40: 6420 7061 7468 2067 6976 656e 2062 7920 d path given by \n-00192d50: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::co\n-00192e00: 6f6b 6965 5f64 6f6d 6169 6e3c 2f61 3e3c okie_domain<\n-00192e10: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap::cookie_pa\n-00192ed0: 7468 3c2f 613e 3c2f 636f 6465 3e2e 2052 th. R\n-00192ee0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n-00192ef0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n-00192f00: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n-00192fc0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n-00192fd0: 6572 726f 7220 636f 6465 2e3c 2f6c 693e error code.
    • \n-00192fe0: 0a3c 6c69 3e3c 636f 6465 3e69 6e74 203c .
    • int <\n-00192ff0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00193000: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00193010: 5f63 6f6f 6b69 6573 2e68 746d 6c23 6761 _cookies.html#ga\n-00193020: 6337 6563 6338 3261 3039 6333 3936 6135 c7ecc82a09c396a5\n-00193030: 3063 3536 6365 3830 3136 3632 6465 3731 0c56ce801662de71\n-00193040: 2220 7469 746c 653d 2253 6574 2063 6f6f \" title=\"Set coo\n-00193050: 6b69 6520 7365 6375 7265 2e22 3e73 6f61 kie secure.\">soa\n-00193060: 705f 7365 745f 636f 6f6b 6965 5f73 6563 p_set_cookie_sec\n-00193070: 7572 6528 7374 7275 6374 2073 6f61 7020 ure(struct soap \n-00193080: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n-00193090: 7220 2a6e 616d 652c 2063 6f6e 7374 2063 r *name, const c\n-001930a0: 6861 7220 2a64 6f6d 6169 6e2c 2063 6f6e har *domain, con\n-001930b0: 7374 2063 6861 7220 2a70 6174 6829 3c2f st char *path); This \n-001930d0: 6675 6e63 7469 6f6e 2073 6574 7320 7468 function sets th\n-001930e0: 6520 2273 6563 7572 6522 2070 726f 7065 e \"secure\" prope\n-001930f0: 7274 7920 6f66 2074 6865 2073 7065 6369 rty of the speci\n-00193100: 6669 6564 2063 6f6f 6b69 6520 3c63 6f64 fied cookie name an\n-00193120: 6420 7570 6461 7465 7320 7468 6520 636f d updates the co\n-00193130: 6f6b 6965 2073 746f 7265 2061 7420 7468 okie store at th\n-00193140: 6520 7365 7276 6572 2073 6964 652e 2054 e server side. T\n-00193150: 6865 2022 7365 6375 7265 2220 7072 6f70 he \"secure\" prop\n-00193160: 6572 7479 206d 6561 6e73 2074 6861 7420 erty means that \n-00193170: 7468 6973 2063 6f6f 6b69 6520 7368 6f75 this cookie shou\n-00193180: 6c64 2062 6520 7365 6e74 2062 7920 7468 ld be sent by th\n-00193190: 6520 636c 6965 6e74 2074 6f20 7468 6520 e client to the \n-001931a0: 7365 7276 6572 206f 6e6c 7920 7768 656e server only when\n-001931b0: 2061 2073 6563 7572 6520 4854 5450 5320 a secure HTTPS \n-001931c0: 636f 6e6e 6563 7469 6f6e 2063 616e 2062 connection can b\n-001931d0: 6520 6573 7461 626c 6973 6865 642e 2057 e established. W\n-001931e0: 6865 6e20 4854 5450 5320 6973 2065 6e61 hen HTTPS is ena\n-001931f0: 626c 6564 2061 6c6c 2063 6f6f 6b69 6573 bled all cookies\n-00193200: 2061 7265 2073 656e 7420 6279 2074 6865 are sent by the\n-00193210: 2073 6572 7665 7220 746f 2074 6865 2063 server to the c\n-00193220: 6c69 656e 7420 7769 7468 2074 6865 2022 lient with the \"\n-00193230: 7365 6375 7265 2220 7072 6f70 6572 7479 secure\" property\n-00193240: 2073 6574 2c20 7768 6963 6820 6d65 616e set, which mean\n-00193250: 7320 7468 6174 2074 6869 7320 6675 6e63 s that this func\n-00193260: 7469 6f6e 2069 7320 6765 6e65 7261 6c6c tion is generall\n-00193270: 7920 6e6f 7420 6e65 6564 6564 2075 6e6c y not needed unl\n-00193280: 6573 7320 7468 6520 7365 7276 6572 2069 ess the server i\n-00193290: 7320 6e6f 7420 4854 5450 532d 656e 6162 s not HTTPS-enab\n-001932a0: 6c65 6420 6275 7420 636f 6f6b 6965 7320 led but cookies \n-001932b0: 6d75 7374 2062 6520 7365 6375 7265 2e20 must be secure. \n-001932c0: 5468 6520 3c63 6f64 653e 646f 6d61 696e The domain\n-001932d0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and path pa\n-001932f0: 7261 6d65 7465 7273 2063 616e 2062 6520 rameters can be \n-00193300: 7370 6563 6966 6965 6420 6f72 2063 616e specified or can\n-00193310: 2062 6520 4e55 4c4c 2074 6f20 7573 6520 be NULL to use \n-00193320: 7468 6520 6375 7272 656e 7420 646f 6d61 the current doma\n-00193330: 696e 2061 6e64 2070 6174 6820 6769 7665 in and path give\n-00193340: 6e20 6279 203c 636f 6465 3e3c 6120 636c n by soa\n-001933f0: 703a 3a63 6f6f 6b69 655f 646f 6d61 696e p::cookie_domain\n-00193400: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n-00193410: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::cook\n-001934c0: 6965 5f70 6174 683c 2f61 3e3c 2f63 6f64 ie_path. Returns #SOAP_OK or a so\n-001935b0: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status error code.\n-001935d0: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
    • .
    • \n-001935e0: 696e 7420 3c61 2063 6c61 7373 3d22 656c int soap_set_cook\n-00193660: 6965 5f73 6573 7369 6f6e 2873 7472 7563 ie_session(struc\n-00193670: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n-00193680: 6e73 7420 6368 6172 202a 6e61 6d65 2c20 nst char *name, \n-00193690: 636f 6e73 7420 6368 6172 202a 646f 6d61 const char *doma\n-001936a0: 696e 2c20 636f 6e73 7420 6368 6172 202a in, const char *\n-001936b0: 7061 7468 293c 2f61 3e3b 3c2f 636f 6465 path); This function \n-001936d0: 6d61 6b65 7320 7468 6520 7370 6563 6966 makes the specif\n-001936e0: 6965 6420 636f 6f6b 6965 203c 636f 6465 ied cookie name a \"\n-00193700: 7365 7373 696f 6e20 636f 6f6b 6965 2220 session cookie\" \n-00193710: 616e 6420 7570 6461 7465 7320 7468 6520 and updates the \n-00193720: 636f 6f6b 6965 2073 746f 7265 2061 7420 cookie store at \n-00193730: 7468 6520 7365 7276 6572 2073 6964 6520 the server side \n-00193740: 6279 206d 6172 6b69 6e67 2074 6865 2063 by marking the c\n-00193750: 6f6f 6b69 6520 6173 2061 2073 6573 7369 ookie as a sessi\n-00193760: 6f6e 2063 6f6f 6b69 652e 2054 6869 7320 on cookie. This \n-00193770: 6d65 616e 7320 7468 6174 2074 6865 2063 means that the c\n-00193780: 6f6f 6b69 6520 7769 6c6c 2062 6520 7365 ookie will be se\n-00193790: 6e74 2074 6f20 636c 6965 6e74 7320 7468 nt to clients th\n-001937a0: 6174 2063 6f6e 6e65 6374 2074 6f20 7468 at connect to th\n-001937b0: 6520 7365 7276 6572 2e20 5468 6973 2066 e server. This f\n-001937c0: 756e 6374 696f 6e20 6973 206e 6f74 206e unction is not n\n-001937d0: 6565 6465 6420 7768 656e 2061 2063 6f6f eeded when a coo\n-001937e0: 6b69 6520 6973 206d 6f64 6966 6965 6420 kie is modified \n-001937f0: 7769 7468 203c 636f 6465 3e3c 6120 636c with soa\n-00193870: 705f 7365 745f 636f 6f6b 6965 5f65 7870 p_set_cookie_exp\n-00193880: 6972 653c 2f61 3e3c 2f63 6f64 653e 2c20 ire, \n-00193890: 666f 7220 6578 616d 706c 652c 2062 6563 for example, bec\n-001938a0: 6175 7365 206d 6f64 6966 6965 6420 636f ause modified co\n-001938b0: 6f6b 6965 7320 6172 6520 616c 7761 7973 okies are always\n-001938c0: 2073 656e 7420 6261 636b 2074 6f20 7468 sent back to th\n-001938d0: 6520 636c 6965 6e74 2e20 5468 6520 3c63 e client. The domain and path\n-00193900: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete\n-00193910: 7273 2063 616e 2062 6520 7370 6563 6966 rs can be specif\n-00193920: 6965 6420 6f72 2063 616e 2062 6520 4e55 ied or can be NU\n-00193930: 4c4c 2074 6f20 7573 6520 7468 6520 6375 LL to use the cu\n-00193940: 7272 656e 7420 646f 6d61 696e 2061 6e64 rrent domain and\n-00193950: 2070 6174 6820 6769 7665 6e20 6279 203c path given by <\n-00193960: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::coo\n-00193a10: 6b69 655f 646f 6d61 696e 3c2f 613e 3c2f kie_domain and \n-00193a30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n-00193ad0: 736f 6170 3a3a 636f 6f6b 6965 5f70 6174 soap::cookie_pat\n-00193ae0: 683c 2f61 3e3c 2f63 6f64 653e 2e20 5265 h. Re\n-00193af0: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-00193b00: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n-00193b10: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n-00193bd0: 7475 733c 2f61 3e3c 2f63 6f64 653e 2065 tus e\n-00193be0: 7272 6f72 2063 6f64 652e 3c2f 6c69 3e0a rror code.
    • .\n-00193bf0: 3c6c 693e 3c63 6f64 653e 766f 6964 203c
    • void <\n-00193c00: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00193c10: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00193c20: 5f63 6f6f 6b69 6573 2e68 746d 6c23 6761 _cookies.html#ga\n-00193c30: 6336 6230 3064 6337 3235 6130 6537 3463 c6b00dc725a0e74c\n-00193c40: 6630 3334 3230 3730 3135 3164 6139 3466 f0342070151da94f\n-00193c50: 2220 7469 746c 653d 2243 6c65 6172 2063 \" title=\"Clear c\n-00193c60: 6f6f 6b69 652e 223e 736f 6170 5f63 6c72 ookie.\">soap_clr\n-00193c70: 5f63 6f6f 6b69 6528 7374 7275 6374 2073 _cookie(struct s\n-00193c80: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n-00193c90: 2063 6861 7220 2a6e 616d 652c 2063 6f6e char *name, con\n-00193ca0: 7374 2063 6861 7220 2a64 6f6d 6169 6e2c st char *domain,\n-00193cb0: 2063 6f6e 7374 2063 6861 7220 2a70 6174 const char *pat\n-00193cc0: 6829 3c2f 613e 3b3c 2f63 6f64 653e 2054 h); T\n-00193cd0: 6869 7320 6675 6e63 7469 6f6e 2064 656c his function del\n-00193ce0: 6574 6573 2074 6865 2073 7065 6369 6669 etes the specifi\n-00193cf0: 6564 2063 6f6f 6b69 6520 3c63 6f64 653e ed cookie \n-00193d00: 6e61 6d65 3c2f 636f 6465 3e20 6672 6f6d name from\n-00193d10: 2074 6865 2063 6f6f 6b69 6520 7374 6f72 the cookie stor\n-00193d20: 6520 6174 2074 6865 2073 6572 7665 7220 e at the server \n-00193d30: 7369 6465 2e20 5468 6520 3c63 6f64 653e side. The \n-00193d40: 646f 6d61 696e 3c2f 636f 6465 3e20 616e domain an\n-00193d50: 6420 3c63 6f64 653e 7061 7468 3c2f 636f d path parameters c\n-00193d70: 616e 2062 6520 7370 6563 6966 6965 6420 an be specified \n-00193d80: 6f72 2063 616e 2062 6520 4e55 4c4c 2074 or can be NULL t\n-00193d90: 6f20 7573 6520 7468 6520 6375 7272 656e o use the curren\n-00193da0: 7420 646f 6d61 696e 2061 6e64 2070 6174 t domain and pat\n-00193db0: 6820 6769 7665 6e20 6279 203c 636f 6465 h given by soap::cookie_\n-00193e70: 646f 6d61 696e 3c2f 613e 3c2f 636f 6465 domain and soap\n-00193f30: 3a3a 636f 6f6b 6965 5f70 6174 683c 2f61 ::cookie_path.
    • .<\n-00193f50: 6c69 3e3c 636f 6465 3e69 6e74 203c 6120 li>int so\n-00193fd0: 6170 5f63 6c72 5f63 6f6f 6b69 655f 7365 ap_clr_cookie_se\n-00193fe0: 7373 696f 6e28 7374 7275 6374 2073 6f61 ssion(struct soa\n-00193ff0: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n-00194000: 6861 7220 2a6e 616d 652c 2063 6f6e 7374 har *name, const\n-00194010: 2063 6861 7220 2a64 6f6d 6169 6e2c 2063 char *domain, c\n-00194020: 6f6e 7374 2063 6861 7220 2a70 6174 6829 onst char *path)\n-00194030: 3c2f 613e 3b3c 2f63 6f64 653e 2054 6869 ; Thi\n-00194040: 7320 6675 6e63 7469 6f6e 2063 6c65 6172 s function clear\n-00194050: 7320 7468 6520 7365 7373 696f 6e20 7072 s the session pr\n-00194060: 6f70 6572 7479 206f 6620 7468 6520 7370 operty of the sp\n-00194070: 6563 6966 6965 6420 636f 6f6b 6965 203c ecified cookie <\n-00194080: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name\n-00194090: 2061 6e64 2075 7064 6174 6573 2074 6865 and updates the\n-001940a0: 2063 6f6f 6b69 6520 7374 6f72 6520 6174 cookie store at\n-001940b0: 2074 6865 2073 6572 7665 7220 7369 6465 the server side\n-001940c0: 2e20 5468 6520 3c63 6f64 653e 646f 6d61 . The doma\n-001940d0: 696e 3c2f 636f 6465 3e20 616e 6420 3c63 in and path
      \n-001940f0: 7061 7261 6d65 7465 7273 2063 616e 2062 parameters can b\n-00194100: 6520 7370 6563 6966 6965 6420 6f72 2063 e specified or c\n-00194110: 616e 2062 6520 4e55 4c4c 2074 6f20 7573 an be NULL to us\n-00194120: 6520 7468 6520 6375 7272 656e 7420 646f e the current do\n-00194130: 6d61 696e 2061 6e64 2070 6174 6820 6769 main and path gi\n-00194140: 7665 6e20 6279 203c 636f 6465 3e3c 6120 ven by s\n-001941f0: 6f61 703a 3a63 6f6f 6b69 655f 646f 6d61 oap::cookie_doma\n-00194200: 696e 3c2f 613e 3c2f 636f 6465 3e20 616e in an\n-00194210: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap::co\n-001942c0: 6f6b 6965 5f70 6174 683c 2f61 3e3c 2f63 okie_path. Returns #SOAP_OK or a <\n-00194300: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00194310: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00194320: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n-00194330: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n-00194340: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n-00194350: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n-00194360: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n-00194370: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n-00194380: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n-00194390: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n-001943a0: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n-001943b0: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n-001943c0: 2f63 6f64 653e 2065 7272 6f72 2063 6f64 /code> error cod\n-001943d0: 652e 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 e..
    • struct \n-00194430: 736f 6170 5f63 6f6f 6b69 653c 2f61 3e20 soap_cookie \n-00194440: 2a73 6f61 705f 636f 6f6b 6965 2873 7472 *soap_cookie(str\n-00194450: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-00194460: 636f 6e73 7420 6368 6172 202a 6e61 6d65 const char *name\n-00194470: 2c20 636f 6e73 7420 6368 6172 202a 646f , const char *do\n-00194480: 6d61 696e 2c20 636f 6e73 7420 6368 6172 main, const char\n-00194490: 202a 7061 7468 293b 3c2f 636f 6465 3e20 *path); \n-001944a0: 5468 6973 2066 756e 6374 696f 6e20 7265 This function re\n-001944b0: 7475 726e 7320 7468 6520 636f 6f6b 6965 turns the cookie\n-001944c0: 2073 7472 7563 7475 7265 206f 6620 7468 structure of th\n-001944d0: 6520 7370 6563 6966 6965 6420 636f 6f6b e specified cook\n-001944e0: 6965 203c 636f 6465 3e6e 616d 653c 2f63 ie name or NULL whe\n-00194500: 6e20 6e6f 7420 666f 756e 6420 6279 2073 n not found by s\n-00194510: 6561 7263 6869 6e67 2074 6865 2063 6f6f earching the coo\n-00194520: 6b69 6520 7374 6f72 6520 6174 2074 6865 kie store at the\n-00194530: 2073 6572 7665 7220 7369 6465 2e20 5468 server side. Th\n-00194540: 6520 3c63 6f64 653e 646f 6d61 696e 3c2f e domain and \n-00194560: 7061 7468 3c2f 636f 6465 3e20 7061 7261 path para\n-00194570: 6d65 7465 7273 2063 616e 2062 6520 7370 meters can be sp\n-00194580: 6563 6966 6965 6420 6f72 2063 616e 2062 ecified or can b\n-00194590: 6520 4e55 4c4c 2074 6f20 7573 6520 7468 e NULL to use th\n-001945a0: 6520 6375 7272 656e 7420 646f 6d61 696e e current domain\n-001945b0: 2061 6e64 2070 6174 6820 6769 7665 6e20 and path given \n-001945c0: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap:\n-00194670: 3a63 6f6f 6b69 655f 646f 6d61 696e 3c2f :cookie_domain and soap::cookie\n-00194740: 5f70 6174 683c 2f61 3e3c 2f63 6f64 653e _path\n-00194750: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
    • .
    • const char *soa\n-00194770: 705f 636f 6f6b 6965 5f76 616c 7565 2873 p_cookie_value(s\n-00194780: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-00194790: 2c20 636f 6e73 7420 6368 6172 202a 6e61 , const char *na\n-001947a0: 6d65 2c20 636f 6e73 7420 6368 6172 202a me, const char *\n-001947b0: 646f 6d61 696e 2c20 636f 6e73 7420 6368 domain, const ch\n-001947c0: 6172 202a 7061 7468 293b 3c2f 636f 6465 ar *path); This function \n-001947e0: 7265 7475 726e 7320 7468 6520 636f 6f6b returns the cook\n-001947f0: 6965 2076 616c 7565 206f 6620 7468 6520 ie value of the \n-00194800: 7370 6563 6966 6965 6420 636f 6f6b 6965 specified cookie\n-00194810: 203c 636f 6465 3e6e 616d 653c 2f63 6f64 name or NULL when \n-00194830: 6e6f 7420 666f 756e 6420 6279 2073 6561 not found by sea\n-00194840: 7263 6869 6e67 2074 6865 2063 6f6f 6b69 rching the cooki\n-00194850: 6520 7374 6f72 6520 6174 2074 6865 2073 e store at the s\n-00194860: 6572 7665 7220 7369 6465 2e20 5468 6520 erver side. The \n-00194870: 3c63 6f64 653e 646f 6d61 696e 3c2f 636f domain and pa\n-00194890: 7468 3c2f 636f 6465 3e20 7061 7261 6d65 th parame\n-001948a0: 7465 7273 2063 616e 2062 6520 7370 6563 ters can be spec\n-001948b0: 6966 6965 6420 6f72 2063 616e 2062 6520 ified or can be \n-001948c0: 4e55 4c4c 2074 6f20 7573 6520 7468 6520 NULL to use the \n-001948d0: 6375 7272 656e 7420 646f 6d61 696e 2061 current domain a\n-001948e0: 6e64 2070 6174 6820 6769 7665 6e20 6279 nd path given by\n-001948f0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::c\n-001949a0: 6f6f 6b69 655f 646f 6d61 696e 3c2f 613e ookie_domain\n-001949b0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap::cookie_p\n-00194a70: 6174 683c 2f61 3e3c 2f63 6f64 653e 2e3c ath.<\n-00194a80: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e74 /li>.
    • t\n-00194a90: 696d 655f 7420 3c61 2063 6c61 7373 3d22 ime_t soap_coo\n-00194b10: 6b69 655f 6578 7069 7265 2873 7472 7563 kie_expire(struc\n-00194b20: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n-00194b30: 6e73 7420 6368 6172 202a 6e61 6d65 2c20 nst char *name, \n-00194b40: 636f 6e73 7420 6368 6172 202a 646f 6d61 const char *doma\n-00194b50: 696e 2c20 636f 6e73 7420 6368 6172 202a in, const char *\n-00194b60: 7061 7468 293c 2f61 3e3b 3c2f 636f 6465 path); This function \n-00194b80: 7265 7475 726e 7320 7468 6520 636f 6f6b returns the cook\n-00194b90: 6965 2065 7870 6972 6174 696f 6e20 7469 ie expiration ti\n-00194ba0: 6d65 203c 636f 6465 3e74 696d 655f 743c me time_t<\n-00194bb0: 2f63 6f64 653e 206f 6620 7468 6520 7370 /code> of the sp\n-00194bc0: 6563 6966 6965 6420 636f 6f6b 6965 203c ecified cookie <\n-00194bd0: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name\n-00194be0: 206f 7220 2d31 2077 6865 6e20 6e6f 7420 or -1 when not \n-00194bf0: 666f 756e 6420 6279 2073 6561 7263 6869 found by searchi\n-00194c00: 6e67 2074 6865 2063 6f6f 6b69 6520 7374 ng the cookie st\n-00194c10: 6f72 6520 6174 2074 6865 2073 6572 7665 ore at the serve\n-00194c20: 7220 7369 6465 2e20 5468 6520 3c63 6f64 r side. The domain \n-00194c40: 616e 6420 3c63 6f64 653e 7061 7468 3c2f and path parameters\n-00194c60: 2063 616e 2062 6520 7370 6563 6966 6965 can be specifie\n-00194c70: 6420 6f72 2063 616e 2062 6520 4e55 4c4c d or can be NULL\n-00194c80: 2074 6f20 7573 6520 7468 6520 6375 7272 to use the curr\n-00194c90: 656e 7420 646f 6d61 696e 2061 6e64 2070 ent domain and p\n-00194ca0: 6174 6820 6769 7665 6e20 6279 203c 636f ath given by soap::cooki\n-00194d60: 655f 646f 6d61 696e 3c2f 613e 3c2f 636f e_domain and so\n-00194e20: 6170 3a3a 636f 6f6b 6965 5f70 6174 683c ap::cookie_path<\n-00194e30: 2f61 3e3c 2f63 6f64 653e 2e3c 2f6c 693e /a>.
    • \n-00194e40: 0a3c 6c69 3e3c 636f 6465 3e69 6e74 203c .
    • int <\n-00194e50: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00194e60: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00194e70: 5f63 6f6f 6b69 6573 2e68 746d 6c23 6761 _cookies.html#ga\n-00194e80: 3765 3535 6236 3431 6333 6133 6436 6639 7e55b641c3a3d6f9\n-00194e90: 3731 3062 3532 3365 3431 3931 3766 6538 710b523e41917fe8\n-00194ea0: 2220 7469 746c 653d 2247 6574 2063 6f6f \" title=\"Get coo\n-00194eb0: 6b69 6573 2066 726f 6d20 7468 6520 4854 kies from the HT\n-00194ec0: 5450 5f43 4f4f 4b49 4520 656e 7669 726f TP_COOKIE enviro\n-00194ed0: 6e6d 656e 7420 7661 7269 6162 6c65 2e22 nment variable.\"\n-00194ee0: 3e73 6f61 705f 6765 7465 6e76 5f63 6f6f >soap_getenv_coo\n-00194ef0: 6b69 6573 2873 7472 7563 7420 736f 6170 kies(struct soap\n-00194f00: 202a 736f 6170 293c 2f61 3e3b 3c2f 636f *soap); This functio\n-00194f20: 6e20 696e 6974 6961 6c69 7a65 7320 7468 n initializes th\n-00194f30: 6520 636f 6f6b 6965 2073 746f 7265 2061 e cookie store a\n-00194f40: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid\n-00194f50: 6520 6279 2072 6561 6469 6e67 2074 6865 e by reading the\n-00194f60: 203c 636f 6465 3e48 5454 505f 434f 4f4b HTTP_COOK\n-00194f70: 4945 3c2f 636f 6465 3e20 656e 7669 726f IE enviro\n-00194f80: 6e6d 656e 7420 7661 7269 6162 6c65 2e20 nment variable. \n-00194f90: 5468 6973 2070 726f 7669 6465 7320 6120 This provides a \n-00194fa0: 6d65 616e 7320 666f 7220 6120 4347 4920 means for a CGI \n-00194fb0: 6170 706c 6963 6174 696f 6e20 746f 2072 application to r\n-00194fc0: 6561 6420 636f 6f6b 6965 7320 7365 6e74 ead cookies sent\n-00194fd0: 2062 7920 6120 636c 6965 6e74 2e20 5265 by a client. Re\n-00194fe0: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-00194ff0: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n-00195000: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n-001950c0: 7475 733c 2f61 3e3c 2f63 6f64 653e 2065 tus e\n-001950d0: 7272 6f72 2063 6f64 6520 7768 656e 2074 rror code when t\n-001950e0: 6865 203c 636f 6465 3e48 5454 505f 434f he HTTP_CO\n-001950f0: 4f4b 4945 3c2f 636f 6465 3e20 7661 7269 OKIE vari\n-00195100: 6162 6c65 2077 6173 206e 6f74 2066 6f75 able was not fou\n-00195110: 6e64 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f nd.
    • .
    • void soap_free_cooki\n-001951a0: 6573 2873 7472 7563 7420 736f 6170 202a es(struct soap *\n-001951b0: 736f 6170 293c 2f61 3e3b 3c2f 636f 6465 soap); This function \n-001951d0: 6672 6565 7320 7468 6520 636f 6f6b 6965 frees the cookie\n-001951e0: 2073 746f 7265 2061 6e64 2064 656c 6574 store and delet\n-001951f0: 6573 2061 6c6c 2063 6f6f 6b69 6573 2e3c es all cookies.<\n-00195200: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e 5468 /li>.
    .

    Th\n-00195210: 6520 666f 6c6c 6f77 696e 6720 7661 7269 e following vari\n-00195220: 6162 6c65 7320 6f66 2074 6865 203c 636f ables of the s\n-00195280: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n-00195290: 6f6e 7465 7874 2061 7265 2075 7365 6420 ontext are used \n-001952a0: 746f 2064 6566 696e 6520 7468 6520 6375 to define the cu\n-001952b0: 7272 656e 7420 646f 6d61 696e 2061 6e64 rrent domain and\n-001952c0: 2070 6174 683a 3c2f 703e 0a3c 756c 3e0a path:

    .
      .\n-001952d0: 3c6c 693e 3c63 6f64 653e 636f 6e73 7420
    • const \n-001952e0: 6368 6172 202a 203c 6120 636c 6173 733d char * soap::c\n-00195390: 6f6f 6b69 655f 646f 6d61 696e 3c2f 613e ookie_domain\n-001953a0: 3c2f 636f 6465 3e20 7368 6f75 6c64 2062 should b\n-001953b0: 6520 7365 7420 746f 2074 6865 2064 6f6d e set to the dom\n-001953c0: 6169 6e20 2868 6f73 7429 206f 6620 7468 ain (host) of th\n-001953d0: 6520 7365 7276 6963 653c 2f6c 693e 0a3c e service
    • .<\n-001953e0: 6c69 3e3c 636f 6465 3e63 6f6e 7374 2063 li>const c\n-001953f0: 6861 7220 2a20 3c61 2063 6c61 7373 3d22 har * soap::cook\n-001954a0: 6965 5f70 6174 683c 2f61 3e3c 2f63 6f64 ie_path may be set to\n-001954c0: 2074 6865 2064 6566 6175 6c74 2070 6174 the default pat\n-001954d0: 6820 746f 2074 6865 2073 6572 7669 6365 h to the service\n-001954e0: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e .
    • \n-001954f0: 696e 7420 3c61 2063 6c61 7373 3d22 656c int soap\n-001955b0: 3a3a 636f 6f6b 6965 5f6d 6178 3c2f 613e ::cookie_max\n-001955c0: 3c2f 636f 6465 3e20 6d61 7869 6d75 6d20 maximum \n-001955d0: 636f 6f6b 6965 2064 6174 6162 6173 6520 cookie database \n-001955e0: 7369 7a65 2028 6465 6661 756c 743d 3332 size (default=32\n-001955f0: 293c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e )
    • .
    .

    \n-00195600: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soap::\n-001956b0: 636f 6f6b 6965 5f70 6174 683c 2f61 3e3c cookie_path<\n-001956c0: 2f63 6f64 653e 2076 616c 7565 2069 7320 /code> value is \n-001956d0: 7573 6564 2074 6f20 6669 6c74 6572 2063 used to filter c\n-001956e0: 6f6f 6b69 6573 2069 6e74 656e 6465 6420 ookies intended \n-001956f0: 666f 7220 7468 6973 2073 6572 7669 6365 for this service\n-00195700: 2061 6363 6f72 6469 6e67 2074 6f20 7468 according to th\n-00195710: 6520 7061 7468 2070 7265 6669 7820 7275 e path prefix ru\n-00195720: 6c65 7320 6f75 746c 696e 6564 2069 6e20 les outlined in \n-00195730: 5246 4332 3130 392e 3c2f 703e 0a3c 703e RFC2109.

    .

    \n-00195740: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex\n-00195750: 616d 706c 6520 7365 7276 6572 2061 646f ample server ado\n-00195760: 7074 7320 636f 6f6b 6965 7320 666f 7220 pts cookies for \n-00195770: 7365 7373 696f 6e20 636f 6e74 726f 6c3a session control:\n-00195780: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main()
    .\n-001957e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct soap soap;
    .
    int m, s;
    .\n-001958e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_in\n-00195950: 6974 3c2f 613e 2826 616d 703b 3c61 2063 it(&soap); .\n-00195a70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n-00195ab0: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .co\n-00195b00: 6f6b 6965 5f70 6174 683c 2f61 3e20 3d20 okie_path = \n-00195b10: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00195b30: 743b 2f26 7175 6f74 3b3c 2f73 7061 6e3e t;/"\n-00195b40: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // the p\n-00195b60: 6174 6820 7768 6963 6820 6973 2075 7365 ath which is use\n-00195b70: 6420 746f 2066 696c 7465 722f 7365 7420 d to filter/set \n-00195b80: 636f 6f6b 6965 7320 7769 7468 2074 6869 cookies with thi\n-00195b90: 7320 6465 7374 696e 6174 696f 6e20 3c2f s destination
    . \n-00195bc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (argc < 2\n-00195bf0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    \n-00195c80: 736f 6170 5f67 6574 656e 765f 636f 6f6b soap_getenv_cook\n-00195c90: 6965 733c 2f61 3e28 2661 6d70 3b3c 6120 ies(&soap); <\n-00195cd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00195ce0: 656e 7422 3e2f 2f20 4347 4920 6170 703a ent\">// CGI app:\n-00195cf0: 2067 7261 6220 636f 6f6b 6965 7320 6672 grab cookies fr\n-00195d00: 6f6d 2026 2333 393b 4854 5450 5f43 4f4f om 'HTTP_COO\n-00195d10: 4b49 4526 2333 393b 2065 6e76 2076 6172 KIE' env var\n-00195d20: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00195d30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00195d40: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_serve<\n-00195da0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-00195dd0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    }
    .<\n-00195e00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00195e10: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > els\n-00195e30: 653c 2f73 7061 6e3e 203c 2f64 6976 3e0a e
    .\n-00195e40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n-00195e70: 2020 6d20 3d20 3c61 2063 6c61 7373 3d22 m = soap_bind<\n-00195ed0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-00195f00: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n-00195f10: 6174 6f69 2861 7267 765b 315d 292c 2031 atoi(argv[1]), 1\n-00195f20: 3029 3b20 3c73 7061 6e20 636c 6173 733d 0); // sma\n-00195f40: 6c6c 2042 4143 4b4c 4f47 2066 6f72 2069 ll BACKLOG for i\n-00195f50: 7465 7261 7469 7665 2073 6572 7665 7273 terative servers\n-00195f60: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00195f80: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-00195fa0: 3c2f 7370 616e 3e20 2821 3c61 2063 6c61 (!soap\n-00196000: 5f76 616c 6964 5f73 6f63 6b65 743c 2f61 _valid_socket(m))
    . \n-00196030: 2020 2020 2065 7869 7428 4558 4954 5f46 exit(EXIT_F\n-00196040: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    .\n-00196050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00196080: 666f 723c 2f73 7061 6e3e 2028 3c73 7061 for (int\n-001960b0: 2069 203d 2031 3b20 3b20 692b 2b29 203c i = 1; ; i++) <\n-001960c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..<\n-00196250: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00196260: 3e20 2020 2020 2020 2065 7869 7428 4558 > exit(EX\n-00196270: 4954 5f46 4149 4c55 5245 293b 203c 2f64 IT_FAILURE); .
    soap\n-001962f0: 5f73 6572 7665 3c2f 613e 2826 616d 703b _serve(&\n-00196300: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00196330: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-00196350: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_end(&s\n-001963e0: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    .\n-001963f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soa\n-00196460: 705f 6672 6565 5f63 6f6f 6b69 6573 3c2f p_free_cookies(&s\n-001964a0: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); \n-001964c0: 2f2f 2072 656d 6f76 6520 616c 6c20 6f6c // remove all ol\n-001964d0: 6420 636f 6f6b 6965 7320 6672 6f6d 2064 d cookies from d\n-001964e0: 6174 6162 6173 6520 736f 206e 6f20 696e atabase so no in\n-001964f0: 7465 7266 6572 656e 6365 206f 6363 7572 terference occur\n-00196500: 7320 7769 7468 2074 6865 2061 7272 6976 s with the arriv\n-00196510: 616c 206f 6620 6e65 7720 636f 6f6b 6965 al of new cookie\n-00196520: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
    .\n-00196530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .<\n-00196550: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00196560: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-00196580: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-001965a0: 3c2f 7370 616e 3e20 303b 203c 2f64 6976 0; .
    }
    . \n-001965e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n-00196620: 5f5f 7765 626d 6574 686f 6428 3c73 7061 __webmethod(struct \n-00196650: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00196680: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001966b0: 2c20 2e2e 2e29 203c 2f64 6976 3e0a 3c64 , ...)
    .\n-001966d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    const <\n-00196710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00196720: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *cookie_val\n-00196740: 7565 203d 203c 6120 636c 6173 733d 2263 ue = soap_c\n-001967a0: 6f6f 6b69 655f 7661 6c75 653c 2f61 3e28 ookie_value(\n-001967b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001967e0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00196800: 6f74 3b63 6f6f 6b69 655f 6e61 6d65 2671 ot;cookie_name&q\n-00196810: 756f 743b 3c2f 7370 616e 3e2c 204e 554c uot;, NUL\n-00196820: 4c2c 204e 554c 4c29 3b3c 2f64 6976 3e0a L, NULL);
    .\n-00196830: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-00196860: 3c2f 7370 616e 3e20 2821 636f 6f6b 6965 (!cookie\n-00196870: 5f76 616c 7565 2920 2020 2020 2020 2020 _value) \n-00196880: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-001968a0: 636f 6f6b 6965 2072 6574 7572 6e65 6420 cookie returned \n-001968b0: 6279 2063 6c69 656e 743f 203c 2f73 7061 by client?
    .
    c\n-001968e0: 6f6f 6b69 655f 7661 6c75 6520 3d20 3c73 ookie_value = "\n-00196910: 696e 6974 6961 6c5f 7661 6c75 6526 7175 initial_value&qu\n-00196920: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // no: set ini\n-00196950: 7469 616c 2063 6f6f 6b69 6520 7661 6c75 tial cookie valu\n-00196960: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
    .\n-00196970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n-001969a0: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
    \n-001969b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... \n-001969d0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-001969e0: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-00196a00: 7965 733a 206d 6f64 6966 7920 7468 6520 yes: modify the \n-00196a10: 636f 6f6b 6965 2076 616c 7565 2074 6f20 cookie value to \n-00196a20: 7265 666c 6563 7420 7468 6520 6e65 7720 reflect the new \n-00196a30: 7374 6174 653c 2f73 7061 6e3e 3c2f 6469 state.
    soap\n-00196ab0: 5f73 6574 5f63 6f6f 6b69 653c 2f61 3e28 _set_cookie(\n-00196ac0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00196af0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00196b10: 6f74 3b63 6f6f 6b69 655f 6e61 6d65 2671 ot;cookie_name&q\n-00196b20: 756f 743b 3c2f 7370 616e 3e2c 2063 6f6f uot;, coo\n-00196b30: 6b69 655f 7661 6c75 652c 204e 554c 4c2c kie_value, NULL,\n-00196b40: 204e 554c 4c29 3b20 3c2f 6469 763e 0a3c NULL);
    .<\n-00196b50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00196b60: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_set\n-00196bc0: 5f63 6f6f 6b69 655f 6578 7069 7265 3c2f _cookie_expire(soap, \n-00196c20: 2671 756f 743b 636f 6f6b 6965 5f6e 616d "cookie_nam\n-00196c30: 6526 7175 6f74 3b3c 2f73 7061 6e3e 2c20 e", \n-00196c40: 3630 2c20 4e55 4c4c 2c20 4e55 4c4c 293b 60, NULL, NULL);\n-00196c50: 203c 7370 616e 2063 6c61 7373 3d22 636f // cookie\n-00196c70: 2065 7870 6972 6573 2069 6e20 3630 2073 expires in 60 s\n-00196c80: 6563 6f6e 6473 203c 2f73 7061 6e3e 3c2f econds .
    return\n-00196cd0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n-00196d30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }.
    <\n-00196e20: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-00196e30: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i\">const char * \n-00196e40: 736f 6170 5f63 6f6f 6b69 655f 7661 6c75 soap_cookie_valu\n-00196e50: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s\n-00196e60: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n-00196e70: 2a6e 616d 652c 2063 6f6e 7374 2063 6861 *name, const cha\n-00196e80: 7220 2a64 6f6d 6169 6e2c 2063 6f6e 7374 r *domain, const\n-00196e90: 2063 6861 7220 2a70 6174 6829 3c2f 6469 char *path)
    Get cookie \n-00196ec0: 7661 6c75 652e 3c2f 6469 763e 3c2f 6469 value.
    .
    struct soap_coo\n-00196fc0: 6b69 6520 2a20 736f 6170 5f73 6574 5f63 kie * soap_set_c\n-00196fd0: 6f6f 6b69 6528 7374 7275 6374 2073 6f61 ookie(struct soa\n-00196fe0: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n-00196ff0: 6861 7220 2a6e 616d 652c 2063 6f6e 7374 har *name, const\n-00197000: 2063 6861 7220 2a76 616c 7565 2c20 636f char *value, co\n-00197010: 6e73 7420 6368 6172 202a 646f 6d61 696e nst char *domain\n-00197020: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa\n-00197030: 7468 293c 2f64 6976 3e3c 6469 7620 636c th)
    Add \n-00197050: 6120 636f 6f6b 6965 2e3c 2f64 6976 3e3c a cookie.
    <\n-00197060: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-001970d0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-001970e0: 726f 7570 5f5f 636f 6f6b 6965 732e 6874 roup__cookies.ht\n-001970f0: 6d6c 2367 6137 6535 3562 3634 3163 3361 ml#ga7e55b641c3a\n-00197100: 3364 3666 3937 3130 6235 3233 6534 3139 3d6f9710b523e419\n-00197110: 3137 6665 3822 3e73 6f61 705f 6765 7465 17fe8\">soap_gete\n-00197120: 6e76 5f63 6f6f 6b69 6573 3c2f 613e 3c2f nv_cookies
    int soap\n-00197150: 5f67 6574 656e 765f 636f 6f6b 6965 7328 _getenv_cookies(\n-00197160: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-00197170: 7029 3c2f 6469 763e 3c64 6976 2063 6c61 p)
    Get c\n-00197190: 6f6f 6b69 6573 2066 726f 6d20 7468 6520 ookies from the \n-001971a0: 4854 5450 5f43 4f4f 4b49 4520 656e 7669 HTTP_COOKIE envi\n-001971b0: 726f 6e6d 656e 7420 7661 7269 6162 6c65 ronment variable\n-001971c0: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .
    vo\n-001972b0: 6964 2073 6f61 705f 6672 6565 5f63 6f6f id soap_free_coo\n-001972c0: 6b69 6573 2873 7472 7563 7420 736f 6170 kies(struct soap\n-001972d0: 202a 736f 6170 293c 2f64 6976 3e3c 6469 *soap)
    \n-001972f0: 4672 6565 2063 6f6f 6b69 6573 2e3c 2f64 Free cookies.
    .
    <\n-00197360: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00197370: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_\n-001973c0: 7365 745f 636f 6f6b 6965 5f65 7870 6972 set_cookie_expir\n-001973d0: 653c 2f61 3e3c 2f64 6976 3e3c 6469 7620 e
    i\n-001973f0: 6e74 2073 6f61 705f 7365 745f 636f 6f6b nt soap_set_cook\n-00197400: 6965 5f65 7870 6972 6528 7374 7275 6374 ie_expire(struct\n-00197410: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n-00197420: 7374 2063 6861 7220 2a6e 616d 652c 206c st char *name, l\n-00197430: 6f6e 6720 6d61 7861 6765 2c20 636f 6e73 ong maxage, cons\n-00197440: 7420 6368 6172 202a 646f 6d61 696e 2c20 t char *domain, \n-00197450: 636f 6e73 7420 6368 6172 202a 7061 7468 const char *path\n-00197460: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Set co\n-00197480: 6f6b 6965 2065 7870 6972 6174 696f 6e2e okie expiration.\n-00197490: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    soap::cook\n-00197540: 6965 5f64 6f6d 6169 6e3c 2f61 3e3c 2f64 ie_domain
    const cha\n-00197570: 7220 2a20 636f 6f6b 6965 5f64 6f6d 6169 r * cookie_domai\n-00197580: 6e3c 2f64 6976 3e3c 6469 7620 636c 6173 n
    User-d\n-001975a0: 6566 696e 6162 6c65 2073 7472 696e 6720 efinable string \n-001975b0: 7468 6174 2073 7065 6369 6669 6573 2074 that specifies t\n-001975c0: 6865 2048 5454 5020 636f 6f6b 6965 2064 he HTTP cookie d\n-001975d0: 6f6d 6169 6e20 6f66 2074 6865 2072 756e omain of the run\n-001975e0: 6e69 6e67 2073 6572 7665 722e 3c2f 6469 ning server.
    Definiti\n-00197610: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-00197620: 2e68 3a32 3936 393c 2f64 6976 3e3c 2f64 .h:2969
    .

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

    .C\n-00197840: 6f6e 6e65 6374 696e 6720 636c 6965 6e74 onnecting client\n-00197850: 7320 7468 726f 7567 6820 7072 6f78 7920 s through proxy \n-00197860: 7365 7276 6572 733c 2f68 323e 0a3c 703e servers

    .

    \n-00197870: 5768 656e 2061 2063 6c69 656e 7420 6e65 When a client ne\n-00197880: 6564 7320 746f 2063 6f6e 6e65 6374 2074 eds to connect t\n-00197890: 6f20 6120 5765 6220 5365 7276 6963 6520 o a Web Service \n-001978a0: 7468 726f 7567 6820 6120 7072 6f78 7920 through a proxy \n-001978b0: 7365 7276 6572 2c20 7365 7420 7468 6520 server, set the \n-001978c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::proxy_hos\n-00197980: 743c 2f61 3e3c 2f63 6f64 653e 2073 7472 t str\n-00197990: 696e 6720 616e 6420 3c63 6f64 653e 3c61 ing and soap::prox\n-00197a60: 795f 706f 7274 3c2f 613e 3c2f 636f 6465 y_port integer attrib\n-00197a80: 7574 6573 206f 6620 7468 6520 6375 7272 utes of the curr\n-00197a90: 656e 7420 3c63 6f64 653e 3c61 2063 6c61 ent soap context to\n-00197b00: 2074 6865 2070 726f 7879 2773 2068 6f73 the proxy's hos\n-00197b10: 7420 6e61 6d65 2061 6e64 2070 6f72 742c t name and port,\n-00197b20: 2072 6573 7065 6374 6976 656c 792e 2046 respectively. F\n-00197b30: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    .\n-00197b40: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n-00197b80: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap; .
    soap_\n-00197c60: 696e 6974 3c2f 613e 2826 616d 703b 3c61 init(&soap); \n-00197ca0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00197ce0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.proxy_host\n-00197d40: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n-00197d60: 7175 6f74 3b70 726f 7879 686f 7374 6e61 quot;proxyhostna\n-00197d70: 6d65 2671 756f 743b 3c2f 7370 616e 3e3b me";\n-00197d80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .\n-00197e30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n-00197e60: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n-00197e70: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n-00197e80: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-00197eb0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "http://h\n-00197ee0: 6f73 743a 706f 7274 2f70 6174 6826 7175 ost:port/path&qu\n-00197ef0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "ac\n-00197f20: 7469 6f6e 2671 756f 743b 3c2f 7370 616e tion", ...))
    .\n-00197f40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_prin\n-00197fb0: 745f 6661 756c 743c 2f61 3e28 2661 6d70 t_fault(&\n-00197fc0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-00197ff0: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
    el\n-00198030: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
    \n-00198040: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n-00198070: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success\n-00198080: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The context att\n-001980b0: 7269 6275 7465 7320 3c63 6f64 653e 3c61 ributes soap::p\n-00198170: 726f 7879 5f68 6f73 743c 2f61 3e3c 2f63 roxy_host and <\n-00198190: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001981a0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001981b0: 6d6c 2361 3033 3735 3534 6664 3263 6635 ml#a037554fd2cf5\n-001981c0: 3466 6239 6136 6435 3332 3662 3131 6338 4fb9a6d5326b11c8\n-001981d0: 6666 6130 2220 7469 746c 653d 2255 7365 ffa0\" title=\"Use\n-001981e0: 722d 6465 6669 6e61 626c 6520 7072 6f78 r-definable prox\n-001981f0: 7920 706f 7274 2077 6869 6368 2073 686f y port which sho\n-00198200: 756c 6420 6265 2073 6574 2074 6f20 636f uld be set to co\n-00198210: 6e6e 6563 7420 7468 726f 7567 6820 616e nnect through an\n-00198220: 2048 5454 5020 7072 6f78 7920 2874 6865 HTTP proxy (the\n-00198230: 2076 616c 7565 2069 7320 3830 3830 2062 value is 8080 b\n-00198240: 7920 2e2e 2e22 3e73 6f61 703a 3a70 726f y ...\">soap::pro\n-00198250: 7879 5f70 6f72 743c 2f61 3e3c 2f63 6f64 xy_port keep their va\n-00198270: 6c75 6573 2074 6872 6f75 6768 2061 2073 lues through a s\n-00198280: 6571 7565 6e63 6520 6f66 2073 6572 7669 equence of servi\n-00198290: 6365 206f 7065 7261 7469 6f6e 2063 616c ce operation cal\n-001982a0: 6c73 2c20 736f 2074 6865 7920 6f6e 6c79 ls, so they only\n-001982b0: 206e 6565 6420 746f 2062 6520 7365 7420 need to be set \n-001982c0: 6f6e 6365 2e3c 2f70 3e0a 3c70 3e57 6865 once.

    .

    Whe\n-001982d0: 6e20 582d 466f 7277 6172 6465 642d 466f n X-Forwarded-Fo\n-001982e0: 7220 6865 6164 6572 7320 6172 6520 7265 r headers are re\n-001982f0: 7475 726e 6564 2062 7920 7468 6520 7072 turned by the pr\n-00198300: 6f78 792c 2074 6865 2068 6561 6465 7220 oxy, the header \n-00198310: 6361 6e20 6265 2061 6363 6573 7365 6420 can be accessed \n-00198320: 696e 2074 6865 203c 636f 6465 3e3c 6120 in the soap::proxy_\n-001983c0: 6672 6f6d 3c2f 613e 3c2f 636f 6465 3e20 from \n-001983d0: 7374 7269 6e67 2e3c 2f70 3e0a 3c70 3e53 string.

    .

    S\n-001983e0: 6565 2061 6c73 6f20 5365 6374 696f 6e73 ee also Sections\n-001983f0: 203c 6120 636c 6173 733d 2265 6c22 2068 HTTP proxy \n-00198430: 6261 7369 6320 6175 7468 656e 7469 6361 basic authentica\n-00198440: 7469 6f6e 3c2f 613e 2061 6e64 203c 6120 tion and HTTP proxy \n-00198490: 4e54 4c4d 2061 7574 6865 6e74 6963 6174 NTLM authenticat\n-001984a0: 696f 6e3c 2f61 3e2e 3c2f 703e 0a3c 703e ion.

    .

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

    \n-00198510: 3c2f 613e 0a42 696e 6420 6265 666f 7265 .Bind before\n-00198520: 2063 6f6e 6e65 6374 2061 6e64 2073 6574 connect and set\n-00198530: 7469 6e67 2074 6865 2063 6c69 656e 7420 ting the client \n-00198540: 696e 7465 7266 6163 6520 6164 6472 6573 interface addres\n-00198550: 733c 2f68 323e 0a3c 703e 546f 2062 696e s

    .

    To bin\n-00198560: 6420 7468 6520 636c 6965 6e74 2074 6f20 d the client to \n-00198570: 6120 706f 7274 2062 6566 6f72 6520 636f a port before co\n-00198580: 6e6e 6563 742c 2073 6574 2074 6865 203c nnect, set the <\n-00198590: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-00198640: 3a3a 636c 6965 6e74 5f70 6f72 743c 2f61 ::client_port to a no\n-00198660: 6e2d 6e65 6761 7469 7665 2070 6f72 7420 n-negative port \n-00198670: 6e75 6d62 6572 3a3c 2f70 3e0a 3c64 6976 number:

    ..
    \n-001987d0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->client_por\n-00198830: 743c 2f61 3e20 3d20 2e2e 2e3b 203c 7370 t = ...; // non-negati\n-00198860: 7665 2070 6f72 7420 6e75 6d62 6572 203c ve port number <\n-00198870: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-00198890: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001988a0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n-001988c0: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, "h\n-00198920: 7474 703a 2f2f 686f 7374 3a70 6f72 742f ttp://host:port/\n-00198930: 7061 7468 2671 756f 743b 3c2f 7370 616e path", &\n-00198960: 7175 6f74 3b61 6374 696f 6e26 7175 6f74 quot;action"\n-00198970: 3b3c 2f73 7061 6e3e 2c20 2e2e 2e29 2920 ;, ...)) \n-00198980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n-001989a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001989b0: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent\">// error
    .
    else
    .
    ..\n-00198a20: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe\n-00198a40: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
    .\n-00198a50: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::c\n-00198af0: 6c69 656e 745f 706f 7274 3c2f 613e 3c2f lient_port
    int clie\n-00198b20: 6e74 5f70 6f72 743c 2f64 6976 3e3c 6469 nt_port
    \n-00198b40: 5573 6572 2d64 6566 696e 6162 6c65 2063 User-definable c\n-00198b50: 6c69 656e 7420 706f 7274 2074 6f20 6269 lient port to bi\n-00198b60: 6e64 2074 6f20 6265 666f 7265 2063 6f6e nd to before con\n-00198b70: 6e65 6374 696e 6720 746f 2061 2073 6572 necting to a ser\n-00198b80: 7665 722c 2077 6865 6e20 6e6f 6e2d 6e65 ver, when non-ne\n-00198b90: 6761 7469 7665 2e3c 2f64 6976 3e3c 6469 gative.
    \n-00198bb0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:36\n-00198bd0: 3930 3c2f 6469 763e 3c2f 6469 763e 0a3c 90
    .<\n-00198be0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This po\n-00198c00: 7274 206e 756d 6265 7220 6973 2075 7365 rt number is use\n-00198c10: 6420 6f6e 6c79 206f 6e63 6520 616e 6420 d only once and \n-00198c20: 7265 7365 7420 746f 202d 3120 2864 6973 reset to -1 (dis\n-00198c30: 6162 6c65 6429 2e20 5365 7420 6974 2061 abled). Set it a\n-00198c40: 6761 696e 2066 6f72 2074 6865 206e 6578 gain for the nex\n-00198c50: 7420 6361 6c6c 2e3c 2f70 3e0a 3c70 3e54 t call.

    .

    T\n-00198c60: 6f20 7365 7420 6120 636c 6965 6e74 2069 o set a client i\n-00198c70: 6e74 6572 6661 6365 2061 6464 7265 7373 nterface address\n-00198c80: 2066 6f72 2074 6865 2063 6f6e 6e65 6374 for the connect\n-00198c90: 696f 6e20 7468 6174 2069 7320 616e 2049 ion that is an I\n-00198ca0: 5020 6164 6472 6573 7320 6f66 2074 6865 P address of the\n-00198cb0: 2063 6c69 656e 743a 3c2f 703e 0a3c 6469 client:

    .
    struc\n-00198d00: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-00198d30: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new();\n-00198dd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->client_in\n-00198e70: 7465 7266 6163 653c 2f61 3e20 3d20 3c73 terface = "\n-00198ea0: 2e2e 2e26 7175 6f74 3b3c 2f73 7061 6e3e ..."\n-00198eb0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // IP ad\n-00198ed0: 6472 6573 7320 3c2f 7370 616e 3e3c 2f64 dress ..\n-00199000: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n-00199020: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    el\n-00199060: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
    \n-00199070: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n-001990a0: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success\n-001990b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00199100: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n-00199170: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char *\n-00199190: 2063 6c69 656e 745f 696e 7465 7266 6163 client_interfac\n-001991a0: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    User-d\n-001991c0: 6566 696e 6162 6c65 2063 6c69 656e 7420 efinable client \n-001991d0: 696e 7465 7266 6163 6520 6164 6472 6573 interface addres\n-001991e0: 7320 746f 206f 7665 7272 6964 6520 7768 s to override wh\n-001991f0: 656e 2063 6f6e 6e65 6374 696e 6720 746f en connecting to\n-00199200: 2061 2073 6572 7665 722c 2077 6865 6e20 a server, when \n-00199210: 6e6f 6e2d 4e55 4c4c 2028 5769 6e64 6f2e non-NULL (Windo.\n-00199220: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De\n-00199240: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00199250: 6473 6f61 7032 2e68 3a33 3639 393c 2f64 dsoap2.h:3699
    .
    \n-00199270: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    to gsoap/st\n-00199500: 6473 6f61 7032 2e68 3c2f 636f 6465 3e3c dsoap2.h<\n-00199510: 2f65 6d3e 2061 6e64 2072 6563 6f6d 7069 /em> and recompi\n-00199520: 6c65 2074 6865 2070 726f 6a65 6374 2063 le the project c\n-00199530: 6f64 652e 3c2f 703e 0a3c 646c 2063 6c61 ode.

    .
    Warning\n-00199560: 3c2f 6474 3e3c 6464 3e44 6f20 6e6f 7420
    Do not \n-00199570: 6c69 6e6b 2061 6761 696e 7374 2074 6865 link against the\n-00199580: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-00199590: 2f6c 6962 6773 6f61 702a 3c2f 636f 6465 /libgsoap* libraries\n-001995b0: 2061 7320 7468 6573 6520 6172 6520 6e6f as these are no\n-001995c0: 7420 7375 6974 6162 6c65 2066 6f72 2046 t suitable for F\n-001995d0: 6173 7443 4749 2e20 436f 6d70 696c 6520 astCGI. Compile \n-001995e0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-001995f0: 7374 6473 6f61 7032 2e63 3c2f 636f 6465 stdsoap2.c (or <\n-00199610: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-00199620: 6170 322e 6370 703c 2f63 6f64 653e 3c2f ap2.cpp) instead.
    .

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

    ..How to minimi\n-001996b0: 7a65 2061 7070 6c69 6361 7469 6f6e 206d ze application m\n-001996c0: 656d 6f72 7920 666f 6f74 7072 696e 743c emory footprint<\n-001996d0: 2f68 323e 0a3c 703e 546f 2063 6f6d 7069 /h2>.

    To compi\n-001996e0: 6c65 2067 534f 4150 2061 7070 6c69 6361 le gSOAP applica\n-001996f0: 7469 6f6e 7320 696e 7465 6e64 6564 2066 tions intended f\n-00199700: 6f72 2073 6d61 6c6c 206d 656d 6f72 7920 or small memory \n-00199710: 6465 7669 6365 732c 2079 6f75 206d 6179 devices, you may\n-00199720: 2077 616e 7420 746f 2072 656d 6f76 6520 want to remove \n-00199730: 616c 6c20 6e6f 6e2d 6573 7365 6e74 6961 all non-essentia\n-00199740: 6c20 6665 6174 7572 6573 2074 6861 7420 l features that \n-00199750: 636f 6e73 756d 6520 7072 6563 696f 7573 consume precious\n-00199760: 2063 6f64 6520 616e 6420 6461 7461 2073 code and data s\n-00199770: 7061 6365 2e20 546f 2064 6f20 7468 6973 pace. To do this\n-00199780: 2c20 636f 6d70 696c 6520 7468 6520 736f , compile the so\n-00199790: 7572 6365 2063 6f64 6520 6669 6c65 7320 urce code files \n-001997a0: 7769 7468 2074 6865 2063 6f6d 7069 6c65 with the compile\n-001997b0: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_LEAN (i.e. #\n-001997e0: 6465 6669 6e65 2057 4954 485f 4c45 414e define WITH_LEAN\n-001997f0: 3c2f 636f 6465 3e29 2074 6f20 7265 6d6f ) to remo\n-00199800: 7665 206d 616e 7920 6e6f 6e2d 6573 7365 ve many non-esse\n-00199810: 6e74 6961 6c20 6665 6174 7572 6573 2e20 ntial features. \n-00199820: 5468 6520 6665 6174 7572 6573 2074 6861 The features tha\n-00199830: 7420 7769 6c6c 2062 6520 6469 7361 626c t will be disabl\n-00199840: 6564 2061 7265 3a3c 2f70 3e0a 3c75 6c3e ed are:

    .
    .\n-0019a180: 3c70 3e55 7365 2074 6865 2063 6f6d 7069

    Use the compi\n-0019a190: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_LEANER<\n-0019a1b0: 2f63 6f64 653e 2074 6f20 6d61 6b65 2074 /code> to make t\n-0019a1c0: 6865 2065 7865 6375 7461 626c 6520 6576 he executable ev\n-0019a1d0: 656e 2073 6d61 6c6c 6572 2062 7920 7265 en smaller by re\n-0019a1e0: 6d6f 7669 6e67 2044 494d 4520 616e 6420 moving DIME and \n-0019a1f0: 4d49 4d45 2061 7474 6163 686d 656e 7420 MIME attachment \n-0019a200: 6861 6e64 6c69 6e67 2c20 3c63 6f64 653e handling, \n-0019a210: 234c 4f4e 4736 343c 2f63 6f64 653e 2028 #LONG64 (\n-0019a220: 3634 2062 6974 2920 7365 7269 616c 697a 64 bit) serializ\n-0019a230: 6174 696f 6e2c 203c 636f 6465 3e77 6368 ation, wch\n-0019a240: 6172 5f74 2a3c 2f63 6f64 653e 2073 6572 ar_t* ser\n-0019a250: 6961 6c69 7a61 7469 6f6e 2c20 616e 6420 ialization, and \n-0019a260: 7375 7070 6f72 7420 666f 7220 584d 4c20 support for XML \n-0019a270: 444f 4d20 6f70 6572 6174 696f 6e73 2e20 DOM operations. \n-0019a280: 4e6f 7465 2074 6861 7420 4449 4d45 2f4d Note that DIME/M\n-0019a290: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n-0019a2a0: 6172 6520 6e6f 7420 6573 7365 6e74 6961 are not essentia\n-0019a2b0: 6c20 746f 2061 6368 6965 7665 2053 4f41 l to achieve SOA\n-0019a2c0: 502f 584d 4c20 696e 7465 726f 7065 7261 P/XML interopera\n-0019a2d0: 6269 6c69 7479 2e20 4449 4d45 2061 7474 bility. DIME att\n-0019a2e0: 6163 686d 656e 7473 2061 7265 2061 2063 achments are a c\n-0019a2f0: 6f6e 7665 6e69 656e 7420 7761 7920 746f onvenient way to\n-0019a300: 2065 7863 6861 6e67 6520 6e6f 6e2d 7465 exchange non-te\n-0019a310: 7874 2d62 6173 6564 2028 692e 652e 2062 xt-based (i.e. b\n-0019a320: 696e 6172 7929 2063 6f6e 7465 6e74 2c20 inary) content, \n-0019a330: 6275 7420 6172 6520 6e6f 7420 7265 7175 but are not requ\n-0019a340: 6972 6564 2066 6f72 2062 6173 6963 2053 ired for basic S\n-0019a350: 4f41 502f 584d 4c20 696e 7465 726f 7065 OAP/XML interope\n-0019a360: 7261 6269 6c69 7479 2e20 4174 7461 6368 rability. Attach\n-0019a370: 6d65 6e74 2072 6571 7569 7265 6d65 6e74 ment requirement\n-0019a380: 7320 6172 6520 7072 6564 6963 7461 626c s are predictabl\n-0019a390: 652e 2054 6861 7420 6973 2c20 6170 706c e. That is, appl\n-0019a3a0: 6963 6174 696f 6e73 2077 6f6e 2774 2073 ications won't s\n-0019a3b0: 7564 6465 6e6c 7920 6465 6369 6465 2074 uddenly decide t\n-0019a3c0: 6f20 7573 6520 4449 4d45 206f 7220 4d49 o use DIME or MI\n-0019a3d0: 4d45 2069 6e73 7465 6164 206f 6620 584d ME instead of XM\n-0019a3e0: 4c20 746f 2065 7863 6861 6e67 6520 636f L to exchange co\n-0019a3f0: 6e74 656e 742e 3c2f 703e 0a3c 703e 4974 ntent.

    .

    It\n-0019a400: 2069 7320 7361 6665 2074 6f20 7472 7920 is safe to try \n-0019a410: 746f 2063 6f6d 7069 6c65 2079 6f75 7220 to compile your \n-0019a420: 6170 706c 6963 6174 696f 6e20 7769 7468 application with\n-0019a430: 2074 6865 2063 6f6d 7069 6c65 2d74 696d the compile-tim\n-0019a440: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI\n-0019a450: 5448 5f4c 4541 4e3c 2f63 6f64 653e 2c20 TH_LEAN, \n-0019a460: 7072 6f76 6964 6564 2074 6861 7420 796f provided that yo\n-0019a470: 7572 2061 7070 6c69 6361 7469 6f6e 2064 ur application d\n-0019a480: 6f65 7320 6e6f 7420 7265 6c79 206f 6e20 oes not rely on \n-0019a490: 492f 4f20 7469 6d65 6f75 7473 2e20 5768 I/O timeouts. Wh\n-0019a4a0: 656e 206e 6f20 6c69 6e6b 6167 6520 6572 en no linkage er\n-0019a4b0: 726f 7220 6f63 6375 7273 2069 6e20 7468 ror occurs in th\n-0019a4c0: 6520 636f 6d70 696c 6174 696f 6e20 7072 e compilation pr\n-0019a4d0: 6f63 6573 732c 2069 7420 6973 2073 6166 ocess, it is saf\n-0019a4e0: 6520 746f 2061 7373 756d 6520 7468 6174 e to assume that\n-0019a4f0: 2079 6f75 7220 6170 706c 6963 6174 696f your applicatio\n-0019a500: 6e20 7769 6c6c 2072 756e 206a 7573 7420 n will run just \n-0019a510: 6669 6e65 2e3c 2f70 3e0a 3c70 3ef0 9f94 fine.

    .

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

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

    \n-0019a570: 3c2f 613e 0a48 6f77 2074 6f20 7265 6d6f .How to remo\n-0019a580: 7665 2074 6865 2042 5344 2073 6f63 6b65 ve the BSD socke\n-0019a590: 7420 6c69 6272 6172 7920 7265 7175 6972 t library requir\n-0019a5a0: 656d 656e 743c 2f68 323e 0a3c 703e 5468 ement

    .

    Th\n-0019a5b0: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n-0019a5c0: 702f 7374 6473 6f61 7032 2e63 3c2f 636f p/stdsoap2.c and gsoap/std\n-0019a5f0: 736f 6170 322e 6370 703c 2f63 6f64 653e soap2.cpp\n-0019a600: 3c2f 656d 3e20 6c69 6272 6172 6965 7320 libraries \n-0019a610: 7368 6f75 6c64 2062 6520 6c69 6e6b 6564 should be linked\n-0019a620: 2077 6974 6820 6120 4253 4420 736f 636b with a BSD sock\n-0019a630: 6574 206c 6962 7261 7279 2069 6e20 7468 et library in th\n-0019a640: 6520 7072 6f6a 6563 7420 6275 696c 642e e project build.\n-0019a650: 2054 6f20 7265 6d6f 7665 2074 6865 206e To remove the n\n-0019a660: 6565 6420 746f 206c 696e 6b20 6120 736f eed to link a so\n-0019a670: 636b 6574 206c 6962 7261 7279 2c20 796f cket library, yo\n-0019a680: 7520 6361 6e20 636f 6d70 696c 6520 3c65 u can compile gsoap/st\n-0019a6a0: 6473 6f61 7032 2e63 3c2f 636f 6465 3e3c dsoap2.c<\n-0019a6b0: 2f65 6d3e 2028 666f 7220 4329 2061 6e64 /em> (for C) and\n-0019a6c0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-0019a6d0: 2f73 7464 736f 6170 322e 6370 703c 2f63 /stdsoap2.cpp (for C\n-0019a6f0: 2b2b 2920 7769 7468 2074 6865 2074 6865 ++) with the the\n-0019a700: 2063 6f6d 7069 6c65 2d74 696d 6520 666c compile-time fl\n-0019a710: 6167 203c 636f 6465 3e23 5749 5448 5f4e ag #WITH_N\n-0019a720: 4f49 4f3c 2f63 6f64 653e 206d 6163 726f OIO macro\n-0019a730: 2073 6574 2028 692e 652e 203c 636f 6465 set (i.e. #define WITH_NO\n-0019a750: 494f 3c2f 636f 6465 3e29 2e20 5468 6973 IO). This\n-0019a760: 2072 656d 6f76 6573 2074 6865 2064 6570 removes the dep\n-0019a770: 656e 6465 6e63 7920 6f6e 2074 6865 2042 endency on the B\n-0019a780: 5344 2073 6f63 6b65 7420 4150 492c 2049 SD socket API, I\n-0019a790: 4f20 7374 7265 616d 732c 203c 636f 6465 O streams, FILE typ\n-0019a7b0: 652c 2061 6e64 203c 636f 6465 3e65 7272 e, and err\n-0019a7c0: 6e6f 3c2f 636f 6465 3e2e 3c2f 703e 0a3c no.

    .<\n-0019a7d0: 703e 596f 7520 7368 6f75 6c64 2064 6566 p>You should def\n-0019a7e0: 696e 6520 6361 6c6c 6261 636b 7320 746f ine callbacks to\n-0019a7f0: 2072 6570 6c61 6365 2074 6865 206d 6973 replace the mis\n-0019a800: 7369 6e67 2073 6f63 6b65 7420 7374 6163 sing socket stac\n-0019a810: 6b2e 2054 6f20 646f 2073 6f2c 2061 6464 k. To do so, add\n-0019a820: 2074 6f20 796f 7572 2063 6f64 6520 7468 to your code th\n-0019a830: 6520 666f 6c6c 6f77 696e 6720 6465 6669 e following defi\n-0019a840: 6e69 7469 6f6e 733a 3c2f 703e 0a3c 6469 nitions:

    .\n-0019a900: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_ini\n-0019a970: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); .
    /* f\n-0019a9e0: 7365 6e64 2069 7320 7573 6564 2074 6f20 send is used to \n-0019a9f0: 7472 616e 736d 6974 2064 6174 6120 696e transmit data in\n-0019aa00: 2062 6c6f 636b 7320 2a2f 3c2f 7370 616e blocks */
    .
    soap.fsend = my\n-0019aac0: 5f73 656e 643b 203c 2f64 6976 3e0a 3c64 _send;
    .\n-0019aae0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* frecv i\n-0019ab00: 7320 7573 6564 2074 6f20 7265 6365 6976 s used to receiv\n-0019ab10: 6520 6461 7461 2069 6e20 626c 6f63 6b73 e data in blocks\n-0019ab20: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ ..
    /\n-0019ac10: 2a20 666f 7065 6e20 6973 2075 7365 6420 * fopen is used \n-0019ac20: 746f 2063 6f6e 6e65 6374 202a 2f3c 2f73 to connect */
    .soap.fopen =\n-0019ace0: 206d 795f 7463 705f 636f 6e6e 6563 743b my_tcp_connect;\n-0019acf0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-0019ad20: 2f2a 2066 636c 6f73 6520 6973 2075 7365 /* fclose is use\n-0019ad30: 6420 746f 2064 6973 636f 6e6e 6563 7420 d to disconnect \n-0019ad40: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-0019ad50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.fclose\n-0019adf0: 3c2f 613e 203d 206d 795f 7463 705f 6469 = my_tcp_di\n-0019ae00: 7363 6f6e 6e65 6374 3b20 3c2f 6469 763e sconnect;
    \n-0019ae10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* fclo\n-0019ae40: 7365 736f 636b 6574 2069 7320 7573 6564 sesocket is used\n-0019ae50: 206f 6e6c 7920 746f 2063 6c6f 7365 2074 only to close t\n-0019ae60: 6865 206d 6173 7465 7220 736f 636b 6574 he master socket\n-0019ae70: 2069 6e20 6120 7365 7276 6572 2075 706f in a server upo\n-0019ae80: 6e20 736f 6170 5f64 6f6e 6528 2920 2a2f n soap_done() */\n-0019ae90: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-0019aea0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0019aeb0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0019aee0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fcloseso\n-0019af40: 636b 6574 3c2f 613e 203d 206d 795f 7463 cket = my_tc\n-0019af50: 705f 636c 6f73 6573 6f63 6b65 743b 203c p_closesocket; <\n-0019af60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    /*\n-0019af90: 2066 7368 7574 646f 776e 736f 636b 6574 fshutdownsocket\n-0019afa0: 2069 7320 7573 6564 2061 6674 6572 2063 is used after c\n-0019afb0: 6f6d 706c 6574 696e 6720 6120 7365 6e64 ompleting a send\n-0019afc0: 206f 7065 7261 7469 6f6e 2074 6f20 7365 operation to se\n-0019afd0: 6e64 2054 4350 2046 494e 202a 2f3c 2f73 nd TCP FIN */
    .soap.fshutdownso\n-0019b090: 636b 6574 3c2f 613e 203d 206d 795f 7463 cket = my_tc\n-0019b0a0: 705f 7368 7574 646f 776e 736f 636b 6574 p_shutdownsocket\n-0019b0b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    /* setting fpol\n-0019b0f0: 6c20 6973 206f 7074 696f 6e61 6c2c 206c l is optional, l\n-0019b100: 6561 7665 2069 7420 4e55 4c4c 2074 6f20 eave it NULL to \n-0019b110: 6f6d 6974 2070 6f6c 6c69 6e67 2074 6865 omit polling the\n-0019b120: 2073 6572 7665 7220 2a2f 3c2f 7370 616e server */
    .
    soap.fpoll = my\n-0019b1e0: 5f70 6f6c 6c3b 203c 2f64 6976 3e0a 3c64 _poll;
    .\n-0019b200: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* faccept\n-0019b220: 2069 7320 7573 6564 206f 6e6c 7920 6279 is used only by\n-0019b230: 2061 2073 6572 7665 7220 6170 706c 6963 a server applic\n-0019b240: 6174 696f 6e20 2a2f 3c2f 7370 616e 3e20 ation */ \n-0019b250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..<\n-0019b310: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0019b320: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-0019b330: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n-0019b340: 6c5f 6761 3230 3231 3061 6131 3731 3031 l_ga20210aa17101\n-0019b350: 3962 3237 6566 3138 3264 3835 3365 3264 9b27ef182d853e2d\n-0019b360: 3665 3266 223e 3c64 6976 2063 6c61 7373 6e2f\">
    int\n-0019b3f0: 282a 2066 706f 6c6c 2928 7374 7275 6374 (* fpoll)(struct\n-0019b400: 2073 6f61 7020 2a73 6f61 7029 3c2f 6469 soap *soap)
    Callback th\n-0019b430: 6174 2062 6c6f 636b 7320 756e 7469 6c20 at blocks until \n-0019b440: 6163 7469 7669 7479 2069 7320 6465 7465 activity is dete\n-0019b450: 6374 6564 206f 6e20 7468 6520 736f 6170 cted on the soap\n-0019b460: 3a3a 736f 636b 6574 206f 7220 736f 6170 ::socket or soap\n-0019b470: 3a3a 6d61 7374 6572 2073 6f63 6b65 742c ::master socket,\n-0019b480: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D\n-0019b4a0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0019b4b0: 7464 736f 6170 322e 683a 3435 3934 3c2f tdsoap2.h:4594
    .
    \n-0019b5b0: 696e 7428 2a20 6663 6c6f 7365 736f 636b int(* fclosesock\n-0019b5c0: 6574 2928 7374 7275 6374 2073 6f61 7020 et)(struct soap \n-0019b5d0: 2a73 6f61 702c 2053 4f41 505f 534f 434b *soap, SOAP_SOCK\n-0019b5e0: 4554 2073 6f63 6b29 3c2f 6469 763e 3c64 ET sock)
    Callback that c\n-0019b610: 6c6f 7365 7320 6120 6769 7665 6e20 736f loses a given so\n-0019b620: 636b 6574 2e3c 2f64 6976 3e3c 6469 7620 cket.
    Definition:\n-0019b650: 2073 7464 736f 6170 322e 683a 3435 3730 stdsoap2.h:4570\n-0019b660: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    soap::fshutdow\n-0019b730: 6e73 6f63 6b65 743c 2f61 3e3c 2f64 6976 nsocket
    int(* fshut\n-0019b760: 646f 776e 736f 636b 6574 2928 7374 7275 downsocket)(stru\n-0019b770: 6374 2073 6f61 7020 2a73 6f61 702c 2053 ct soap *soap, S\n-0019b780: 4f41 505f 534f 434b 4554 2073 6f63 6b2c OAP_SOCKET sock,\n-0019b790: 2069 6e74 2068 6f77 293c 2f64 6976 3e3c int how)
    <\n-0019b7a0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0019b7b0: 223e 4361 6c6c 6261 636b 2074 6861 7420 \">Callback that \n-0019b7c0: 7368 7574 7320 646f 776e 2061 2067 6976 shuts down a giv\n-0019b7d0: 656e 2073 6f63 6b65 742e 3c2f 6469 763e en socket.
    \n-0019b7e0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-0019b800: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-0019b810: 3a34 3538 333c 2f64 6976 3e3c 2f64 6976 :4583
    .
    SOAP_SOCKET(* \n-0019b910: 6661 6363 6570 7429 2873 7472 7563 7420 faccept)(struct \n-0019b920: 736f 6170 202a 736f 6170 2c20 534f 4150 soap *soap, SOAP\n-0019b930: 5f53 4f43 4b45 5420 736f 636b 2c20 7374 _SOCKET sock, st\n-0019b940: 7275 6374 2073 6f63 6b61 6464 7220 2a61 ruct sockaddr *a\n-0019b950: 6464 722c 2069 6e74 202a 6c65 6e29 3c2f ddr, int *len)
    Callback \n-0019b980: 7468 6174 2077 6169 7473 2066 6f72 2061 that waits for a\n-0019b990: 6e64 2061 6363 6570 7473 2061 2073 6f63 nd accepts a soc\n-0019b9a0: 6b65 7420 636f 6e6e 6563 7469 6f6e 2072 ket connection r\n-0019b9b0: 6571 7565 7374 6564 2062 7920 6120 636c equested by a cl\n-0019b9c0: 6965 6e74 2e3c 2f64 6976 3e3c 6469 7620 ient.
    Definition:\n-0019b9f0: 2073 7464 736f 6170 322e 683a 3435 3039 stdsoap2.h:4509\n-0019ba00: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    These fun\n-0019ba30: 6374 696f 6e73 2073 686f 756c 6420 7072 ctions should pr\n-0019ba40: 6f76 6964 6520 6120 6d69 6e69 6d61 6c20 ovide a minimal \n-0019ba50: 696e 7075 742f 6f75 7470 7574 2073 7461 input/output sta\n-0019ba60: 636b 2028 3c63 6f64 653e 3c61 2063 6c61 ck (soap::frecv and so\n-0019bbb0: 6170 3a3a 6673 656e 643c 2f61 3e3c 2f63 ap::fsend) to read/wr\n-0019bbd0: 6974 6520 584d 4c20 616e 6420 736f 636b ite XML and sock\n-0019bbe0: 6574 2d6c 696b 6520 7374 6163 6b20 2874 et-like stack (t\n-0019bbf0: 6865 206f 7468 6572 2066 756e 6374 696f he other functio\n-0019bc00: 6e73 2920 7768 656e 2064 6576 656c 6f70 ns) when develop\n-0019bc10: 696e 6720 636c 6965 6e74 2061 6e64 2073 ing client and s\n-0019bc20: 6572 7665 7220 6170 706c 6963 6174 696f erver applicatio\n-0019bc30: 6e73 2e3c 2f70 3e0a 3c70 3e53 6565 2053 ns.

    .

    See S\n-0019bc40: 6563 7469 6f6e 203c 6120 636c 6173 733d ection \n-0019bc70: 4675 6e63 7469 6f6e 2063 616c 6c62 6163 Function callbac\n-0019bc80: 6b73 2066 6f72 2063 7573 746f 6d69 7a65 ks for customize\n-0019bc90: 6420 492f 4f20 616e 6420 4854 5450 2068 d I/O and HTTP h\n-0019bca0: 616e 646c 696e 673c 2f61 3e20 666f 7220 andling for \n-0019bcb0: 6d6f 7265 2064 6574 6169 6c73 206f 6e20 more details on \n-0019bcc0: 7468 6520 7573 6520 6f66 2074 6865 7365 the use of these\n-0019bcd0: 2063 616c 6c62 6163 6b73 2e20 416c 6c20 callbacks. All \n-0019bce0: 6361 6c6c 6261 636b 2066 756e 6374 696f callback functio\n-0019bcf0: 6e20 706f 696e 7465 7273 2073 686f 756c n pointers shoul\n-0019bd00: 6420 6265 206e 6f6e 2d4e 554c 4c2c 2065 d be non-NULL, e\n-0019bd10: 7863 6570 7420 3c63 6f64 653e 3c61 2063 xcept soap::fp\n-0019bde0: 6f6c 6c3c 2f61 3e3c 2f63 6f64 653e 2e3c oll.<\n-0019bdf0: 2f70 3e0a 3c70 3e59 6f75 2063 616e 6e6f /p>.

    You canno\n-0019be00: 7420 7573 6520 3c63 6f64 653e 3c61 2063 t use soap_print_fau\n-0019bea0: 6c74 3c2f 613e 3c2f 636f 6465 3e20 616e lt an\n-0019beb0: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap_print\n-0019bf60: 5f66 6175 6c74 5f6c 6f63 6174 696f 6e3c _fault_location<\n-0019bf70: 2f61 3e3c 2f63 6f64 653e 2074 6f20 7072 /a> to pr\n-0019bf80: 696e 7420 6572 726f 7220 6469 6167 6e6f int error diagno\n-0019bf90: 7374 6963 732e 2049 6e73 7465 6164 2c20 stics. Instead, \n-0019bfa0: 7468 6520 7661 6c75 6520 6f66 203c 636f the value of soap::e\n-0019c060: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e2c rror,\n-0019c070: 2077 6869 6368 2063 6f6e 7461 696e 7320 which contains \n-0019c080: 7468 6520 6753 4f41 5020 6572 726f 7220 the gSOAP error \n-0019c090: 636f 6465 2c20 6361 6e20 6265 2075 7365 code, can be use\n-0019c0a0: 6420 746f 2064 6574 6572 6d69 6e65 2074 d to determine t\n-0019c0b0: 6865 2063 6175 7365 206f 6620 6120 6661 he cause of a fa\n-0019c0c0: 756c 742e 3c2f 703e 0a3c 703e f09f 949d ult.

    .

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

    .<\n-0019c100: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.How to co\n-0019c130: 6d62 696e 6520 6d75 6c74 6970 6c65 2063 mbine multiple c\n-0019c140: 6c69 656e 7420 616e 6420 7365 7276 6572 lient and server\n-0019c150: 2069 6d70 6c65 6d65 6e74 6174 696f 6e73 implementations\n-0019c160: 2069 6e74 6f20 6f6e 6520 6578 6563 7574 into one execut\n-0019c170: 6162 6c65 3c2f 6832 3e0a 3c70 3e54 6865 able.

    The\n-0019c180: 2077 7364 6c32 6820 746f 6f6c 2063 616e wsdl2h tool can\n-0019c190: 2062 6520 7573 6564 2074 6f20 696d 706f be used to impo\n-0019c1a0: 7274 206d 756c 7469 706c 6520 5753 444c rt multiple WSDL\n-0019c1b0: 7320 616e 6420 7363 6865 6d61 7320 6174 s and schemas at\n-0019c1c0: 206f 6e63 652e 2054 6865 2073 6572 7669 once. The servi\n-0019c1d0: 6365 2064 6566 696e 6974 696f 6e73 2061 ce definitions a\n-0019c1e0: 7265 2063 6f6d 6269 6e65 6420 696e 206f re combined in o\n-0019c1f0: 6e65 2068 6561 6465 7220 6669 6c65 2074 ne header file t\n-0019c200: 6f20 6265 2070 6172 7365 6420 6279 2073 o be parsed by s\n-0019c210: 6f61 7063 7070 322e 2049 7420 6973 2069 oapcpp2. It is i\n-0019c220: 6d70 6f72 7461 6e74 2074 6f20 6173 7369 mportant to assi\n-0019c230: 676e 206e 616d 6573 7061 6365 2070 7265 gn namespace pre\n-0019c240: 6669 7865 7320 746f 206e 616d 6573 7061 fixes to namespa\n-0019c250: 6365 2055 5249 7320 7573 696e 6720 7468 ce URIs using th\n-0019c260: 6520 3c65 6d3e 3c63 6f64 653e 7479 7065 e type\n-0019c270: 6d61 702e 6461 743c 2f63 6f64 653e 3c2f map.dat file. Otherw\n-0019c290: 6973 652c 2077 7364 6c32 6820 7769 6c6c ise, wsdl2h will\n-0019c2a0: 2061 7373 6967 6e20 6e61 6d65 7370 6163 assign namespac\n-0019c2b0: 6520 7072 6566 6978 6573 203c 636f 6465 e prefixes ns1, ns2, a\n-0019c2e0: 6e64 2073 6f20 6f6e 2074 6f20 7468 6520 nd so on to the \n-0019c2f0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-0019c300: 6e73 2061 6e64 2073 6368 656d 6120 7479 ns and schema ty\n-0019c310: 7065 732e 2054 6875 732c 2061 6e79 2063 pes. Thus, any c\n-0019c320: 6861 6e67 6520 746f 2061 2057 5344 4c20 hange to a WSDL \n-0019c330: 6f72 2073 6368 656d 6120 6d61 7920 7265 or schema may re\n-0019c340: 7375 6c74 2069 6e20 6120 6e65 7720 7072 sult in a new pr\n-0019c350: 6566 6978 2061 7373 6967 6e6d 656e 742e efix assignment.\n-0019c360: 2046 6f72 206d 6f72 6520 6465 7461 696c For more detail\n-0019c370: 732c 2070 6c65 6173 6520 7365 6520 5365 s, please see Se\n-0019c380: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Cu\n-0019c3b0: 7374 6f6d 697a 696e 6720 584d 4c20 6461 stomizing XML da\n-0019c3c0: 7461 2062 696e 6469 6e67 7320 7769 7468 ta bindings with\n-0019c3d0: 2074 6865 2074 7970 656d 6170 2e64 6174 the typemap.dat\n-0019c3e0: 2066 696c 653c 2f61 3e20 2e3c 2f70 3e0a file .

    .\n-0019c3f0: 3c70 3e41 6e6f 7468 6572 2061 7070 726f

    Another appro\n-0019c400: 6163 6820 746f 2063 6f6d 6269 6e65 206d ach to combine m\n-0019c410: 756c 7469 706c 6520 636c 6965 6e74 2061 ultiple client a\n-0019c420: 6e64 2073 6572 7669 6365 2061 7070 6c69 nd service appli\n-0019c430: 6361 7469 6f6e 7320 696e 746f 206f 6e65 cations into one\n-0019c440: 2065 7865 6375 7461 626c 6520 6973 2062 executable is b\n-0019c450: 7920 7573 696e 6720 432b 2b20 6e61 6d65 y using C++ name\n-0019c460: 7370 6163 6573 2074 6f20 7374 7275 6374 spaces to struct\n-0019c470: 7572 616c 6c79 2073 6570 6172 6174 6520 urally separate \n-0019c480: 7468 6520 6465 6669 6e69 7469 6f6e 732e the definitions.\n-0019c490: 2054 6869 7320 6973 2061 7574 6f6d 6174 This is automat\n-0019c4a0: 6564 2077 6974 6820 3c61 2068 7265 663d ed with <\n-0019c4c0: 636f 6465 3e77 7364 6c32 6820 2d71 206e code>wsdl2h -q n\n-0019c4d0: 616d 653c 2f63 6f64 653e 3c2f 623e 206f ame o\n-0019c4e0: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption -\n-0019c4f0: 7120 6e61 6d65 3c2f 636f 6465 3e3c 2f62 q name. Or by cre\n-0019c510: 6174 696e 6720 6c69 6272 6172 6965 7320 ating libraries \n-0019c520: 696e 2043 2066 6f72 2074 6865 2063 6c69 in C for the cli\n-0019c530: 656e 742f 7365 7276 6572 206f 626a 6563 ent/server objec\n-0019c540: 7473 2061 7320 6578 706c 6169 6e65 6420 ts as explained \n-0019c550: 696e 2073 7562 7365 7175 656e 7420 7365 in subsequent se\n-0019c560: 6374 696f 6e73 3c2f 703e 0a3c 703e 426f ctions

    .

    Bo\n-0019c570: 7468 2061 7070 726f 6163 6865 7320 6172 th approaches ar\n-0019c580: 6520 6465 6d6f 6e73 7472 6174 6564 2062 e demonstrated b\n-0019c590: 7920 6578 616d 706c 6573 2069 6e20 7468 y examples in th\n-0019c5a0: 6520 6753 4f41 5020 736f 7572 6365 2063 e gSOAP source c\n-0019c5b0: 6f64 6520 7061 636b 6167 652c 2074 6865 ode package, the\n-0019c5c0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-0019c5d0: 2f73 616d 706c 6573 2f6c 696e 6b3c 2f63 /samples/link (C onl\n-0019c5f0: 7929 2061 6e64 203c 656d 3e3c 636f 6465 y) and gsoap/samples/l\n-0019c610: 696e 6b2b 2b3c 2f63 6f64 653e 3c2f 656d ink++ (C++ with C++ \n-0019c630: 6e61 6d65 7370 6163 6573 2920 6578 616d namespaces) exam\n-0019c640: 706c 6573 2e3c 2f70 3e0a 3c70 3ef0 9f94 ples.

    .

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

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

    .Ho\n-0019c6b0: 7720 746f 2062 7569 6c64 2061 2063 6c69 w to build a cli\n-0019c6c0: 656e 7420 6f72 2073 6572 7665 7220 696e ent or server in\n-0019c6d0: 2061 2043 2b2b 2063 6f64 6520 6e61 6d65 a C++ code name\n-0019c6e0: 7370 6163 653c 2f68 323e 0a3c 703e 596f space

    .

    Yo\n-0019c6f0: 7520 6361 6e20 7573 6520 6120 432b 2b20 u can use a C++ \n-0019c700: 636f 6465 206e 616d 6573 7061 6365 206f code namespace o\n-0019c710: 6620 796f 7572 2063 686f 6963 6520 696e f your choice in\n-0019c720: 2079 6f75 7220 696e 7465 7266 6163 6520 your interface \n-0019c730: 6865 6164 6572 2066 696c 6520 746f 2062 header file to b\n-0019c740: 7569 6c64 2061 2063 6c69 656e 7420 6f72 uild a client or\n-0019c750: 2073 6572 7665 7220 696e 2074 6861 7420 server in that \n-0019c760: 432b 2b20 6e61 6d65 7370 6163 652e 2049 C++ namespace. I\n-0019c770: 6e20 7468 6973 2077 6179 2c20 796f 7520 n this way, you \n-0019c780: 6361 6e20 6372 6561 7465 206d 756c 7469 can create multi\n-0019c790: 706c 6520 636c 6965 6e74 7320 616e 6420 ple clients and \n-0019c7a0: 7365 7276 6572 7320 7468 6174 2063 616e servers that can\n-0019c7b0: 2062 6520 636f 6d62 696e 6564 2061 6e64 be combined and\n-0019c7c0: 206c 696e 6b65 6420 746f 6765 7468 6572 linked together\n-0019c7d0: 2077 6974 686f 7574 2063 6f6e 666c 6963 without conflic\n-0019c7e0: 7473 2c20 7768 6963 6820 6973 2065 7870 ts, which is exp\n-0019c7f0: 6c61 696e 6564 2069 6e20 6d6f 7265 2064 lained in more d\n-0019c800: 6574 6169 6c20 696e 2074 6865 206e 6578 etail in the nex\n-0019c810: 7420 7365 6374 696f 6e20 2877 6869 6368 t section (which\n-0019c820: 2061 6c73 6f20 7368 6f77 7320 616e 2065 also shows an e\n-0019c830: 7861 6d70 6c65 2063 6f6d 6269 6e69 6e67 xample combining\n-0019c840: 2074 776f 2063 6c69 656e 7420 6c69 6272 two client libr\n-0019c850: 6172 6965 7320 6465 6669 6e65 6420 696e aries defined in\n-0019c860: 2074 776f 2043 2b2b 2063 6f64 6520 6e61 two C++ code na\n-0019c870: 6d65 7370 6163 6573 292e 3c2f 703e 0a3c mespaces).

    .<\n-0019c880: 703e 5573 6520 3c61 2068 7265 663d 2223 p>Use wsdl2h -q nam\n-0019c8b0: 653c 2f63 6f64 653e 3c2f 623e 206f 7074 e opt\n-0019c8c0: 696f 6e20 3c62 3e3c 636f 6465 3e2d 7120 ion -q \n-0019c8d0: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e3c name<\n-0019c8e0: 2f61 3e20 746f 2067 656e 6572 6174 6520 /a> to generate \n-0019c8f0: 6465 6669 6e69 7469 6f6e 7320 696e 2074 definitions in t\n-0019c900: 6865 2043 2b2b 203c 636f 6465 3e6e 616d he C++ nam\n-0019c910: 653c 2f63 6f64 653e 206e 616d 6573 7061 e namespa\n-0019c920: 6365 2e20 5468 6973 206f 7074 696f 6e20 ce. This option \n-0019c930: 6361 6e20 616c 736f 2062 6520 7573 6564 can also be used\n-0019c940: 2069 6e20 636f 6d62 696e 6174 696f 6e20 in combination \n-0019c950: 7769 7468 2043 2b2b 2070 726f 7879 2061 with C++ proxy a\n-0019c960: 6e64 2073 6572 7665 7220 6f62 6a65 6374 nd server object\n-0019c970: 2067 656e 6572 6174 696f 6e2c 2075 7369 generation, usi\n-0019c980: 6e67 203c 623e 3c63 6f64 653e 736f 6170 ng soap\n-0019c990: 6370 7032 202d 6a3c 2f63 6f64 653e 3c2f cpp2 -j option -j\n-0019c9c0: 206f 7220 6f70 7469 6f6e 203c 623e 3c63 or option -i).

    .

    At mo\n-0019c9f0: 7374 206f 6e65 206e 616d 6573 7061 6365 st one namespace\n-0019ca00: 2063 616e 2062 6520 6465 6669 6e65 6420 can be defined \n-0019ca10: 666f 7220 7468 6520 656e 7469 7265 2069 for the entire i\n-0019ca20: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n-0019ca30: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n-0019ca40: 322e 2054 6865 2043 2b2b 206e 616d 6573 2. The C++ names\n-0019ca50: 7061 6365 206d 7573 7420 636f 6d70 6c65 pace must comple\n-0019ca60: 7465 6c79 2065 6e63 6170 7375 6c61 7465 tely encapsulate\n-0019ca70: 2074 6865 2065 6e74 6972 6520 636f 6e74 the entire cont\n-0019ca80: 656e 7473 206f 6620 7468 6520 6865 6164 ents of the head\n-0019ca90: 6572 2066 696c 653a 3c2f 703e 0a3c 6469 er file:

    .
    names\n-0019cae0: 7061 6365 203c 2f73 7061 6e3e 4e61 6d65 pace Name\n-0019caf0: 7370 6163 654e 616d 6520 7b3c 2f64 6976 spaceName {.
    ... \n-0019cb30: 696e 7465 7266 6163 6520 3c2f 7370 616e interface header file con\n-0019cb50: 7465 6e74 7320 2e2e 2e20 3c2f 6469 763e tents ...
    \n-0019cb60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .

    It is imp\n-0019f3f0: 6f72 7461 6e74 2074 6f20 7573 6520 3c62 ortant to use soapcpp2 \n-0019f410: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -n op\n-0019f420: 7469 6f6e 203c 623e 3c63 6f64 653e 2d6e tion -n\n-0019f430: 3c2f 636f 6465 3e3c 2f62 3e2c 2073 6565 , see\n-0019f440: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section soapcpp\n-0019f480: 3220 6f70 7469 6f6e 733c 2f61 3e2c 2074 2 options, t\n-0019f490: 6f20 7265 6e61 6d65 2074 6865 206e 616d o rename the nam\n-0019f4a0: 6573 7061 6365 2074 6162 6c65 7320 736f espace tables so\n-0019f4b0: 2077 6520 6361 6e20 696e 636c 7564 6520 we can include \n-0019f4c0: 7468 656d 2061 6c6c 2077 6974 686f 7574 them all without\n-0019f4d0: 2072 756e 6e69 6e67 2069 6e74 6f20 7265 running into re\n-0019f4e0: 6465 6669 6e69 7469 6f6e 732e 3c2f 703e definitions.

    \n-0019f4f0: 0a3c 646c 2063 6c61 7373 3d22 7365 6374 .
    No\n-0019f510: 7465 3c2f 6474 3e3c 6464 3e4c 696e 6b20 te
    Link \n-0019f520: 636f 6e66 6c69 6374 7320 6d61 7920 7374 conflicts may st\n-0019f530: 696c 6c20 6f63 6375 7220 696e 2074 6865 ill occur in the\n-0019f540: 2075 6e6c 696b 656c 7920 7369 7475 6174 unlikely situat\n-0019f550: 696f 6e20 7468 6174 2069 6465 6e74 6963 ion that identic\n-0019f560: 616c 2073 6572 7669 6365 206f 7065 7261 al service opera\n-0019f570: 7469 6f6e 206e 616d 6573 2061 7265 2064 tion names are d\n-0019f580: 6566 696e 6564 2069 6e20 7477 6f20 6f72 efined in two or\n-0019f590: 206d 6f72 6520 7374 7562 206f 7220 736b more stub or sk\n-0019f5a0: 656c 6574 6f6e 2066 756e 6374 696f 6e73 eleton functions\n-0019f5b0: 2077 6865 6e20 7468 6573 6520 6d65 7468 when these meth\n-0019f5c0: 6f64 7320 7368 6172 6520 7468 6520 7361 ods share the sa\n-0019f5d0: 6d65 2058 4d4c 206e 616d 6573 7061 6365 me XML namespace\n-0019f5e0: 2070 7265 6669 782e 3c2f 6464 3e3c 2f64 prefix.
    .

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

    .

    .C++ examples<\n-0019f660: 2f68 333e 0a3c 703e 4173 2061 6e20 6578 /h3>.

    As an ex\n-0019f670: 616d 706c 6520 7765 2077 696c 6c20 6275 ample we will bu\n-0019f680: 696c 6420 6120 4465 6c61 7965 6420 5374 ild a Delayed St\n-0019f690: 6f63 6b20 5175 6f74 6520 636c 6965 6e74 ock Quote client\n-0019f6a0: 206c 6962 7261 7279 2061 6e64 2061 2043 library and a C\n-0019f6b0: 7572 7265 6e63 7920 4578 6368 616e 6765 urrency Exchange\n-0019f6c0: 2052 6174 6520 636c 6965 6e74 206c 6962 Rate client lib\n-0019f6d0: 7261 7279 2e3c 2f70 3e0a 3c70 3e46 6972 rary.

    .

    Fir\n-0019f6e0: 7374 2c20 7765 2063 7265 6174 6520 616e st, we create an\n-0019f6f0: 2065 6d70 7479 2068 6561 6465 7220 6669 empty header fi\n-0019f700: 6c65 203c 656d 3e3c 636f 6465 3e65 6e76 le env\n-0019f710: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .h, \n-0019f720: 7768 6963 6820 6d61 7920 6265 2065 6d70 which may be emp\n-0019f730: 7479 206f 7220 7368 6f75 6c64 2063 6f6e ty or should con\n-0019f740: 7461 696e 2053 4f41 5020 4865 6164 6572 tain SOAP Header\n-0019f750: 2061 6e64 2046 6175 6c74 2064 6566 696e and Fault defin\n-0019f760: 6974 696f 6e73 2061 7320 6578 706c 6169 itions as explai\n-0019f770: 6e65 6420 696e 2053 6563 7469 6f6e 203c ned in Section <\n-0019f780: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0019f790: 663d 2269 6e64 6578 2e68 746d 6c23 6479 f=\"index.html#dy\n-0019f7a0: 6c69 6273 223e 486f 7720 746f 2063 7265 libs\">How to cre\n-0019f7b0: 6174 6520 636c 6965 6e74 2f73 6572 7665 ate client/serve\n-0019f7c0: 7220 6c69 6272 6172 6965 733c 2f61 3e2c r libraries,\n-0019f7d0: 2061 6e64 2063 6f6d 7069 6c65 2069 7420 and compile it \n-0019f7e0: 6173 2066 6f6c 6c6f 7773 3a20 3c2f 703e as follows:

    \n-0019f7f0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     soapcpp2 \n-0019f810: 2d70 656e 7620 656e 762e 680a 2063 2b2b  -penv env.h. c++\n-0019f820: 202d 6320 656e 7643 2e63 7070 0a3c 2f70   -c envC.cpp.

    We also c\n-0019f840: 6f6d 7069 6c65 203c 656d 3e3c 636f 6465 ompile gsoap/stdsoap2.\n-0019f860: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n-0019f870: 7769 7468 6f75 7420 6e61 6d65 7370 6163 without namespac\n-0019f880: 6573 3a20 3c2f 703e 3c70 7265 2063 6c61 es:

     c\n-0019f8a0: 2b2b 202d 6320 2d44 5749 5448 5f4e 4f4e  ++ -c -DWITH_NON\n-0019f8b0: 414d 4553 5041 4345 5320 7374 6473 6f61  AMESPACES stdsoa\n-0019f8c0: 7032 2e63 7070 0a3c 2f70 7265 3e3c 703e  p2.cpp.

    \n-0019f8d0: 2049 6620 796f 7520 646f 206e 6f74 2075 If you do not u\n-0019f8e0: 7365 203c 636f 6465 3e23 5749 5448 5f4e se #WITH_N\n-0019f8f0: 4f4e 414d 4553 5041 4345 533c 2f63 6f64 ONAMESPACES then you will\n-0019f910: 2067 6574 2061 6e20 756e 7265 736f 6c76 get an unresolv\n-0019f920: 6564 206c 696e 6b20 6572 726f 7220 666f ed link error fo\n-0019f930: 7220 7468 6520 676c 6f62 616c 203c 636f r the global namespaces table. You \n-0019f960: 6361 6e20 6465 6669 6e65 2061 2064 756d can define a dum\n-0019f970: 6d79 2074 6162 6c65 2074 6f20 6176 6f69 my table to avoi\n-0019f980: 6420 6861 7669 6e67 2074 6f20 7265 636f d having to reco\n-0019f990: 6d70 696c 6520 3c65 6d3e 3c63 6f64 653e mpile \n-0019f9a0: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c\n-0019f9b0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c pp.<\n-0019f9c0: 2f70 3e0a 3c70 3e53 6563 6f6e 642c 2077 /p>.

    Second, w\n-0019f9d0: 6520 6372 6561 7465 2074 6865 2044 656c e create the Del\n-0019f9e0: 6179 6564 2053 746f 636b 2051 756f 7465 ayed Stock Quote\n-0019f9f0: 2068 6561 6465 7220 6669 6c65 2073 7065 header file spe\n-0019fa00: 6369 6669 6361 7469 6f6e 2c20 7768 6963 cification, whic\n-0019fa10: 6820 6d61 7920 6265 206f 6274 6169 6e65 h may be obtaine\n-0019fa20: 6420 7573 696e 6720 7468 6520 5753 444c d using the WSDL\n-0019fa30: 2069 6d70 6f72 7465 722e 2049 6620 796f importer. If yo\n-0019fa40: 7520 7761 6e74 2074 6f20 7573 6520 432b u want to use C+\n-0019fa50: 2b20 6e61 6d65 7370 6163 6573 2074 6865 + namespaces the\n-0019fa60: 6e20 796f 7520 6e65 6564 2074 6f20 6d61 n you need to ma\n-0019fa70: 6e75 616c 6c79 2061 6464 2074 6865 203c nually add the <\n-0019fa80: 636f 6465 3e6e 616d 6573 7061 6365 3c2f code>namespace declaratio\n-0019faa0: 6e20 746f 2074 6865 2067 656e 6572 6174 n to the generat\n-0019fab0: 6564 2068 6561 6465 7220 6669 6c65 3a3c ed header file:<\n-0019fac0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    namespace quote {
    \n-0019fb20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    //gsoap ns se\n-0019fb70: 7276 6963 6520 6e61 6d65 3a20 5365 7276 rvice name: Serv\n-0019fb80: 6963 6520 3c2f 7370 616e 3e3c 2f64 6976 ice .
    //gsoa\n-0019fbc0: 7020 6e73 2073 6572 7669 6365 2073 7479 p ns service sty\n-0019fbd0: 6c65 3a20 7270 6320 3c2f 7370 616e 3e3c le: rpc <\n-0019fbe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-0019fc10: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-0019fc20: 2065 6e63 6f64 696e 673a 2065 6e63 6f64 encoding: encod\n-0019fc30: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    \n-0019fc40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-0019fc70: 206e 7320 7365 7276 6963 6520 6c6f 6361 ns service loca\n-0019fc80: 7469 6f6e 3a20 6874 7470 3a2f 2f73 6572 tion: http://ser\n-0019fc90: 7669 6365 732e 786d 6574 686f 6473 2e6e vices.xmethods.n\n-0019fca0: 6574 2f73 6f61 7020 3c2f 7370 616e 3e3c et/soap <\n-0019fcb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-0019fce0: 6773 6f61 7020 6e73 2073 6368 656d 6120 gsoap ns schema \n-0019fcf0: 6e61 6d65 7370 6163 653a 2075 726e 3a78 namespace: urn:x\n-0019fd00: 6d65 7468 6f64 732d 6465 6c61 7965 642d methods-delayed-\n-0019fd10: 7175 6f74 6573 203c 2f73 7061 6e3e 3c2f quotes .
    //g\n-0019fd50: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-0019fd60: 6d65 7468 6f64 2d61 6374 696f 6e3a 2067 method-action: g\n-0019fd70: 6574 5175 6f74 6520 2671 756f 743b 2671 etQuote "&q\n-0019fd80: 756f 743b 203c 2f73 7061 6e3e 3c2f 6469 uot; .
    i\n-0019fdc0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6765 nt ns__ge\n-0019fdd0: 7451 756f 7465 283c 7370 616e 2063 6c61 tQuote(char *sy\n-0019fe00: 6d62 6f6c 2c20 3c73 7061 6e20 636c 6173 mbol, \n-0019fe20: 666c 6f61 743c 2f73 7061 6e3e 2026 616d float &am\n-0019fe30: 703b 5265 7375 6c74 293b 203c 2f64 6976 p;Result); .
    .} \n-0019fe70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // namespa\n-0019fe90: 6365 2071 756f 7465 3c2f 7370 616e 3e3c ce quote<\n-0019fea0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-0019fec0: 5765 2074 6865 6e20 636f 6d70 696c 6520 We then compile \n-0019fed0: 6974 2061 7320 6120 6c69 6272 6172 7920 it as a library \n-0019fee0: 616e 6420 7765 2075 7365 206f 7074 696f and we use optio\n-0019fef0: 6e20 3c62 3e3c 636f 6465 3e2d 6e3c 2f63 n -n to pref\n-0019ff10: 6978 2074 6865 2067 656e 6572 6174 6564 ix the generated\n-0019ff20: 2066 696c 6573 2061 6e64 2074 6f20 7265 files and to re\n-0019ff30: 6e61 6d65 2074 6865 206e 616d 6573 7061 name the namespa\n-0019ff40: 6365 2074 6162 6c65 2074 6f20 6176 6f69 ce table to avoi\n-0019ff50: 6420 6c69 6e6b 2063 6f6e 666c 6963 7473 d link conflicts\n-0019ff60: 206c 6174 6572 3a20 3c2f 703e 3c70 7265 later:

    soapcpp2 -n q\n-0019ff90: 756f 7465 2e68 0a20 632b 2b20 2d63 2071 uote.h. c++ -c q\n-0019ffa0: 756f 7465 436c 6965 6e74 4c69 622e 6370 uoteClientLib.cp\n-0019ffb0: 700a 3c2f 7072 653e 3c70 3e20 4966 2079 p.

    If y\n-0019ffc0: 6f75 2064 6f6e 2774 2077 616e 7420 746f ou don't want to\n-0019ffd0: 2075 7365 2061 2043 2b2b 2063 6f64 6520 use a C++ code \n-0019ffe0: 6e61 6d65 7370 6163 652c 2079 6f75 2073 namespace, you s\n-0019fff0: 686f 756c 6420 636f 6d70 696c 6520 3c65 hould compile quote.h<\n-001a0010: 2f63 6f64 653e 3c2f 656d 3e20 2261 7320 /code> \"as \n-001a0020: 6973 2220 7769 7468 206f 7074 696f 6e20 is\" with option \n-001a0030: 3c62 3e3c 636f 6465 3e2d 7071 756f 7465 -pquote\n-001a0040: 3c2f 636f 6465 3e3c 2f62 3e3a 203c 2f70 :

     soapcpp2\n-001a0070: 202d 6e20 2d70 7175 6f74 6520 7175 6f74   -n -pquote quot\n-001a0080: 652e 680a 2063 2b2b 202d 6320 7175 6f74  e.h. c++ -c quot\n-001a0090: 6543 6c69 656e 744c 6962 2e63 7070 0a3c  eClientLib.cpp.<\n-001a00a0: 2f70 7265 3e3c 703e 2054 6869 7264 2c20  /pre>

    Third, \n-001a00b0: 7765 2063 7265 6174 6520 7468 6520 4375 we create the Cu\n-001a00c0: 7272 656e 6379 2045 7863 6861 6e67 6520 rrency Exchange \n-001a00d0: 5261 7465 2068 6561 6465 7220 6669 6c65 Rate header file\n-001a00e0: 2073 7065 6369 6669 6361 7469 6f6e 3a3c specification:<\n-001a00f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    namespace rate {
    .\n-001a0150: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    //gsoap ns ser\n-001a01a0: 7669 6365 206e 616d 653a 2053 6572 7669 vice name: Servi\n-001a01b0: 6365 203c 2f73 7061 6e3e 3c2f 6469 763e ce
    \n-001a01c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-001a01f0: 206e 7320 7365 7276 6963 6520 7374 796c ns service styl\n-001a0200: 653a 2072 7063 203c 2f73 7061 6e3e 3c2f e: rpc .
    //g\n-001a0240: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-001a0250: 656e 636f 6469 6e67 3a20 656e 636f 6465 encoding: encode\n-001a0260: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n-001a0270: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-001a02a0: 6e73 2073 6572 7669 6365 206c 6f63 6174 ns service locat\n-001a02b0: 696f 6e3a 2068 7474 703a 2f2f 7365 7276 ion: http://serv\n-001a02c0: 6963 6573 2e78 6d65 7468 6f64 732e 6e65 ices.xmethods.ne\n-001a02d0: 742f 736f 6170 203c 2f73 7061 6e3e 3c2f t/soap .
    //g\n-001a0310: 736f 6170 206e 7320 7363 6865 6d61 206e soap ns schema n\n-001a0320: 616d 6573 7061 6365 3a20 7572 6e3a 786d amespace: urn:xm\n-001a0330: 6574 686f 6473 2d43 7572 7265 6e63 7945 ethods-CurrencyE\n-001a0340: 7863 6861 6e67 6520 3c2f 7370 616e 3e3c xchange <\n-001a0350: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-001a0380: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-001a0390: 206d 6574 686f 642d 6163 7469 6f6e 3a20 method-action: \n-001a03a0: 6765 7452 6174 6520 2671 756f 743b 2671 getRate "&q\n-001a03b0: 756f 743b 203c 2f73 7061 6e3e 3c2f 6469 uot; .
    i\n-001a03f0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6765 nt ns__ge\n-001a0400: 7452 6174 6528 3c73 7061 6e20 636c 6173 tRate(\n-001a0420: 6368 6172 3c2f 7370 616e 3e20 2a63 6f75 char *cou\n-001a0430: 6e74 7279 312c 203c 7370 616e 2063 6c61 ntry1, char *co\n-001a0460: 756e 7472 7932 2c20 3c73 7061 6e20 636c untry2, float &\n-001a0490: 616d 703b 5265 7375 6c74 293b 203c 2f64 amp;Result); .
    .\n-001a04d0: 7d20 3c73 7061 6e20 636c 6173 733d 2263 } // names\n-001a04f0: 7061 6365 2072 6174 653c 2f73 7061 6e3e pace rate\n-001a0500: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Similar to the \n-001a0530: 5175 6f74 6520 6578 616d 706c 6520 6162 Quote example ab\n-001a0540: 6f76 652c 2077 6520 6765 6e65 7261 7465 ove, we generate\n-001a0550: 2073 6f75 7263 6520 636f 6465 2075 7369 source code usi\n-001a0560: 6e67 206f 7074 696f 6e20 3c62 3e3c 636f ng option -n
    \n-001a0580: 2074 6f20 7072 6566 6978 2074 6865 2067 to prefix the g\n-001a0590: 656e 6572 6174 6564 2066 696c 6573 2061 enerated files a\n-001a05a0: 6e64 2074 6f20 7265 6e61 6d65 2074 6865 nd to rename the\n-001a05b0: 206e 616d 6573 7061 6365 2074 6162 6c65 namespace table\n-001a05c0: 2074 6f20 6176 6f69 6420 6c69 6e6b 2063 to avoid link c\n-001a05d0: 6f6e 666c 6963 7473 3a20 3c2f 703e 3c70 onflicts:

    soapcpp2 -n\n-001a0600: 2072 6174 652e 680a 3c2f 7072 653e 3c70 rate.h.
    Fourth, we use\n-001a0620: 2074 6865 2067 656e 6572 6174 6564 2073 the generated s\n-001a0630: 6f75 7263 6520 636f 6465 206c 6962 7261 ource code libra\n-001a0640: 7269 6573 2077 6974 6820 7468 6520 6d61 ries with the ma\n-001a0650: 696e 2070 726f 6772 616d 2e3c 2f70 3e0a in program.

    .\n-001a0660: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n-001a06b0: 743b 7175 6f74 6548 2e68 2e68 2671 756f t;quoteH.h.h&quo\n-001a06c0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-001a06d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n-001a0700: 636c 7564 6520 2671 756f 743b 7261 7465 clude "rate\n-001a0710: 482e 682e 6826 7175 6f74 3b3c 2f73 7061 H.h.h"
    .
    #include &\n-001a0760: 7175 6f74 3b71 756f 7465 2e6e 736d 6170 quot;quote.nsmap\n-001a0770: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    #include "\n-001a07c0: 7261 7465 2e6e 736d 6170 2671 756f 743b rate.nsmap"\n-001a07d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a07f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n-001a0830: 6169 6e28 3c73 7061 6e20 636c 6173 733d ain(in\n-001a0850: 743c 2f73 7061 6e3e 2061 7267 632c 203c t argc, <\n-001a0860: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a0870: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *argv[]) .
    {
    .<\n-001a08b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a08c0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-001a08e0: 2f73 7061 6e3e 2028 6172 6763 2026 6c74 /span> (argc <\n-001a08f0: 3b3d 2031 2920 3c2f 6469 763e 0a3c 6469 ;= 1)
    . \n-001a0910: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    s\n-001a0930: 7464 3a3a 6365 7272 2026 6c74 3b26 6c74 td::cerr <<\n-001a0940: 3b20 3c73 7061 6e20 636c 6173 733d 2273 ; &q\n-001a0960: 756f 743b 5573 6167 653a 206d 6169 6e20 uot;Usage: main \n-001a0970: 7469 636b 6572 205b 6375 7272 656e 6379 ticker [currency\n-001a0980: 5d26 7175 6f74 3b3c 2f73 7061 6e3e 2026 ]" &\n-001a0990: 6c74 3b26 6c74 3b20 7374 643a 3a65 6e64 lt;< std::end\n-001a09a0: 6c20 3c2f 6469 763e 0a3c 6469 7620 636c l
    .
    e\n-001a09c0: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n-001a09d0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } \n-001a09f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-001a0a30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a0a40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a0a50: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001a0a60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001a0a90: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-001a0af0: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    . \n-001a0b10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 float\n-001a0b30: 3c2f 7370 616e 3e20 713b 203c 2f64 6976 q; ..\n-001a0c10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-001a0c40: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n-001a0c50: 6c6c 5f6e 735f 5f67 6574 5175 6f74 6528 ll_ns__getQuote(\n-001a0c60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001a0c90: 204e 554c 4c2c 204e 554c 4c2c 2061 7267 NULL, NULL, arg\n-001a0ca0: 765b 315d 2c20 7129 2920 3c73 7061 6e20 v[1], q)) \n-001a0cc0: 2f2f 2067 6574 2071 756f 7465 203c 2f73 // get quote
    .
    {\n-001a0cf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a0d60: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault\n-001a0d70: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001a0da0: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); <\n-001a0db0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }.
    \n-001a0e00: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    {
    .<\n-001a0e30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a0e40: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-001a0e60: 663c 2f73 7061 6e3e 2028 6172 6763 2026 f (argc &\n-001a0e70: 6774 3b20 3229 203c 2f64 6976 3e0a 3c64 gt; 2)
    .\n-001a0e90: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n-001a0eb0: 2020 2020 3c73 7061 6e20 636c 6173 733d fl\n-001a0ed0: 6f61 743c 2f73 7061 6e3e 2072 3b20 3c2f oat r; .
    soap_set_nam\n-001a0f60: 6573 7061 6365 733c 2f61 3e28 3c61 2063 espaces(soap, rat\n-001a0fa0: 655f 6e61 6d65 7370 6163 6573 293b 203c e_namespaces); <\n-001a0fb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soap_call_ns_\n-001a1000: 5f67 6574 5261 7465 283c 6120 636c 6173 _getRate(\n-001a1030: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n-001a1040: 4e55 4c4c 2c20 3c73 7061 6e20 636c 6173 NULL, "us"\n-001a1070: 3c2f 7370 616e 3e2c 2061 7267 765b 325d , argv[2]\n-001a1080: 2c20 7229 2920 3c73 7061 6e20 636c 6173 , r)) // g\n-001a10a0: 6574 2072 6174 6520 696e 2055 5320 646f et rate in US do\n-001a10b0: 6c6c 6172 7320 3c2f 7370 616e 3e3c 2f64 llars .
    soap_print_faul\n-001a1140: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-001a1170: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n-001a1180: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-001a11a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a11b0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n-001a11e0: 2020 2020 2020 7120 2a3d 2072 3b20 3c73 q *= r; // convert t\n-001a1210: 6865 2071 756f 7465 203c 2f73 7061 6e3e he quote \n-001a1220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } <\n-001a1240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    std:\n-001a1260: 3a63 6f75 7420 266c 743b 266c 743b 2061 :cout << a\n-001a1270: 7267 765b 315d 2026 6c74 3b26 6c74 3b20 rgv[1] << \n-001a1280: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001a12a0: 743b 3a20 2671 756f 743b 3c2f 7370 616e t;: " << q <\n-001a12c0: 3b26 6c74 3b20 7374 643a 3a65 6e64 6c3b ;< std::endl;\n-001a12d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    so\n-001a1360: 6170 5f64 6573 7472 6f79 3c2f 613e 283c ap_destroy(<\n-001a1370: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a1380: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a1390: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-001a13a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a1410: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap);.
    so\n-001a14c0: 6170 5f66 7265 653c 2f61 3e28 3c61 2063 ap_free(soap);.
    return \n-001a1540: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
    .
    }.

    Co\n-001a1580: 6d70 696c 6520 616e 6420 6c69 6e6b 2074 mpile and link t\n-001a1590: 6869 7320 6170 706c 6963 6174 696f 6e20 his application \n-001a15a0: 7769 7468 203c 656d 3e3c 636f 6465 3e73 with s\n-001a15b0: 7464 736f 6170 322e 6f3c 2f63 6f64 653e tdsoap2.o\n-001a15c0: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , envC.o, q\n-001a15f0: 756f 7465 5365 7276 6572 5072 6f78 792e uoteServerProxy.\n-001a1600: 6f3c 2f63 6f64 653e 3c2f 656d 3e2c 2061 o, a\n-001a1610: 6e64 203c 656d 3e3c 636f 6465 3e72 6174 nd rat\n-001a1620: 6553 6572 7665 7250 726f 7879 2e6f 3c2f eServerProxy.o.

    .\n-001a1640: 3c70 3e49 6e73 7465 6164 206f 6620 7468

    Instead of th\n-001a1650: 6520 6765 6e65 7261 7465 6420 3c63 6f64 e generated soap_call_webm\n-001a1670: 6574 686f 643c 2f63 6f64 653e 2073 7475 ethod stu\n-001a1680: 6220 6675 6e63 7469 6f6e 7320 796f 7520 b functions you \n-001a1690: 6361 6e20 616c 736f 2075 7365 203c 623e can also use \n-001a16a0: 3c63 6f64 653e 736f 6170 6370 7032 202d soapcpp2 -\n-001a16b0: 6a3c 2f63 6f64 653e 3c2f 623e 206f 7074 j opt\n-001a16c0: 696f 6e20 3c62 3e3c 636f 6465 3e2d 6a3c ion -j<\n-001a16d0: 2f63 6f64 653e 3c2f 623e 206f 7220 6f70 /code> or op\n-001a16e0: 7469 6f6e 203c 623e 3c63 6f64 653e 2d69 tion -i\n-001a16f0: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2067 to g\n-001a1700: 656e 6572 6174 6520 432b 2b20 7072 6f78 enerate C++ prox\n-001a1710: 7920 636c 6173 7365 732e 3c2f 703e 0a3c y classes.

    .<\n-001a1720: 703e 546f 2063 6f6d 7069 6c65 2073 6572 p>To compile ser\n-001a1730: 7665 7220 6973 2076 6572 7920 7369 6d69 ver is very simi\n-001a1740: 6c61 722e 2046 6f72 2065 7861 6d70 6c65 lar. For example\n-001a1750: 2c20 6173 7375 6d65 2074 6861 7420 7765 , assume that we\n-001a1760: 206e 6565 6420 746f 2069 6d70 6c65 6d65 need to impleme\n-001a1770: 6e74 2061 2063 616c 6375 6c61 746f 7220 nt a calculator \n-001a1780: 7365 7276 6963 6520 616e 6420 7765 2077 service and we w\n-001a1790: 616e 7420 746f 2063 7265 6174 6520 6120 ant to create a \n-001a17a0: 6c69 6272 6172 7920 666f 7220 6974 2e3c library for it.<\n-001a17b0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    namespace calc {
    .\n-001a1810: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    //gsoap ns ser\n-001a1860: 7669 6365 206e 616d 653a 2043 616c 6320 vice name: Calc \n-001a1870: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a1890: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-001a18b0: 2073 6572 7669 6365 2073 7479 6c65 3a20 service style: \n-001a18c0: 7270 6320 3c2f 7370 616e 3e3c 2f64 6976 rpc .
    //gsoa\n-001a1900: 7020 6e73 2073 6572 7669 6365 2065 6e63 p ns service enc\n-001a1910: 6f64 696e 673a 2065 6e63 6f64 6564 203c oding: encoded <\n-001a1920: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001a1940: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001a1950: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-001a1960: 7365 7276 6963 6520 6c6f 6361 7469 6f6e service location\n-001a1970: 3a20 6874 7470 3a2f 2f77 7777 2e63 732e : http://www.cs.\n-001a1980: 6673 752e 6564 752f 7e65 6e67 656c 656e fsu.edu/~engelen\n-001a1990: 2f63 616c 632e 6367 6920 3c2f 7370 616e /calc.cgi
    .
    \n-001a19d0: 2f2f 6773 6f61 7020 6e73 2073 6368 656d //gsoap ns schem\n-001a19e0: 6120 6e61 6d65 7370 6163 653a 2075 726e a namespace: urn\n-001a19f0: 3a63 616c 6320 3c2f 7370 616e 3e3c 2f64 :calc .
    \n-001a1a30: 696e 743c 2f73 7061 6e3e 206e 735f 5f61 int ns__a\n-001a1a40: 6464 283c 7370 616e 2063 6c61 7373 3d22 dd(dou\n-001a1a60: 626c 653c 2f73 7061 6e3e 2061 2c20 3c73 ble a, double b, double\n-001a1ac0: 2026 616d 703b 7265 7375 6c74 293b 203c &result); <\n-001a1ad0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_\n-001a1b10: 5f73 7562 283c 7370 616e 2063 6c61 7373 _sub(d\n-001a1b30: 6f75 626c 653c 2f73 7061 6e3e 2061 2c20 ouble a, \n-001a1b40: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n-001a1b60: 3c2f 7370 616e 3e20 622c 203c 7370 616e b, double &result);\n-001a1ba0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int n\n-001a1be0: 735f 5f6d 756c 283c 7370 616e 2063 6c61 s__mul(double a\n-001a1c10: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub\n-001a1c30: 6c65 3c2f 7370 616e 3e20 622c 203c 7370 le b, double &result\n-001a1c70: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    int\n-001a1cb0: 206e 735f 5f64 6976 283c 7370 616e 2063 ns__div(double\n-001a1ce0: 2061 2c20 3c73 7061 6e20 636c 6173 733d a, do\n-001a1d00: 7562 6c65 3c2f 7370 616e 3e20 622c 203c uble b, <\n-001a1d10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a1d20: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n-001a1d30: 2f73 7061 6e3e 2026 616d 703b 7265 7375 /span> &resu\n-001a1d40: 6c74 293b 203c 2f64 6976 3e0a 3c64 6976 lt);
    . <\n-001a1d60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } \n-001a1d90: 2f2f 206e 616d 6573 7061 6365 2063 616c // namespace cal\n-001a1da0: 633c 2f73 7061 6e3e 3c2f 6469 763e 0a3c c
    .<\n-001a1db0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    We gene\n-001a1dd0: 7261 7465 2063 6f64 653a 203c 2f70 3e3c rate code:

    <\n-001a1de0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-001a1df0: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n-001a1e00: 6a20 2d6e 2063 616c 632e 680a 3c2f 7072 j -n calc.h.

    Here we us\n-001a1e20: 6564 206f 7074 696f 6e20 3c62 3e3c 636f ed option -j\n-001a1e40: 2074 6f20 6765 6e65 7261 7465 2061 2043 to generate a C\n-001a1e50: 2b2b 2073 6572 7669 6365 2063 6c61 7373 ++ service class\n-001a1e60: 203c 656d 3e3c 636f 6465 3e63 616c 6343 calcC\n-001a1e70: 616c 6353 6572 7669 6365 2e68 3c2f 636f alcService.h and calcCalcS\n-001a1ea0: 6572 7669 6365 2e63 7070 3c2f 636f 6465 ervice.cpp. The effe\n-001a1ec0: 6374 206f 6620 7468 6520 3c62 3e3c 636f ct of the -n\n-001a1ee0: 206f 7074 696f 6e20 6973 2074 6861 7420 option is that \n-001a1ef0: 6974 2063 7265 6174 6573 206c 6f63 616c it creates local\n-001a1f00: 206e 616d 6573 7061 6365 2074 6162 6c65 namespace table\n-001a1f10: 7320 616e 6420 7573 6573 203c 656d 3e3c s and uses <\n-001a1f20: 636f 6465 3e63 616c 633c 2f63 6f64 653e code>calc\n-001a1f30: 3c2f 656d 3e20 746f 2070 7265 6669 7820 to prefix \n-001a1f40: 7468 6520 6765 6e65 7261 7465 6420 6669 the generated fi\n-001a1f50: 6c65 732e 3c2f 703e 0a3c 6469 7620 636c les.

    .
    <\n-001a1f70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a1f80: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n-001a1fa0: 6c75 6465 2026 7175 6f74 3b63 616c 6343 lude "calcC\n-001a1fb0: 616c 6353 6572 7669 6365 2e68 2671 756f alcService.h&quo\n-001a1fc0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-001a1fd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in\n-001a2000: 636c 7564 6520 2671 756f 743b 6361 6c63 clude "calc\n-001a2010: 2e6e 736d 6170 2671 756f 743b 3c2f 7370 .nsmap"
    .
    .
    \n-001a2070: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-001a2080: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    calc::Calc\n-001a20c0: 2063 616c 633b 203c 2f64 6976 3e0a 3c64 calc;
    .\n-001a20e0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... //
    . \n-001a2120: 6361 6c63 2e73 6572 7665 2829 3b20 3c73 calc.serve(); // calls req\n-001a2150: 7565 7374 2064 6973 7061 7463 6865 7220 uest dispatcher \n-001a2160: 746f 2069 6e76 6f6b 6520 6f6e 6520 6f66 to invoke one of\n-001a2170: 2074 6865 2066 756e 6374 696f 6e73 2062 the functions b\n-001a2180: 656c 6f77 203c 2f73 7061 6e3e 3c2f 6469 elow .
    ... //
    \n-001a21d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    .
    int calc\n-001a2240: 3a3a 4361 6c63 3a3a 6164 6428 3c73 7061 ::Calc::add(double a, double b\n-001a22a0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub\n-001a22c0: 6c65 3c2f 7370 616e 3e20 2661 6d70 3b72 le &r\n-001a22d0: 6573 756c 7429 3c2f 6469 763e 0a3c 6469 esult)
    .{\n-001a22f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    resul\n-001a2310: 7420 3d20 6120 2b20 623b 3c2f 6469 763e t = a + b;
    \n-001a2320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n-001a2350: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK;.
    }
    .<\n-001a23e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a23f0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-001a2430: 6361 6c63 3a3a 4361 6c63 3a3a 7375 6228 calc::Calc::sub(\n-001a2440: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n-001a2460: 3c2f 7370 616e 3e20 612c 203c 7370 616e a, double b, \n-001a24b0: 646f 7562 6c65 3c2f 7370 616e 3e20 2661 double &a\n-001a24c0: 6d70 3b72 6573 756c 7429 3c2f 6469 763e mp;result)
    \n-001a24d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    r\n-001a2500: 6573 756c 7420 3d20 6120 2d20 623b 3c2f esult = a - b;.
    return\n-001a2550: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n-001a25b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    } .
    .<\n-001a2600: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a2610: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int calc::Calc::\n-001a2630: 6d75 6c28 3c73 7061 6e20 636c 6173 733d mul(do\n-001a2650: 7562 6c65 3c2f 7370 616e 3e20 612c 203c uble a, <\n-001a2660: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a2670: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n-001a2680: 2f73 7061 6e3e 2062 2c20 3c73 7061 6e20 /span> b, double &result).
    {
    .<\n-001a26e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a26f0: 3e20 2072 6573 756c 7420 3d20 6120 2a20 > result = a * \n-001a2700: 623b 3c2f 6469 763e 0a3c 6469 7620 636c b;
    ..} \n-001a27c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a27e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-001a2810: 3c2f 7370 616e 3e20 6361 6c63 3a3a 4361 calc::Ca\n-001a2820: 6c63 3a3a 6469 7628 3c73 7061 6e20 636c lc::div(double \n-001a2850: 612c 203c 7370 616e 2063 6c61 7373 3d22 a, dou\n-001a2870: 626c 653c 2f73 7061 6e3e 2062 2c20 3c73 ble b, double &resul\n-001a28b0: 7429 3c2f 6469 763e 0a3c 6469 7620 636c t)
    .
    {.
    result = \n-001a28f0: 6120 2f20 623b 3c2f 6469 763e 0a3c 6469 a / b;
    . \n-001a2910: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001a2930: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001a2990: 505f 4f4b 3c2f 613e 3b3c 2f64 6976 3e0a P_OK;
    .\n-001a29a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .

    We \n-001a30e0: 636f 6d70 696c 6520 6974 2061 7320 6120 compile it as a \n-001a30f0: 6c69 6272 6172 7920 616e 6420 7765 2075 library and we u\n-001a3100: 7365 206f 7074 696f 6e73 203c 623e 3c63 se options -n and -\n-001a3130: 7071 756f 7465 3c2f 636f 6465 3e3c 2f62 pquote to prefix the \n-001a3150: 6765 6e65 7261 7465 6420 6669 6c65 7320 generated files \n-001a3160: 616e 6420 746f 2072 656e 616d 6520 7468 and to rename th\n-001a3170: 6520 6e61 6d65 7370 6163 6520 7461 626c e namespace tabl\n-001a3180: 6520 746f 2061 766f 6964 206c 696e 6b20 e to avoid link \n-001a3190: 636f 6e66 6c69 6374 733a 203c 2f70 3e3c conflicts:

    <\n-001a31a0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-001a31b0: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n-001a31c0: 6320 2d6e 202d 7071 756f 7465 2071 756f c -n -pquote quo\n-001a31d0: 7465 2e68 0a20 6363 202d 6320 7175 6f74 te.h. cc -c quot\n-001a31e0: 6543 6c69 656e 744c 6962 2e63 0a3c 2f70 eClientLib.c.

    Third, we\n-001a3200: 2063 7265 6174 6520 7468 6520 4375 7272 create the Curr\n-001a3210: 656e 6379 2045 7863 6861 6e67 6520 5261 ency Exchange Ra\n-001a3220: 7465 2068 6561 6465 7220 6669 6c65 2073 te header file s\n-001a3230: 7065 6369 6669 6361 7469 6f6e 3a3c 2f70 pecification:.

    \n-001a3280: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-001a3290: 6365 206e 616d 653a 2053 6572 7669 6365 ce name: Service\n-001a32a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001a32b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a32c0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-001a32e0: 7320 7365 7276 6963 6520 7374 796c 653a s service style:\n-001a32f0: 2072 7063 203c 2f73 7061 6e3e 3c2f 6469 rpc .
    //gso\n-001a3330: 6170 206e 7320 7365 7276 6963 6520 656e ap ns service en\n-001a3340: 636f 6469 6e67 3a20 656e 636f 6465 6420 coding: encoded \n-001a3350: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a3370: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-001a3390: 2073 6572 7669 6365 206c 6f63 6174 696f service locatio\n-001a33a0: 6e3a 2068 7474 703a 2f2f 7365 7276 6963 n: http://servic\n-001a33b0: 6573 2e78 6d65 7468 6f64 732e 6e65 742f es.xmethods.net/\n-001a33c0: 736f 6170 203c 2f73 7061 6e3e 3c2f 6469 soap .
    //gso\n-001a3400: 6170 206e 7320 7363 6865 6d61 206e 616d ap ns schema nam\n-001a3410: 6573 7061 6365 3a20 7572 6e3a 786d 6574 espace: urn:xmet\n-001a3420: 686f 6473 2d43 7572 7265 6e63 7945 7863 hods-CurrencyExc\n-001a3430: 6861 6e67 6520 3c2f 7370 616e 3e3c 2f64 hange .
    //gs\n-001a3470: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n-001a3480: 6574 686f 642d 6163 7469 6f6e 3a20 6765 ethod-action: ge\n-001a3490: 7452 6174 6520 2671 756f 743b 2671 756f tRate "&quo\n-001a34a0: 743b 203c 2f73 7061 6e3e 3c2f 6469 763e t;
    \n-001a34b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-001a34e0: 3c2f 7370 616e 3e20 6e73 5f5f 6765 7452 ns__getR\n-001a34f0: 6174 6528 3c73 7061 6e20 636c 6173 733d ate(ch\n-001a3510: 6172 3c2f 7370 616e 3e20 2a63 6f75 6e74 ar *count\n-001a3520: 7279 312c 203c 7370 616e 2063 6c61 7373 ry1, c\n-001a3540: 6861 723c 2f73 7061 6e3e 202a 636f 756e har *coun\n-001a3550: 7472 7932 2c20 3c73 7061 6e20 636c 6173 try2, \n-001a3570: 666c 6f61 743c 2f73 7061 6e3e 202a 5265 float *Re\n-001a3580: 7375 6c74 293b 3c2f 6469 763e 0a3c 2f64 sult);
    .

    We compil\n-001a35b0: 6520 6974 2061 7320 6120 6c69 6272 6172 e it as a librar\n-001a35c0: 7920 616e 6420 7765 2075 7365 206f 7074 y and we use opt\n-001a35d0: 696f 6e73 203c 623e 3c63 6f64 653e 2d6e ions -n\n-001a35e0: 3c2f 636f 6465 3e3c 2f62 3e20 616e 6420 and \n-001a35f0: 3c62 3e3c 636f 6465 3e2d 7072 6174 653c -prate<\n-001a3600: 2f63 6f64 653e 3c2f 623e 2074 6f20 7072 /code> to pr\n-001a3610: 6566 6978 2074 6865 2067 656e 6572 6174 efix the generat\n-001a3620: 6564 2066 696c 6573 2061 6e64 2074 6f20 ed files and to \n-001a3630: 7265 6e61 6d65 2074 6865 206e 616d 6573 rename the names\n-001a3640: 7061 6365 2074 6162 6c65 2074 6f20 6176 pace table to av\n-001a3650: 6f69 6420 6c69 6e6b 2063 6f6e 666c 6963 oid link conflic\n-001a3660: 7473 3a20 3c2f 703e 3c70 7265 2063 6c61 ts:

     s\n-001a3680: 6f61 7063 7070 3220 2d63 202d 6e20 2d70  oapcpp2 -c -n -p\n-001a3690: 7261 7465 2072 6174 652e 680a 2063 6320  rate rate.h. cc \n-001a36a0: 2d63 2072 6174 6543 6c69 656e 744c 6962  -c rateClientLib\n-001a36b0: 2e63 0a3c 2f70 7265 3e3c 703e 2054 6865  .c.

    The\n-001a36c0: 206d 6169 6e20 7072 6f67 7261 6d20 6973 main program is\n-001a36d0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ\n-001a3720: 6520 2671 756f 743b 7175 6f74 6548 2e68 e "quoteH.h\n-001a3730: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    #include "\n-001a3780: 7261 7465 482e 6826 7175 6f74 3b3c 2f73 rateH.h"
    .
    #include\n-001a37d0: 2026 7175 6f74 3b71 756f 7465 2e6e 736d "quote.nsm\n-001a37e0: 6170 2671 756f 743b 3c2f 7370 616e 3e3c ap"<\n-001a37f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #include &quo\n-001a3830: 743b 7261 7465 2e6e 736d 6170 2671 756f t;rate.nsmap&quo\n-001a3840: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    .\n-001a3850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n-001a38a0: 206d 6169 6e28 3c73 7061 6e20 636c 6173 main(\n-001a38c0: 696e 743c 2f73 7061 6e3e 2061 7267 632c int argc,\n-001a38d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001a38f0: 2f73 7061 6e3e 202a 6172 6776 5b5d 2920 /span> *argv[]) \n-001a3900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001a3920: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001a3950: 663c 2f73 7061 6e3e 2028 6172 6763 2026 f (argc &\n-001a3960: 6c74 3b3d 2031 2920 3c2f 6469 763e 0a3c lt;= 1)
    .<\n-001a3970: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a3980: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n-001a39a0: 2066 7072 696e 7466 2873 7464 6572 722c fprintf(stderr,\n-001a39b0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001a39d0: 6f74 3b55 7361 6765 3a20 6d61 696e 2074 ot;Usage: main t\n-001a39e0: 6963 6b65 7220 5b63 7572 7265 6e63 795d icker [currency]\n-001a39f0: 5c6e 2671 756f 743b 3c2f 7370 616e 3e29 \\n")\n-001a3a00: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    e\n-001a3a20: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n-001a3a30: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } \n-001a3a50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-001a3a90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a3aa0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a3ab0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001a3ac0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001a3af0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-001a3b50: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n-001a3b70: 2020 3c73 7061 6e20 636c 6173 733d 226b floa\n-001a3b90: 743c 2f73 7061 6e3e 2071 3b20 3c2f 6469 t q; .\n-001a3c70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001a3ca0: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n-001a3cb0: 616c 6c5f 6e73 5f5f 6765 7451 756f 7465 all_ns__getQuote\n-001a3cc0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a3cf0: 2c20 4e55 4c4c 2c20 4e55 4c4c 2c20 6172 , NULL, NULL, ar\n-001a3d00: 6776 5b31 5d2c 2026 616d 703b 7129 2920 gv[1], &q)) \n-001a3d10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get quo\n-001a3d30: 7465 203c 2f73 7061 6e3e 3c2f 6469 763e te
    \n-001a3d40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n-001a3db0: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-001a3dc0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a3dd0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a3de0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001a3df0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-001a3e00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n-001a3e30: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
    \n-001a3e40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . \n-001a3e70: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n-001a3e90: 2f73 7061 6e3e 2028 6172 6763 2026 6774 /span> (argc >\n-001a3ea0: 3b20 3229 203c 2f64 6976 3e0a 3c64 6976 ; 2)
    . \n-001a3ec0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-001a3ee0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_se\n-001a3f40: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces\n-001a3f50: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a3f80: 2c20 7261 7465 5f6e 616d 6573 7061 6365 , rate_namespace\n-001a3f90: 7329 3b20 3c2f 6469 763e 0a3c 6469 7620 s);
    .
    \n-001a3fb0: 2020 203c 7370 616e 2063 6c61 7373 3d22 flo\n-001a3fd0: 6174 3c2f 7370 616e 3e20 723b 203c 2f64 at r; .
    if \n-001a4020: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f67 (soap_call_ns__g\n-001a4030: 6574 5261 7465 283c 6120 636c 6173 733d etRate(so\n-001a4060: 6170 3c2f 613e 2c20 4e55 4c4c 2c20 4e55 ap, NULL, NU\n-001a4070: 4c4c 2c20 3c73 7061 6e20 636c 6173 733d LL, \n-001a4090: 2671 756f 743b 7573 2671 756f 743b 3c2f "us", argv[2], \n-001a40b0: 2661 6d70 3b72 2929 203c 7370 616e 2063 &r)) /\n-001a40d0: 2f20 6765 7420 7261 7465 2069 6e20 5553 / get rate in US\n-001a40e0: 2064 6f6c 6c61 7273 203c 2f73 7061 6e3e dollars \n-001a40f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a4110: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n-001a4170: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n-001a41a0: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n-001a41b0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n-001a41d0: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n-001a41f0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-001a4200: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a4210: 3e20 2020 2020 2020 2071 202a 3d20 723b > q *= r;\n-001a4220: 203c 7370 616e 2063 6c61 7373 3d22 636f // conver\n-001a4240: 7420 7468 6520 7175 6f74 6520 3c2f 7370 t the quote
    .
    \n-001a4270: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    p\n-001a4290: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("%s: %f \\\n-001a42c0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-001a42d0: 6172 6776 5b31 5d2c 2071 293b 203c 2f64 argv[1], q); .
    }
    \n-001a4300: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-001a4370: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap);.\n-001a4460: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n-001a4510: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-001a4540: 7475 726e 3c2f 7370 616e 3e20 303b 203c turn 0; <\n-001a4550: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n-001a4570: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Compil\n-001a4590: 6520 616e 6420 6c69 6e6b 2074 6869 7320 e and link this \n-001a45a0: 6170 706c 6963 6174 696f 6e20 7769 7468 application with\n-001a45b0: 203c 656d 3e3c 636f 6465 3e73 7464 736f stdso\n-001a45c0: 6170 322e 6f3c 2f63 6f64 653e 3c2f 656d ap2.o, env\n-001a45e0: 432e 6f3c 2f63 6f64 653e 3c2f 656d 3e2c C.o,\n-001a45f0: 203c 656d 3e3c 636f 6465 3e71 756f 7465 quote\n-001a4600: 436c 6965 6e74 4c69 622e 6f3c 2f63 6f64 ClientLib.o, and rateClien\n-001a4630: 744c 6962 2e6f 3c2f 636f 6465 3e3c 2f65 tLib.o.

    .

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

    ..How to c\n-001a46b0: 6861 696e 2043 2073 6572 7669 6365 7320 hain C services \n-001a46c0: 746f 2061 6363 6570 7420 6d65 7373 6167 to accept messag\n-001a46d0: 6573 206f 6e20 7468 6520 7361 6d65 2070 es on the same p\n-001a46e0: 6f72 743c 2f68 333e 0a3c 703e 5768 656e ort

    .

    When\n-001a46f0: 2063 6f6d 6269 6e69 6e67 206d 756c 7469 combining multi\n-001a4700: 706c 6520 7365 7276 6963 6573 2069 6e74 ple services int\n-001a4710: 6f20 6f6e 6520 6170 706c 6963 6174 696f o one applicatio\n-001a4720: 6e2c 2079 6f75 2063 616e 2072 756e 2077 n, you can run w\n-001a4730: 7364 6c32 6820 6f6e 206d 756c 7469 706c sdl2h on multipl\n-001a4740: 6520 5753 444c 7320 746f 2067 656e 6572 e WSDLs to gener\n-001a4750: 6174 6520 7468 6520 7369 6e67 6c65 2061 ate the single a\n-001a4760: 6c6c 2d69 6e63 6c75 7369 7665 2073 6572 ll-inclusive ser\n-001a4770: 7669 6365 2064 6566 696e 6974 696f 6e73 vice definitions\n-001a4780: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n-001a4790: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n-001a47a0: 7070 322e 2054 6869 7320 6865 6164 6572 pp2. This header\n-001a47b0: 2066 696c 6520 6973 2074 6865 6e20 7072 file is then pr\n-001a47c0: 6f63 6573 7365 6420 7769 7468 2073 6f61 ocessed with soa\n-001a47d0: 7063 7070 3220 746f 2067 656e 6572 6174 pcpp2 to generat\n-001a47e0: 6520 736b 656c 6574 6f6e 2066 756e 6374 e skeleton funct\n-001a47f0: 696f 6e73 2069 6e20 432e 3c2f 703e 0a3c ions in C.

    .<\n-001a4800: 703e 5768 6174 2069 6620 7765 2067 656e p>What if we gen\n-001a4810: 6572 6174 6520 6d75 6c74 6970 6c65 2073 erate multiple s\n-001a4820: 6572 7669 6365 732c 2065 6163 6820 6672 ervices, each fr\n-001a4830: 6f6d 2061 2057 5344 4c20 7365 7061 7261 om a WSDL separa\n-001a4840: 7465 6c79 2c20 616e 6420 7761 6e74 2074 tely, and want t\n-001a4850: 6f20 6465 706c 6f79 2074 6865 6d20 6f6e o deploy them on\n-001a4860: 2074 6865 2073 616d 6520 706f 7274 3f20 the same port? \n-001a4870: 5468 6973 2072 6571 7569 7265 7320 6c69 This requires li\n-001a4880: 7374 656e 696e 6720 746f 2074 6865 2073 stening to the s\n-001a4890: 616d 6520 706f 7274 2061 6e64 2074 6865 ame port and the\n-001a48a0: 6e20 6368 6169 6e69 6e67 2074 6865 2073 n chaining the s\n-001a48b0: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n-001a48c0: 7320 736f 2074 6861 7420 6561 6368 2073 s so that each s\n-001a48d0: 6572 7669 6365 2063 616e 2073 6572 7665 ervice can serve\n-001a48e0: 2061 2072 6571 7565 7374 2e3c 2f70 3e0a a request.

    .\n-001a48f0: 3c70 3e46 6972 7374 2077 6520 6372 6561

    First we crea\n-001a4900: 7465 2061 203c 656d 3e3c 636f 6465 3e65 te a e\n-001a4910: 6e76 2e68 3c2f 636f 6465 3e3c 2f65 6d3e nv.h\n-001a4920: 2074 6861 7420 636f 6e74 6169 6e73 2074 that contains t\n-001a4930: 6865 206a 6f69 6e74 2053 4f41 5020 4865 he joint SOAP He\n-001a4940: 6164 6572 2061 6e64 2053 4f41 5020 4661 ader and SOAP Fa\n-001a4950: 756c 7420 6465 6669 6e69 7469 6f6e 732c ult definitions,\n-001a4960: 2066 6f72 2065 7861 6d70 6c65 2062 7920 for example by \n-001a4970: 636f 7079 2d70 6173 7469 6e67 2074 6865 copy-pasting the\n-001a4980: 7365 2066 726f 6d20 7468 6520 6f74 6865 se from the othe\n-001a4990: 7220 6865 6164 6572 2066 696c 6573 2067 r header files g\n-001a49a0: 656e 6572 6174 6564 2062 7920 7773 646c enerated by wsdl\n-001a49b0: 3268 2e20 4f72 2074 6869 7320 6669 6c65 2h. Or this file\n-001a49c0: 2069 7320 656d 7074 7920 6966 206e 6f20 is empty if no \n-001a49d0: 7370 6563 6961 6c69 7a65 6420 534f 4150 specialized SOAP\n-001a49e0: 2048 6561 6465 7273 2061 6e64 2046 6175 Headers and Fau\n-001a49f0: 6c74 7320 6172 6520 7573 6564 2e20 5765 lts are used. We\n-001a4a00: 2063 6f6d 7069 6c65 2069 7420 6173 2066 compile it as f\n-001a4a10: 6f6c 6c6f 7773 3a20 3c2f 703e 3c70 7265 ollows:

    soapcpp2 -c -\n-001a4a40: 7065 6e76 2065 6e76 2e68 0a20 6363 202d penv env.h. cc -\n-001a4a50: 6320 656e 7643 2e63 0a3c 2f70 7265 3e3c c envC.c.<\n-001a4a60: 703e 2057 6520 616c 736f 2063 6f6d 7069 p> We also compi\n-001a4a70: 6c65 203c 656d 3e3c 636f 6465 3e67 736f le gso\n-001a4a80: 6170 2f73 7464 736f 6170 322e 633c 2f63 ap/stdsoap2.c withou\n-001a4aa0: 7420 6e61 6d65 7370 6163 6573 3a20 3c2f t namespaces:
     cc -c -\n-001a4ad0: 4457 4954 485f 4e4f 4e41 4d45 5350 4143  DWITH_NONAMESPAC\n-001a4ae0: 4553 2073 7464 736f 6170 322e 630a 3c2f  ES stdsoap2.c.

    Say for \n-001a4b00: 6578 616d 706c 6520 7468 6174 2077 6520 example that we \n-001a4b10: 6861 7665 2061 2073 6572 7669 6365 2064 have a service d\n-001a4b20: 6566 696e 6974 696f 6e20 696e 203c 656d efinition in quote.h. We c\n-001a4b50: 6f6d 7069 6c65 2069 7420 6173 2061 206c ompile it as a l\n-001a4b60: 6962 7261 7279 2061 6e64 2077 6520 7573 ibrary and we us\n-001a4b70: 6520 6f70 7469 6f6e 7320 3c62 3e3c 636f e options -n\n-001a4b90: 2061 6e64 203c 623e 3c63 6f64 653e 2d70 and -p\n-001a4ba0: 7175 6f74 653c 2f63 6f64 653e 3c2f 623e quote\n-001a4bb0: 2074 6f20 7072 6566 6978 2074 6865 2067 to prefix the g\n-001a4bc0: 656e 6572 6174 6564 2066 696c 6573 2061 enerated files a\n-001a4bd0: 6e64 2074 6f20 7265 6e61 6d65 2074 6865 nd to rename the\n-001a4be0: 206e 616d 6573 7061 6365 2074 6162 6c65 namespace table\n-001a4bf0: 2074 6f20 6176 6f69 6420 6c69 6e6b 2063 to avoid link c\n-001a4c00: 6f6e 666c 6963 7473 3a20 3c2f 703e 3c70 onflicts:

    soapcpp2 -c\n-001a4c30: 202d 6e20 2d70 7175 6f74 6520 7175 6f74 -n -pquote quot\n-001a4c40: 652e 680a 2063 6320 2d63 2071 756f 7465 e.h. cc -c quote\n-001a4c50: 436c 6965 6e74 4c69 622e 630a 3c2f 7072 ClientLib.c.

    We do the \n-001a4c70: 7361 6d65 2066 6f72 2061 2073 6572 7669 same for a servi\n-001a4c80: 6365 2064 6566 696e 6974 696f 6e20 696e ce definition in\n-001a4c90: 203c 656d 3e3c 636f 6465 3e72 6174 652e rate.\n-001a4ca0: 683c 2f63 6f64 653e 3c2f 656d 3e3a 203c h: <\n-001a4cb0: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     soapcp\n-001a4cd0: 7032 202d 6320 2d6e 202d 7072 6174 6520  p2 -c -n -prate \n-001a4ce0: 7261 7465 2e68 0a20 6363 202d 6320 7261  rate.h. cc -c ra\n-001a4cf0: 7465 436c 6965 6e74 4c69 622e 630a 3c2f  teClientLib.c.

    To serve\n-001a4d10: 2062 6f74 6820 7468 6520 7175 6f74 6520 both the quote \n-001a4d20: 616e 6420 7261 7465 2073 6572 7669 6365 and rate service\n-001a4d30: 7320 6f6e 2074 6865 2073 616d 6520 706f s on the same po\n-001a4d40: 7274 2c20 7765 2063 6861 696e 2074 6865 rt, we chain the\n-001a4d50: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n-001a4d60: 6865 7273 2061 7320 666f 6c6c 6f77 733a hers as follows:\n-001a4d70: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #include\n-001a4dc0: 2026 7175 6f74 3b71 756f 7465 482e 6826 "quoteH.h&\n-001a4dd0: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    \n-001a4e10: 2369 6e63 6c75 6465 2026 7175 6f74 3b72 #include "r\n-001a4e20: 6174 6548 2e68 2671 756f 743b 3c2f 7370 ateH.h"
    .
    #include \n-001a4e70: 2671 756f 743b 7175 6f74 652e 6e73 6d61 "quote.nsma\n-001a4e80: 7026 7175 6f74 3b3c 2f73 7061 6e3e 3c2f p".
    #include "\n-001a4ed0: 3b72 6174 652e 6e73 6d61 7026 7175 6f74 ;rate.nsmap"\n-001a4ee0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n-001a4ef0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a4f00: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    struct <\n-001a4f40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a4f50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a4f60: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001a4f70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001a4fa0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-001a5000: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n-001a5020: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_vali\n-001a50a0: 645f 736f 636b 6574 3c2f 613e 283c 6120 d_socket(soa\n-001a5100: 705f 6269 6e64 3c2f 613e 283c 6120 636c p_bind(soap, NULL\n-001a5140: 2c20 3830 3830 2c20 3130 2929 2920 3c73 , 8080, 10))) // small BAC\n-001a5170: 4b4c 4f47 2066 6f72 2069 7465 7261 7469 KLOG for iterati\n-001a5180: 7665 2073 6572 7665 7273 3c2f 7370 616e ve servers
    .
    {.
    \n-001a51e0: 7768 696c 653c 2f73 7061 6e3e 2028 3129 while (1)\n-001a51f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    if (\n-001a52a0: 736f 6170 5f76 616c 6964 5f73 6f63 6b65 soap_valid_socke\n-001a52b0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soap_accep\n-001a5310: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-001a5340: 703c 2f61 3e29 2929 3c2f 6469 763e 0a3c p)))
    .<\n-001a5350: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a5360: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n-001a5380: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n-001a53a0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap_b\n-001a5400: 6567 696e 5f73 6572 7665 3c2f 613e 283c egin_serve(<\n-001a5410: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a5420: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a5430: 6874 6d6c 223e 736f 6170 3c2f 613e 2929 html\">soap))\n-001a5440: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a5460: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a5480: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n-001a54e0: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap, stder\n-001a5520: 7229 3b20 3c2f 6469 763e 0a3c 6469 7620 r);
    .
    \n-001a5540: 2020 2020 203c 7370 616e 2063 6c61 7373 c\n-001a5560: 6f6e 7469 6e75 653c 2f73 7061 6e3e 3b3c ontinue;<\n-001a5570: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }<\n-001a5590: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_na\n-001a5610: 6d65 7370 6163 6573 3c2f 613e 283c 6120 mespaces(soap, qu\n-001a5650: 6f74 655f 6e61 6d65 7370 6163 6573 293b ote_namespaces);\n-001a5660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-001a5680: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a5690: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (quote_serve_\n-001a56b0: 7265 7175 6573 7428 3c61 2063 6c61 7373 request(s\n-001a56e0: 6f61 703c 2f61 3e29 203d 3d20 3c61 2063 oap) == \n-001a5740: 534f 4150 5f4e 4f5f 4d45 5448 4f44 3c2f SOAP_NO_METHOD)
    .
    \n-001a5770: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    . \n-001a5860: 2020 2020 2020 203c 7370 616e 2063 6c61 if (rate\n-001a5890: 5f73 6572 7665 5f72 6571 7565 7374 283c _serve_request(<\n-001a58a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a58b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a58c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2929 html\">soap))\n-001a58d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a58f0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_send_fau\n-001a5950: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so\n-001a5980: 6170 3c2f 613e 293b 203c 7370 616e 2063 ap); /\n-001a59a0: 2f20 7365 6e64 2066 6175 6c74 2074 6f20 / send fault to \n-001a59b0: 636c 6965 6e74 203c 2f73 7061 6e3e 3c2f client .
    } <\n-001a59e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else if\n-001a5a40: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (\n-001a5a70: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->error)\n-001a5ad0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a5af0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a5b10: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_send_faul\n-001a5b70: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-001a5ba0: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); //\n-001a5bc0: 2073 656e 6420 6661 756c 7420 746f 2063 send fault to c\n-001a5bd0: 6c69 656e 7420 3c2f 7370 616e 3e3c 2f64 lient .
    }.
    }.
    else if (soap->\n-001a5d00: 6572 726e 756d 3c2f 613e 2920 3c73 7061 errnum) // accept fail\n-001a5d30: 6564 2c20 7472 7920 6167 6169 6e20 6166 ed, try again af\n-001a5d40: 7465 7220 3120 7365 636f 6e64 3c2f 7370 ter 1 second
    .
    \n-001a5d70: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a5d90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_print_fa\n-001a5df0: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n-001a5e20: 6f61 703c 2f61 3e2c 2073 7464 6572 7229 oap, stderr)\n-001a5e30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-001a5e50: 2073 6c65 6570 2831 293b 3c2f 6469 763e sleep(1);
    \n-001a5e60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-001a5e80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-001a5eb0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    {
    .\n-001a5ee0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    fprintf(\n-001a5f00: 7374 6465 7272 2c20 3c73 7061 6e20 636c stderr, "server\n-001a5f30: 2074 696d 6564 206f 7574 5c6e 2671 756f timed out\\n&quo\n-001a5f40: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); .
    break;
    .
    \n-001a5fb0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    soap_destroy<\n-001a6030: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001a6060: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n-001a6080: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_end\n-001a60e0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001a6110: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n-001a6130: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    }.
    soap_\n-001a61c0: 6465 7374 726f 793c 2f61 3e28 3c61 2063 destroy(soap); .
    soap\n-001a6270: 5f65 6e64 3c2f 613e 283c 6120 636c 6173 _end(\n-001a62a0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); ..<\n-001a6360: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This ch\n-001a6380: 6169 6e69 6e67 2063 616e 2062 6520 6172 aining can be ar\n-001a6390: 6269 7472 6172 696c 7920 6465 6570 2e20 bitrarily deep. \n-001a63a0: 5768 656e 2074 6865 2070 7265 7669 6f75 When the previou\n-001a63b0: 7320 7265 7175 6573 7420 6661 696c 7320 s request fails \n-001a63c0: 7769 7468 2061 203c 636f 6465 3e23 534f with a #SO\n-001a63d0: 4150 5f4e 4f5f 4d45 5448 4f44 3c2f 636f AP_NO_METHOD then next re\n-001a63f0: 7175 6573 7420 6469 7370 6174 6368 6572 quest dispatcher\n-001a6400: 2063 616e 2062 6520 7472 6965 642e 3c2f can be tried..

    The server\n-001a6420: 2073 686f 756c 6420 616c 736f 2064 6566 should also def\n-001a6430: 696e 6520 7468 6520 7365 7276 6963 6520 ine the service \n-001a6440: 6f70 6572 6174 696f 6e73 3a3c 2f70 3e0a operations:

    .\n-001a6450: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int ns_\n-001a64a0: 5f67 6574 5175 6f74 6528 3c73 7061 6e20 _getQuote(\n-001a64c0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001a6500: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a6510: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a6520: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001a6530: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *symbol, <\n-001a6560: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a6570: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float *Result); \n-001a6590: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001a65b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    *Result = .\n-001a65d0: 2e2e 203b 203c 2f64 6976 3e0a 3c64 6976 .. ;
    . \n-001a65f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-001a6610: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-001a6670: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    .\n-001a6680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int ns__\n-001a66f0: 6765 7452 6174 6528 3c73 7061 6e20 636c getRate(st\n-001a6710: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, char *country1, <\n-001a67b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a67c0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *country2, \n-001a67e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n-001a6800: 2f73 7061 6e3e 202a 5265 7375 6c74 293b /span> *Result);\n-001a6810: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    *Result = \n-001a6850: 2e2e 2e20 3b20 3c2f 6469 763e 0a3c 6469 ... ;
    . \n-001a6870: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001a6890: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001a68f0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    \n-001a6900: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n-001a8a80: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

    .

    .How to\n-001a8ae0: 2063 7265 6174 6520 444c 4c73 3c2f 6832 create DLLs.

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

    .

    .\n-001a8b50: 4372 6561 7469 6e67 2074 6865 2062 6173 Creating the bas\n-001a8b60: 6520 7374 6473 6f61 7032 2e64 6c6c 3c2f e stdsoap2.dll.

    The engin\n-001a8b80: 6520 646f 6573 206e 6f74 2064 6566 696e e does not defin\n-001a8b90: 6520 534f 4150 2048 6561 6465 7220 616e e SOAP Header an\n-001a8ba0: 6420 4661 756c 7420 7365 7269 616c 697a d Fault serializ\n-001a8bb0: 6572 7320 7468 6174 2074 6865 2065 6e67 ers that the eng\n-001a8bc0: 696e 6520 6e65 6564 7320 7768 656e 2069 ine needs when i\n-001a8bd0: 6e73 7461 6c6c 6564 2061 7320 6120 6c69 nstalled as a li\n-001a8be0: 6272 6172 792e 2057 6520 7468 6572 6566 brary. We theref\n-001a8bf0: 6f72 6520 6164 6420 534f 4150 2048 6561 ore add SOAP Hea\n-001a8c00: 6465 7220 616e 6420 4661 756c 7420 7365 der and Fault se\n-001a8c10: 7269 616c 697a 6572 732c 2077 6869 6368 rializers, which\n-001a8c20: 2061 7265 2063 6f6d 7069 6c65 6420 7365 are compiled se\n-001a8c30: 7061 7261 7465 6c79 2061 7320 666f 6c6c parately as foll\n-001a8c40: 6f77 732e 2046 6972 7374 2c20 6372 6561 ows. First, crea\n-001a8c50: 7465 2061 206e 6577 2068 6561 6465 7220 te a new header \n-001a8c60: 6669 6c65 203c 656d 3e3c 636f 6465 3e65 file e\n-001a8c70: 6e76 2e68 3c2f 636f 6465 3e3c 2f65 6d3e nv.h\n-001a8c80: 2077 6974 6820 7468 6520 534f 4150 2048 with the SOAP H\n-001a8c90: 6561 6465 7220 3c63 6f64 653e 3c61 2063 eader SOAP_ENV_\n-001a8d00: 5f48 6561 6465 723c 2f61 3e3c 2f63 6f64 _Header and SOAP Faul\n-001a8d20: 7420 3c63 6f64 653e 3c61 2063 6c61 7373 t SOAP_ENV__Fault\n-001a8d90: 3c2f 613e 3c2f 636f 6465 3e20 7374 7275 stru\n-001a8da0: 6374 7572 6573 2c20 696e 636c 7564 696e ctures, includin\n-001a8db0: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g SOAP_EN\n-001a8e20: 565f 5f44 6574 6169 6c3c 2f61 3e3c 2f63 V__Detail if this str\n-001a8e40: 7563 7475 7265 2063 6f6e 7461 696e 7320 ucture contains \n-001a8e50: 6d65 6d62 6572 7320 7468 6174 2061 7265 members that are\n-001a8e60: 2073 6572 6961 6c69 7a65 6420 6173 2066 serialized as f\n-001a8e70: 6175 6c74 2064 6574 6169 6c73 2e20 596f ault details. Yo\n-001a8e80: 7520 6361 6e20 6c65 6176 6520 7468 6973 u can leave this\n-001a8e90: 2068 6561 6465 7220 6669 6c65 2065 6d70 header file emp\n-001a8ea0: 7479 2069 6620 796f 7520 7761 6e74 2074 ty if you want t\n-001a8eb0: 6f20 7573 6520 7468 6520 6465 6661 756c o use the defaul\n-001a8ec0: 7420 534f 4150 2048 6561 6465 7220 616e t SOAP Header an\n-001a8ed0: 6420 4661 756c 742e 2048 6f77 6576 6572 d Fault. However\n-001a8ee0: 2c20 6966 2053 4f41 5020 4865 6164 6572 , if SOAP Header\n-001a8ef0: 7320 6172 6520 7265 7175 6972 6564 2074 s are required t\n-001a8f00: 6865 6e20 796f 7520 6361 6e6e 6f74 206c hen you cannot l\n-001a8f10: 6561 7665 2074 6865 203c 636f 6465 3e3c eave the <\n-001a8f20: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001a8f30: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n-001a8f40: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he\n-001a8f50: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html\" title\n-001a8f60: 3d22 534f 4150 2048 6561 6465 7220 7374 =\"SOAP Header st\n-001a8f70: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.\">SOAP_E\n-001a8f80: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header structure \n-001a8fa0: 656d 7074 792e 2046 6f72 2065 7861 6d70 empty. For examp\n-001a8fb0: 6c65 2c20 7468 6520 5753 2d41 6464 7265 le, the WS-Addre\n-001a8fc0: 7373 696e 6720 616e 6420 5753 2d53 6563 ssing and WS-Sec\n-001a8fd0: 7572 6974 7920 706c 7567 696e 7320 7265 urity plugins re\n-001a8fe0: 7175 6972 6520 534f 4150 2048 6561 6465 quire SOAP Heade\n-001a8ff0: 7273 2077 6869 6368 2063 616e 2062 6520 rs which can be \n-001a9000: 696d 706f 7274 6564 2062 7920 6164 6469 imported by addi\n-001a9010: 6e67 203c 636f 6465 3e23 696d 706f 7274 ng #import\n-001a9020: 2022 7773 6135 2e68 223c 2f63 6f64 653e \"wsa5.h\"\n-001a9030: 2061 6e64 203c 636f 6465 3e23 696d 706f and #impo\n-001a9040: 7274 2022 7773 7365 2e68 223c 2f63 6f64 rt \"wsse.h\", respectively\n-001a9060: 2074 6f20 3c65 6d3e 3c63 6f64 653e 656e to en\n-001a9070: 762e 683c 2f63 6f64 653e 3c2f 656d 3e2e v.h.\n-001a9080: 2054 6865 6e20 636f 6d70 696c 6520 7468 Then compile th\n-001a9090: 6973 2068 6561 6465 7220 6669 6c65 2077 is header file w\n-001a90a0: 6974 683a 203c 2f70 3e3c 7072 6520 636c ith:

     \n-001a90c0: 736f 6170 6370 7032 202d 7065 6e76 2065  soapcpp2 -penv e\n-001a90d0: 6e76 2e68 0a3c 2f70 7265 3e3c 703e 2054  nv.h.

    T\n-001a90e0: 6865 2067 656e 6572 6174 6564 203c 656d he generated envC.cpp<\n-001a9100: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n-001a9110: 2068 6f6c 6473 2074 6865 2053 4f41 5020 holds the SOAP \n-001a9120: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n-001a9130: 2073 6572 6961 6c69 7a65 7273 2e20 5765 serializers. We\n-001a9140: 2063 616e 2065 6974 6865 7220 6372 6561 can either crea\n-001a9150: 7465 2061 2073 6570 6172 6174 6520 3c65 te a separate envC.dll\n-001a9170: 3c2f 636f 6465 3e3c 2f65 6d3e 2044 4c4c DLL\n-001a9180: 2066 6f72 2074 6869 7320 7468 6174 2061 for this that a\n-001a9190: 6c6c 2063 6c69 656e 7473 2061 6e64 2073 ll clients and s\n-001a91a0: 6572 7669 6365 2061 7070 6c69 6361 7469 ervice applicati\n-001a91b0: 6f6e 7320 7769 6c6c 2075 7365 2c20 6f72 ons will use, or\n-001a91c0: 2063 6f6d 6269 6e65 203c 656d 3e3c 636f combine envC.cpp with the\n-001a91f0: 203c 656d 3e3c 636f 6465 3e73 7464 736f stdso\n-001a9200: 6170 322e 646c 6c3c 2f63 6f64 653e 3c2f ap2.dll we create, w\n-001a9220: 6869 6368 2077 6520 7769 6c6c 2065 7870 hich we will exp\n-001a9230: 6c61 696e 2066 7572 7468 6572 2e3c 2f70 lain further..

    The next st\n-001a9250: 6570 2069 7320 746f 2063 7265 6174 6520 ep is to create \n-001a9260: 3c65 6d3e 3c63 6f64 653e 7374 6473 6f61 stdsoa\n-001a9270: 7032 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 p2.dll which consist\n-001a9290: 7320 6f66 2074 6865 2066 696c 6520 3c65 s of the file gsoap/st\n-001a92b0: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp and <\n-001a92d0: 636f 6465 3e65 6e76 432e 6370 703c 2f63 code>envC.cpp and op\n-001a92f0: 7469 6f6e 616c 6c79 2074 6865 2070 6c75 tionally the plu\n-001a9300: 6769 6e73 2079 6f75 2077 616e 7420 746f gins you want to\n-001a9310: 2075 7365 2073 7563 6820 6173 203c 656d use such as wsseapi.c\n-001a9330: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2028 pp (\n-001a9340: 7765 206e 6565 6420 746f 2072 656e 616d we need to renam\n-001a9350: 6520 616c 6c20 3c65 6d3e 3c63 6f64 653e e all \n-001a9360: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .c f\n-001a9370: 696c 6573 2074 6f20 3c65 6d3e 3c63 6f64 iles to .cpp files to avoi\n-001a93a0: 6420 6973 7375 6573 2077 6974 6820 4d53 d issues with MS\n-001a93b0: 5643 2b2b 292e 2054 6869 7320 444c 4c20 VC++). This DLL \n-001a93c0: 636f 6e74 6169 6e73 2061 6c6c 2063 6f6d contains all com\n-001a93d0: 6d6f 6e20 6675 6e63 7469 6f6e 7320 6e65 mon functions ne\n-001a93e0: 6564 6564 2066 6f72 2061 6c6c 206f 7468 eded for all oth\n-001a93f0: 6572 2063 6c69 656e 7473 2061 6e64 2073 er clients and s\n-001a9400: 6572 7665 7273 2062 6173 6564 206f 6e20 ervers based on \n-001a9410: 6753 4f41 502e 2043 6f6d 7069 6c65 203c gSOAP. Compile <\n-001a9420: 656d 3e3c 636f 6465 3e65 6e76 432e 6370 em>envC.cp\n-001a9430: 703c 2f63 6f64 653e 3c2f 656d 3e20 616e p an\n-001a9440: 6420 3c65 6d3e 3c63 6f64 653e 6773 6f61 d gsoa\n-001a9450: 702f 7374 6473 6f61 7032 2e63 7070 3c2f p/stdsoap2.cpp into \n-001a9470: 3c65 6d3e 3c63 6f64 653e 7374 6473 6f61 stdsoa\n-001a9480: 7032 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 p2.dll using the com\n-001a94a0: 7069 6c65 7220 6f70 7469 6f6e 203c 636f piler option /D #WITH_NONAMES\n-001a94d0: 5041 4345 533c 2f63 6f64 653e 2061 6e64 PACES and\n-001a94e0: 2074 6865 204d 5356 4320 5072 652d 5072 the MSVC Pre-Pr\n-001a94f0: 6f63 6573 736f 7220 6465 6669 6e69 7469 ocessor definiti\n-001a9500: 6f6e 7320 3c63 6f64 653e 534f 4150 5f46 ons SOAP_F\n-001a9510: 4d41 4331 3d5f 5f64 6563 6c73 7065 6328 MAC1=__declspec(\n-001a9520: 646c 6c65 7870 6f72 7429 3c2f 636f 6465 dllexport), SOAP_FM\n-001a9540: 4143 333d 5f5f 6465 636c 7370 6563 2864 AC3=__declspec(d\n-001a9550: 6c6c 6578 706f 7274 293c 2f63 6f64 653e llexport)\n-001a9560: 2c20 616e 6420 7468 6520 3c63 6f64 653e , and the \n-001a9570: 2353 4f41 505f 5354 445f 4558 504f 5254 #SOAP_STD_EXPORT\n-001a9580: 533c 2f63 6f64 653e 206d 6163 726f 2073 S macro s\n-001a9590: 6574 2061 7320 7368 6f77 6e20 6265 6c6f et as shown belo\n-001a95a0: 7720 6672 6f6d 2074 6865 204d 5356 4320 w from the MSVC \n-001a95b0: 636f 6d6d 616e 6420 7072 6f6d 7074 3a20 command prompt: \n-001a95c0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

    C:>\n-001a95e0: 2063 6c20 2f63 202f 492e 202f 4548 7363   cl /c /I. /EHsc\n-001a95f0: 202f 4457 4954 485f 4e4f 4e41 4d45 5350   /DWITH_NONAMESP\n-001a9600: 4143 4553 202f 4453 4f41 505f 464d 4143  ACES /DSOAP_FMAC\n-001a9610: 313d 5f5f 6465 636c 7370 6563 2864 6c6c  1=__declspec(dll\n-001a9620: 6578 706f 7274 2920 2f44 534f 4150 5f46  export) /DSOAP_F\n-001a9630: 4d41 4333 3d5f 5f64 6563 6c73 7065 6328  MAC3=__declspec(\n-001a9640: 646c 6c65 7870 6f72 7429 202f 4453 4f41  dllexport) /DSOA\n-001a9650: 505f 5354 445f 4558 504f 5254 5320 656e  P_STD_EXPORTS en\n-001a9660: 7643 2e63 7070 2073 7464 736f 6170 322e  vC.cpp stdsoap2.\n-001a9670: 6370 700a 433a 2667 743b 206c 696e 6b20  cpp.C:> link \n-001a9680: 2f4c 4942 5041 5448 2077 7332 5f33 322e  /LIBPATH ws2_32.\n-001a9690: 6c69 6220 2f4f 5554 3a6d 7967 736f 6170  lib /OUT:mygsoap\n-001a96a0: 2e64 6c6c 202f 444c 4c20 656e 7643 2e6f  .dll /DLL envC.o\n-001a96b0: 626a 2073 7464 736f 6170 322e 6f62 6a0a  bj stdsoap2.obj.\n-001a96c0: 3c2f 7072 653e 3c70 3e20 4e6f 7465 3a20  

    Note: \n-001a96d0: 6173 206f 6620 6753 4f41 5020 322e 382e as of gSOAP 2.8.\n-001a96e0: 3330 2061 6e64 206c 6174 6572 2c20 7468 30 and later, th\n-001a96f0: 6520 444c 4c20 6578 706f 7274 206d 6163 e DLL export mac\n-001a9700: 726f 7320 7368 6f77 6e20 6865 7265 2061 ros shown here a\n-001a9710: 7265 2061 6c6c 2073 6574 2077 6974 6820 re all set with \n-001a9720: 6f6e 6520 7072 652d 7072 6f63 6573 736f one pre-processo\n-001a9730: 7220 6465 6669 6e69 7469 6f6e 203c 636f r definition #SOAP_STD_EXP\n-001a9750: 4f52 5453 3c2f 636f 6465 3e2e 3c2f 703e ORTS.

    \n-001a9760: 0a3c 703e 416c 7465 726e 6174 6976 656c .

    Alternativel\n-001a9770: 792c 2079 6f75 2063 616e 2063 6f6d 7069 y, you can compi\n-001a9780: 6c65 2077 6974 6820 3c63 6f64 653e 2f44 le with /D\n-001a9790: 3c2f 636f 6465 3e20 3c63 6f64 653e 2357 #W\n-001a97a0: 4954 485f 534f 4150 4445 4653 5f48 3c2f ITH_SOAPDEFS_H and put th\n-001a97c0: 6520 6d61 6372 6f20 6465 6669 6e69 7469 e macro definiti\n-001a97d0: 6f6e 7320 696e 203c 656d 3e3c 636f 6465 ons in soapdefs.h. This ex\n-001a9800: 706f 7274 7320 616c 6c20 6675 6e63 7469 ports all functi\n-001a9810: 6f6e 7320 7768 6963 6820 6172 6520 7072 ons which are pr\n-001a9820: 6563 6564 6564 2062 7920 7468 6520 6d61 eceded by the ma\n-001a9830: 6372 6f20 3c63 6f64 653e 2353 4f41 505f cro #SOAP_\n-001a9840: 464d 4143 313c 2f63 6f64 653e 2069 6e20 FMAC1 in \n-001a9850: 7468 6520 3c65 6d3e 3c63 6f64 653e 736f the so\n-001a9860: 6170 6370 7032 2e63 7070 3c2f 636f 6465 apcpp2.cpp source fi\n-001a9880: 6c65 2061 6e64 206d 6163 726f 203c 636f le and macro #SOAP_FMAC3 in the envC.cpp<\n-001a98c0: 2f63 6f64 653e 3c2f 656d 3e20 736f 7572 /code> sour\n-001a98d0: 6365 2066 696c 652e 3c2f 703e 0a3c 703e ce file.

    .

    \n-001a98e0: 4669 6e61 6c6c 792c 206e 6f74 6520 7468 Finally, note th\n-001a98f0: 6174 2074 6865 2067 534f 4150 2073 6f75 at the gSOAP sou\n-001a9900: 7263 6520 636f 6465 2070 6163 6b61 6765 rce code package\n-001a9910: 2063 6f6e 7461 696e 7320 6120 6c6f 7420 contains a lot \n-001a9920: 6f66 203c 656d 3e3c 636f 6465 3e2e 633c of .c<\n-001a9930: 2f63 6f64 653e 3c2f 656d 3e20 736f 7572 /code> sour\n-001a9940: 6365 2063 6f64 6520 6669 6c65 732e 204d ce code files. M\n-001a9950: 6978 696e 6720 4320 7769 7468 2043 2b2b ixing C with C++\n-001a9960: 2066 696c 6573 2069 7320 6e6f 7420 7265 files is not re\n-001a9970: 636f 6d6d 656e 6465 6420 7769 7468 2056 commended with V\n-001a9980: 6973 7561 6c20 5374 7564 696f 2061 6e64 isual Studio and\n-001a9990: 2077 696c 6c20 6c65 6164 2074 6f20 7275 will lead to ru\n-001a99a0: 6e2d 7469 6d65 2065 7272 6f72 7320 7768 n-time errors wh\n-001a99b0: 656e 2062 7569 6c64 696e 6720 444c 4c73 en building DLLs\n-001a99c0: 2e20 5468 6572 6566 6f72 652c 2061 6c77 . Therefore, alw\n-001a99d0: 6179 7320 7265 6e61 6d65 203c 656d 3e3c ays rename <\n-001a99e0: 636f 6465 3e2e 633c 2f63 6f64 653e 3c2f code>.c source code \n-001a9a00: 6669 6c65 7320 746f 203c 656d 3e3c 636f files to .cpp source code \n-001a9a30: 6669 6c65 7320 7768 656e 2063 7265 6174 files when creat\n-001a9a40: 696e 6720 444c 4c73 2e3c 2f70 3e0a 3c70 ing DLLs.

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

    <\n-001a9ab0: 2f61 3e0a 4372 6561 7469 6e67 2063 6c69 /a>.Creating cli\n-001a9ac0: 656e 7420 616e 6420 7365 7276 6572 2044 ent and server D\n-001a9ad0: 4c4c 733c 2f68 333e 0a3c 703e 436f 6d70 LLs

    .

    Comp\n-001a9ae0: 696c 6520 7468 6520 3c65 6d3e 3c63 6f64 ile the soapClientLib.\n-001a9b00: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n-001a9b10: 616e 6420 3c65 6d3e 3c63 6f64 653e 736f and so\n-001a9b20: 6170 5365 7276 6572 4c69 622e 6370 703c apServerLib.cpp<\n-001a9b30: 2f63 6f64 653e 3c2f 656d 3e20 736f 7572 /code> sour\n-001a9b40: 6365 7320 6173 2044 4c4c 7320 6279 2075 ces as DLLs by u\n-001a9b50: 7369 6e67 2074 6865 204d 5356 4320 5072 sing the MSVC Pr\n-001a9b60: 652d 5072 6f63 6573 736f 7220 6465 6669 e-Processor defi\n-001a9b70: 6e69 7469 6f6e 7320 3c63 6f64 653e 534f nitions SO\n-001a9b80: 4150 5f46 4d41 4335 3d5f 5f64 6563 6c73 AP_FMAC5=__decls\n-001a9b90: 7065 6328 646c 6c65 7870 6f72 7429 3c2f pec(dllexport) and \n-001a9bb0: 534f 4150 5f43 4d41 433d 5f5f 6465 636c SOAP_CMAC=__decl\n-001a9bc0: 7370 6563 2864 6c6c 6578 706f 7274 293c spec(dllexport)<\n-001a9bd0: 2f63 6f64 653e 2c20 616e 6420 6279 2075 /code>, and by u\n-001a9be0: 7369 6e67 2074 6865 2043 2b2b 2063 6f6d sing the C++ com\n-001a9bf0: 7069 6c65 7220 6f70 7469 6f6e 203c 636f piler option /D #WITH_NONAMES\n-001a9c20: 5041 4345 533c 2f63 6f64 653e 2e20 416c PACES. Al\n-001a9c30: 6c20 6f66 2074 6865 7365 206d 6163 726f l of these macro\n-001a9c40: 7320 6172 6520 7365 7420 6173 2061 2073 s are set as a s\n-001a9c50: 686f 7274 6861 6e64 2077 6974 6820 6f6e horthand with on\n-001a9c60: 6520 7072 652d 7072 6f63 6573 736f 7220 e pre-processor \n-001a9c70: 6465 6669 6e69 7469 6f6e 203c 636f 6465 definition #SOAP_STD_EXPOR\n-001a9c90: 5453 3c2f 636f 6465 3e20 2872 6571 7569 TS (requi\n-001a9ca0: 7265 7320 6753 4f41 5020 322e 382e 3330 res gSOAP 2.8.30\n-001a9cb0: 206f 7220 6c61 7465 7229 2e3c 2f70 3e0a or later).

    .\n-001a9cc0: 3c70 3e54 6869 7320 444c 4c20 6c69 6e6b

    This DLL link\n-001a9cd0: 7320 746f 203c 656d 3e3c 636f 6465 3e73 s to s\n-001a9ce0: 7464 736f 6170 322e 646c 6c3c 2f63 6f64 tdsoap2.dll we creat\n-001a9d00: 6564 2069 6e20 5365 6374 696f 6e20 3c61 ed in Section Creating t\n-001a9d40: 6865 2062 6173 6520 7374 6473 6f61 7032 he base stdsoap2\n-001a9d50: 2e64 6c6c 3c2f 613e 2e3c 2f70 3e0a 3c70 .dll.

    .To create multi\n-001a9d70: 706c 6520 444c 4c73 2069 6e20 7468 6520 ple DLLs in the \n-001a9d80: 7361 6d65 2070 726f 6a65 6374 2064 6972 same project dir\n-001a9d90: 6563 746f 7279 2c20 796f 7520 7368 6f75 ectory, you shou\n-001a9da0: 6c64 2075 7365 203c 623e 3c63 6f64 653e ld use \n-001a9db0: 736f 6170 6370 7032 202d 7020 6e61 6d65 soapcpp2 -p name\n-001a9dc0: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n-001a9dd0: 6f6e 203c 623e 3c63 6f64 653e 2d70 206e on -p n\n-001a9de0: 616d 653c 2f63 6f64 653e 3c2f 623e 2074 ame t\n-001a9df0: 6f20 7265 6e61 6d65 2074 6865 2067 656e o rename the gen\n-001a9e00: 6572 6174 6564 203c 656d 3e3c 636f 6465 erated soapClientLib.c\n-001a9e20: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2061 pp a\n-001a9e30: 6e64 203c 656d 3e3c 636f 6465 3e73 6f61 nd soa\n-001a9e40: 7053 6572 7665 724c 6962 2e63 7070 3c2f pServerLib.cpp (and \n-001a9e60: 6173 736f 6369 6174 6564 2920 6669 6c65 associated) file\n-001a9e70: 732e 2054 6865 203c 623e 3c63 6f64 653e s. The \n-001a9e80: 2d70 206e 616d 653c 2f63 6f64 653e 3c2f -p name option specif\n-001a9ea0: 6965 7320 6120 3c65 6d3e 3c63 6f64 653e ies a \n-001a9eb0: 6e61 6d65 3c2f 636f 6465 3e3c 2f65 6d3e name\n-001a9ec0: 2070 7265 6669 7820 746f 2072 6570 6c61 prefix to repla\n-001a9ed0: 6365 2074 6865 203c 656d 3e3c 636f 6465 ce the soap file name pref\n-001a9f00: 6978 2e20 416e 6f74 6865 7220 7761 7920 ix. Another way \n-001a9f10: 6973 2074 6f20 7573 6520 432b 2b20 6e61 is to use C++ na\n-001a9f20: 6d65 7370 6163 6573 2077 6974 6820 3c62 mespaces with soapcpp2 \n-001a9f40: 2d71 206e 616d 653c 2f63 6f64 653e 3c2f -q name option -q name, if the in\n-001a9f80: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-001a9f90: 696c 6520 696e 7075 7420 746f 2073 6f61 ile input to soa\n-001a9fa0: 7063 7070 3220 646f 6573 206e 6f74 2061 pcpp2 does not a\n-001a9fb0: 6c72 6561 6479 2064 6563 6c61 7265 2061 lready declare a\n-001a9fc0: 2043 2b2b 206e 616d 6573 7061 6365 2e20 C++ namespace. \n-001a9fd0: 4120 636c 6561 6e20 7365 7061 7261 7469 A clean separati\n-001a9fe0: 6f6e 206f 6620 6c69 6272 6172 6965 7320 on of libraries \n-001a9ff0: 6361 6e20 616c 736f 2062 6520 6163 6869 can also be achi\n-001aa000: 6576 6564 2077 6974 6820 432b 2b20 6e61 eved with C++ na\n-001aa010: 6d65 7370 6163 6573 2c20 7365 6520 5365 mespaces, see Se\n-001aa020: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction How to build\n-001aa060: 2061 2063 6c69 656e 7420 6f72 2073 6572 a client or ser\n-001aa070: 7665 7220 696e 2061 2043 2b2b 2063 6f64 ver in a C++ cod\n-001aa080: 6520 6e61 6d65 7370 6163 653c 2f61 3e20 e namespace \n-001aa090: 2e3c 2f70 3e0a 3c70 3e55 6e6c 6573 7320 .

    .

    Unless \n-001aa0a0: 796f 7520 7573 6520 7468 6520 636c 6965 you use the clie\n-001aa0b0: 6e74 2070 726f 7879 2061 6e64 2073 6572 nt proxy and ser\n-001aa0c0: 7665 7220 6f62 6a65 6374 2063 6c61 7373 ver object class\n-001aa0d0: 6573 2028 3c65 6d3e 3c63 6f64 653e 736f es (so\n-001aa0e0: 6170 5859 5a50 726f 7879 2e68 3c2f 636f apXYZProxy.h and soapXYZSe\n-001aa110: 7276 6963 652e 683c 2f63 6f64 653e 3c2f rvice.h), all client\n-001aa130: 2061 6e64 2073 6572 7665 7220 6170 706c and server appl\n-001aa140: 6963 6174 696f 6e73 206d 7573 7420 6578 ications must ex\n-001aa150: 706c 6963 6974 6c79 2073 6574 2074 6865 plicitly set the\n-001aa160: 206e 616d 6573 7061 6365 7320 7661 6c75 namespaces valu\n-001aa170: 6520 6f66 2074 6865 203c 636f 6465 3e3c e of the <\n-001aa180: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001aa190: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-001aa1a0: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n-001aa1b0: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n-001aa1c0: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n-001aa1d0: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n-001aa1e0: 7874 2077 6974 683a 3c2f 703e 0a3c 6469 xt with:

    .

    whe\n-001aa340: 7265 2074 6865 203c 636f 6465 3e6e 616d re the nam\n-001aa350: 6573 7061 6365 735b 5d3c 2f63 6f64 653e espaces[]\n-001aa360: 2074 6162 6c65 2073 686f 756c 6420 6265 table should be\n-001aa370: 2064 6566 696e 6564 2069 6e20 7468 6520 defined in the \n-001aa380: 636c 6965 6e74 2f73 6572 7665 7220 736f client/server so\n-001aa390: 7572 6365 2e20 5468 6573 6520 7461 626c urce. These tabl\n-001aa3a0: 6573 2061 7265 2067 656e 6572 6174 6564 es are generated\n-001aa3b0: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the .nsmap<\n-001aa3d0: 2f65 6d3e 2066 696c 6573 2e20 5468 6520 /em> files. The \n-001aa3e0: 7461 626c 6573 2061 7265 2072 656e 616d tables are renam\n-001aa3f0: 6564 2066 6f72 2063 6f6e 7665 6e69 656e ed for convenien\n-001aa400: 6365 2075 7369 6e67 203c 623e 3c63 6f64 ce using soapcpp2 -n option \n-001aa430: 3c62 3e3c 636f 6465 3e2d 6e3c 2f63 6f64 -n, see Sect\n-001aa450: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion soapcpp2 opt\n-001aa490: 696f 6e73 3c2f 613e 202e 3c2f 703e 0a3c ions .

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

    .

    .How \n-001aa500: 746f 2062 7569 6c64 206d 6f64 756c 6573 to build modules\n-001aa510: 2061 6e64 206c 6962 7261 7269 6573 2077 and libraries w\n-001aa520: 6974 6820 7468 6520 236d 6f64 756c 6520 ith the #module \n-001aa530: 6469 7265 6374 6976 653c 2f68 323e 0a3c directive

    .<\n-001aa540: 703e 5468 6520 3c63 6f64 653e 236d 6f64 p>The #mod\n-001aa550: 756c 653c 2f63 6f64 653e 2064 6972 6563 ule direc\n-001aa560: 7469 7665 2069 7320 7573 6564 2074 6f20 tive is used to \n-001aa570: 6275 696c 6420 6d6f 6475 6c65 7320 7769 build modules wi\n-001aa580: 7468 2073 6f61 7063 7070 322e 2041 206c th soapcpp2. A l\n-001aa590: 6962 7261 7279 2063 616e 2062 6520 6275 ibrary can be bu\n-001aa5a0: 696c 7420 6672 6f6d 2061 206d 6f64 756c ilt from a modul\n-001aa5b0: 6520 616e 6420 6c69 6e6b 6564 2077 6974 e and linked wit\n-001aa5c0: 6820 6d75 6c74 6970 6c65 2057 6562 2073 h multiple Web s\n-001aa5d0: 6572 7669 6365 7320 6170 706c 6963 6174 ervices applicat\n-001aa5e0: 696f 6e73 2e20 5468 6520 6469 7265 6374 ions. The direct\n-001aa5f0: 6976 6520 7368 6f75 6c64 2061 7070 6561 ive should appea\n-001aa600: 7220 6174 2074 6865 2074 6f70 206f 6620 r at the top of \n-001aa610: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he\n-001aa620: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so\n-001aa630: 6170 6370 7032 2061 6e64 2068 6173 2074 apcpp2 and has t\n-001aa640: 6865 2066 6f6c 6c6f 7769 6e67 2066 6f72 he following for\n-001aa650: 6d61 7473 3a3c 2f70 3e0a 3c64 6976 2063 mats:

    .
    \n-001aa670: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #mo\n-001aa6a0: 6475 6c65 2026 7175 6f74 3b6e 616d 6526 dule "name&\n-001aa6b0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .

    an\n-001aa6e0: 643c 2f70 3e0a 3c64 6976 2063 6c61 7373 d

    .
    #module\n-001aa730: 2026 7175 6f74 3b6e 616d 6526 7175 6f74 "name"\n-001aa740: 3b3c 2f73 7061 6e3e 2026 7175 6f74 3b66 ; "f\n-001aa750: 756c 6c6e 616d 6526 7175 6f74 3b3c 2f64 ullname".

    wh\n-001aa780: 6572 6520 7468 6520 3c63 6f64 653e 6e61 ere the na\n-001aa790: 6d65 3c2f 636f 6465 3e20 6d75 7374 2062 me must b\n-001aa7a0: 6520 6120 756e 6971 7565 2073 686f 7274 e a unique short\n-001aa7b0: 206e 616d 6520 666f 7220 7468 6520 6d6f name for the mo\n-001aa7c0: 6475 6c65 2e20 5468 6520 6e61 6d65 2069 dule. The name i\n-001aa7d0: 7320 6361 7365 2069 6e73 656e 7369 7469 s case insensiti\n-001aa7e0: 7665 2061 6e64 206d 7573 7420 6e6f 7420 ve and must not \n-001aa7f0: 6578 6365 6564 2034 2063 6861 7261 6374 exceed 4 charact\n-001aa800: 6572 7320 696e 206c 656e 6774 682e 2054 ers in length. T\n-001aa810: 6865 203c 636f 6465 3e66 756c 6c6e 616d he fullnam\n-001aa820: 653c 2f63 6f64 653e 2c20 7768 656e 2070 e, when p\n-001aa830: 7265 7365 6e74 2c20 7265 7072 6573 656e resent, represen\n-001aa840: 7473 2074 6865 2066 756c 6c20 6e61 6d65 ts the full name\n-001aa850: 206f 6620 7468 6520 6d6f 6475 6c65 2061 of the module a\n-001aa860: 6e64 2069 7320 7573 6564 2074 6f20 7072 nd is used to pr\n-001aa870: 6566 6978 2074 6865 2066 756e 6374 696f efix the functio\n-001aa880: 6e20 6e61 6d65 7320 6f66 2074 6865 2067 n names of the g\n-001aa890: 656e 6572 6174 6564 2073 6572 6961 6c69 enerated seriali\n-001aa8a0: 7a65 7273 2072 6570 6c61 6369 6e67 2074 zers replacing t\n-001aa8b0: 6865 2075 7375 616c 203c 636f 6465 3e73 he usual s\n-001aa8c0: 6f61 703c 2f63 6f64 653e 2070 7265 6669 oap prefi\n-001aa8d0: 782e 2049 6620 6162 7365 6e74 2c20 7468 x. If absent, th\n-001aa8e0: 6520 7368 6f72 7420 6e61 6d65 2069 7320 e short name is \n-001aa8f0: 7573 6564 2074 6f20 7072 6566 6978 2074 used to prefix t\n-001aa900: 6865 2066 756e 6374 696f 6e20 6e61 6d65 he function name\n-001aa910: 7320 6f66 2074 6865 2073 6572 6961 6c69 s of the seriali\n-001aa920: 7a65 7273 2e3c 2f70 3e0a 3c70 3e54 6865 zers.

    .

    The\n-001aa930: 2072 6573 7420 6f66 2074 6865 2063 6f6e rest of the con\n-001aa940: 7465 6e74 206f 6620 7468 6520 696e 7465 tent of the inte\n-001aa950: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-001aa960: 6520 696e 636c 7564 6573 2074 7970 6520 e includes type \n-001aa970: 6465 636c 6172 6174 696f 6e73 2061 6e64 declarations and\n-001aa980: 206f 7074 696f 6e61 6c6c 7920 7468 6520 optionally the \n-001aa990: 6465 636c 6172 6174 696f 6e73 206f 6620 declarations of \n-001aa9a0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-001aa9b0: 6e73 2061 6e64 2053 4f41 5020 4865 6164 ns and SOAP Head\n-001aa9c0: 6572 7320 616e 6420 4661 756c 7473 2074 ers and Faults t\n-001aa9d0: 6861 7420 6172 6520 756e 6976 6572 7361 hat are universa\n-001aa9e0: 6c6c 7920 7573 6564 2062 7920 534f 4150 lly used by SOAP\n-001aa9f0: 2073 6572 7669 6365 732c 2077 6865 6e20 services, when \n-001aaa00: 6170 706c 6963 6162 6c65 2e20 5768 656e applicable. When\n-001aaa10: 2074 6865 2073 6f61 7063 7070 3220 746f the soapcpp2 to\n-001aaa20: 6f6c 2070 726f 6365 7373 6573 2074 6865 ol processes the\n-001aaa30: 2068 6561 6465 7220 6669 6c65 206d 6f64 header file mod\n-001aaa40: 756c 652c 2069 7420 7769 6c6c 2067 656e ule, it will gen\n-001aaa50: 6572 6174 6520 7468 6520 736f 7572 6365 erate the source\n-001aaa60: 2063 6f64 6573 2066 6f72 2061 206c 6962 codes for a lib\n-001aaa70: 7261 7279 2e20 5468 6520 5765 6220 7365 rary. The Web se\n-001aaa80: 7276 6963 6573 2061 7070 6c69 6361 7469 rvices applicati\n-001aaa90: 6f6e 2074 6861 7420 7573 6573 2074 6865 on that uses the\n-001aaaa0: 206c 6962 7261 7279 2073 686f 756c 6420 library should \n-001aaab0: 7573 6520 6120 6865 6164 6572 2066 696c use a header fil\n-001aaac0: 6520 7468 6174 2069 6d70 6f72 7473 2074 e that imports t\n-001aaad0: 6865 206d 6f64 756c 6520 7769 7468 2074 he module with t\n-001aaae0: 6865 203c 636f 6465 3e23 696d 706f 7274 he #import\n-001aaaf0: 3c2f 636f 6465 3e20 6469 7265 6374 6976 directiv\n-001aab00: 652c 2066 6f72 2065 7861 6d70 6c65 3a3c e, for example:<\n-001aab10: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    /* Contents of\n-001aab60: 2066 696c 6520 2671 756f 743b 6d6f 6475 file "modu\n-001aab70: 6c65 2e68 2671 756f 743b 202a 2f3c 2f73 le.h" */
    .#module\n-001aabc0: 2026 7175 6f74 3b74 6573 7426 7175 6f74 "test"\n-001aabd0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n-001aabe0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001aabf0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    // types and ty\n-001aac30: 7065 6465 6673 2062 6563 6f6d 6520 6d6f pedefs become mo\n-001aac40: 6475 6c65 2d73 7065 6369 6669 633c 2f73 dule-specific
    .
    typedef LONG64 x\n-001aacf0: 7364 5f5f 6c6f 6e67 3b3c 2f64 6976 3e0a sd__long;
    .\n-001aad00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    char\n-001aad30: 3c2f 7370 616e 3e2a 3b3c 2f64 6976 3e0a *;
    .\n-001aad40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    // a module-sp\n-001aad90: 6563 6966 6963 2073 7472 7563 743c 2f73 ecific struct
    .
    struct ns__S
    .\n-001aae00: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {

    .
    ..\n-001aae20: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // membe\n-001aae40: 7273 3c2f 7370 616e 3e3c 2f64 6976 3e0a rs
    .\n-001aae50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .and a header fi\n-001ab690: 6c65 203c 656d 3e3c 636f 6465 3e65 7861 le exa\n-001ab6a0: 6d70 6c65 2e68 3c2f 636f 6465 3e3c 2f65 mple.h that uses it:\n-001ab6c0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    /* Contents o\n-001ab710: 6620 6669 6c65 2026 7175 6f74 3b65 7861 f file "exa\n-001ab720: 6d70 6c65 2e68 2671 756f 743b 202a 2f3c mple.h" */<\n-001ab730: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001ab750: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001ab760: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor\">#impor\n-001ab770: 7420 2671 756f 743b 6d6f 6475 6c65 2e68 t "module.h\n-001ab780: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    .\n-001ab7c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__webmeth\n-001ab7f0: 6f64 283c 7370 616e 2063 6c61 7373 3d22 od(const \n-001ab830: 6368 6172 3c2f 7370 616e 3e20 2a63 6f64 char *cod\n-001ab840: 652c 203c 7370 616e 2063 6c61 7373 3d22 e, struct<\n-001ab860: 2f73 7061 6e3e 206e 735f 5f53 202a 7265 /span> ns__S *re\n-001ab870: 636f 7264 2c20 3c73 7061 6e20 636c 6173 cord, \n-001ab890: 696e 743c 2f73 7061 6e3e 202a 7265 7375 int *resu\n-001ab8a0: 6c74 293b 2020 2020 3c2f 6469 763e 0a3c lt);
    .<\n-001ab8b0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The mod\n-001ab8d0: 756c 6520 6973 2063 6f6d 7069 6c65 6420 ule is compiled \n-001ab8e0: 6173 2066 6f6c 6c6f 7773 3a20 3c2f 703e as follows:

    \n-001ab8f0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    soapcpp2 m\n-001ab910: 6f64 756c 6531 2e68 0a3c 2f70 7265 3e3c  odule1.h.
    <\n-001ab920: 703e 2054 6869 7320 6765 6e65 7261 7465 p> This generate\n-001ab930: 7320 7468 6520 6669 6c65 7320 3c65 6d3e s the files \n-001ab940: 3c63 6f64 653e 7465 7374 5374 7562 2e68 testStub.h\n-001ab950: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , testH.h<\n-001ab970: 2f63 6f64 653e 3c2f 656d 3e2c 2061 6e64 /code>
    , and\n-001ab980: 203c 656d 3e3c 636f 6465 3e74 6573 7443 testC\n-001ab990: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-001ab9a0: 2077 6974 6820 7365 7269 616c 697a 6572 with serializer\n-001ab9b0: 7320 666f 7220 3c63 6f64 653e 7374 7275 s for stru\n-001ab9c0: 6374 206e 735f 5f53 3c2f 636f 6465 3e20 ct ns__S \n-001ab9d0: 6275 7420 616c 736f 2066 6f72 203c 636f but also for char* \n-001ab9f0: 616e 6420 3c63 6f64 653e 696e 743c 2f63 and int.

    .

    Run\n-001aba10: 6e69 6e67 2073 6f61 7063 7070 3220 6f6e ning soapcpp2 on\n-001aba20: 203c 656d 3e3c 636f 6465 3e65 7861 6d70 examp\n-001aba30: 6c65 2e68 3c2f 636f 6465 3e3c 2f65 6d3e le.h\n-001aba40: 2069 6d70 6f72 7473 2074 6865 206d 6f64 imports the mod\n-001aba50: 756c 6520 6465 6669 6e69 7469 6f6e 732c ule definitions,\n-001aba60: 2062 7574 2064 6f65 7320 6e6f 7420 6765 but does not ge\n-001aba70: 6e65 7261 7465 2073 6572 6961 6c69 7a65 nerate serialize\n-001aba80: 7273 2066 6f72 203c 636f 6465 3e73 7472 rs for str\n-001aba90: 7563 7420 6e73 5f5f 533c 2f63 6f64 653e uct ns__S\n-001abaa0: 2c20 3c63 6f64 653e 6368 6172 2a3c 2f63 , char* and i\n-001abac0: 6e74 3c2f 636f 6465 3e20 7369 6e63 6520 nt since \n-001abad0: 7468 6573 6520 6172 6520 6465 6669 6e65 these are define\n-001abae0: 6420 6279 203c 656d 3e3c 636f 6465 3e6d d by m\n-001abaf0: 6f64 756c 652e 683c 2f63 6f64 653e 3c2f odule.h:

    s\n-001abb20: 6f61 7063 7070 3220 2d43 4c20 6578 616d  oapcpp2 -CL exam\n-001abb30: 706c 652e 680a 3c2f 7072 653e 3c70 3e20  ple.h.

    \n-001abb40: 416e 2065 7861 6d70 6c65 2063 6c69 656e An example clien\n-001abb50: 7420 6170 706c 6963 6174 696f 6e20 7468 t application th\n-001abb60: 6174 2063 616c 6c73 2074 6865 2063 6c69 at calls the cli\n-001abb70: 656e 7420 7374 7562 2066 756e 6374 696f ent stub functio\n-001abb80: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n-001abbb0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001abbc0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001abbd0: 6465 2026 7175 6f74 3b73 6f61 7048 2e68 de "soapH.h\n-001abbe0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    #include "\n-001abc30: 6e73 2e6e 736d 6170 2671 756f 743b 3c2f ns.nsmap"
    . <\n-001abc60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai\n-001abca0: 6e28 293c 2f64 6976 3e0a 3c64 6976 2063 n()
    .
    {.
    st\n-001abcf0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-001abd60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001abd70: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001abd80: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-001abd90: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-001abda0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-001abdb0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-001abdc0: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
    .
    struct ns__S s;
    \n-001abe10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_defaul\n-001abe30: 745f 6e73 5f5f 5328 3c61 2063 6c61 7373 t_ns__S(s\n-001abe60: 6f61 703c 2f61 3e2c 2026 616d 703b 7329 oap, &s)\n-001abe70: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    s.na\n-001abe90: 6d65 203d 203c 6120 636c 6173 733d 2263 me = soap_s\n-001abef0: 7472 6475 703c 2f61 3e28 3c61 2063 6c61 trdup(soap, "nam\n-001abf50: 6526 7175 6f74 3b3c 2f73 7061 6e3e 293b e");\n-001abf60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s.amo\n-001abf80: 756e 7420 3d20 3132 343b 3c2f 6469 763e unt = 124;
    \n-001abf90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001abfc0: 6e74 3c2f 7370 616e 3e20 6e3b 3c2f 6469 nt n;.\n-001ac0b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n-001ac120: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-001ac130: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001ac140: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001ac150: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001ac160: 7374 6465 7272 293b 3c2f 6469 763e 0a3c stderr);
    .<\n-001ac170: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ac180: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > els\n-001ac1a0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .<\n-001ac1b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ac1c0: 3e20 2020 2070 7269 6e74 6628 3c73 7061 > printf("OK\n-001ac1f0: 206e 203d 2025 645c 6e26 7175 6f74 3b3c n = %d\\n"<\n-001ac200: 2f73 7061 6e3e 2c20 6e29 3b3c 2f64 6976 /span>, n);.
    soap_\n-001ac280: 6465 7374 726f 793c 2f61 3e28 3c61 2063 destroy(soap);.
    soa\n-001ac330: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap);.\n-001ac420: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    vo\n-001acd20: 6964 3c2f 7370 616e 3e2a 2073 6f61 705f id* soap_\n-001acd30: 6c6f 6f6b 7570 5f70 6c75 6769 6e28 3c73 lookup_plugin(struct soap*, const<\n-001acdb0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char*);<\n-001acde0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-001ace00: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soap_copy functi\n-001aced0: 6f6e 2072 6574 7572 6e73 2061 206e 6577 on returns a new\n-001acee0: 2064 796e 616d 6963 616c 6c79 2061 6c6c dynamically all\n-001acef0: 6f63 6174 6564 203c 636f 6465 3e3c 6120 ocated soap context\n-001acf60: 2074 6861 7420 6973 2061 2063 6f70 7920 that is a copy \n-001acf70: 6f66 2061 6e6f 7468 6572 2c20 7375 6368 of another, such\n-001acf80: 2074 6861 7420 6e6f 2064 6174 6120 6973 that no data is\n-001acf90: 2073 6861 7265 6420 6265 7477 6565 6e20 shared between \n-001acfa0: 7468 6520 636f 7079 2061 6e64 2074 6865 the copy and the\n-001acfb0: 206f 7269 6769 6e61 6c20 636f 6e74 6578 original contex\n-001acfc0: 742e 2054 6865 203c 636f 6465 3e3c 6120 t. The soap_cop\n-001ad080: 793c 2f61 3e3c 2f63 6f64 653e 2066 756e y fun\n-001ad090: 6374 696f 6e20 696e 766f 6b65 7320 7468 ction invokes th\n-001ad0a0: 6520 636f 7079 2066 756e 6374 696f 6e73 e copy functions\n-001ad0b0: 206f 6620 7468 6520 7265 6769 7374 6572 of the register\n-001ad0c0: 6564 2070 6c75 6769 6e73 2074 6f20 636f ed plugins to co\n-001ad0d0: 7079 2074 6865 2070 6c75 6769 6e73 2720 py the plugins' \n-001ad0e0: 6c6f 6361 6c20 6461 7461 2e20 5468 6520 local data. The \n-001ad0f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d\n-001ad1c0: 6f6e 653c 2f61 3e3c 2f63 6f64 653e 2061 one a\n-001ad1d0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap_fr\n-001ad280: 6565 3c2f 613e 3c2f 636f 6465 3e20 6675 ee fu\n-001ad290: 6e63 7469 6f6e 7320 6465 2d72 6567 6973 nctions de-regis\n-001ad2a0: 7465 7273 2061 6c6c 2070 6c75 6769 6e2e ters all plugin.\n-001ad2b0: 3c2f 703e 0a3c 703e 5468 6520 666f 6c6c

    .

    The foll\n-001ad2c0: 6f77 2065 7861 6d70 6c65 206f 7665 7272 ow example overr\n-001ad2d0: 6964 6573 2074 6865 2073 656e 6420 616e ides the send an\n-001ad2e0: 6420 7265 6365 6976 6520 6361 6c6c 6261 d receive callba\n-001ad2f0: 636b 7320 746f 2063 6f70 7920 616c 6c20 cks to copy all \n-001ad300: 6d65 7373 6167 6573 2074 6861 7420 6172 messages that ar\n-001ad310: 6520 7365 6e74 2061 6e64 2072 6563 6569 e sent and recei\n-001ad320: 7665 6420 746f 2074 6865 2074 6572 6d69 ved to the termi\n-001ad330: 6e61 6c20 2873 7464 6572 7229 2e3c 2f70 nal (stderr)..

    First, we w\n-001ad350: 7269 7465 2061 2068 6561 6465 7220 6669 rite a header fi\n-001ad360: 6c65 203c 656d 3e3c 636f 6465 3e70 6c75 le plu\n-001ad370: 6769 6e2e 683c 2f63 6f64 653e 3c2f 656d gin.h to define the \n-001ad390: 6c6f 6361 6c20 706c 7567 696e 2064 6174 local plugin dat\n-001ad3a0: 6120 7374 7275 6374 7572 6528 7329 2061 a structure(s) a\n-001ad3b0: 6e64 2077 6520 6465 6669 6e65 2061 2067 nd we define a g\n-001ad3c0: 6c6f 6261 6c20 6e61 6d65 2074 6f20 6964 lobal name to id\n-001ad3d0: 656e 7469 6679 2074 6865 2070 6c75 6769 entify the plugi\n-001ad3e0: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n-001ad410: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001ad420: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001ad430: 6465 2026 7175 6f74 3b3c 6120 636c 6173 de "stdsoap2.h&\n-001ad470: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #define PLUGIN_\n-001ad4c0: 4944 2026 7175 6f74 3b50 4c55 4749 4e2d ID "PLUGIN-\n-001ad4d0: 312e 3026 7175 6f74 3b3c 2f73 7061 6e3e 1.0"\n-001ad4e0: 203c 7370 616e 2063 6c61 7373 3d22 636f // some n\n-001ad500: 616d 6520 746f 2069 6465 6e74 6966 7920 ame to identify \n-001ad510: 706c 7567 696e 203c 2f73 7061 6e3e 3c2f plugin .
    .<\n-001ad540: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ad550: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct plugin_data\n-001ad580: 203c 7370 616e 2063 6c61 7373 3d22 636f // local \n-001ad5a0: 706c 7567 696e 2064 6174 6120 3c2f 7370 plugin data
    .
    {.
    int (*fs\n-001ad5f0: 656e 6429 283c 7370 616e 2063 6c61 7373 end)(struc\n-001ad610: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-001ad640: 736f 6170 3c2f 613e 2a2c 203c 7370 616e soap*, const char*, size_t); <\n-001ad6a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001ad6b0: 656e 7422 3e2f 2f20 746f 2073 6176 6520 ent\">// to save \n-001ad6c0: 616e 6420 7573 6520 7365 6e64 2063 616c and use send cal\n-001ad6d0: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
    size_t (\n-001ad700: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *frecv)(struct \n-001ad780: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-001ad7b0: 6170 3c2f 613e 2a2c 203c 7370 616e 2063 ap*, char*,\n-001ad7e0: 2073 697a 655f 7429 3b20 3c73 7061 6e20 size_t); \n-001ad800: 2f2f 2074 6f20 7361 7665 2061 6e64 2075 // to save and u\n-001ad810: 7365 2072 6563 7620 6361 6c6c 6261 636b se recv callback\n-001ad820: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001ad830: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ad840: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
    .
    int plugin(s\n-001ad8a0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-001ad910: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ad920: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap_plugin *\n-001ad940: 706c 7567 696e 2c20 3c73 7061 6e20 636c plugin, void *a\n-001ad970: 7267 293b 3c2f 6469 763e 0a3c 6469 7620 rg);
    .
    stdsoap2.h\n-001ad9e0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    This fi\n-001ada00: 6c65 2064 6566 696e 6573 2074 6865 2063 le defines the c\n-001ada10: 6f6d 6d6f 6e20 6d61 6372 6f73 2c20 7479 ommon macros, ty\n-001ada20: 7065 7320 616e 6420 6675 6e63 7469 6f6e pes and function\n-001ada30: 7320 6f66 2074 6865 2067 534f 4150 2041 s of the gSOAP A\n-001ada40: 5049 2067 726f 7570 6564 2062 7920 6d6f PI grouped by mo\n-001ada50: 6475 6c65 733c 2f64 6976 3e3c 2f64 6976 dules
    .

    Then\n-001ada80: 2c20 7765 2077 7269 7465 2074 6865 2070 , we write the p\n-001ada90: 6c75 6769 6e20 7265 6769 7374 7279 2066 lugin registry f\n-001adaa0: 756e 6374 696f 6e20 616e 6420 7468 6520 unction and the \n-001adab0: 6361 6c6c 6261 636b 733a 3c2f 703e 0a3c callbacks:

    .<\n-001adac0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-001adad0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #include "\n-001adb10: 3b70 6c75 6769 6e2e 6826 7175 6f74 3b3c ;plugin.h"<\n-001adb20: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-001adb40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001adb70: 7374 6174 6963 3c2f 7370 616e 3e20 3c73 static const\n-001adba0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001adbc0: 2f73 7061 6e3e 2070 6c75 6769 6e5f 6964 /span> plugin_id\n-001adbd0: 5b5d 203d 2050 4c55 4749 4e5f 4944 3b20 [] = PLUGIN_ID; \n-001adbe0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // the plu\n-001adc00: 6769 6e20 6964 203c 2f73 7061 6e3e 3c2f gin id .
    sta\n-001adc40: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic int \n-001adc70: 706c 7567 696e 5f69 6e69 7428 3c73 7061 plugin_init(struct \n-001adca0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001adcd0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001add00: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct plugin_dat\n-001add30: 6120 2a64 6174 6129 3b20 3c2f 6469 763e a *data);
    \n-001add40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    static<\n-001add70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int plug\n-001adda0: 696e 5f63 6f70 7928 3c73 7061 6e20 636c in_copy(st\n-001addc0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, struct soap_plugin *d\n-001ade60: 7374 2c20 3c73 7061 6e20 636c 6173 733d st, struct\n-001ade80: 3c2f 7370 616e 3e20 736f 6170 5f70 6c75 soap_plu\n-001ade90: 6769 6e20 2a73 7263 293b 203c 2f64 6976 gin *src); .
    static\n-001aded0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c void pl\n-001adf00: 7567 696e 5f64 656c 6574 6528 3c73 7061 ugin_delete(struct \n-001adf30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001adf60: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001adf90: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct soap_plugi\n-001adfc0: 6e20 2a70 293b 203c 2f64 6976 3e0a 3c64 n *p);
    .\n-001adfe0: 3c73 7061 6e20 636c 6173 733d 226b 6579 static in\n-001ae020: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_\n-001ae030: 7365 6e64 283c 7370 616e 2063 6c61 7373 send(struc\n-001ae050: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-001ae080: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *bu\n-001ae150: 663c 2f61 3e2c 203c 7370 616e 2063 6c61 f, size_t l\n-001ae180: 656e 293b 203c 2f64 6976 3e0a 3c64 6976 en);
    .static size\n-001ae1e0: 5f74 3c2f 7370 616e 3e20 706c 7567 696e _t plugin\n-001ae1f0: 5f72 6563 7628 3c73 7061 6e20 636c 6173 _recv(stru\n-001ae210: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, char *buf<\n-001ae2f0: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, s\n-001ae310: 697a 655f 743c 2f73 7061 6e3e 206c 656e ize_t len\n-001ae320: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    .
    // t\n-001ae370: 6865 2072 6567 6973 7472 7920 6675 6e63 he registry func\n-001ae380: 7469 6f6e 3a20 3c2f 7370 616e 3e3c 2f64 tion: ..<\n-001ae4c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ae4d0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    p-&\n-001ae4f0: 6774 3b69 6420 3d20 706c 7567 696e 5f69 gt;id = plugin_i\n-001ae500: 643b 203c 2f64 6976 3e0a 3c64 6976 2063 d;
    .
    p-\n-001ae520: 2667 743b 6461 7461 203d 2028 3c73 7061 >data = (void*)malloc(\n-001ae570: 7369 7a65 6f66 3c2f 7370 616e 3e28 3c73 sizeof(struct plugin_data));\n-001ae5b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    p-&g\n-001ae5d0: 743b 6663 6f70 7920 3d20 706c 7567 696e t;fcopy = plugin\n-001ae5e0: 5f63 6f70 793b 203c 7370 616e 2063 6c61 _copy; /* \n-001ae600: 6f70 7469 6f6e 616c 3a20 7768 656e 2073 optional: when s\n-001ae610: 6574 2074 6865 2070 6c75 6769 6e20 6d75 et the plugin mu\n-001ae620: 7374 2063 6f70 7920 6974 7320 6c6f 6361 st copy its loca\n-001ae630: 6c20 6461 7461 202a 2f3c 2f73 7061 6e3e l data */\n-001ae640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    p->\n-001ae660: 3b66 6465 6c65 7465 203d 2070 6c75 6769 ;fdelete = plugi\n-001ae670: 6e5f 6465 6c65 7465 3b20 3c2f 6469 763e n_delete;
    \n-001ae680: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001ae6b0: 663c 2f73 7061 6e3e 2028 702d 2667 743b f (p->\n-001ae6c0: 6461 7461 2920 3c2f 6469 763e 0a3c 6469 data)
    . \n-001ae6e0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n-001ae700: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ae710: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (plugin_init(\n-001ae730: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001ae760: 2028 3c73 7061 6e20 636c 6173 733d 226b (struct plugin_dat\n-001ae790: 612a 2970 2d26 6774 3b64 6174 6129 2920 a*)p->data)) \n-001ae7a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    fre\n-001ae7e0: 6528 702d 2667 743b 6461 7461 293b 203c e(p->data); <\n-001ae7f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001ae800: 656e 7422 3e2f 2f20 6572 726f 723a 2063 ent\">// error: c\n-001ae810: 6f75 6c64 206e 6f74 2069 6e69 7420 3c2f ould not init
    . \n-001ae840: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-001ae860: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-001ae8c0: 534f 4150 5f45 4f4d 3c2f 613e 3b20 3c73 SOAP_EOM; // return er\n-001ae8f0: 726f 7220 3c2f 7370 616e 3e3c 2f64 6976 ror .
    }
    \n-001ae920: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . \n-001ae950: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001ae970: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001ae9d0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    \n-001ae9e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n-001aea10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n-001aea40: 6174 6963 3c2f 7370 616e 3e20 3c73 7061 atic int\n-001aea70: 2070 6c75 6769 6e5f 696e 6974 283c 7370 plugin_init(struct\n-001aeaa0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-001aead0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, struct<\n-001aeb20: 2f73 7061 6e3e 2070 6c75 6769 6e5f 6461 /span> plugin_da\n-001aeb30: 7461 202a 6461 7461 2920 3c2f 6469 763e ta *data)
    \n-001aeb40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    d\n-001aeb70: 6174 612d 2667 743b 6673 656e 6420 3d20 ata->fsend = \n-001aeb80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001aebb0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >fsend\n-001aec10: 3c2f 613e 3b20 3c73 7061 6e20 636c 6173 ; // s\n-001aec30: 6176 6520 6f6c 6420 7265 6376 2063 616c ave old recv cal\n-001aec40: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
    data->\n-001aec70: 3b66 7265 6376 203d 203c 6120 636c 6173 ;frecv = \n-001aeca0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->frecv; <\n-001aed10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001aed20: 656e 7422 3e2f 2f20 7361 7665 206f 6c64 ent\">// save old\n-001aed30: 2073 656e 6420 6361 6c6c 6261 636b 203c send callback <\n-001aed40: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001aed60: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-001aed90: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fsen\n-001aedf0: 643c 2f61 3e20 3d20 706c 7567 696e 5f73 d = plugin_s\n-001aee00: 656e 643b 203c 7370 616e 2063 6c61 7373 end; // re\n-001aee20: 706c 6163 6520 7365 6e64 2063 616c 6c62 place send callb\n-001aee30: 6163 6b20 7769 7468 206e 6577 203c 2f73 ack with new
    .
    <\n-001aee60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001aee70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001aee80: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-001aee90: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;frecv<\n-001aeef0: 2f61 3e20 3d20 706c 7567 696e 5f72 6563 /a> = plugin_rec\n-001aef00: 763b 203c 7370 616e 2063 6c61 7373 3d22 v; // repl\n-001aef20: 6163 6520 7265 6376 2063 616c 6c62 6163 ace recv callbac\n-001aef30: 6b20 7769 7468 206e 6577 203c 2f73 7061 k with new
    ..}\n-001af000: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    // cop\n-001af050: 7920 706c 7567 696e 2064 6174 612c 2063 y plugin data, c\n-001af060: 616c 6c65 6420 6279 2073 6f61 705f 636f alled by soap_co\n-001af070: 7079 2829 3c2f 7370 616e 3e3c 2f64 6976 py().
    // Thi\n-001af0b0: 7320 6973 2069 6d70 6f72 7461 6e74 3a20 s is important: \n-001af0c0: 7765 206e 6565 6420 6120 6465 6570 2063 we need a deep c\n-001af0d0: 6f70 7920 746f 2061 766f 6964 2064 6174 opy to avoid dat\n-001af0e0: 6120 7368 6172 696e 6720 6279 2074 776f a sharing by two\n-001af0f0: 2063 6f6e 7465 7874 7320 3c2f 7370 616e contexts
    ..
    {.
    \n-001af2b0: 6966 3c2f 7370 616e 3e20 2821 2864 7374 if (!(dst\n-001af2c0: 2d26 6774 3b64 6174 6120 3d20 283c 7370 ->data = (struct\n-001af2f0: 2070 6c75 6769 6e5f 6461 7461 2a29 6d61 plugin_data*)ma\n-001af300: 6c6c 6f63 283c 7370 616e 2063 6c61 7373 lloc(sizeo\n-001af320: 663c 2f73 7061 6e3e 283c 7370 616e 2063 f(s\n-001af340: 7472 7563 743c 2f73 7061 6e3e 2070 6c75 truct plu\n-001af350: 6769 6e5f 6461 7461 2929 2929 203c 2f64 gin_data)))) ..
    *\n-001af420: 6473 742d 2667 743b 6461 7461 203d 202a dst->data = *\n-001af430: 7372 632d 2667 743b 6461 7461 3b20 3c2f src->data; .
    return\n-001af480: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n-001af4e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    .\n-001af530: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // plugin \n-001af550: 6465 6c65 7469 6f6e 2c20 6361 6c6c 6564 deletion, called\n-001af560: 2062 7920 736f 6170 5f64 6f6e 6528 2920 by soap_done() \n-001af570: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001af590: 3c73 7061 6e20 636c 6173 733d 226b 6579 static vo\n-001af5d0: 6964 3c2f 7370 616e 3e20 706c 7567 696e id plugin\n-001af5e0: 5f64 656c 6574 6528 3c73 7061 6e20 636c _delete(st\n-001af600: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, struct soap_plugin *p\n-001af6a0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    free(p-&g\n-001af6e0: 743b 6461 7461 293b 203c 7370 616e 2063 t;data); /\n-001af700: 2f20 6672 6565 2061 6c6c 6f63 6174 6564 / free allocated\n-001af710: 2070 6c75 6769 6e20 6461 7461 203c 2f73 plugin data
    .
    } <\n-001af740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-001af760: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // the n\n-001af790: 6577 2073 656e 6420 6361 6c6c 6261 636b ew send callback\n-001af7a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001af7b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001af7c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static i\n-001af800: 6e74 3c2f 7370 616e 3e20 706c 7567 696e nt plugin\n-001af810: 5f73 656e 6428 3c73 7061 6e20 636c 6173 _send(stru\n-001af830: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, const <\n-001af8c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001af8d0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *b\n-001af930: 7566 3c2f 613e 2c20 3c73 7061 6e20 636c uf, size_t \n-001af960: 6c65 6e29 203c 2f64 6976 3e0a 3c64 6976 len)
    .{<\n-001af980: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001af9b0: 7374 7275 6374 203c 2f73 7061 6e3e 706c struct pl\n-001af9c0: 7567 696e 5f64 6174 6120 2a64 6174 6120 ugin_data *data \n-001af9d0: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (struct \n-001af9f0: 3c2f 7370 616e 3e70 6c75 6769 6e5f 6461 plugin_da\n-001afa00: 7461 2a29 736f 6170 5f6c 6f6f 6b75 705f ta*)soap_lookup_\n-001afa10: 706c 7567 696e 283c 6120 636c 6173 733d plugin(so\n-001afa40: 6170 3c2f 613e 2c20 706c 7567 696e 5f69 ap, plugin_i\n-001afa50: 6429 3b20 3c73 7061 6e20 636c 6173 733d d); // fet\n-001afa70: 6368 2070 6c75 6769 6e26 2333 393b 7320 ch plugin's \n-001afa80: 6c6f 6361 6c20 6461 7461 203c 2f73 7061 local data
    .
    fwr\n-001afab0: 6974 6528 6275 662c 206c 656e 2c20 312c ite(buf, len, 1,\n-001afac0: 2073 7464 6572 7229 3b20 3c73 7061 6e20 stderr); \n-001afae0: 2f2f 2077 7269 7465 206d 6573 7361 6765 // write message\n-001afaf0: 2074 6f20 7374 6465 7272 203c 2f73 7061 to stderr
    ..
    } .
    .\n-001afc20: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // the new\n-001afc40: 2072 6563 6569 7665 2063 616c 6c62 6163 receive callbac\n-001afc50: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
    .\n-001afc60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    static \n-001afcb0: 7369 7a65 5f74 3c2f 7370 616e 3e20 706c size_t pl\n-001afcc0: 7567 696e 5f72 6563 7628 3c73 7061 6e20 ugin_recv(\n-001afce0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001afd20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001afd30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001afd40: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001afd50: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *buf, size_t len)
    .\n-001afdb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct plugin_data *d\n-001afe10: 6174 6120 3d20 283c 7370 616e 2063 6c61 ata = (str\n-001afe30: 7563 7420 3c2f 7370 616e 3e70 6c75 6769 uct plugi\n-001afe40: 6e5f 6461 7461 2a29 736f 6170 5f6c 6f6f n_data*)soap_loo\n-001afe50: 6b75 705f 706c 7567 696e 283c 6120 636c kup_plugin(soap, plug\n-001afe90: 696e 5f69 6429 3b20 3c73 7061 6e20 636c in_id); //\n-001afeb0: 2066 6574 6368 2070 6c75 6769 6e26 2333 fetch plugin\n-001afec0: 393b 7320 6c6f 6361 6c20 6461 7461 203c 9;s local data <\n-001afed0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001afef0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n-001aff10: 743c 2f73 7061 6e3e 2072 6573 203d 2064 t res = d\n-001aff20: 6174 612d 2667 743b 6672 6563 7628 3c61 ata->frecv(soap, b\n-001aff60: 7566 2c20 6c65 6e29 3b20 3c73 7061 6e20 uf, len); \n-001aff80: 2f2f 2067 6574 2064 6174 6120 6672 6f6d // get data from\n-001aff90: 206f 6c64 2072 6563 7620 6361 6c6c 6261 old recv callba\n-001affa0: 636b 203c 2f73 7061 6e3e 3c2f 6469 763e ck
    \n-001affb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fwrite(buf,\n-001affd0: 2072 6573 2c20 312c 2073 7464 6572 7229 res, 1, stderr)\n-001affe0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    return res;
    \n-001b0030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    <\n-001b00a0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-001b00b0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">SOAP_E\n-001b0100: 4f4d 3c2f 613e 3c2f 6469 763e 3c64 6976 OM
    \n-001b0120: 2364 6566 696e 6520 534f 4150 5f45 4f4d #define SOAP_EOM\n-001b0130: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    A soap_\n-001b0150: 7374 6174 7573 2065 7272 6f72 2063 6f64 status error cod\n-001b0160: 653a 206f 7574 206f 6620 6d65 6d6f 7279 e: out of memory\n-001b0170: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-001b0190: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-001b01a0: 736f 6170 322e 683a 3233 3731 3c2f 6469 soap2.h:2371
    .
    <\n-001b01c0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001b01d0: 3c70 3e49 7420 6973 2074 6865 2072 6573

    It is the res\n-001b01e0: 706f 6e73 6962 696c 6974 7920 6f66 2074 ponsibility of t\n-001b01f0: 6865 2070 6c75 6769 6e20 746f 2068 616e he plugin to han\n-001b0200: 646c 6520 7265 6769 7374 7279 2028 696e dle registry (in\n-001b0210: 6974 292c 2063 6f70 792c 2061 6e64 2064 it), copy, and d\n-001b0220: 656c 6574 696f 6e20 6f66 2074 6865 2070 eletion of the p\n-001b0230: 6c75 6769 6e20 6461 7461 2061 6e64 2072 lugin data and r\n-001b0240: 6573 6574 2063 616c 6c62 6163 6b73 2e3c eset callbacks.<\n-001b0250: 2f70 3e0a 3c70 3e54 6865 203c 636f 6465 /p>.

    The fdelete \n-001b0270: 6361 6c6c 6261 636b 206f 6620 3c63 6f64 callback of struct soap_pl\n-001b0290: 7567 696e 3c2f 636f 6465 3e20 6d75 7374 ugin must\n-001b02a0: 2062 6520 7365 7420 746f 2064 652d 7265 be set to de-re\n-001b02b0: 6769 7374 6572 2074 6865 2070 6c75 6769 gister the plugi\n-001b02c0: 6e20 616e 6420 6c65 7420 6974 2064 656c n and let it del\n-001b02d0: 6574 6520 6974 7320 7265 736f 7572 6365 ete its resource\n-001b02e0: 732e 3c2f 703e 0a3c 703e 4120 706c 7567 s.

    .

    A plug\n-001b02f0: 696e 2069 7320 636f 7069 6564 2061 6c6f in is copied alo\n-001b0300: 6e67 2077 6974 6820 6974 7320 636f 7272 ng with its corr\n-001b0310: 6573 706f 6e64 696e 6720 3c63 6f64 653e esponding \n-001b0320: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001b0370: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001b0380: 6578 7420 7769 7468 2074 6865 203c 636f ext with the so\n-001b0440: 6170 5f63 6f70 793c 2f61 3e3c 2f63 6f64 ap_copy call. This fu\n-001b0460: 6e63 7469 6f6e 2063 6f70 6965 7320 6120 nction copies a \n-001b0470: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context and th\n-001b04e0: 6520 6368 6169 6e20 6f66 2070 6c75 6769 e chain of plugi\n-001b04f0: 6e73 2e20 4974 2069 7320 7570 2074 6f20 ns. It is up to \n-001b0500: 7468 6520 706c 7567 696e 2069 6d70 6c65 the plugin imple\n-001b0510: 6d65 6e74 6174 696f 6e20 746f 2073 6861 mentation to sha\n-001b0520: 7265 2074 6865 2070 6c75 6769 6e20 6461 re the plugin da\n-001b0530: 7461 206f 7220 6e6f 7420 6173 2066 6f6c ta or not as fol\n-001b0540: 6c6f 7773 3a3c 2f70 3e0a 3c75 6c3e 0a3c lows:

    .
    .\n+0018aaa0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {.
    soap_\n+0018ab30: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n+0018ab40: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+0018ab70: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); <\n+0018ab80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    exit(E\n+0018aba0: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    }
    .\n+0018abd0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    #define SOAP_SS\n+0018acc0: 4c5f 4e4f 5f41 5554 4845 4e54 4943 4154 L_NO_AUTHENTICAT\n+0018acd0: 494f 4e3c 2f64 6976 3e3c 6469 7620 636c ION
    soap\n+0018acf0: 5f73 736c 5f66 6c61 6773 2066 6c61 6720 _ssl_flags flag \n+0018ad00: 7661 6c75 6520 746f 2064 6973 6162 6c65 value to disable\n+0018ad10: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+0018ad20: 6f66 2074 6865 2070 6565 723c 2f64 6976 of the peer
    Definitio\n+0018ad50: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+0018ad60: 683a 3538 3430 3c2f 6469 763e 3c2f 6469 h:5840
    .

    Thi\n+0018ad90: 7320 616c 736f 2061 7373 756d 6573 2074 s also assumes t\n+0018ada0: 6861 7420 7468 6520 7365 7276 6572 2064 hat the server d\n+0018adb0: 6f65 7320 6e6f 7420 7265 7175 6972 6520 oes not require \n+0018adc0: 636c 6965 6e74 7320 746f 2061 7574 6865 clients to authe\n+0018add0: 6e74 6963 6174 6520 2874 6865 206b 6579 nticate (the key\n+0018ade0: 6669 6c65 2069 7320 6162 7365 6e74 292e file is absent).\n+0018adf0: 3c2f 703e 0a3c 703e 4d61 6b65 2073 7572

    .

    Make sur\n+0018ae00: 6520 796f 7520 6861 7665 2073 6967 6e61 e you have signa\n+0018ae10: 6c20 6861 6e64 6c65 7273 2073 6574 2069 l handlers set i\n+0018ae20: 6e20 796f 7572 2061 7070 6c69 6361 7469 n your applicati\n+0018ae30: 6f6e 2074 6f20 6361 7463 6820 6272 6f6b on to catch brok\n+0018ae40: 656e 2063 6f6e 6e65 6374 696f 6e73 2028 en connections (\n+0018ae50: 3c63 6f64 653e 5349 4750 4950 453c 2f63 SIGPIPE):

    .
    signal(SIGPIP\n+0018aea0: 452c 2073 6967 7069 7065 5f68 616e 646c E, sigpipe_handl\n+0018aeb0: 6529 3b3c 2f64 6976 3e0a 3c2f 6469 763e e);
    .
    \n+0018aec0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This wi\n+0018fd90: 6c6c 2073 656e 6420 6120 636f 6d70 7265 ll send a compre\n+0018fda0: 7373 6564 2053 4f41 502f 584d 4c20 7265 ssed SOAP/XML re\n+0018fdb0: 7175 6573 7420 746f 2061 2073 6572 7669 quest to a servi\n+0018fdc0: 6365 2c20 7072 6f76 6964 6564 2074 6861 ce, provided tha\n+0018fdd0: 7420 5a6c 6962 2069 7320 696e 7374 616c t Zlib is instal\n+0018fde0: 6c65 6420 616e 6420 6c69 6e6b 6564 2077 led and linked w\n+0018fdf0: 6974 6820 7468 6520 6170 706c 6963 6174 ith the applicat\n+0018fe00: 696f 6e20 616e 6420 7468 6520 636f 6d70 ion and the comp\n+0018fe10: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_GZIP option was\n+0018fe40: 2075 7365 6420 746f 2063 6f6d 7069 6c65 used to compile\n+0018fe50: 2074 6865 2073 6f75 7263 6573 2e20 5265 the sources. Re\n+0018fe60: 6365 6976 696e 6720 636f 6d70 7265 7373 ceiving compress\n+0018fe70: 6564 2053 4f41 502f 584d 4c20 6f76 6572 ed SOAP/XML over\n+0018fe80: 2048 5454 5020 6569 7468 6572 2069 6e20 HTTP either in \n+0018fe90: 677a 6970 206f 7220 6465 666c 6174 6520 gzip or deflate \n+0018fea0: 666f 726d 6174 7320 6973 2061 7574 6f6d formats is autom\n+0018feb0: 6174 6963 2e20 5468 6520 3c63 6f64 653e atic. The \n+0018fec0: 2353 4f41 505f 454e 435f 5a4c 4942 3c2f #SOAP_ENC_ZLIB flag does \n+0018fee0: 6e6f 7420 6861 7665 2074 6f20 6265 2073 not have to be s\n+0018fef0: 6574 2061 7420 7468 6520 7365 7276 6572 et at the server\n+0018ff00: 2073 6964 6520 746f 2061 6363 6570 7420 side to accept \n+0018ff10: 636f 6d70 7265 7373 6564 206d 6573 7361 compressed messa\n+0018ff20: 6765 732e 2052 6561 6469 6e67 2061 6e64 ges. Reading and\n+0018ff30: 2072 6563 6569 7669 6e67 2067 7a69 7020 receiving gzip \n+0018ff40: 636f 6d70 7265 7373 6564 2053 4f41 502f compressed SOAP/\n+0018ff50: 584d 4c20 7769 7468 6f75 7420 4854 5450 XML without HTTP\n+0018ff60: 2068 6561 6465 7273 2028 652e 672e 2077 headers (e.g. w\n+0018ff70: 6974 6820 6f74 6865 7220 7472 616e 7370 ith other transp\n+0018ff80: 6f72 7420 7072 6f74 6f63 6f6c 7329 2069 ort protocols) i\n+0018ff90: 7320 616c 736f 2061 7574 6f6d 6174 6963 s also automatic\n+0018ffa0: 2e3c 2f70 3e0a 3c70 3e54 6f20 636f 6e74 .

    .

    To cont\n+0018ffb0: 726f 6c20 7468 6520 6c65 7665 6c20 6f66 rol the level of\n+0018ffc0: 2063 6f6d 7072 6573 7369 6f6e 2066 6f72 compression for\n+0018ffd0: 206f 7574 626f 756e 6420 6d65 7373 6167 outbound messag\n+0018ffe0: 6573 2c20 796f 7520 6361 6e20 7365 7420 es, you can set \n+0018fff0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the so\n+001900b0: 6170 3a3a 7a5f 6c65 7665 6c3c 2f61 3e3c ap::z_level<\n+001900c0: 2f63 6f64 653e 2074 6f20 6120 7661 6c75 /code> to a valu\n+001900d0: 6520 6265 7477 6565 6e20 3120 616e 6420 e between 1 and \n+001900e0: 392c 2077 6865 7265 2031 2069 7320 7468 9, where 1 is th\n+001900f0: 6520 6265 7374 2073 7065 6564 2061 6e64 e best speed and\n+00190100: 2039 2069 7320 7468 6520 6265 7374 2063 9 is the best c\n+00190110: 6f6d 7072 6573 7369 6f6e 2028 6465 6661 ompression (defa\n+00190120: 756c 7420 6973 2036 292e 2046 6f72 2065 ult is 6). For e\n+00190130: 7861 6d70 6c65 3c2f 703e 0a3c 6469 7620 xample

    .
    soap_ini\n+001901c0: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); .
    soap_\n+00190270: 7365 745f 6f6d 6f64 653c 2f61 3e28 2661 set_omode(&a\n+00190280: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, SOAP_ENC_\n+00190310: 5a4c 4942 3c2f 613e 293b 203c 2f64 6976 ZLIB); .
    soap<\n+00190360: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.z_l\n+001903b0: 6576 656c 3c2f 613e 203d 2039 3b20 3c73 evel = 9; // best comp\n+001903e0: 7265 7373 696f 6e20 3c2f 7370 616e 3e3c ression <\n+001903f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00190440: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00190450: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+00190490: 6f61 703a 3a7a 5f6c 6576 656c 3c2f 613e oap::z_level\n+001904a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    unsign\n+001904c0: 6564 2073 686f 7274 207a 5f6c 6576 656c ed short z_level\n+001904d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    User-de\n+001904f0: 6669 6e61 626c 6520 636f 6d70 7265 7373 finable compress\n+00190500: 696f 6e20 6c65 7665 6c20 666f 7220 677a ion level for gz\n+00190510: 6970 2063 6f6d 7072 6573 7369 6f6e 2028 ip compression (\n+00190520: 303d 6e6f 6e65 2c20 313d 6661 7374 2074 0=none, 1=fast t\n+00190530: 6f20 393d 6265 7374 2920 6465 6661 756c o 9=best) defaul\n+00190540: 7420 6c65 7665 6c20 6973 2036 2e3c 2f64 t level is 6.
    Definit\n+00190570: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00190580: 322e 683a 3337 3034 3c2f 6469 763e 3c2f 2.h:3704
    .

    T\n+001905b0: 6f20 7665 7269 6679 2061 6e64 206d 6f6e o verify and mon\n+001905c0: 6974 6f72 2063 6f6d 7072 6573 7369 6f6e itor compression\n+001905d0: 2072 6174 6573 2c20 796f 7520 6361 6e20 rates, you can \n+001905e0: 7573 6520 7468 6520 7661 6c75 6573 203c use the values <\n+001905f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::z_ratio_\n+001906b0: 696e 3c2f 613e 3c2f 636f 6465 3e20 616e in an\n+001906c0: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap::z_ratio_o\n+00190780: 7574 3c2f 613e 3c2f 636f 6465 3e2e 2054 ut. T\n+00190790: 6865 7365 2074 776f 2066 6c6f 6174 2076 hese two float v\n+001907a0: 616c 7565 7320 6c69 6520 6265 7477 6565 alues lie betwee\n+001907b0: 6e20 302e 3020 616e 6420 312e 3020 616e n 0.0 and 1.0 an\n+001907c0: 6420 6578 7072 6573 7320 7468 6520 7261 d express the ra\n+001907d0: 7469 6f20 6f66 2074 6865 2063 6f6d 7072 tio of the compr\n+001907e0: 6573 7365 6420 6d65 7373 6167 6520 6c65 essed message le\n+001907f0: 6e67 7468 206f 7665 7220 756e 636f 6d70 ngth over uncomp\n+00190800: 7265 7373 6564 206d 6573 7361 6765 206c ressed message l\n+00190810: 656e 6774 682e 3c2f 703e 0a3c 6469 7620 ength.

    ..
    else\n+00190970: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00190990: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    ...\n+00190b40: 203c 7370 616e 2063 6c61 7373 3d22 636f // succes\n+00190b60: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n+00190b70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00190b80: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    \n+00190c50: 666c 6f61 7420 7a5f 7261 7469 6f5f 696e float z_ratio_in\n+00190c60: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    The com\n+00190c80: 7072 6573 7369 6f6e 2072 6174 696f 203d pression ratio =\n+00190c90: 2063 6f6d 7072 6573 7365 642e 7369 7a65 compressed.size\n+00190ca0: 2f75 6e63 6f6d 7072 6573 7365 642e 7369 /uncompressed.si\n+00190cb0: 7a65 206f 6620 7468 6520 636f 6d70 7265 ze of the compre\n+00190cc0: 7373 6564 206d 6573 7361 6765 2072 6563 ssed message rec\n+00190cd0: 6569 7665 642e 3c2f 6469 763e 3c64 6976 eived.
    <\n+00190cf0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:370\n+00190d10: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .
    soap::z_r\n+00190dc0: 6174 696f 5f6f 7574 3c2f 613e 3c2f 6469 atio_out
    float z_ra\n+00190df0: 7469 6f5f 6f75 743c 2f64 6976 3e3c 6469 tio_out
    \n+00190e10: 5468 6520 636f 6d70 7265 7373 696f 6e20 The compression \n+00190e20: 7261 7469 6f20 3d20 636f 6d70 7265 7373 ratio = compress\n+00190e30: 6564 2e73 697a 652f 756e 636f 6d70 7265 ed.size/uncompre\n+00190e40: 7373 6564 2e73 697a 6520 6f66 2074 6865 ssed.size of the\n+00190e50: 2063 6f6d 7072 6573 7365 6420 6d65 7373 compressed mess\n+00190e60: 6167 6520 7365 6e74 2e3c 2f64 6976 3e3c age sent.
    <\n+00190e70: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00190e80: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00190e90: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00190ea0: 3337 3134 3c2f 6469 763e 3c2f 6469 763e 3714
    \n+00190eb0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Note:\n+00190ed0: 206c 6f77 6572 2072 6174 696f 7320 6d65 lower ratios me\n+00190ee0: 616e 2068 6967 6865 7220 636f 6d70 7265 an higher compre\n+00190ef0: 7373 696f 6e20 7261 7465 732e 3c2f 703e ssion rates.

    \n+00190f00: 0a3c 703e 436f 6d70 7265 7373 6564 2074 .

    Compressed t\n+00190f10: 7261 6e73 6665 7273 2072 6571 7569 7265 ransfers require\n+00190f20: 2062 7566 6665 7269 6e67 2074 6865 2065 buffering the e\n+00190f30: 6e74 6972 6520 6f75 7470 7574 206d 6573 ntire output mes\n+00190f40: 7361 6765 2074 6f20 6465 7465 726d 696e sage to determin\n+00190f50: 6520 4854 5450 206d 6573 7361 6765 206c e HTTP message l\n+00190f60: 656e 6774 682e 2054 6869 7320 6d65 616e ength. This mean\n+00190f70: 7320 7468 6174 2074 6865 203c 636f 6465 s that the #SOAP_IO_STORE<\n+00190f90: 2f63 6f64 653e 2066 6c61 6720 6973 2061 /code> flag is a\n+00190fa0: 7574 6f6d 6174 6963 616c 6c79 2073 6574 utomatically set\n+00190fb0: 2077 6865 6e20 7468 6520 3c63 6f64 653e when the \n+00190fc0: 2353 4f41 505f 454e 435f 5a4c 4942 3c2f #SOAP_ENC_ZLIB flag is se\n+00190fe0: 7420 746f 2073 656e 6420 636f 6d70 7265 t to send compre\n+00190ff0: 7373 6564 206d 6573 7361 6765 732e 2054 ssed messages. T\n+00191000: 6865 2075 7365 206f 6620 4854 5450 2063 he use of HTTP c\n+00191010: 6875 6e6b 696e 6720 7369 676e 6966 6963 hunking signific\n+00191020: 616e 746c 7920 7265 6475 6365 7320 6d65 antly reduces me\n+00191030: 6d6f 7279 2075 7361 6765 2061 6e64 206d mory usage and m\n+00191040: 6179 2073 7065 6564 2075 7020 7468 6520 ay speed up the \n+00191050: 7472 616e 736d 6973 7369 6f6e 206f 6620 transmission of \n+00191060: 636f 6d70 7265 7373 6564 2053 4f41 502f compressed SOAP/\n+00191070: 584d 4c20 6d65 7373 6167 6573 2e20 5468 XML messages. Th\n+00191080: 6973 2069 7320 6163 636f 6d70 6c69 7368 is is accomplish\n+00191090: 6564 2062 7920 7365 7474 696e 6720 7468 ed by setting th\n+001910a0: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO\n+001910b0: 5f43 4855 4e4b 3c2f 636f 6465 3e20 666c _CHUNK fl\n+001910c0: 6167 2077 6974 6820 3c63 6f64 653e 2353 ag with #S\n+001910d0: 4f41 505f 454e 435f 5a4c 4942 3c2f 636f OAP_ENC_ZLIB for the outp\n+001910f0: 7574 206d 6f64 652e 2048 6f77 6576 6572 ut mode. However\n+00191100: 2c20 736f 6d65 2057 6562 2073 6572 7665 , some Web serve\n+00191110: 7273 2064 6f20 6e6f 7420 6163 6365 7074 rs do not accept\n+00191120: 2048 5454 5020 6368 756e 6b65 6420 7265 HTTP chunked re\n+00191130: 7175 6573 7420 6d65 7373 6167 6573 2028 quest messages (\n+00191140: 6576 656e 2077 6865 6e20 7468 6579 2072 even when they r\n+00191150: 6574 7572 6e20 4854 5450 2063 6875 6e6b eturn HTTP chunk\n+00191160: 6564 206d 6573 7361 6765 7321 292e 2053 ed messages!). S\n+00191170: 7461 6e64 2d61 6c6f 6e65 2067 534f 4150 tand-alone gSOAP\n+00191180: 2073 6572 7669 6365 7320 616c 7761 7973 services always\n+00191190: 2061 6363 6570 7420 6368 756e 6b65 6420 accept chunked \n+001911a0: 7265 7175 6573 7420 6d65 7373 6167 6573 request messages\n+001911b0: 2e3c 2f70 3e0a 3c70 3e54 6f20 7265 7374 .

    .

    To rest\n+001911c0: 7269 6374 2074 6865 2063 6f6d 7072 6573 rict the compres\n+001911d0: 7369 6f6e 2074 6f20 7468 6520 6465 666c sion to the defl\n+001911e0: 6174 6520 666f 726d 6174 206f 6e6c 792c ate format only,\n+001911f0: 2063 6f6d 7069 6c65 2074 6865 2073 6f75 compile the sou\n+00191200: 7263 6573 2077 6974 6820 7468 6520 636f rces with the co\n+00191210: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n+00191220: 3c63 6f64 653e 2357 4954 485f 5a4c 4942 #WITH_ZLIB\n+00191230: 3c2f 636f 6465 3e2e 2054 6869 7320 6c69 . This li\n+00191240: 6d69 7473 2063 6f6d 7072 6573 7369 6f6e mits compression\n+00191250: 2061 6e64 2064 6563 6f6d 7072 6573 7369 and decompressi\n+00191260: 6f6e 2074 6f20 7468 6520 6465 666c 6174 on to the deflat\n+00191270: 6520 666f 726d 6174 2e20 4f6e 6c79 2070 e format. Only p\n+00191280: 6c61 696e 2061 6e64 2064 6566 6c61 7465 lain and deflate\n+00191290: 6420 6d65 7373 6167 6573 2063 616e 2062 d messages can b\n+001912a0: 6520 6578 6368 616e 6765 642c 2067 7a69 e exchanged, gzi\n+001912b0: 7020 6973 206e 6f74 2073 7570 706f 7274 p is not support\n+001912c0: 6564 2077 6974 6820 7468 6973 206f 7074 ed with this opt\n+001912d0: 696f 6e2e 2052 6563 6569 7669 6e67 2067 ion. Receiving g\n+001912e0: 7a69 7020 636f 6d70 7265 7373 6564 2063 zip compressed c\n+001912f0: 6f6e 7465 6e74 2069 7320 6175 746f 6d61 ontent is automa\n+00191300: 7469 632c 2065 7665 6e20 696e 2074 6865 tic, even in the\n+00191310: 2061 6273 656e 6365 206f 6620 4854 5450 absence of HTTP\n+00191320: 2068 6561 6465 7273 2e20 5265 6365 6976 headers. Receiv\n+00191330: 696e 6720 6465 666c 6174 6520 636f 6d70 ing deflate comp\n+00191340: 7265 7373 6564 2063 6f6e 7465 6e74 2069 ressed content i\n+00191350: 7320 6e6f 7420 6175 746f 6d61 7469 6320 s not automatic \n+00191360: 696e 2074 6865 2061 6273 656e 6365 206f in the absence o\n+00191370: 6620 4854 5450 2068 6561 6465 7273 2061 f HTTP headers a\n+00191380: 6e64 2072 6571 7569 7265 7320 7468 6520 nd requires the \n+00191390: 666c 6167 203c 636f 6465 3e23 534f 4150 flag #SOAP\n+001913a0: 5f45 4e43 5f5a 4c49 423c 2f63 6f64 653e _ENC_ZLIB\n+001913b0: 2074 6f20 6265 2073 6574 2066 6f72 2074 to be set for t\n+001913c0: 6865 2069 6e70 7574 206d 6f64 6520 746f he input mode to\n+001913d0: 2064 6563 6f6d 7072 6573 7320 6465 666c decompress defl\n+001913e0: 6174 6564 2064 6174 612e 3c2f 703e 0a3c ated data.

    .<\n+001913f0: 646c 2063 6c61 7373 3d22 7365 6374 696f dl class=\"sectio\n+00191400: 6e20 7761 726e 696e 6722 3e3c 6474 3e57 n warning\">
    W\n+00191410: 6172 6e69 6e67 3c2f 6474 3e3c 6464 3e49 arning
    I\n+00191420: 7420 6973 2069 6d70 6f72 7461 6e74 2074 t is important t\n+00191430: 6861 7420 7468 6520 3c63 6f64 653e 2357 hat the #W\n+00191440: 4954 485f 475a 4950 3c2f 636f 6465 3e20 ITH_GZIP \n+00191450: 616e 6420 3c63 6f64 653e 2357 4954 485f and #WITH_\n+00191460: 5a4c 4942 3c2f 636f 6465 3e20 6d61 6372 ZLIB macr\n+00191470: 6f73 206d 7573 7420 6265 2063 6f6e 7369 os must be consi\n+00191480: 7374 656e 746c 7920 6465 6669 6e65 6420 stently defined \n+00191490: 746f 2063 6f6d 7069 6c65 2074 6865 2073 to compile the s\n+001914a0: 6f75 7263 6573 2c20 7375 6368 2061 7320 ources, such as \n+001914b0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+001914c0: 7374 6473 6f61 7032 2e63 7070 3c2f 636f stdsoap2.cpp, soapC.cpp, <\n+00191500: 636f 6465 3e73 6f61 7043 6c69 656e 742e code>soapClient.\n+00191510: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2c cpp,\n+00191520: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS\n+00191530: 6572 7665 722e 6370 703c 2f63 6f64 653e erver.cpp\n+00191540: 3c2f 656d 3e2c 2061 6e64 2061 6c6c 2061 , and all a\n+00191550: 7070 6c69 6361 7469 6f6e 2073 6f75 7263 pplication sourc\n+00191560: 6573 2074 6861 7420 696e 636c 7564 6520 es that include \n+00191570: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+00191580: 7374 6473 6f61 7032 2e68 3c2f 636f 6465 stdsoap2.h or soapH.h. If the \n+001915c0: 6d61 6372 6f73 2061 7265 206e 6f74 2063 macros are not c\n+001915d0: 6f6e 7369 7374 656e 746c 7920 7573 6564 onsistently used\n+001915e0: 2c20 7468 6520 6170 706c 6963 6174 696f , the applicatio\n+001915f0: 6e20 7769 6c6c 2063 7261 7368 2064 7565 n will crash due\n+00191600: 2074 6f20 6120 6d69 736d 6174 6368 6573 to a mismatches\n+00191610: 2069 6e20 7468 6520 6465 636c 6172 6174 in the declarat\n+00191620: 696f 6e20 616e 6420 6163 6365 7373 206f ion and access o\n+00191630: 6620 7468 6520 3c63 6f64 653e 3c61 2063 f the soap\n+00191690: 3c2f 636f 6465 3e20 636f 6e74 6578 742e context.\n+001916a0: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e f09f
    .

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

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

    .Cl\n+00191710: 6965 6e74 2d73 6964 6520 636f 6f6b 6965 ient-side cookie\n+00191720: 2073 7570 706f 7274 3c2f 6832 3e0a 3c70 support

    .Client-side coo\n+00191740: 6b69 6520 7375 7070 6f72 7420 6973 206f kie support is o\n+00191750: 7074 696f 6e61 6c2e 2054 6f20 656e 6162 ptional. To enab\n+00191760: 6c65 2063 6f6f 6b69 6520 7375 7070 6f72 le cookie suppor\n+00191770: 742c 2063 6f6d 7069 6c65 2061 6c6c 2073 t, compile all s\n+00191780: 6f75 7263 6573 2077 6974 6820 7468 6520 ources with the \n+00191790: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n+001917a0: 6720 3c63 6f64 653e 2357 4954 485f 434f g #WITH_CO\n+001917b0: 4f4b 4945 533c 2f63 6f64 653e 2c20 666f OKIES, fo\n+001917c0: 7220 6578 616d 706c 653a 203c 2f70 3e3c r example:

    <\n+001917d0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+001917e0: 656e 7422 3e20 632b 2b20 2d44 5749 5448 ent\"> c++ -DWITH\n+001917f0: 5f43 4f4f 4b49 4553 202d 6f20 6d79 636c _COOKIES -o mycl\n+00191800: 6965 6e74 2073 7464 736f 6170 322e 6370 ient stdsoap2.cp\n+00191810: 7020 736f 6170 432e 6370 7020 736f 6170 p soapC.cpp soap\n+00191820: 436c 6965 6e74 2e63 7070 0a3c 2f70 7265 Client.cpp.

    or add the \n+00191840: 666f 6c6c 6f77 696e 6720 6c69 6e65 2074 following line t\n+00191850: 6f20 3c65 6d3e 3c63 6f64 653e 7374 6473 o stds\n+00191860: 6f61 702e 683c 2f63 6f64 653e 3c2f 656d oap.h:

    .
    <\n+001918a0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001918b0: 726f 6365 7373 6f72 223e 2364 6566 696e rocessor\">#defin\n+001918c0: 6520 5749 5448 5f43 4f4f 4b49 4553 3c2f e WITH_COOKIES
    .

    Client-sid\n+00191900: 6520 636f 6f6b 6965 2073 7570 706f 7274 e cookie support\n+00191910: 2069 7320 6675 6c6c 7920 6175 746f 6d61 is fully automa\n+00191920: 7469 632e 2053 6f20 6a75 7374 2063 6f6d tic. So just com\n+00191930: 7069 6c65 203c 656d 3e3c 636f 6465 3e67 pile g\n+00191940: 736f 6170 2f73 7464 736f 6170 322e 6370 soap/stdsoap2.cp\n+00191950: 703c 2f63 6f64 653e 3c2f 656d 3e20 7769 p wi\n+00191960: 7468 2074 6865 2063 6f6d 7069 6c65 2d74 th the compile-t\n+00191970: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n+00191980: 5749 5448 5f43 4f4f 4b49 4553 3c2f 636f WITH_COOKIES to enable co\n+001919a0: 6f6b 6965 2d62 6173 6564 2073 6573 7369 okie-based sessi\n+001919b0: 6f6e 2063 6f6e 7472 6f6c 2069 6e20 796f on control in yo\n+001919c0: 7572 2063 6c69 656e 742e 3c2f 703e 0a3c ur client.

    .<\n+001919d0: 703e 4120 636f 6f6b 6965 2073 746f 7265 p>A cookie store\n+001919e0: 2077 6974 6820 636f 6f6b 6965 7320 6973 with cookies is\n+001919f0: 206b 6570 7420 616e 6420 7265 7475 726e kept and return\n+00191a00: 6564 2074 6f20 7468 6520 6170 7072 6f70 ed to the approp\n+00191a10: 7269 6174 6520 7365 7276 6572 7320 7768 riate servers wh\n+00191a20: 656e 2074 6865 2063 6c69 656e 7420 636f en the client co\n+00191a30: 6e6e 6563 7473 2074 6f20 7468 6573 6520 nnects to these \n+00191a40: 7365 7276 6572 732e 2043 6f6f 6b69 6573 servers. Cookies\n+00191a50: 2061 7265 206e 6f74 2061 7574 6f6d 6174 are not automat\n+00191a60: 6963 616c 6c79 2073 6176 6564 2074 6f20 ically saved to \n+00191a70: 6120 6669 6c65 2062 7920 6120 636c 6965 a file by a clie\n+00191a80: 6e74 2e20 416e 2065 7861 6d70 6c65 2063 nt. An example c\n+00191a90: 6f6f 6b69 6520 6669 6c65 206d 616e 6167 ookie file manag\n+00191aa0: 6572 2069 7320 696e 636c 7564 6564 2061 er is included a\n+00191ab0: 7320 616e 2065 7874 7261 7320 696e 2074 s an extras in t\n+00191ac0: 6865 2067 534f 4150 2070 6163 6b61 6765 he gSOAP package\n+00191ad0: 2e20 596f 7520 6361 6e20 7265 6d6f 7665 . You can remove\n+00191ae0: 2061 6c6c 2063 6f6f 6b69 6573 2066 726f all cookies fro\n+00191af0: 6d20 6120 3c63 6f64 653e 3c61 2063 6c61 m a soap context by\n+00191b60: 2063 616c 6c69 6e67 203c 636f 6465 3e73 calling s\n+00191b70: 6f61 705f 6672 6565 5f63 6f6f 6b69 6573 oap_free_cookies\n+00191b80: 2873 6f61 7029 3c2f 636f 6465 3e2c 2077 (soap), w\n+00191b90: 6869 6368 2061 6c73 6f20 6861 7070 656e hich also happen\n+00191ba0: 7320 7768 656e 2079 6f75 2063 616c 6c20 s when you call \n+00191bb0: 3c63 6f64 653e 736f 6170 5f64 6f6e 6528 soap_done(\n+00191bc0: 736f 6170 293c 2f63 6f64 653e 2e3c 2f70 soap)..

    To avoid \"c\n+00191be0: 6f6f 6b69 6520 7374 6f72 6d73 2220 6361 ookie storms\" ca\n+00191bf0: 7573 6564 2062 7920 6d61 6c69 6369 6f75 used by maliciou\n+00191c00: 7320 7365 7276 6572 7320 7468 6174 2072 s servers that r\n+00191c10: 6574 7572 6e20 616e 2075 6e72 6561 736f eturn an unreaso\n+00191c20: 6e61 626c 6520 616d 6f75 6e74 206f 6620 nable amount of \n+00191c30: 636f 6f6b 6965 732c 2067 534f 4150 2063 cookies, gSOAP c\n+00191c40: 6c69 656e 7473 2f73 6572 7665 7273 2061 lients/servers a\n+00191c50: 7265 206c 696d 6974 6564 2074 6f20 6120 re limited to a \n+00191c60: 636f 6f6b 6965 2073 746f 7265 2073 697a cookie store siz\n+00191c70: 6520 6f66 203c 636f 6465 3e3c 6120 636c e of soap::cookie_\n+00191d40: 6d61 783c 2f61 3e3c 2f63 6f64 653e 2074 max t\n+00191d50: 6861 7420 7468 6520 7573 6572 2063 616e hat the user can\n+00191d60: 2063 6861 6e67 652c 2066 6f72 2065 7861 change, for exa\n+00191d70: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    \n+00191d90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+00191dc0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+00191df0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00191e20: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n+00191e80: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); ..<\n+00191f40: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00191f50: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+00191f60: 6874 6d6c 5f61 3434 6264 3766 6338 6261 html_a44bd7fc8ba\n+00191f70: 3038 6231 6465 6332 6630 3832 3939 6437 08b1dec2f08299d7\n+00191f80: 6637 3233 6464 223e 3c64 6976 2063 6c61 f723dd\">
    soap::co\n+00191fe0: 6f6b 6965 5f6d 6178 3c2f 613e 3c2f 6469 okie_max
    int cookie\n+00192010: 5f6d 6178 3c2f 6469 763e 3c64 6976 2063 _max
    Use\n+00192030: 722d 6465 6669 6e61 626c 6520 6d61 7869 r-definable maxi\n+00192040: 6d75 6d20 6e75 6d62 6572 206f 6620 6163 mum number of ac\n+00192050: 7469 7665 2063 6f6f 6b69 6573 2061 6c6c tive cookies all\n+00192060: 6f77 6564 2074 6f20 6265 2073 6574 2077 owed to be set w\n+00192070: 6974 6820 736f 6170 5f73 6574 5f63 6f6f ith soap_set_coo\n+00192080: 6b69 6520 6265 666f 7265 2063 6f6f 6b69 kie before cooki\n+00192090: 6520 2e2e 2e3c 2f64 6976 3e3c 6469 7620 e ...
    Definition:\n+001920c0: 2073 7464 736f 6170 322e 683a 3239 3733 stdsoap2.h:2973\n+001920d0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    The cooki\n+00192100: 6520 7374 6f72 6520 6973 2061 206c 696e e store is a lin\n+00192110: 6b65 6420 6c69 7374 206f 6620 3c63 6f64 ked list of soap_co\n+00192170: 6f6b 6965 3c2f 613e 3c2f 636f 6465 3e20 okie \n+00192180: 7374 7275 6374 7572 6573 2070 6f69 6e74 structures point\n+00192190: 6564 2074 6f20 6279 203c 636f 6465 3e3c ed to by <\n+001921a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001921b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+001921c0: 6d6c 2361 6365 6664 6134 3434 3630 6432 ml#acefda44460d2\n+001921d0: 3639 3130 3533 3230 6531 6562 6531 3836 69105320e1ebe186\n+001921e0: 3630 3866 2220 7469 746c 653d 2254 6865 608f\" title=\"The\n+001921f0: 2063 6f6f 6b69 6520 7374 6f72 6520 6973 cookie store is\n+00192200: 2061 206c 696e 6b65 6420 6c69 7374 206f a linked list o\n+00192210: 6620 636f 6f6b 6965 732e 223e 736f 6170 f cookies.\">soap\n+00192220: 3a3a 636f 6f6b 6965 733c 2f61 3e3c 2f63 ::cookies.

    .

    Sin\n+00192240: 6365 2074 6865 2063 6f6f 6b69 6520 7374 ce the cookie st\n+00192250: 6f72 6520 6973 206c 696e 6b65 6420 746f ore is linked to\n+00192260: 2074 6865 2063 7572 7265 6e74 203c 636f the current s\n+001922c0: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+001922d0: 6f6e 7465 7874 2c20 616e 6420 6561 6368 ontext, and each\n+001922e0: 2074 6872 6561 6420 6d75 7374 2075 7365 thread must use\n+001922f0: 2069 7473 206f 776e 2063 6f6e 7465 7874 its own context\n+00192300: 2c20 6561 6368 2074 6872 6561 6420 616c , each thread al\n+00192310: 736f 2068 6173 2069 7473 206f 776e 2063 so has its own c\n+00192320: 6f6f 6b69 6520 7374 6f72 652e 3c2f 703e ookie store.

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

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

    .

    <\n+00192390: 2f61 3e0a 5365 7276 6572 2d73 6964 6520 /a>.Server-side \n+001923a0: 636f 6f6b 6965 2073 7570 706f 7274 3c2f cookie support.

    This feat\n+001923c0: 7572 6520 6973 206e 6f74 2072 6563 6f6d ure is not recom\n+001923d0: 6d65 6e64 6564 2074 6f20 696d 706c 656d mended to implem\n+001923e0: 656e 7420 7374 6174 6520 696e 2073 7461 ent state in sta\n+001923f0: 6e64 2d61 6c6f 6e65 2073 6572 7665 7273 nd-alone servers\n+00192400: 2e20 436f 6f6b 6965 7320 6d61 7920 7265 . Cookies may re\n+00192410: 7175 6972 6520 6120 6661 6972 2061 6d6f quire a fair amo\n+00192420: 756e 7420 6f66 2070 726f 6365 7373 696e unt of processin\n+00192430: 6720 6f76 6572 6865 6164 2061 6e64 2061 g overhead and a\n+00192440: 7265 206e 6f74 2069 6e20 6661 6374 206e re not in fact n\n+00192450: 6565 6465 6420 746f 2069 6d70 6c65 6d65 eeded to impleme\n+00192460: 6e74 2073 7461 7465 6675 6c20 7365 7276 nt stateful serv\n+00192470: 6963 6573 2c20 7768 6963 6820 6973 2074 ices, which is t\n+00192480: 7970 6963 616c 6c79 2070 6572 666f 726d ypically perform\n+00192490: 6564 2077 6974 6820 7365 7373 696f 6e20 ed with session \n+001924a0: 4944 7320 696e 2058 4d4c 2f4a 534f 4e20 IDs in XML/JSON \n+001924b0: 6d65 7373 6167 6573 206f 7220 6279 2070 messages or by p\n+001924c0: 6173 7369 6e67 2074 6865 2073 6573 7369 assing the sessi\n+001924d0: 6f6e 2049 4473 2076 6961 2074 6865 2055 on IDs via the U\n+001924e0: 524c 2e3c 2f70 3e0a 3c70 3e53 6572 7665 RL.

    .

    Serve\n+001924f0: 722d 7369 6465 2063 6f6f 6b69 6520 7375 r-side cookie su\n+00192500: 7070 6f72 7420 6973 206f 7074 696f 6e61 pport is optiona\n+00192510: 6c2e 2054 6f20 656e 6162 6c65 2063 6f6f l. To enable coo\n+00192520: 6b69 6520 7375 7070 6f72 742c 2063 6f6d kie support, com\n+00192530: 7069 6c65 2061 6c6c 2073 6f75 7263 6573 pile all sources\n+00192540: 2077 6974 6820 636f 6d70 696c 652d 7469 with compile-ti\n+00192550: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W\n+00192560: 4954 485f 434f 4f4b 4945 533c 2f63 6f64 ITH_COOKIES:

     c\n+00192590: 2b2b 202d 4457 4954 485f 434f 4f4b 4945  ++ -DWITH_COOKIE\n+001925a0: 5320 2d6f 206d 7973 6572 7665 7220 2e2e  S -o myserver ..\n+001925b0: 2e0a 3c2f 7072 653e 3c70 3e20 5365 6520  ..

    See \n+001925c0: 4150 4920 646f 6375 6d65 6e74 6174 696f API documentatio\n+001925d0: 6e20 4d6f 6475 6c65 203c 6120 636c 6173 n Module HTTP co\n+00192610: 6f6b 6965 2066 756e 6374 696f 6e73 3c2f okie functions for the cooki\n+00192630: 6520 4150 4920 6675 6e63 7469 6f6e 732e e API functions.\n+00192640: 2053 6565 2074 6865 203c 6120 6872 6566 See the HTTP sessions \n+00192680: 706c 7567 696e 3c2f 613e 2066 6f72 2048 plugin for H\n+00192690: 5454 5020 7365 7373 696f 6e20 6d61 6e61 TTP session mana\n+001926a0: 6765 6d65 6e74 2077 6974 6820 636f 6f6b gement with cook\n+001926b0: 6965 7320 7468 6174 2069 7320 7265 7175 ies that is requ\n+001926c0: 6972 6564 2066 6f72 2073 6572 7665 722d ired for server-\n+001926d0: 7369 6465 2073 6573 7369 6f6e 2063 6f6e side session con\n+001926e0: 7472 6f6c 2e20 5468 6520 3c63 6f64 653e trol. The \n+001926f0: 2357 4954 485f 434f 4f4b 4945 533c 2f63 #WITH_COOKIES flag is use\n+00192710: 6c65 7373 2077 6974 686f 7574 2073 6572 less without ser\n+00192720: 7665 722d 7369 6465 2073 6573 7369 6f6e ver-side session\n+00192730: 206d 616e 6167 656d 656e 7420 616e 6420 management and \n+00192740: 636f 6e74 726f 6c2e 3c2f 703e 0a3c 703e control.

    .

    \n+00192750: 4865 7265 2069 7320 616e 206f 7665 7276 Here is an overv\n+00192760: 6965 7720 6f66 2074 6865 2063 6f6f 6b69 iew of the cooki\n+00192770: 6520 4150 4920 6675 6e63 7469 6f6e 733a e API functions:\n+00192780: 3c2f 703e 0a3c 756c 3e0a 3c6c 693e 3c63

    .
      .
    • struct soap_cookie *soap_set_cook\n+00192800: 6965 2873 7472 7563 7420 736f 6170 202a ie(struct soap *\n+00192810: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+00192820: 202a 6e61 6d65 2c20 636f 6e73 7420 6368 *name, const ch\n+00192830: 6172 202a 7661 6c75 652c 2063 6f6e 7374 ar *value, const\n+00192840: 2063 6861 7220 2a64 6f6d 6169 6e2c 2063 char *domain, c\n+00192850: 6f6e 7374 2063 6861 7220 2a70 6174 6829 onst char *path)\n+00192860: 3b3c 2f63 6f64 653e 2054 6869 7320 6675 ; This fu\n+00192870: 6e63 7469 6f6e 2061 6464 7320 6120 636f nction adds a co\n+00192880: 6f6b 6965 2074 6f20 7468 6520 636f 6f6b okie to the cook\n+00192890: 6965 2073 746f 7265 2061 7420 7468 6520 ie store at the \n+001928a0: 7365 7276 6572 2073 6964 652c 2069 6620 server side, if \n+001928b0: 6e6f 7420 616c 7265 6164 7920 7468 6572 not already ther\n+001928c0: 652c 2077 6974 6820 7468 6520 7370 6563 e, with the spec\n+001928d0: 6966 6965 6420 3c63 6f64 653e 6e61 6d65 ified name\n+001928e0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and value. \n+00192900: 5468 6520 3c63 6f64 653e 646f 6d61 696e The domain\n+00192910: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and path pa\n+00192930: 7261 6d65 7465 7273 2063 616e 2062 6520 rameters can be \n+00192940: 7370 6563 6966 6965 6420 6f72 2063 616e specified or can\n+00192950: 2062 6520 4e55 4c4c 2074 6f20 7573 6520 be NULL to use \n+00192960: 7468 6520 6375 7272 656e 7420 646f 6d61 the current doma\n+00192970: 696e 2061 6e64 2070 6174 6820 6769 7665 in and path give\n+00192980: 6e20 6279 203c 636f 6465 3e3c 6120 636c n by soa\n+00192a30: 703a 3a63 6f6f 6b69 655f 646f 6d61 696e p::cookie_domain\n+00192a40: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+00192a50: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::cook\n+00192b00: 6965 5f70 6174 683c 2f61 3e3c 2f63 6f64 ie_path. Returns poin\n+00192b20: 7465 7220 746f 2074 6865 2063 6f6f 6b69 ter to the cooki\n+00192b30: 6520 7374 7275 6374 7572 6520 696e 2074 e structure in t\n+00192b40: 6865 2064 6174 6162 6173 6520 6f72 204e he database or N\n+00192b50: 554c 4c20 7768 656e 2061 6e20 6572 726f ULL when an erro\n+00192b60: 7220 6f63 6375 7272 6564 2e3c 2f6c 693e r occurred.
    • \n+00192b70: 0a3c 6c69 3e3c 636f 6465 3e69 6e74 203c .
    • int <\n+00192b80: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00192b90: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00192ba0: 5f63 6f6f 6b69 6573 2e68 746d 6c23 6761 _cookies.html#ga\n+00192bb0: 6532 3235 3934 6637 6363 6464 3534 3736 e22594f7ccdd5476\n+00192bc0: 6263 6464 3933 3632 3662 3330 3036 6566 bcdd93626b3006ef\n+00192bd0: 2220 7469 746c 653d 2253 6574 2063 6f6f \" title=\"Set coo\n+00192be0: 6b69 6520 6578 7069 7261 7469 6f6e 2e22 kie expiration.\"\n+00192bf0: 3e73 6f61 705f 7365 745f 636f 6f6b 6965 >soap_set_cookie\n+00192c00: 5f65 7870 6972 6528 7374 7275 6374 2073 _expire(struct s\n+00192c10: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+00192c20: 2063 6861 7220 2a6e 616d 652c 206c 6f6e char *name, lon\n+00192c30: 6720 6578 7069 7265 2c20 636f 6e73 7420 g expire, const \n+00192c40: 6368 6172 202a 646f 6d61 696e 2c20 636f char *domain, co\n+00192c50: 6e73 7420 6368 6172 202a 7061 7468 293c nst char *path)<\n+00192c60: 2f61 3e3b 3c2f 636f 6465 3e20 5468 6973 /a>; This\n+00192c70: 2066 756e 6374 696f 6e20 7365 7473 2074 function sets t\n+00192c80: 6865 2065 7870 6972 6174 696f 6e20 6f66 he expiration of\n+00192c90: 2074 6865 2073 7065 6369 6669 6564 2063 the specified c\n+00192ca0: 6f6f 6b69 6520 3c63 6f64 653e 6e61 6d65 ookie name\n+00192cb0: 3c2f 636f 6465 3e20 696e 2073 6563 6f6e in secon\n+00192cc0: 6473 2061 6e64 2075 7064 6174 6573 2074 ds and updates t\n+00192cd0: 6865 2063 6f6f 6b69 6520 7374 6f72 6520 he cookie store \n+00192ce0: 6174 2074 6865 2073 6572 7665 7220 7369 at the server si\n+00192cf0: 6465 2e20 5468 6520 3c63 6f64 653e 646f de. The do\n+00192d00: 6d61 696e 3c2f 636f 6465 3e20 616e 6420 main and \n+00192d10: 3c63 6f64 653e 7061 7468 3c2f 636f 6465 path parameters can\n+00192d30: 2062 6520 7370 6563 6966 6965 6420 6f72 be specified or\n+00192d40: 2063 616e 2062 6520 4e55 4c4c 2074 6f20 can be NULL to \n+00192d50: 7573 6520 7468 6520 6375 7272 656e 7420 use the current \n+00192d60: 646f 6d61 696e 2061 6e64 2070 6174 6820 domain and path \n+00192d70: 6769 7665 6e20 6279 203c 636f 6465 3e3c given by <\n+00192d80: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00192d90: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00192da0: 6d6c 2361 6632 6563 6662 6165 3734 3064 ml#af2ecfbae740d\n+00192db0: 6137 3833 3961 3063 3563 3936 6562 3635 a7839a0c5c96eb65\n+00192dc0: 6462 3261 2220 7469 746c 653d 2255 7365 db2a\" title=\"Use\n+00192dd0: 722d 6465 6669 6e61 626c 6520 7374 7269 r-definable stri\n+00192de0: 6e67 2074 6861 7420 7370 6563 6966 6965 ng that specifie\n+00192df0: 7320 7468 6520 4854 5450 2063 6f6f 6b69 s the HTTP cooki\n+00192e00: 6520 646f 6d61 696e 206f 6620 7468 6520 e domain of the \n+00192e10: 7275 6e6e 696e 6720 7365 7276 6572 2e22 running server.\"\n+00192e20: 3e73 6f61 703a 3a63 6f6f 6b69 655f 646f >soap::cookie_do\n+00192e30: 6d61 696e 3c2f 613e 3c2f 636f 6465 3e20 main \n+00192e40: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::\n+00192ef0: 636f 6f6b 6965 5f70 6174 683c 2f61 3e3c cookie_path<\n+00192f00: 2f63 6f64 653e 2e20 5265 7475 726e 7320 /code>. Returns \n+00192f10: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status error c\n+00193000: 6f64 652e 3c2f 6c69 3e0a 3c6c 693e 3c63 ode.
    • .
    • int soap_set_c\n+00193090: 6f6f 6b69 655f 7365 6375 7265 2873 7472 ookie_secure(str\n+001930a0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+001930b0: 636f 6e73 7420 6368 6172 202a 6e61 6d65 const char *name\n+001930c0: 2c20 636f 6e73 7420 6368 6172 202a 646f , const char *do\n+001930d0: 6d61 696e 2c20 636f 6e73 7420 6368 6172 main, const char\n+001930e0: 202a 7061 7468 293c 2f61 3e3b 3c2f 636f *path); This functio\n+00193100: 6e20 7365 7473 2074 6865 2022 7365 6375 n sets the \"secu\n+00193110: 7265 2220 7072 6f70 6572 7479 206f 6620 re\" property of \n+00193120: 7468 6520 7370 6563 6966 6965 6420 636f the specified co\n+00193130: 6f6b 6965 203c 636f 6465 3e6e 616d 653c okie name<\n+00193140: 2f63 6f64 653e 2061 6e64 2075 7064 6174 /code> and updat\n+00193150: 6573 2074 6865 2063 6f6f 6b69 6520 7374 es the cookie st\n+00193160: 6f72 6520 6174 2074 6865 2073 6572 7665 ore at the serve\n+00193170: 7220 7369 6465 2e20 5468 6520 2273 6563 r side. The \"sec\n+00193180: 7572 6522 2070 726f 7065 7274 7920 6d65 ure\" property me\n+00193190: 616e 7320 7468 6174 2074 6869 7320 636f ans that this co\n+001931a0: 6f6b 6965 2073 686f 756c 6420 6265 2073 okie should be s\n+001931b0: 656e 7420 6279 2074 6865 2063 6c69 656e ent by the clien\n+001931c0: 7420 746f 2074 6865 2073 6572 7665 7220 t to the server \n+001931d0: 6f6e 6c79 2077 6865 6e20 6120 7365 6375 only when a secu\n+001931e0: 7265 2048 5454 5053 2063 6f6e 6e65 6374 re HTTPS connect\n+001931f0: 696f 6e20 6361 6e20 6265 2065 7374 6162 ion can be estab\n+00193200: 6c69 7368 6564 2e20 5768 656e 2048 5454 lished. When HTT\n+00193210: 5053 2069 7320 656e 6162 6c65 6420 616c PS is enabled al\n+00193220: 6c20 636f 6f6b 6965 7320 6172 6520 7365 l cookies are se\n+00193230: 6e74 2062 7920 7468 6520 7365 7276 6572 nt by the server\n+00193240: 2074 6f20 7468 6520 636c 6965 6e74 2077 to the client w\n+00193250: 6974 6820 7468 6520 2273 6563 7572 6522 ith the \"secure\"\n+00193260: 2070 726f 7065 7274 7920 7365 742c 2077 property set, w\n+00193270: 6869 6368 206d 6561 6e73 2074 6861 7420 hich means that \n+00193280: 7468 6973 2066 756e 6374 696f 6e20 6973 this function is\n+00193290: 2067 656e 6572 616c 6c79 206e 6f74 206e generally not n\n+001932a0: 6565 6465 6420 756e 6c65 7373 2074 6865 eeded unless the\n+001932b0: 2073 6572 7665 7220 6973 206e 6f74 2048 server is not H\n+001932c0: 5454 5053 2d65 6e61 626c 6564 2062 7574 TTPS-enabled but\n+001932d0: 2063 6f6f 6b69 6573 206d 7573 7420 6265 cookies must be\n+001932e0: 2073 6563 7572 652e 2054 6865 203c 636f secure. The domain\n+00193300: 2061 6e64 203c 636f 6465 3e70 6174 683c and path<\n+00193310: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n+00193320: 7320 6361 6e20 6265 2073 7065 6369 6669 s can be specifi\n+00193330: 6564 206f 7220 6361 6e20 6265 204e 554c ed or can be NUL\n+00193340: 4c20 746f 2075 7365 2074 6865 2063 7572 L to use the cur\n+00193350: 7265 6e74 2064 6f6d 6169 6e20 616e 6420 rent domain and \n+00193360: 7061 7468 2067 6976 656e 2062 7920 3c63 path given by soap::cook\n+00193420: 6965 5f64 6f6d 6169 6e3c 2f61 3e3c 2f63 ie_domain and <\n+00193440: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00193450: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00193460: 6d6c 2361 6664 6439 3163 6531 3138 3966 ml#afdd91ce1189f\n+00193470: 6564 6433 3265 6266 6135 3164 6436 6564 edd32ebfa51dd6ed\n+00193480: 3333 6562 2220 7469 746c 653d 2255 7365 33eb\" title=\"Use\n+00193490: 722d 6465 6669 6e61 626c 6520 7374 7269 r-definable stri\n+001934a0: 6e67 2074 6861 7420 7370 6563 6966 6965 ng that specifie\n+001934b0: 7320 7468 6520 4854 5450 2063 6f6f 6b69 s the HTTP cooki\n+001934c0: 6520 7061 7468 206f 6620 7468 6520 7275 e path of the ru\n+001934d0: 6e6e 696e 6720 7365 7276 6572 2e22 3e73 nning server.\">s\n+001934e0: 6f61 703a 3a63 6f6f 6b69 655f 7061 7468 oap::cookie_path\n+001934f0: 3c2f 613e 3c2f 636f 6465 3e2e 2052 6574 . Ret\n+00193500: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n+00193510: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n+00193520: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n+001935e0: 7573 3c2f 613e 3c2f 636f 6465 3e20 6572 us er\n+001935f0: 726f 7220 636f 6465 2e3c 2f6c 693e 0a3c ror code.
    • .<\n+00193600: 6c69 3e3c 636f 6465 3e69 6e74 203c 6120 li>int soap\n+00193680: 5f73 6574 5f63 6f6f 6b69 655f 7365 7373 _set_cookie_sess\n+00193690: 696f 6e28 7374 7275 6374 2073 6f61 7020 ion(struct soap \n+001936a0: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n+001936b0: 7220 2a6e 616d 652c 2063 6f6e 7374 2063 r *name, const c\n+001936c0: 6861 7220 2a64 6f6d 6169 6e2c 2063 6f6e har *domain, con\n+001936d0: 7374 2063 6861 7220 2a70 6174 6829 3c2f st char *path); This \n+001936f0: 6675 6e63 7469 6f6e 206d 616b 6573 2074 function makes t\n+00193700: 6865 2073 7065 6369 6669 6564 2063 6f6f he specified coo\n+00193710: 6b69 6520 3c63 6f64 653e 6e61 6d65 3c2f kie name a \"session\n+00193730: 2063 6f6f 6b69 6522 2061 6e64 2075 7064 cookie\" and upd\n+00193740: 6174 6573 2074 6865 2063 6f6f 6b69 6520 ates the cookie \n+00193750: 7374 6f72 6520 6174 2074 6865 2073 6572 store at the ser\n+00193760: 7665 7220 7369 6465 2062 7920 6d61 726b ver side by mark\n+00193770: 696e 6720 7468 6520 636f 6f6b 6965 2061 ing the cookie a\n+00193780: 7320 6120 7365 7373 696f 6e20 636f 6f6b s a session cook\n+00193790: 6965 2e20 5468 6973 206d 6561 6e73 2074 ie. This means t\n+001937a0: 6861 7420 7468 6520 636f 6f6b 6965 2077 hat the cookie w\n+001937b0: 696c 6c20 6265 2073 656e 7420 746f 2063 ill be sent to c\n+001937c0: 6c69 656e 7473 2074 6861 7420 636f 6e6e lients that conn\n+001937d0: 6563 7420 746f 2074 6865 2073 6572 7665 ect to the serve\n+001937e0: 722e 2054 6869 7320 6675 6e63 7469 6f6e r. This function\n+001937f0: 2069 7320 6e6f 7420 6e65 6564 6564 2077 is not needed w\n+00193800: 6865 6e20 6120 636f 6f6b 6965 2069 7320 hen a cookie is \n+00193810: 6d6f 6469 6669 6564 2077 6974 6820 3c63 modified with soap_set_c\n+001938a0: 6f6f 6b69 655f 6578 7069 7265 3c2f 613e ookie_expire\n+001938b0: 3c2f 636f 6465 3e2c 2066 6f72 2065 7861 , for exa\n+001938c0: 6d70 6c65 2c20 6265 6361 7573 6520 6d6f mple, because mo\n+001938d0: 6469 6669 6564 2063 6f6f 6b69 6573 2061 dified cookies a\n+001938e0: 7265 2061 6c77 6179 7320 7365 6e74 2062 re always sent b\n+001938f0: 6163 6b20 746f 2074 6865 2063 6c69 656e ack to the clien\n+00193900: 742e 2054 6865 203c 636f 6465 3e64 6f6d t. The dom\n+00193910: 6169 6e3c 2f63 6f64 653e 2061 6e64 203c ain and <\n+00193920: 636f 6465 3e70 6174 683c 2f63 6f64 653e code>path\n+00193930: 2070 6172 616d 6574 6572 7320 6361 6e20 parameters can \n+00193940: 6265 2073 7065 6369 6669 6564 206f 7220 be specified or \n+00193950: 6361 6e20 6265 204e 554c 4c20 746f 2075 can be NULL to u\n+00193960: 7365 2074 6865 2063 7572 7265 6e74 2064 se the current d\n+00193970: 6f6d 6169 6e20 616e 6420 7061 7468 2067 omain and path g\n+00193980: 6976 656e 2062 7920 3c63 6f64 653e 3c61 iven by \n+00193a30: 736f 6170 3a3a 636f 6f6b 6965 5f64 6f6d soap::cookie_dom\n+00193a40: 6169 6e3c 2f61 3e3c 2f63 6f64 653e 2061 ain a\n+00193a50: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::c\n+00193b00: 6f6f 6b69 655f 7061 7468 3c2f 613e 3c2f ookie_path. Returns <\n+00193b20: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+00193b40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+00193c00: 3c2f 636f 6465 3e20 6572 726f 7220 636f error co\n+00193c10: 6465 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f de..
    • void soap_clr_cookie\n+00193ca0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00193cb0: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n+00193cc0: 6e61 6d65 2c20 636f 6e73 7420 6368 6172 name, const char\n+00193cd0: 202a 646f 6d61 696e 2c20 636f 6e73 7420 *domain, const \n+00193ce0: 6368 6172 202a 7061 7468 293c 2f61 3e3b char *path);\n+00193cf0: 3c2f 636f 6465 3e20 5468 6973 2066 756e This fun\n+00193d00: 6374 696f 6e20 6465 6c65 7465 7320 7468 ction deletes th\n+00193d10: 6520 7370 6563 6966 6965 6420 636f 6f6b e specified cook\n+00193d20: 6965 203c 636f 6465 3e6e 616d 653c 2f63 ie name from the co\n+00193d40: 6f6b 6965 2073 746f 7265 2061 7420 7468 okie store at th\n+00193d50: 6520 7365 7276 6572 2073 6964 652e 2054 e server side. T\n+00193d60: 6865 203c 636f 6465 3e64 6f6d 6169 6e3c he domain<\n+00193d70: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and path par\n+00193d90: 616d 6574 6572 7320 6361 6e20 6265 2073 ameters can be s\n+00193da0: 7065 6369 6669 6564 206f 7220 6361 6e20 pecified or can \n+00193db0: 6265 204e 554c 4c20 746f 2075 7365 2074 be NULL to use t\n+00193dc0: 6865 2063 7572 7265 6e74 2064 6f6d 6169 he current domai\n+00193dd0: 6e20 616e 6420 7061 7468 2067 6976 656e n and path given\n+00193de0: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soap\n+00193e90: 3a3a 636f 6f6b 6965 5f64 6f6d 6169 6e3c ::cookie_domain<\n+00193ea0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+00193eb0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::cooki\n+00193f60: 655f 7061 7468 3c2f 613e 3c2f 636f 6465 e_path.
    • .
    • int soap_clr_\n+00194000: 636f 6f6b 6965 5f73 6573 7369 6f6e 2873 cookie_session(s\n+00194010: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00194020: 2c20 636f 6e73 7420 6368 6172 202a 6e61 , const char *na\n+00194030: 6d65 2c20 636f 6e73 7420 6368 6172 202a me, const char *\n+00194040: 646f 6d61 696e 2c20 636f 6e73 7420 6368 domain, const ch\n+00194050: 6172 202a 7061 7468 293c 2f61 3e3b 3c2f ar *path); This funct\n+00194070: 696f 6e20 636c 6561 7273 2074 6865 2073 ion clears the s\n+00194080: 6573 7369 6f6e 2070 726f 7065 7274 7920 ession property \n+00194090: 6f66 2074 6865 2073 7065 6369 6669 6564 of the specified\n+001940a0: 2063 6f6f 6b69 6520 3c63 6f64 653e 6e61 cookie na\n+001940b0: 6d65 3c2f 636f 6465 3e20 616e 6420 7570 me and up\n+001940c0: 6461 7465 7320 7468 6520 636f 6f6b 6965 dates the cookie\n+001940d0: 2073 746f 7265 2061 7420 7468 6520 7365 store at the se\n+001940e0: 7276 6572 2073 6964 652e 2054 6865 203c rver side. The <\n+001940f0: 636f 6465 3e64 6f6d 6169 6e3c 2f63 6f64 code>domain and pat\n+00194110: 683c 2f63 6f64 653e 2070 6172 616d 6574 h paramet\n+00194120: 6572 7320 6361 6e20 6265 2073 7065 6369 ers can be speci\n+00194130: 6669 6564 206f 7220 6361 6e20 6265 204e fied or can be N\n+00194140: 554c 4c20 746f 2075 7365 2074 6865 2063 ULL to use the c\n+00194150: 7572 7265 6e74 2064 6f6d 6169 6e20 616e urrent domain an\n+00194160: 6420 7061 7468 2067 6976 656e 2062 7920 d path given by \n+00194170: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::co\n+00194220: 6f6b 6965 5f64 6f6d 6169 6e3c 2f61 3e3c okie_domain<\n+00194230: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap::cookie_pa\n+001942f0: 7468 3c2f 613e 3c2f 636f 6465 3e2e 2052 th. R\n+00194300: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+00194310: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+00194320: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+001943e0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+001943f0: 6572 726f 7220 636f 6465 2e3c 2f6c 693e error code.
    • \n+00194400: 0a3c 6c69 3e3c 636f 6465 3e73 7472 7563 .
    • struc\n+00194410: 7420 3c61 2063 6c61 7373 3d22 656c 2220 t soap_co\n+00194460: 6f6b 6965 3c2f 613e 202a 736f 6170 5f63 okie *soap_c\n+00194470: 6f6f 6b69 6528 7374 7275 6374 2073 6f61 ookie(struct soa\n+00194480: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n+00194490: 6861 7220 2a6e 616d 652c 2063 6f6e 7374 har *name, const\n+001944a0: 2063 6861 7220 2a64 6f6d 6169 6e2c 2063 char *domain, c\n+001944b0: 6f6e 7374 2063 6861 7220 2a70 6174 6829 onst char *path)\n+001944c0: 3b3c 2f63 6f64 653e 2054 6869 7320 6675 ; This fu\n+001944d0: 6e63 7469 6f6e 2072 6574 7572 6e73 2074 nction returns t\n+001944e0: 6865 2063 6f6f 6b69 6520 7374 7275 6374 he cookie struct\n+001944f0: 7572 6520 6f66 2074 6865 2073 7065 6369 ure of the speci\n+00194500: 6669 6564 2063 6f6f 6b69 6520 3c63 6f64 fied cookie name or\n+00194520: 204e 554c 4c20 7768 656e 206e 6f74 2066 NULL when not f\n+00194530: 6f75 6e64 2062 7920 7365 6172 6368 696e ound by searchin\n+00194540: 6720 7468 6520 636f 6f6b 6965 2073 746f g the cookie sto\n+00194550: 7265 2061 7420 7468 6520 7365 7276 6572 re at the server\n+00194560: 2073 6964 652e 2054 6865 203c 636f 6465 side. The domain a\n+00194580: 6e64 203c 636f 6465 3e70 6174 683c 2f63 nd path parameters \n+001945a0: 6361 6e20 6265 2073 7065 6369 6669 6564 can be specified\n+001945b0: 206f 7220 6361 6e20 6265 204e 554c 4c20 or can be NULL \n+001945c0: 746f 2075 7365 2074 6865 2063 7572 7265 to use the curre\n+001945d0: 6e74 2064 6f6d 6169 6e20 616e 6420 7061 nt domain and pa\n+001945e0: 7468 2067 6976 656e 2062 7920 3c63 6f64 th given by soap::cookie\n+001946a0: 5f64 6f6d 6169 6e3c 2f61 3e3c 2f63 6f64 _domain and soa\n+00194760: 703a 3a63 6f6f 6b69 655f 7061 7468 3c2f p::cookie_path.
    • .\n+00194780: 3c6c 693e 3c63 6f64 653e 636f 6e73 7420
    • const \n+00194790: 6368 6172 202a 736f 6170 5f63 6f6f 6b69 char *soap_cooki\n+001947a0: 655f 7661 6c75 6528 7374 7275 6374 2073 e_value(struct s\n+001947b0: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+001947c0: 2063 6861 7220 2a6e 616d 652c 2063 6f6e char *name, con\n+001947d0: 7374 2063 6861 7220 2a64 6f6d 6169 6e2c st char *domain,\n+001947e0: 2063 6f6e 7374 2063 6861 7220 2a70 6174 const char *pat\n+001947f0: 6829 3b3c 2f63 6f64 653e 2054 6869 7320 h); This \n+00194800: 6675 6e63 7469 6f6e 2072 6574 7572 6e73 function returns\n+00194810: 2074 6865 2063 6f6f 6b69 6520 7661 6c75 the cookie valu\n+00194820: 6520 6f66 2074 6865 2073 7065 6369 6669 e of the specifi\n+00194830: 6564 2063 6f6f 6b69 6520 3c63 6f64 653e ed cookie \n+00194840: 6e61 6d65 3c2f 636f 6465 3e20 6f72 204e name or N\n+00194850: 554c 4c20 7768 656e 206e 6f74 2066 6f75 ULL when not fou\n+00194860: 6e64 2062 7920 7365 6172 6368 696e 6720 nd by searching \n+00194870: 7468 6520 636f 6f6b 6965 2073 746f 7265 the cookie store\n+00194880: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s\n+00194890: 6964 652e 2054 6865 203c 636f 6465 3e64 ide. The d\n+001948a0: 6f6d 6169 6e3c 2f63 6f64 653e 2061 6e64 omain and\n+001948b0: 203c 636f 6465 3e70 6174 683c 2f63 6f64 path parameters ca\n+001948d0: 6e20 6265 2073 7065 6369 6669 6564 206f n be specified o\n+001948e0: 7220 6361 6e20 6265 204e 554c 4c20 746f r can be NULL to\n+001948f0: 2075 7365 2074 6865 2063 7572 7265 6e74 use the current\n+00194900: 2064 6f6d 6169 6e20 616e 6420 7061 7468 domain and path\n+00194910: 2067 6976 656e 2062 7920 3c63 6f64 653e given by \n+00194920: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::cookie_d\n+001949d0: 6f6d 6169 6e3c 2f61 3e3c 2f63 6f64 653e omain\n+001949e0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap:\n+00194a90: 3a63 6f6f 6b69 655f 7061 7468 3c2f 613e :cookie_path\n+00194aa0: 3c2f 636f 6465 3e2e 3c2f 6c69 3e0a 3c6c .
    • .time_t <\n+00194ac0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00194ad0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00194ae0: 5f63 6f6f 6b69 6573 2e68 746d 6c23 6761 _cookies.html#ga\n+00194af0: 6163 3334 3634 6461 3436 3931 6665 3836 ac3464da4691fe86\n+00194b00: 6232 3432 3162 6166 6563 6565 3062 3664 b2421bafecee0b6d\n+00194b10: 2220 7469 746c 653d 2247 6574 2063 6f6f \" title=\"Get coo\n+00194b20: 6b69 6520 6578 7069 7261 7469 6f6e 2e22 kie expiration.\"\n+00194b30: 3e73 6f61 705f 636f 6f6b 6965 5f65 7870 >soap_cookie_exp\n+00194b40: 6972 6528 7374 7275 6374 2073 6f61 7020 ire(struct soap \n+00194b50: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n+00194b60: 7220 2a6e 616d 652c 2063 6f6e 7374 2063 r *name, const c\n+00194b70: 6861 7220 2a64 6f6d 6169 6e2c 2063 6f6e har *domain, con\n+00194b80: 7374 2063 6861 7220 2a70 6174 6829 3c2f st char *path); This \n+00194ba0: 6675 6e63 7469 6f6e 2072 6574 7572 6e73 function returns\n+00194bb0: 2074 6865 2063 6f6f 6b69 6520 6578 7069 the cookie expi\n+00194bc0: 7261 7469 6f6e 2074 696d 6520 3c63 6f64 ration time time_t \n+00194be0: 6f66 2074 6865 2073 7065 6369 6669 6564 of the specified\n+00194bf0: 2063 6f6f 6b69 6520 3c63 6f64 653e 6e61 cookie na\n+00194c00: 6d65 3c2f 636f 6465 3e20 6f72 202d 3120 me or -1 \n+00194c10: 7768 656e 206e 6f74 2066 6f75 6e64 2062 when not found b\n+00194c20: 7920 7365 6172 6368 696e 6720 7468 6520 y searching the \n+00194c30: 636f 6f6b 6965 2073 746f 7265 2061 7420 cookie store at \n+00194c40: 7468 6520 7365 7276 6572 2073 6964 652e the server side.\n+00194c50: 2054 6865 203c 636f 6465 3e64 6f6d 6169 The domai\n+00194c60: 6e3c 2f63 6f64 653e 2061 6e64 203c 636f n and path
      p\n+00194c80: 6172 616d 6574 6572 7320 6361 6e20 6265 arameters can be\n+00194c90: 2073 7065 6369 6669 6564 206f 7220 6361 specified or ca\n+00194ca0: 6e20 6265 204e 554c 4c20 746f 2075 7365 n be NULL to use\n+00194cb0: 2074 6865 2063 7572 7265 6e74 2064 6f6d the current dom\n+00194cc0: 6169 6e20 616e 6420 7061 7468 2067 6976 ain and path giv\n+00194cd0: 656e 2062 7920 3c63 6f64 653e 3c61 2063 en by so\n+00194d80: 6170 3a3a 636f 6f6b 6965 5f64 6f6d 6169 ap::cookie_domai\n+00194d90: 6e3c 2f61 3e3c 2f63 6f64 653e 2061 6e64 n and\n+00194da0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::coo\n+00194e50: 6b69 655f 7061 7468 3c2f 613e 3c2f 636f kie_path..
    • int soap_g\n+00194f10: 6574 656e 765f 636f 6f6b 6965 7328 7374 etenv_cookies(st\n+00194f20: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n+00194f30: 3c2f 613e 3b3c 2f63 6f64 653e 2054 6869 ; Thi\n+00194f40: 7320 6675 6e63 7469 6f6e 2069 6e69 7469 s function initi\n+00194f50: 616c 697a 6573 2074 6865 2063 6f6f 6b69 alizes the cooki\n+00194f60: 6520 7374 6f72 6520 6174 2074 6865 2073 e store at the s\n+00194f70: 6572 7665 7220 7369 6465 2062 7920 7265 erver side by re\n+00194f80: 6164 696e 6720 7468 6520 3c63 6f64 653e ading the \n+00194f90: 4854 5450 5f43 4f4f 4b49 453c 2f63 6f64 HTTP_COOKIE environment v\n+00194fb0: 6172 6961 626c 652e 2054 6869 7320 7072 ariable. This pr\n+00194fc0: 6f76 6964 6573 2061 206d 6561 6e73 2066 ovides a means f\n+00194fd0: 6f72 2061 2043 4749 2061 7070 6c69 6361 or a CGI applica\n+00194fe0: 7469 6f6e 2074 6f20 7265 6164 2063 6f6f tion to read coo\n+00194ff0: 6b69 6573 2073 656e 7420 6279 2061 2063 kies sent by a c\n+00195000: 6c69 656e 742e 2052 6574 7572 6e73 203c lient. Returns <\n+00195010: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+00195030: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+001950f0: 3c2f 636f 6465 3e20 6572 726f 7220 636f error co\n+00195100: 6465 2077 6865 6e20 7468 6520 3c63 6f64 de when the HTTP_COOKIE variable wa\n+00195130: 7320 6e6f 7420 666f 756e 642e 3c2f 6c69 s not found..
    • void\n+00195150: 203c 6120 636c 6173 733d 2265 6c22 2068 soap_f\n+001951c0: 7265 655f 636f 6f6b 6965 7328 7374 7275 ree_cookies(stru\n+001951d0: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap); This \n+001951f0: 6675 6e63 7469 6f6e 2066 7265 6573 2074 function frees t\n+00195200: 6865 2063 6f6f 6b69 6520 7374 6f72 6520 he cookie store \n+00195210: 616e 6420 6465 6c65 7465 7320 616c 6c20 and deletes all \n+00195220: 636f 6f6b 6965 732e 3c2f 6c69 3e0a 3c2f cookies.
    • ..

      The follo\n+00195240: 7769 6e67 2076 6172 6961 626c 6573 206f wing variables o\n+00195250: 6620 7468 6520 3c63 6f64 653e 3c61 2063 f the soap\n+001952b0: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n+001952c0: 6172 6520 7573 6564 2074 6f20 6465 6669 are used to defi\n+001952d0: 6e65 2074 6865 2063 7572 7265 6e74 2064 ne the current d\n+001952e0: 6f6d 6169 6e20 616e 6420 7061 7468 3a3c omain and path:<\n+001952f0: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c 636f /p>.

        .
      • const char * \n+00195310: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::cookie_d\n+001953c0: 6f6d 6169 6e3c 2f61 3e3c 2f63 6f64 653e omain\n+001953d0: 2073 686f 756c 6420 6265 2073 6574 2074 should be set t\n+001953e0: 6f20 7468 6520 646f 6d61 696e 2028 686f o the domain (ho\n+001953f0: 7374 2920 6f66 2074 6865 2073 6572 7669 st) of the servi\n+00195400: 6365 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 ce
      • .
      • const char * <\n+00195420: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00195430: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00195440: 6d6c 2361 6664 6439 3163 6531 3138 3966 ml#afdd91ce1189f\n+00195450: 6564 6433 3265 6266 6135 3164 6436 6564 edd32ebfa51dd6ed\n+00195460: 3333 6562 2220 7469 746c 653d 2255 7365 33eb\" title=\"Use\n+00195470: 722d 6465 6669 6e61 626c 6520 7374 7269 r-definable stri\n+00195480: 6e67 2074 6861 7420 7370 6563 6966 6965 ng that specifie\n+00195490: 7320 7468 6520 4854 5450 2063 6f6f 6b69 s the HTTP cooki\n+001954a0: 6520 7061 7468 206f 6620 7468 6520 7275 e path of the ru\n+001954b0: 6e6e 696e 6720 7365 7276 6572 2e22 3e73 nning server.\">s\n+001954c0: 6f61 703a 3a63 6f6f 6b69 655f 7061 7468 oap::cookie_path\n+001954d0: 3c2f 613e 3c2f 636f 6465 3e20 6d61 7920 may \n+001954e0: 6265 2073 6574 2074 6f20 7468 6520 6465 be set to the de\n+001954f0: 6661 756c 7420 7061 7468 2074 6f20 7468 fault path to th\n+00195500: 6520 7365 7276 6963 653c 2f6c 693e 0a3c e service
      • .<\n+00195510: 6c69 3e3c 636f 6465 3e69 6e74 203c 6120 li>int soap::cooki\n+001955e0: 655f 6d61 783c 2f61 3e3c 2f63 6f64 653e e_max\n+001955f0: 206d 6178 696d 756d 2063 6f6f 6b69 6520 maximum cookie \n+00195600: 6461 7461 6261 7365 2073 697a 6520 2864 database size (d\n+00195610: 6566 6175 6c74 3d33 3229 3c2f 6c69 3e0a efault=32).\n+00195620: 3c2f 756c 3e0a 3c70 3e54 6865 203c 636f
      .

      The soap::cookie_\n+001956e0: 7061 7468 3c2f 613e 3c2f 636f 6465 3e20 path \n+001956f0: 7661 6c75 6520 6973 2075 7365 6420 746f value is used to\n+00195700: 2066 696c 7465 7220 636f 6f6b 6965 7320 filter cookies \n+00195710: 696e 7465 6e64 6564 2066 6f72 2074 6869 intended for thi\n+00195720: 7320 7365 7276 6963 6520 6163 636f 7264 s service accord\n+00195730: 696e 6720 746f 2074 6865 2070 6174 6820 ing to the path \n+00195740: 7072 6566 6978 2072 756c 6573 206f 7574 prefix rules out\n+00195750: 6c69 6e65 6420 696e 2052 4643 3231 3039 lined in RFC2109\n+00195760: 2e3c 2f70 3e0a 3c70 3e54 6865 2066 6f6c .

      .

      The fol\n+00195770: 6c6f 7769 6e67 2065 7861 6d70 6c65 2073 lowing example s\n+00195780: 6572 7665 7220 6164 6f70 7473 2063 6f6f erver adopts coo\n+00195790: 6b69 6573 2066 6f72 2073 6573 7369 6f6e kies for session\n+001957a0: 2063 6f6e 7472 6f6c 3a3c 2f70 3e0a 3c64 control:

      .
      \n+001957f0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n+00195800: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
      .
      {.
      str\n+00195850: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
      int m, s\n+00195900: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      soap_init(\n+00195980: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+001959b0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
      .\n+001959d0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.cooki\n+00195a50: 655f 646f 6d61 696e 3c2f 613e 203d 203c e_domain = <\n+00195a60: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00195a70: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00195a80: 3b2e 2e2e 2671 756f 743b 3c2f 7370 616e ;...";
      .
      soap.cookie_pa\n+00195b30: 7468 3c2f 613e 203d 203c 7370 616e 2063 th = "/&quo\n+00195b60: 743b 3c2f 7370 616e 3e3b 203c 7370 616e t;; // the path whi\n+00195b90: 6368 2069 7320 7573 6564 2074 6f20 6669 ch is used to fi\n+00195ba0: 6c74 6572 2f73 6574 2063 6f6f 6b69 6573 lter/set cookies\n+00195bb0: 2077 6974 6820 7468 6973 2064 6573 7469 with this desti\n+00195bc0: 6e61 7469 6f6e 203c 2f73 7061 6e3e 3c2f nation .
      if (ar\n+00195c10: 6763 2026 6c74 3b20 3229 203c 2f64 6976 gc < 2) .
      {
      .\n+00195c50: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_ge\n+00195cb0: 7465 6e76 5f63 6f6f 6b69 6573 3c2f 613e tenv_cookies\n+00195cc0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+00195cf0: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); //\n+00195d10: 2043 4749 2061 7070 3a20 6772 6162 2063 CGI app: grab c\n+00195d20: 6f6f 6b69 6573 2066 726f 6d20 2623 3339 ookies from '\n+00195d30: 3b48 5454 505f 434f 4f4b 4945 2623 3339 ;HTTP_COOKIE'\n+00195d40: 3b20 656e 7620 7661 7220 3c2f 7370 616e ; env var
      .
      so\n+00195dc0: 6170 5f73 6572 7665 3c2f 613e 2826 616d ap_serve(&am\n+00195dd0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
      .
      }\n+00195e20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      else
      .
      {..
      if\n+00195fd0: 2028 213c 6120 636c 6173 733d 2263 6f64 (!soap_valid_\n+00196030: 736f 636b 6574 3c2f 613e 286d 2929 203c socket(m)) <\n+00196040: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      ex\n+00196060: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE)\n+00196070: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      <\n+00196090: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001960a0: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow\">for (i\n+001960d0: 6e74 3c2f 7370 616e 3e20 6920 3d20 313b nt i = 1;\n+001960e0: 203b 2069 2b2b 2920 3c2f 6469 763e 0a3c ; i++)
      .<\n+001960f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00196100: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
      . \n+00196120: 2020 2020 2073 203d 203c 6120 636c 6173 s = soap_ac\n+00196180: 6365 7074 3c2f 613e 2826 616d 703b 3c61 cept(&soap); \n+001961c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      <\n+001961e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001961f0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!soap_vali\n+00196260: 645f 736f 636b 6574 3c2f 613e 2873 2929 d_socket(s))\n+00196270: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n+00196290: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL\n+001962a0: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
      . \n+001962c0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_serve<\n+00196320: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+00196350: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
      s\n+001963d0: 6f61 705f 656e 643c 2f61 3e28 2661 6d70 oap_end(&\n+001963e0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00196410: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
      .
      \n+00196430: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_free_\n+00196490: 636f 6f6b 6965 733c 2f61 3e28 2661 6d70 cookies(&\n+001964a0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+001964d0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // remo\n+001964f0: 7665 2061 6c6c 206f 6c64 2063 6f6f 6b69 ve all old cooki\n+00196500: 6573 2066 726f 6d20 6461 7461 6261 7365 es from database\n+00196510: 2073 6f20 6e6f 2069 6e74 6572 6665 7265 so no interfere\n+00196520: 6e63 6520 6f63 6375 7273 2077 6974 6820 nce occurs with \n+00196530: 7468 6520 6172 7269 7661 6c20 6f66 206e the arrival of n\n+00196540: 6577 2063 6f6f 6b69 6573 203c 2f73 7061 ew cookies
      .
      }\n+00196570: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      } .
      return\n+001965d0: 2030 3b20 3c2f 6469 763e 0a3c 6469 7620 0;
      .
      } <\n+001965f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      .\n+00196610: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      int<\n+00196640: 2f73 7061 6e3e 206e 735f 5f77 6562 6d65 /span> ns__webme\n+00196650: 7468 6f64 283c 7370 616e 2063 6c61 7373 thod(struc\n+00196670: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+001966a0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, ...) \n+001966e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {
      \n+00196700: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      const\n+00196730: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *c\n+00196760: 6f6f 6b69 655f 7661 6c75 6520 3d20 3c61 ookie_value = soap_cookie_v\n+001967d0: 616c 7565 3c2f 613e 283c 6120 636c 6173 alue(\n+00196800: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "cook\n+00196830: 6965 5f6e 616d 6526 7175 6f74 3b3c 2f73 ie_name", NULL, NULL\n+00196850: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
      .
      if\n+00196890: 2028 2163 6f6f 6b69 655f 7661 6c75 6529 (!cookie_value)\n+001968a0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001968b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // cookie \n+001968d0: 7265 7475 726e 6564 2062 7920 636c 6965 returned by clie\n+001968e0: 6e74 3f20 3c2f 7370 616e 3e3c 2f64 6976 nt? .
      cookie_v\n+00196910: 616c 7565 203d 203c 7370 616e 2063 6c61 alue = "initial\n+00196940: 5f76 616c 7565 2671 756f 743b 3c2f 7370 _value"; // no\n+00196970: 3a20 7365 7420 696e 6974 6961 6c20 636f : set initial co\n+00196980: 6f6b 6965 2076 616c 7565 203c 2f73 7061 okie value
      .
      else
      .
      \n+001969f0: 2e2e 2e20 2020 2020 2020 2020 2020 2020 ... \n+00196a00: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00196a10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // yes: mo\n+00196a30: 6469 6679 2074 6865 2063 6f6f 6b69 6520 dify the cookie \n+00196a40: 7661 6c75 6520 746f 2072 6566 6c65 6374 value to reflect\n+00196a50: 2074 6865 206e 6577 2073 7461 7465 3c2f the new state
      . \n+00196a80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_co\n+00196ae0: 6f6b 6965 3c2f 613e 283c 6120 636c 6173 okie(\n+00196b10: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "cook\n+00196b40: 6965 5f6e 616d 6526 7175 6f74 3b3c 2f73 ie_name", cookie_val\n+00196b60: 7565 2c20 4e55 4c4c 2c20 4e55 4c4c 293b ue, NULL, NULL);\n+00196b70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      soap_set_cookie\n+00196bf0: 5f65 7870 6972 653c 2f61 3e28 3c61 2063 _expire(soap, "c\n+00196c50: 6f6f 6b69 655f 6e61 6d65 2671 756f 743b ookie_name"\n+00196c60: 3c2f 7370 616e 3e2c 2036 302c 204e 554c , 60, NUL\n+00196c70: 4c2c 204e 554c 4c29 3b20 3c73 7061 6e20 L, NULL); \n+00196c90: 2f2f 2063 6f6f 6b69 6520 6578 7069 7265 // cookie expire\n+00196ca0: 7320 696e 2036 3020 7365 636f 6e64 7320 s in 60 seconds \n+00196cb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+00196cd0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00196cf0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n+00196d50: 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 AP_OK; .
      }
      ..
      soa\n+00196fb0: 705f 7365 745f 636f 6f6b 6965 3c2f 613e p_set_cookie\n+00196fc0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      struct\n+00196fe0: 2073 6f61 705f 636f 6f6b 6965 202a 2073 soap_cookie * s\n+00196ff0: 6f61 705f 7365 745f 636f 6f6b 6965 2873 oap_set_cookie(s\n+00197000: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00197010: 2c20 636f 6e73 7420 6368 6172 202a 6e61 , const char *na\n+00197020: 6d65 2c20 636f 6e73 7420 6368 6172 202a me, const char *\n+00197030: 7661 6c75 652c 2063 6f6e 7374 2063 6861 value, const cha\n+00197040: 7220 2a64 6f6d 6169 6e2c 2063 6f6e 7374 r *domain, const\n+00197050: 2063 6861 7220 2a70 6174 6829 3c2f 6469 char *path)
      Add a cooki\n+00197080: 652e 3c2f 6469 763e 3c2f 6469 763e 0a3c e.
      .<\n+00197090: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+001970a0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+001970b0: 705f 5f63 6f6f 6b69 6573 5f68 746d 6c5f p__cookies_html_\n+001970c0: 6761 3765 3535 6236 3431 6333 6133 6436 ga7e55b641c3a3d6\n+001970d0: 6639 3731 3062 3532 3365 3431 3931 3766 f9710b523e41917f\n+001970e0: 6538 223e 3c64 6976 2063 6c61 7373 3d22 e8\">int soap_getenv\n+00197180: 5f63 6f6f 6b69 6573 2873 7472 7563 7420 _cookies(struct \n+00197190: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
      Get cookies \n+001971c0: 6672 6f6d 2074 6865 2048 5454 505f 434f from the HTTP_CO\n+001971d0: 4f4b 4945 2065 6e76 6972 6f6e 6d65 6e74 OKIE environment\n+001971e0: 2076 6172 6961 626c 652e 3c2f 6469 763e variable.
      \n+001971f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+00197260: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_fre\n+001972b0: 655f 636f 6f6b 6965 733c 2f61 3e3c 2f64 e_cookies
      void soap\n+001972e0: 5f66 7265 655f 636f 6f6b 6965 7328 7374 _free_cookies(st\n+001972f0: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n+00197300: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      Free co\n+00197320: 6f6b 6965 732e 3c2f 6469 763e 3c2f 6469 okies.
      .
      soap_set_coo\n+001973f0: 6b69 655f 6578 7069 7265 3c2f 613e 3c2f kie_expire
      int soap\n+00197420: 5f73 6574 5f63 6f6f 6b69 655f 6578 7069 _set_cookie_expi\n+00197430: 7265 2873 7472 7563 7420 736f 6170 202a re(struct soap *\n+00197440: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+00197450: 202a 6e61 6d65 2c20 6c6f 6e67 206d 6178 *name, long max\n+00197460: 6167 652c 2063 6f6e 7374 2063 6861 7220 age, const char \n+00197470: 2a64 6f6d 6169 6e2c 2063 6f6e 7374 2063 *domain, const c\n+00197480: 6861 7220 2a70 6174 6829 3c2f 6469 763e har *path)
      \n+00197490: 3c64 6976 2063 6c61 7373 3d22 7474 646f
      Set cookie ex\n+001974b0: 7069 7261 7469 6f6e 2e3c 2f64 6976 3e3c piration.
      <\n+001974c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      <\n+00197510: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00197520: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+00197560: 6f61 703a 3a63 6f6f 6b69 655f 646f 6d61 oap::cookie_doma\n+00197570: 696e 3c2f 613e 3c2f 6469 763e 3c64 6976 in
      \n+00197590: 636f 6e73 7420 6368 6172 202a 2063 6f6f const char * coo\n+001975a0: 6b69 655f 646f 6d61 696e 3c2f 6469 763e kie_domain
      \n+001975b0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
      User-definabl\n+001975d0: 6520 7374 7269 6e67 2074 6861 7420 7370 e string that sp\n+001975e0: 6563 6966 6965 7320 7468 6520 4854 5450 ecifies the HTTP\n+001975f0: 2063 6f6f 6b69 6520 646f 6d61 696e 206f cookie domain o\n+00197600: 6620 7468 6520 7275 6e6e 696e 6720 7365 f the running se\n+00197610: 7276 6572 2e3c 2f64 6976 3e3c 6469 7620 rver.
      Definition:\n+00197640: 2073 7464 736f 6170 322e 683a 3239 3639 stdsoap2.h:2969\n+00197650: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
      .
      soap::cook\n+00197700: 6965 5f70 6174 683c 2f61 3e3c 2f64 6976 ie_path
      const char \n+00197730: 2a20 636f 6f6b 6965 5f70 6174 683c 2f64 * cookie_path
      User-defin\n+00197760: 6162 6c65 2073 7472 696e 6720 7468 6174 able string that\n+00197770: 2073 7065 6369 6669 6573 2074 6865 2048 specifies the H\n+00197780: 5454 5020 636f 6f6b 6965 2070 6174 6820 TTP cookie path \n+00197790: 6f66 2074 6865 2072 756e 6e69 6e67 2073 of the running s\n+001977a0: 6572 7665 722e 3c2f 6469 763e 3c64 6976 erver.
      <\n+001977c0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:297\n+001977e0: 313c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 1
      .

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

      .

      <\n+00197840: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00197850: 2069 643d 2270 726f 7879 7365 7276 6572 id=\"proxyserver\n+00197860: 7322 3e3c 2f61 3e0a 436f 6e6e 6563 7469 s\">.Connecti\n+00197870: 6e67 2063 6c69 656e 7473 2074 6872 6f75 ng clients throu\n+00197880: 6768 2070 726f 7879 2073 6572 7665 7273 gh proxy servers\n+00197890: 3c2f 6832 3e0a 3c70 3e57 6865 6e20 6120

      .

      When a \n+001978a0: 636c 6965 6e74 206e 6565 6473 2074 6f20 client needs to \n+001978b0: 636f 6e6e 6563 7420 746f 2061 2057 6562 connect to a Web\n+001978c0: 2053 6572 7669 6365 2074 6872 6f75 6768 Service through\n+001978d0: 2061 2070 726f 7879 2073 6572 7665 722c a proxy server,\n+001978e0: 2073 6574 2074 6865 203c 636f 6465 3e3c set the <\n+001978f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00197900: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00197910: 6d6c 2361 6331 3732 6264 3930 3139 6166 ml#ac172bd9019af\n+00197920: 6565 6262 3336 3335 6233 6139 6637 3261 eebb3635b3a9f72a\n+00197930: 3931 3031 2220 7469 746c 653d 2255 7365 9101\" title=\"Use\n+00197940: 722d 6465 6669 6e61 626c 6520 7072 6f78 r-definable prox\n+00197950: 7920 686f 7374 206e 616d 6520 7374 7269 y host name stri\n+00197960: 6e67 2077 6869 6368 2073 686f 756c 6420 ng which should \n+00197970: 6265 2073 6574 2074 6f20 636f 6e6e 6563 be set to connec\n+00197980: 7420 7468 726f 7567 6820 616e 2048 5454 t through an HTT\n+00197990: 5020 7072 6f78 792e 223e 736f 6170 3a3a P proxy.\">soap::\n+001979a0: 7072 6f78 795f 686f 7374 3c2f 613e 3c2f proxy_host string and\n+001979c0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+00197a80: 6f61 703a 3a70 726f 7879 5f70 6f72 743c oap::proxy_port<\n+00197a90: 2f61 3e3c 2f63 6f64 653e 2069 6e74 6567 /a> integ\n+00197aa0: 6572 2061 7474 7269 6275 7465 7320 6f66 er attributes of\n+00197ab0: 2074 6865 2063 7572 7265 6e74 203c 636f the current s\n+00197b10: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+00197b20: 6f6e 7465 7874 2074 6f20 7468 6520 7072 ontext to the pr\n+00197b30: 6f78 7927 7320 686f 7374 206e 616d 6520 oxy's host name \n+00197b40: 616e 6420 706f 7274 2c20 7265 7370 6563 and port, respec\n+00197b50: 7469 7665 6c79 2e20 466f 7220 6578 616d tively. For exam\n+00197b60: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

      .
      <\n+00197b80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00197b90: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+00197be0: 3c2f 613e 203c 6120 636c 6173 733d 2263 soap\n+00197c10: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
      .<\n+00197c30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00197c40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00197c50: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00197c60: 6761 3865 3033 3465 3161 3764 3630 3933 ga8e034e1a7d6093\n+00197c70: 6561 6464 6331 3162 3634 3731 3739 3635 eaddc11b64717965\n+00197c80: 3763 223e 736f 6170 5f69 6e69 743c 2f61 7c\">soap_init(&so\n+00197cc0: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
      .\n+00197cd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap.proxy\n+00197d60: 5f68 6f73 743c 2f61 3e20 3d20 3c73 7061 _host = "pr\n+00197d90: 6f78 7968 6f73 746e 616d 6526 7175 6f74 oxyhostname"\n+00197da0: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
      \n+00197db0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      soap.prox\n+00197e40: 795f 706f 7274 3c2f 613e 203d 2038 3038 y_port = 808\n+00197e50: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
      .
      if \n+00197e90: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f77 (soap_call_ns__w\n+00197ea0: 6562 6d65 7468 6f64 2826 616d 703b 3c61 ebmethod(&soap, <\n+00197ee0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00197ef0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00197f00: 3b68 7474 703a 2f2f 686f 7374 3a70 6f72 ;http://host:por\n+00197f10: 742f 7061 7468 2671 756f 743b 3c2f 7370 t/path", "action&qu\n+00197f50: 6f74 3b3c 2f73 7061 6e3e 2c20 2e2e 2e29 ot;, ...)\n+00197f60: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
      ..
      else
      .
      ..\n+00198080: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe\n+001980a0: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
      .\n+001980b0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

      The co\n+001980d0: 6e74 6578 7420 6174 7472 6962 7574 6573 ntext attributes\n+001980e0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::proxy_ho\n+001981a0: 7374 3c2f 613e 3c2f 636f 6465 3e20 616e st an\n+001981b0: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d \n+00198270: 736f 6170 3a3a 7072 6f78 795f 706f 7274 soap::proxy_port\n+00198280: 3c2f 613e 3c2f 636f 6465 3e20 6b65 6570 keep\n+00198290: 2074 6865 6972 2076 616c 7565 7320 7468 their values th\n+001982a0: 726f 7567 6820 6120 7365 7175 656e 6365 rough a sequence\n+001982b0: 206f 6620 7365 7276 6963 6520 6f70 6572 of service oper\n+001982c0: 6174 696f 6e20 6361 6c6c 732c 2073 6f20 ation calls, so \n+001982d0: 7468 6579 206f 6e6c 7920 6e65 6564 2074 they only need t\n+001982e0: 6f20 6265 2073 6574 206f 6e63 652e 3c2f o be set once..

      When X-For\n+00198300: 7761 7264 6564 2d46 6f72 2068 6561 6465 warded-For heade\n+00198310: 7273 2061 7265 2072 6574 7572 6e65 6420 rs are returned \n+00198320: 6279 2074 6865 2070 726f 7879 2c20 7468 by the proxy, th\n+00198330: 6520 6865 6164 6572 2063 616e 2062 6520 e header can be \n+00198340: 6163 6365 7373 6564 2069 6e20 7468 6520 accessed in the \n+00198350: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa\n+001983e0: 703a 3a70 726f 7879 5f66 726f 6d3c 2f61 p::proxy_from string.\n+00198400: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

      .

      See also\n+00198410: 2053 6563 7469 6f6e 7320 3c61 2063 6c61 Sections HT\n+00198450: 5450 2070 726f 7879 2062 6173 6963 2061 TP proxy basic a\n+00198460: 7574 6865 6e74 6963 6174 696f 6e3c 2f61 uthentication and HT\n+001984b0: 5450 2070 726f 7879 204e 544c 4d20 6175 TP proxy NTLM au\n+001984c0: 7468 656e 7469 6361 7469 6f6e 3c2f 613e thentication\n+001984d0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

      .

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

      .

      \n+00198510: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Bi\n+00198540: 6e64 2062 6566 6f72 6520 636f 6e6e 6563 nd before connec\n+00198550: 7420 616e 6420 7365 7474 696e 6720 7468 t and setting th\n+00198560: 6520 636c 6965 6e74 2069 6e74 6572 6661 e client interfa\n+00198570: 6365 2061 6464 7265 7373 3c2f 6832 3e0a ce address

      .\n+00198580: 3c70 3e54 6f20 6269 6e64 2074 6865 2063

      To bind the c\n+00198590: 6c69 656e 7420 746f 2061 2070 6f72 7420 lient to a port \n+001985a0: 6265 666f 7265 2063 6f6e 6e65 6374 2c20 before connect, \n+001985b0: 7365 7420 7468 6520 3c63 6f64 653e 3c61 set the soap::clien\n+00198670: 745f 706f 7274 3c2f 613e 3c2f 636f 6465 t_port to a non-negat\n+00198690: 6976 6520 706f 7274 206e 756d 6265 723a ive port number:\n+001986a0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      .
      struct soap\n+00198720: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+001987b0: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
      .\n+001987c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap->c\n+00198850: 6c69 656e 745f 706f 7274 3c2f 613e 203d lient_port =\n+00198860: 202e 2e2e 3b20 3c73 7061 6e20 636c 6173 ...; // n\n+00198880: 6f6e 2d6e 6567 6174 6976 6520 706f 7274 on-negative port\n+00198890: 206e 756d 6265 7220 3c2f 7370 616e 3e3c number <\n+001988a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      if (soa\n+001988e0: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n+001988f0: 7468 6f64 283c 6120 636c 6173 733d 2263 thod(soap\n+00198920: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "http://h\n+00198950: 6f73 743a 706f 7274 2f70 6174 6826 7175 ost:port/path&qu\n+00198960: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "ac\n+00198990: 7469 6f6e 2671 756f 743b 3c2f 7370 616e tion", ...))
      .\n+001989b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ... //\n+001989e0: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
      \n+00198a20: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
      ... // success
      .
      int client_port\n+00198b50: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      User-de\n+00198b70: 6669 6e61 626c 6520 636c 6965 6e74 2070 finable client p\n+00198b80: 6f72 7420 746f 2062 696e 6420 746f 2062 ort to bind to b\n+00198b90: 6566 6f72 6520 636f 6e6e 6563 7469 6e67 efore connecting\n+00198ba0: 2074 6f20 6120 7365 7276 6572 2c20 7768 to a server, wh\n+00198bb0: 656e 206e 6f6e 2d6e 6567 6174 6976 652e en non-negative.\n+00198bc0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      Defi\n+00198be0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00198bf0: 6f61 7032 2e68 3a33 3639 303c 2f64 6976 oap2.h:3690
      .
      <\n+00198c20: 703e 5468 6973 2070 6f72 7420 6e75 6d62 p>This port numb\n+00198c30: 6572 2069 7320 7573 6564 206f 6e6c 7920 er is used only \n+00198c40: 6f6e 6365 2061 6e64 2072 6573 6574 2074 once and reset t\n+00198c50: 6f20 2d31 2028 6469 7361 626c 6564 292e o -1 (disabled).\n+00198c60: 2053 6574 2069 7420 6167 6169 6e20 666f Set it again fo\n+00198c70: 7220 7468 6520 6e65 7874 2063 616c 6c2e r the next call.\n+00198c80: 3c2f 703e 0a3c 703e 546f 2073 6574 2061

      .

      To set a\n+00198c90: 2063 6c69 656e 7420 696e 7465 7266 6163 client interfac\n+00198ca0: 6520 6164 6472 6573 7320 666f 7220 7468 e address for th\n+00198cb0: 6520 636f 6e6e 6563 7469 6f6e 2074 6861 e connection tha\n+00198cc0: 7420 6973 2061 6e20 4950 2061 6464 7265 t is an IP addre\n+00198cd0: 7373 206f 6620 7468 6520 636c 6965 6e74 ss of the client\n+00198ce0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

      .\n+00198e00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      soap->\n+00198e90: 636c 6965 6e74 5f69 6e74 6572 6661 6365 client_interface\n+00198ea0: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "...&quo\n+00198ed0: 743b 3c2f 7370 616e 3e3b 203c 7370 616e t;; // IP address <\n+00198f00: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+00198f20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00198f30: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n+00198f50: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, "h\n+00198fb0: 7474 703a 2f2f 686f 7374 3a70 6f72 742f ttp://host:port/\n+00198fc0: 7061 7468 2671 756f 743b 3c2f 7370 616e path", &\n+00198ff0: 7175 6f74 3b61 6374 696f 6e26 7175 6f74 quot;action"\n+00199000: 3b3c 2f73 7061 6e3e 2c20 2e2e 2e29 2920 ;, ...)) \n+00199010: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      ... <\n+00199030: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00199040: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent\">// error
      .
      else
      .
      ..\n+001990b0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe\n+001990d0: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
      .\n+001990e0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
      \n+001991d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
      User-definabl\n+001991f0: 6520 636c 6965 6e74 2069 6e74 6572 6661 e client interfa\n+00199200: 6365 2061 6464 7265 7373 2074 6f20 6f76 ce address to ov\n+00199210: 6572 7269 6465 2077 6865 6e20 636f 6e6e erride when conn\n+00199220: 6563 7469 6e67 2074 6f20 6120 7365 7276 ecting to a serv\n+00199230: 6572 2c20 7768 656e 206e 6f6e 2d4e 554c er, when non-NUL\n+00199240: 4c20 2857 696e 646f 2e2e 2e3c 2f64 6976 L (Windo...
      Definitio\n+00199270: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00199280: 683a 3336 3939 3c2f 6469 763e 3c2f 6469 h:3699
      .

      Thi\n+001992b0: 7320 636c 6965 6e74 2069 6e74 6572 6661 s client interfa\n+001992c0: 6365 2061 6464 7265 7373 2073 7472 696e ce address strin\n+001992d0: 6720 6973 2075 7365 6420 6f6e 6c79 206f g is used only o\n+001992e0: 6e63 6520 616e 6420 7265 7365 7420 746f nce and reset to\n+001992f0: 204e 554c 4c20 2864 6973 6162 6c65 6429 NULL (disabled)\n+00199300: 2e20 5365 7420 6974 2061 6761 696e 2066 . Set it again f\n+00199310: 6f72 2074 6865 206e 6578 7420 6361 6c6c or the next call\n+00199320: 2e20 5468 6973 2066 6561 7475 7265 2069 . This feature i\n+00199330: 7320 6e6f 7420 6176 6169 6c61 626c 6520 s not available \n+00199340: 7768 656e 2063 6f6d 7069 6c69 6e67 2074 when compiling t\n+00199350: 6865 2063 6f64 6520 6f6e 2077 696e 646f he code on windo\n+00199360: 7773 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ws.

      .

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

      ..FastCGI.

      To enable \n+001993e0: 4661 7374 4347 4920 7375 7070 6f72 742c FastCGI support,\n+001993f0: 2069 6e73 7461 6c6c 2046 6173 7443 4749 install FastCGI\n+00199400: 2061 6e64 2063 6f6d 7069 6c65 2061 6c6c and compile all\n+00199410: 2073 6f61 7063 7070 322d 6765 6e65 7261 soapcpp2-genera\n+00199420: 7465 6420 736f 7572 6365 2063 6f64 6520 ted source code \n+00199430: 6669 6c65 7320 616e 6420 796f 7572 2061 files and your a\n+00199440: 7070 6c69 6361 7469 6f6e 2073 6f75 7263 pplication sourc\n+00199450: 6573 2077 6974 6820 7468 6520 636f 6d70 es with the comp\n+00199460: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_FASTCG\n+00199480: 493c 2f63 6f64 653e 206f 7220 6164 643a I or add:\n+00199490: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      .
      #define \n+001994e0: 5749 5448 5f46 4153 5443 4749 3c2f 7370 WITH_FASTCGI
      .
      \n+00199500: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

      \n+0019ba50: 5468 6573 6520 6675 6e63 7469 6f6e 7320 These functions \n+0019ba60: 7368 6f75 6c64 2070 726f 7669 6465 2061 should provide a\n+0019ba70: 206d 696e 696d 616c 2069 6e70 7574 2f6f minimal input/o\n+0019ba80: 7574 7075 7420 7374 6163 6b20 283c 636f utput stack (soap\n+0019bb30: 3a3a 6672 6563 763c 2f61 3e3c 2f63 6f64 ::frecv and soap::fse\n+0019bbe0: 6e64 3c2f 613e 3c2f 636f 6465 3e29 2074 nd) t\n+0019bbf0: 6f20 7265 6164 2f77 7269 7465 2058 4d4c o read/write XML\n+0019bc00: 2061 6e64 2073 6f63 6b65 742d 6c69 6b65 and socket-like\n+0019bc10: 2073 7461 636b 2028 7468 6520 6f74 6865 stack (the othe\n+0019bc20: 7220 6675 6e63 7469 6f6e 7329 2077 6865 r functions) whe\n+0019bc30: 6e20 6465 7665 6c6f 7069 6e67 2063 6c69 n developing cli\n+0019bc40: 656e 7420 616e 6420 7365 7276 6572 2061 ent and server a\n+0019bc50: 7070 6c69 6361 7469 6f6e 732e 3c2f 703e pplications.

      \n+0019bc60: 0a3c 703e 5365 6520 5365 6374 696f 6e20 .

      See Section \n+0019bc70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Functio\n+0019bca0: 6e20 6361 6c6c 6261 636b 7320 666f 7220 n callbacks for \n+0019bcb0: 6375 7374 6f6d 697a 6564 2049 2f4f 2061 customized I/O a\n+0019bcc0: 6e64 2048 5454 5020 6861 6e64 6c69 6e67 nd HTTP handling\n+0019bcd0: 3c2f 613e 2066 6f72 206d 6f72 6520 6465 for more de\n+0019bce0: 7461 696c 7320 6f6e 2074 6865 2075 7365 tails on the use\n+0019bcf0: 206f 6620 7468 6573 6520 6361 6c6c 6261 of these callba\n+0019bd00: 636b 732e 2041 6c6c 2063 616c 6c62 6163 cks. All callbac\n+0019bd10: 6b20 6675 6e63 7469 6f6e 2070 6f69 6e74 k function point\n+0019bd20: 6572 7320 7368 6f75 6c64 2062 6520 6e6f ers should be no\n+0019bd30: 6e2d 4e55 4c4c 2c20 6578 6365 7074 203c n-NULL, except <\n+0019bd40: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fpoll\n+0019be10: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 703e .

      .

      \n+0019be20: 596f 7520 6361 6e6e 6f74 2075 7365 203c You cannot use <\n+0019be30: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_\n+0019bec0: 7072 696e 745f 6661 756c 743c 2f61 3e3c print_fault<\n+0019bed0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and s\n+0019bf80: 6f61 705f 7072 696e 745f 6661 756c 745f oap_print_fault_\n+0019bf90: 6c6f 6361 7469 6f6e 3c2f 613e 3c2f 636f location to print err\n+0019bfb0: 6f72 2064 6961 676e 6f73 7469 6373 2e20 or diagnostics. \n+0019bfc0: 496e 7374 6561 642c 2074 6865 2076 616c Instead, the val\n+0019bfd0: 7565 206f 6620 3c63 6f64 653e 3c61 2063 ue of soap::error, which \n+0019c0a0: 636f 6e74 6169 6e73 2074 6865 2067 534f contains the gSO\n+0019c0b0: 4150 2065 7272 6f72 2063 6f64 652c 2063 AP error code, c\n+0019c0c0: 616e 2062 6520 7573 6564 2074 6f20 6465 an be used to de\n+0019c0d0: 7465 726d 696e 6520 7468 6520 6361 7573 termine the caus\n+0019c0e0: 6520 6f66 2061 2066 6175 6c74 2e3c 2f70 e of a fault..

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

      .

      .\n+0019c150: 486f 7720 746f 2063 6f6d 6269 6e65 206d How to combine m\n+0019c160: 756c 7469 706c 6520 636c 6965 6e74 2061 ultiple client a\n+0019c170: 6e64 2073 6572 7665 7220 696d 706c 656d nd server implem\n+0019c180: 656e 7461 7469 6f6e 7320 696e 746f 206f entations into o\n+0019c190: 6e65 2065 7865 6375 7461 626c 653c 2f68 ne executable.

      The wsdl2h\n+0019c1b0: 2074 6f6f 6c20 6361 6e20 6265 2075 7365 tool can be use\n+0019c1c0: 6420 746f 2069 6d70 6f72 7420 6d75 6c74 d to import mult\n+0019c1d0: 6970 6c65 2057 5344 4c73 2061 6e64 2073 iple WSDLs and s\n+0019c1e0: 6368 656d 6173 2061 7420 6f6e 6365 2e20 chemas at once. \n+0019c1f0: 5468 6520 7365 7276 6963 6520 6465 6669 The service defi\n+0019c200: 6e69 7469 6f6e 7320 6172 6520 636f 6d62 nitions are comb\n+0019c210: 696e 6564 2069 6e20 6f6e 6520 6865 6164 ined in one head\n+0019c220: 6572 2066 696c 6520 746f 2062 6520 7061 er file to be pa\n+0019c230: 7273 6564 2062 7920 736f 6170 6370 7032 rsed by soapcpp2\n+0019c240: 2e20 4974 2069 7320 696d 706f 7274 616e . It is importan\n+0019c250: 7420 746f 2061 7373 6967 6e20 6e61 6d65 t to assign name\n+0019c260: 7370 6163 6520 7072 6566 6978 6573 2074 space prefixes t\n+0019c270: 6f20 6e61 6d65 7370 6163 6520 5552 4973 o namespace URIs\n+0019c280: 2075 7369 6e67 2074 6865 203c 656d 3e3c using the <\n+0019c290: 636f 6465 3e74 7970 656d 6170 2e64 6174 code>typemap.dat\n+0019c2a0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+0019c2b0: 652e 204f 7468 6572 7769 7365 2c20 7773 e. Otherwise, ws\n+0019c2c0: 646c 3268 2077 696c 6c20 6173 7369 676e dl2h will assign\n+0019c2d0: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi\n+0019c2e0: 7865 7320 3c63 6f64 653e 6e73 313c 2f63 xes ns1, ns2<\n+0019c300: 2f63 6f64 653e 2c20 616e 6420 736f 206f /code>, and so o\n+0019c310: 6e20 746f 2074 6865 2073 6572 7669 6365 n to the service\n+0019c320: 206f 7065 7261 7469 6f6e 7320 616e 6420 operations and \n+0019c330: 7363 6865 6d61 2074 7970 6573 2e20 5468 schema types. Th\n+0019c340: 7573 2c20 616e 7920 6368 616e 6765 2074 us, any change t\n+0019c350: 6f20 6120 5753 444c 206f 7220 7363 6865 o a WSDL or sche\n+0019c360: 6d61 206d 6179 2072 6573 756c 7420 696e ma may result in\n+0019c370: 2061 206e 6577 2070 7265 6669 7820 6173 a new prefix as\n+0019c380: 7369 676e 6d65 6e74 2e20 466f 7220 6d6f signment. For mo\n+0019c390: 7265 2064 6574 6169 6c73 2c20 706c 6561 re details, plea\n+0019c3a0: 7365 2073 6565 2053 6563 7469 6f6e 203c se see Section <\n+0019c3b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019c3c0: 663d 2269 6e64 6578 2e68 746d 6c23 7479 f=\"index.html#ty\n+0019c3d0: 7065 6d61 7022 3e43 7573 746f 6d69 7a69 pemap\">Customizi\n+0019c3e0: 6e67 2058 4d4c 2064 6174 6120 6269 6e64 ng XML data bind\n+0019c3f0: 696e 6773 2077 6974 6820 7468 6520 7479 ings with the ty\n+0019c400: 7065 6d61 702e 6461 7420 6669 6c65 3c2f pemap.dat file .

      .

      Anot\n+0019c420: 6865 7220 6170 7072 6f61 6368 2074 6f20 her approach to \n+0019c430: 636f 6d62 696e 6520 6d75 6c74 6970 6c65 combine multiple\n+0019c440: 2063 6c69 656e 7420 616e 6420 7365 7276 client and serv\n+0019c450: 6963 6520 6170 706c 6963 6174 696f 6e73 ice applications\n+0019c460: 2069 6e74 6f20 6f6e 6520 6578 6563 7574 into one execut\n+0019c470: 6162 6c65 2069 7320 6279 2075 7369 6e67 able is by using\n+0019c480: 2043 2b2b 206e 616d 6573 7061 6365 7320 C++ namespaces \n+0019c490: 746f 2073 7472 7563 7475 7261 6c6c 7920 to structurally \n+0019c4a0: 7365 7061 7261 7465 2074 6865 2064 6566 separate the def\n+0019c4b0: 696e 6974 696f 6e73 2e20 5468 6973 2069 initions. This i\n+0019c4c0: 7320 6175 746f 6d61 7465 6420 7769 7468 s automated with\n+0019c4d0: 203c 6120 6872 6566 3d22 2377 7364 6c32 ws\n+0019c4f0: 646c 3268 202d 7120 6e61 6d65 3c2f 636f dl2h -q name option <\n+0019c510: 623e 3c63 6f64 653e 2d71 206e 616d 653c b>-q name<\n+0019c520: 2f63 6f64 653e 3c2f 623e 3c2f 613e 2e20 /code>. \n+0019c530: 4f72 2062 7920 6372 6561 7469 6e67 206c Or by creating l\n+0019c540: 6962 7261 7269 6573 2069 6e20 4320 666f ibraries in C fo\n+0019c550: 7220 7468 6520 636c 6965 6e74 2f73 6572 r the client/ser\n+0019c560: 7665 7220 6f62 6a65 6374 7320 6173 2065 ver objects as e\n+0019c570: 7870 6c61 696e 6564 2069 6e20 7375 6273 xplained in subs\n+0019c580: 6571 7565 6e74 2073 6563 7469 6f6e 733c equent sections<\n+0019c590: 2f70 3e0a 3c70 3e42 6f74 6820 6170 7072 /p>.

      Both appr\n+0019c5a0: 6f61 6368 6573 2061 7265 2064 656d 6f6e oaches are demon\n+0019c5b0: 7374 7261 7465 6420 6279 2065 7861 6d70 strated by examp\n+0019c5c0: 6c65 7320 696e 2074 6865 2067 534f 4150 les in the gSOAP\n+0019c5d0: 2073 6f75 7263 6520 636f 6465 2070 6163 source code pac\n+0019c5e0: 6b61 6765 2c20 7468 6520 3c65 6d3e 3c63 kage, the gsoap/sample\n+0019c600: 732f 6c69 6e6b 3c2f 636f 6465 3e3c 2f65 s/link (C only) and \n+0019c620: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+0019c630: 7361 6d70 6c65 732f 6c69 6e6b 2b2b 3c2f samples/link++ (C++ \n+0019c650: 7769 7468 2043 2b2b 206e 616d 6573 7061 with C++ namespa\n+0019c660: 6365 7329 2065 7861 6d70 6c65 732e 3c2f ces) examples..

      .... Back to t\n+0019c690: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n+0019c6a0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

      .

      .How to bu\n+0019c6e0: 696c 6420 6120 636c 6965 6e74 206f 7220 ild a client or \n+0019c6f0: 7365 7276 6572 2069 6e20 6120 432b 2b20 server in a C++ \n+0019c700: 636f 6465 206e 616d 6573 7061 6365 3c2f code namespace.

      You can u\n+0019c720: 7365 2061 2043 2b2b 2063 6f64 6520 6e61 se a C++ code na\n+0019c730: 6d65 7370 6163 6520 6f66 2079 6f75 7220 mespace of your \n+0019c740: 6368 6f69 6365 2069 6e20 796f 7572 2069 choice in your i\n+0019c750: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+0019c760: 6669 6c65 2074 6f20 6275 696c 6420 6120 file to build a \n+0019c770: 636c 6965 6e74 206f 7220 7365 7276 6572 client or server\n+0019c780: 2069 6e20 7468 6174 2043 2b2b 206e 616d in that C++ nam\n+0019c790: 6573 7061 6365 2e20 496e 2074 6869 7320 espace. In this \n+0019c7a0: 7761 792c 2079 6f75 2063 616e 2063 7265 way, you can cre\n+0019c7b0: 6174 6520 6d75 6c74 6970 6c65 2063 6c69 ate multiple cli\n+0019c7c0: 656e 7473 2061 6e64 2073 6572 7665 7273 ents and servers\n+0019c7d0: 2074 6861 7420 6361 6e20 6265 2063 6f6d that can be com\n+0019c7e0: 6269 6e65 6420 616e 6420 6c69 6e6b 6564 bined and linked\n+0019c7f0: 2074 6f67 6574 6865 7220 7769 7468 6f75 together withou\n+0019c800: 7420 636f 6e66 6c69 6374 732c 2077 6869 t conflicts, whi\n+0019c810: 6368 2069 7320 6578 706c 6169 6e65 6420 ch is explained \n+0019c820: 696e 206d 6f72 6520 6465 7461 696c 2069 in more detail i\n+0019c830: 6e20 7468 6520 6e65 7874 2073 6563 7469 n the next secti\n+0019c840: 6f6e 2028 7768 6963 6820 616c 736f 2073 on (which also s\n+0019c850: 686f 7773 2061 6e20 6578 616d 706c 6520 hows an example \n+0019c860: 636f 6d62 696e 696e 6720 7477 6f20 636c combining two cl\n+0019c870: 6965 6e74 206c 6962 7261 7269 6573 2064 ient libraries d\n+0019c880: 6566 696e 6564 2069 6e20 7477 6f20 432b efined in two C+\n+0019c890: 2b20 636f 6465 206e 616d 6573 7061 6365 + code namespace\n+0019c8a0: 7329 2e3c 2f70 3e0a 3c70 3e55 7365 203c s).

      .

      Use <\n+0019c8b0: 6120 6872 6566 3d22 2377 7364 6c32 682d a href=\"#wsdl2h-\n+0019c8c0: 7122 3e3c 623e 3c63 6f64 653e 7773 646c q\">wsdl\n+0019c8d0: 3268 202d 7120 6e61 6d65 3c2f 636f 6465 2h -q name option \n+0019c8f0: 3c63 6f64 653e 2d71 206e 616d 653c 2f63 -q name to \n+0019c910: 6765 6e65 7261 7465 2064 6566 696e 6974 generate definit\n+0019c920: 696f 6e73 2069 6e20 7468 6520 432b 2b20 ions in the C++ \n+0019c930: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name namespace. Thi\n+0019c950: 7320 6f70 7469 6f6e 2063 616e 2061 6c73 s option can als\n+0019c960: 6f20 6265 2075 7365 6420 696e 2063 6f6d o be used in com\n+0019c970: 6269 6e61 7469 6f6e 2077 6974 6820 432b bination with C+\n+0019c980: 2b20 7072 6f78 7920 616e 6420 7365 7276 + proxy and serv\n+0019c990: 6572 206f 626a 6563 7420 6765 6e65 7261 er object genera\n+0019c9a0: 7469 6f6e 2c20 7573 696e 6720 3c62 3e3c tion, using <\n+0019c9b0: 636f 6465 3e73 6f61 7063 7070 3220 2d6a code>soapcpp2 -j\n+0019c9c0: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+0019c9d0: 6f6e 203c 623e 3c63 6f64 653e 2d6a 3c2f on -j or opt\n+0019c9f0: 696f 6e20 3c62 3e3c 636f 6465 3e2d 693c ion -i<\n+0019ca00: 2f63 6f64 653e 3c2f 623e 292e 3c2f 703e /code>).

      \n+0019ca10: 0a3c 703e 4174 206d 6f73 7420 6f6e 6520 .

      At most one \n+0019ca20: 6e61 6d65 7370 6163 6520 6361 6e20 6265 namespace can be\n+0019ca30: 2064 6566 696e 6564 2066 6f72 2074 6865 defined for the\n+0019ca40: 2065 6e74 6972 6520 696e 7465 7266 6163 entire interfac\n+0019ca50: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n+0019ca60: 7220 736f 6170 6370 7032 2e20 5468 6520 r soapcpp2. The \n+0019ca70: 432b 2b20 6e61 6d65 7370 6163 6520 6d75 C++ namespace mu\n+0019ca80: 7374 2063 6f6d 706c 6574 656c 7920 656e st completely en\n+0019ca90: 6361 7073 756c 6174 6520 7468 6520 656e capsulate the en\n+0019caa0: 7469 7265 2063 6f6e 7465 6e74 7320 6f66 tire contents of\n+0019cab0: 2074 6865 2068 6561 6465 7220 6669 6c65 the header file\n+0019cac0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

      .
      namespace NamespaceNa\n+0019cb20: 6d65 207b 3c2f 6469 763e 0a3c 6469 7620 me {
      .
      .\n+0019cb40: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. interfa\n+0019cb60: 6365 203c 2f73 7061 6e3e 6865 6164 6572 ce header\n+0019cb70: 2066 696c 6520 636f 6e74 656e 7473 202e file contents .\n+0019cb80: 2e2e 203c 2f64 6976 3e0a 3c64 6976 2063 ..
      .
      }.

      Wh\n+0019cbc0: 656e 2063 6f6d 7069 6c69 6e67 2074 6869 en compiling thi\n+0019cbd0: 7320 696e 7465 7266 6163 6520 6865 6164 s interface head\n+0019cbe0: 6572 2066 696c 6520 7769 7468 2074 6865 er file with the\n+0019cbf0: 2073 6f61 7063 7070 3220 746f 6f6c 2c20 soapcpp2 tool, \n+0019cc00: 616c 6c20 7479 7065 2064 6566 696e 6974 all type definit\n+0019cc10: 696f 6e73 2c20 7468 6520 7365 7269 616c ions, the serial\n+0019cc20: 697a 6572 7320 666f 7220 7468 6573 6520 izers for these \n+0019cc30: 7479 7065 732c 2061 6e64 2074 6865 2073 types, and the s\n+0019cc40: 7475 6220 616e 6420 736b 656c 6574 6f6e tub and skeleton\n+0019cc50: 2066 756e 6374 696f 6e73 2077 696c 6c20 functions will \n+0019cc60: 6265 2070 6c61 6365 6420 696e 2074 6869 be placed in thi\n+0019cc70: 7320 6e61 6d65 7370 6163 652e 2054 6865 s namespace. The\n+0019cc80: 2058 4d4c 206e 616d 6573 7061 6365 206d XML namespace m\n+0019cc90: 6170 7069 6e67 2074 6162 6c65 2028 7361 apping table (sa\n+0019cca0: 7665 6420 696e 2061 203c 656d 3e3c 636f ved in a .nsmap\n+0019ccc0: 3c2f 656d 3e20 6669 6c65 2920 7769 6c6c file) will\n+0019ccd0: 206e 6f74 2062 6520 706c 6163 6564 2069 not be placed i\n+0019cce0: 6e20 7468 6520 636f 6465 206e 616d 6573 n the code names\n+0019ccf0: 7061 6365 2074 6f20 616c 6c6f 7720 6974 pace to allow it\n+0019cd00: 2074 6f20 6265 206c 696e 6b65 6420 6173 to be linked as\n+0019cd10: 2061 2067 6c6f 6261 6c20 6f62 6a65 6374 a global object\n+0019cd20: 2e20 596f 7520 6361 6e20 7573 6520 3c62 . You can use soapcpp2 \n+0019cd40: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -n op\n+0019cd50: 7469 6f6e 203c 623e 3c63 6f64 653e 2d6e tion -n\n+0019cd60: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2063 to c\n+0019cd70: 7265 6174 6520 6c6f 6361 6c20 584d 4c20 reate local XML \n+0019cd80: 6e61 6d65 7370 6163 6520 7461 626c 6573 namespace tables\n+0019cd90: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section so\n+0019cdd0: 6170 6370 7032 206f 7074 696f 6e73 3c2f apcpp2 options (but remember\n+0019cdf0: 2074 6861 7420 796f 7520 6578 706c 6963 that you explic\n+0019ce00: 6974 6c79 206e 6565 6420 746f 2069 6e69 itly need to ini\n+0019ce10: 7469 616c 697a 6520 7468 6520 6e61 6d65 tialize the name\n+0019ce20: 7370 6163 6573 2074 6f20 706f 696e 7420 spaces to point \n+0019ce30: 746f 2061 2074 6162 6c65 2061 7420 7275 to a table at ru\n+0019ce40: 6e20 7469 6d65 2075 7369 6e67 203c 636f n time using soap_set_name\n+0019cf20: 7370 6163 6573 3c2f 613e 3c2f 636f 6465 spaces). The generate\n+0019cf40: 6420 6669 6c65 7320 6172 6520 7072 6566 d files are pref\n+0019cf50: 6978 6564 2077 6974 6820 7468 6520 636f ixed with the co\n+0019cf60: 6465 206e 616d 6573 7061 6365 206e 616d de namespace nam\n+0019cf70: 6520 696e 7374 6561 6420 6f66 2074 6865 e instead of the\n+0019cf80: 2075 7375 616c 203c 656d 3e3c 636f 6465 usual soap file name pref\n+0019cfb0: 6978 2074 6f20 656e 6162 6c65 206d 756c ix to enable mul\n+0019cfc0: 7469 706c 6520 636c 6965 6e74 2f73 6572 tiple client/ser\n+0019cfd0: 7665 7220 636f 6465 7320 746f 2062 6520 ver codes to be \n+0019cfe0: 6275 696c 6420 696e 2074 6865 2073 616d build in the sam\n+0019cff0: 6520 7072 6f6a 6563 7420 6469 7265 6374 e project direct\n+0019d000: 6f72 792e 3c2f 703e 0a3c 703e 4265 6361 ory.

      .

      Beca\n+0019d010: 7573 6520 7468 6520 534f 4150 2048 6561 use the SOAP Hea\n+0019d020: 6465 7220 616e 6420 4661 756c 7420 7365 der and Fault se\n+0019d030: 7269 616c 697a 6572 7320 7769 6c6c 2061 rializers will a\n+0019d040: 6c73 6f20 6265 2070 6c61 6365 6420 696e lso be placed in\n+0019d050: 2074 6865 206e 616d 6573 7061 6365 2c20 the namespace, \n+0019d060: 7468 6579 2063 616e 6e6f 7420 6265 2063 they cannot be c\n+0019d070: 616c 6c65 6420 6672 6f6d 2074 6865 203c alled from the <\n+0019d080: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+0019d090: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp run time\n+0019d0b0: 206c 6962 7261 7279 2063 6f64 6520 616e library code an\n+0019d0c0: 6420 6172 6520 7468 6572 6566 6f72 6520 d are therefore \n+0019d0d0: 7265 6e64 6572 6564 2075 6e75 7361 626c rendered unusabl\n+0019d0e0: 652e 2054 6865 7265 666f 7265 2c20 7468 e. Therefore, th\n+0019d0f0: 6573 6520 7365 7269 616c 697a 6572 7320 ese serializers \n+0019d100: 6172 6520 6e6f 7420 636f 6d70 696c 6564 are not compiled\n+0019d110: 2061 7420 616c 6c20 2865 6e66 6f72 6365 at all (enforce\n+0019d120: 6420 7769 7468 203c 636f 6465 3e23 6465 d with #de\n+0019d130: 6669 6e65 2057 4954 485f 4e4f 474c 4f42 fine WITH_NOGLOB\n+0019d140: 414c 3c2f 636f 6465 3e29 2e20 546f 2061 AL). To a\n+0019d150: 6464 2053 4f41 5020 4865 6164 6572 2061 dd SOAP Header a\n+0019d160: 6e64 2046 6175 6c74 2073 6572 6961 6c69 nd Fault seriali\n+0019d170: 7a65 7273 2c20 796f 7520 6d75 7374 2063 zers, you must c\n+0019d180: 6f6d 7069 6c65 2074 6865 6d20 7365 7061 ompile them sepa\n+0019d190: 7261 7465 6c79 2061 7320 666f 6c6c 6f77 rately as follow\n+0019d1a0: 732e 2046 6972 7374 2c20 6372 6561 7465 s. First, create\n+0019d1b0: 2061 206e 6577 2068 6561 6465 7220 6669 a new header fi\n+0019d1c0: 6c65 203c 656d 3e3c 636f 6465 3e65 6e76 le env\n+0019d1d0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2077 .h w\n+0019d1e0: 6974 6820 7468 6520 534f 4150 2048 6561 ith the SOAP Hea\n+0019d1f0: 6465 7220 3c63 6f64 653e 3c61 2063 6c61 der SOAP_ENV__H\n+0019d260: 6561 6465 723c 2f61 3e3c 2f63 6f64 653e eader\n+0019d270: 2061 6e64 2053 4f41 5020 4661 756c 7420 and SOAP Fault \n+0019d280: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 S\n+0019d2e0: 4f41 505f 454e 565f 5f46 6175 6c74 3c2f OAP_ENV__Fault struct\n+0019d300: 7572 6573 2c20 696e 636c 7564 696e 6720 ures, including \n+0019d310: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 SOAP_ENV_\n+0019d380: 5f44 6574 6169 6c3c 2f61 3e3c 2f63 6f64 _Detail if this struc\n+0019d3a0: 7475 7265 2063 6f6e 7461 696e 7320 6d65 ture contains me\n+0019d3b0: 6d62 6572 7320 7468 6174 2061 7265 2073 mbers that are s\n+0019d3c0: 6572 6961 6c69 7a65 6420 6173 2066 6175 erialized as fau\n+0019d3d0: 6c74 2064 6574 6169 6c73 2e20 596f 7520 lt details. You \n+0019d3e0: 6361 6e20 6c65 6176 6520 7468 6973 2068 can leave this h\n+0019d3f0: 6561 6465 7220 6669 6c65 2065 6d70 7479 eader file empty\n+0019d400: 2069 6620 796f 7520 7761 6e74 2074 6f20 if you want to \n+0019d410: 7573 6520 7468 6520 6465 6661 756c 7420 use the default \n+0019d420: 534f 4150 2048 6561 6465 7220 616e 6420 SOAP Header and \n+0019d430: 4661 756c 742e 2048 6f77 6576 6572 2c20 Fault. However, \n+0019d440: 6966 2053 4f41 5020 4865 6164 6572 7320 if SOAP Headers \n+0019d450: 6172 6520 7265 7175 6972 6564 2074 6865 are required the\n+0019d460: 6e20 796f 7520 6361 6e6e 6f74 206c 6561 n you cannot lea\n+0019d470: 7665 2074 6865 203c 636f 6465 3e3c 6120 ve the SOAP_ENV\n+0019d4e0: 5f5f 4865 6164 6572 3c2f 613e 3c2f 636f __Header structure em\n+0019d500: 7074 792e 2046 6f72 2065 7861 6d70 6c65 pty. For example\n+0019d510: 2c20 7468 6520 5753 2d41 6464 7265 7373 , the WS-Address\n+0019d520: 696e 6720 616e 6420 5753 2d53 6563 7572 ing and WS-Secur\n+0019d530: 6974 7920 706c 7567 696e 7320 7265 7175 ity plugins requ\n+0019d540: 6972 6520 534f 4150 2048 6561 6465 7273 ire SOAP Headers\n+0019d550: 2077 6869 6368 2063 616e 2062 6520 696d which can be im\n+0019d560: 706f 7274 6564 2062 7920 6164 6469 6e67 ported by adding\n+0019d570: 203c 636f 6465 3e23 696d 706f 7274 2022 #import \"\n+0019d580: 7773 6135 2e68 223c 2f63 6f64 653e 2061 wsa5.h\" a\n+0019d590: 6e64 203c 636f 6465 3e23 696d 706f 7274 nd #import\n+0019d5a0: 2022 7773 7365 2e68 223c 2f63 6f64 653e \"wsse.h\"\n+0019d5b0: 2c20 7265 7370 6563 7469 7665 6c79 2074 , respectively t\n+0019d5c0: 6f20 3c65 6d3e 3c63 6f64 653e 656e 762e o env.\n+0019d5d0: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2054 h. T\n+0019d5e0: 6865 6e20 636f 6d70 696c 6520 7468 6973 hen compile this\n+0019d5f0: 2068 6561 6465 7220 6669 6c65 2077 6974 header file wit\n+0019d600: 683a 203c 2f70 3e3c 7072 6520 636c 6173 h:

       so\n+0019d620: 6170 6370 7032 202d 7065 6e76 2065 6e76  apcpp2 -penv env\n+0019d630: 2e68 0a3c 2f70 7265 3e3c 703e 2054 6865  .h.

      The\n+0019d640: 2067 656e 6572 6174 6564 203c 656d 3e3c generated <\n+0019d650: 636f 6465 3e65 6e76 432e 6370 703c 2f63 code>envC.cpp file h\n+0019d670: 6f6c 6473 2074 6865 2053 4f41 5020 4865 olds the SOAP He\n+0019d680: 6164 6572 2061 6e64 2046 6175 6c74 2073 ader and Fault s\n+0019d690: 6572 6961 6c69 7a65 7273 2061 6e64 2079 erializers and y\n+0019d6a0: 6f75 2063 616e 206c 696e 6b20 7468 6973 ou can link this\n+0019d6b0: 2066 696c 6520 7769 7468 2079 6f75 7220 file with your \n+0019d6c0: 636c 6965 6e74 2061 6e64 2073 6572 7665 client and serve\n+0019d6d0: 7220 6170 706c 6963 6174 696f 6e73 2e3c r applications.<\n+0019d6e0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

      .

      \n+0019d740: 0a48 6f77 2074 6f20 6372 6561 7465 2063 .How to create c\n+0019d750: 6c69 656e 742f 7365 7276 6572 206c 6962 lient/server lib\n+0019d760: 7261 7269 6573 3c2f 6832 3e0a 3c70 3e54 raries

      .

      T\n+0019d770: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool\n+0019d780: 2070 726f 6475 6365 7320 3c65 6d3e 3c63 produces soapClientLi\n+0019d7a0: 622e 6370 703c 2f63 6f64 653e 3c2f 656d b.cpp and \n+0019d7c0: 736f 6170 5365 7276 6572 4c69 622e 6370 soapServerLib.cp\n+0019d7d0: 703c 2f63 6f64 653e 3c2f 656d 3e20 736f p so\n+0019d7e0: 7572 6365 2063 6f64 6520 6669 6c65 7320 urce code files \n+0019d7f0: 7468 6174 2061 7265 2073 7065 6369 6669 that are specifi\n+0019d800: 6361 6c6c 7920 696e 7465 6e64 6564 2066 cally intended f\n+0019d810: 6f72 2062 7569 6c64 696e 6720 7374 6174 or building stat\n+0019d820: 6963 206f 7220 6479 6e61 6d69 6320 636c ic or dynamic cl\n+0019d830: 6965 6e74 2061 6e64 2073 6572 7665 7220 ient and server \n+0019d840: 6c69 6272 6172 6965 7320 696e 2043 206f libraries in C o\n+0019d850: 7220 432b 2b2e 2054 6865 7365 2066 696c r C++. These fil\n+0019d860: 6573 2065 7870 6f72 7420 7468 6520 7374 es export the st\n+0019d870: 7562 2061 6e64 2073 6b65 6c65 746f 6e20 ub and skeleton \n+0019d880: 6675 6e63 7469 6f6e 732c 2062 7574 206b functions, but k\n+0019d890: 6565 7020 616c 6c20 7365 7269 616c 697a eep all serializ\n+0019d8a0: 6174 696f 6e20 636f 6465 2073 7461 7469 ation code stati\n+0019d8b0: 632c 2074 6875 7320 6869 6464 656e 2074 c, thus hidden t\n+0019d8c0: 6f20 6176 6f69 6420 6c69 6e6b 2073 796d o avoid link sym\n+0019d8d0: 626f 6c20 636f 6e66 6c69 6374 7320 7768 bol conflicts wh\n+0019d8e0: 656e 2063 6f6d 6269 6e69 6e67 206d 756c en combining mul\n+0019d8f0: 7469 706c 6520 636c 6965 6e74 7320 616e tiple clients an\n+0019d900: 6420 7365 7276 6963 6573 2069 6e74 6f20 d services into \n+0019d910: 6f6e 6520 6578 6563 7574 6162 6c65 2e20 one executable. \n+0019d920: 4e6f 7465 2074 6861 7420 6974 2069 7320 Note that it is \n+0019d930: 6661 7220 7369 6d70 6c65 7220 746f 2075 far simpler to u\n+0019d940: 7365 2074 6865 2077 7364 6c32 6820 746f se the wsdl2h to\n+0019d950: 6f6c 206f 6e20 6d75 6c74 6970 6c65 2057 ol on multiple W\n+0019d960: 5344 4c20 6669 6c65 7320 746f 2067 656e SDL files to gen\n+0019d970: 6572 6174 6520 6120 6865 6164 6572 2066 erate a header f\n+0019d980: 696c 6520 7468 6174 2063 6f6d 6269 6e65 ile that combine\n+0019d990: 7320 616c 6c20 7365 7276 6963 6520 6465 s all service de\n+0019d9a0: 6669 6e69 7469 6f6e 732e 2048 6f77 6576 finitions. Howev\n+0019d9b0: 6572 2c20 7468 6520 6170 7072 6f61 6368 er, the approach\n+0019d9c0: 2070 7265 7365 6e74 6564 2069 6e20 7468 presented in th\n+0019d9d0: 6973 2073 6563 7469 6f6e 2069 7320 7573 is section is us\n+0019d9e0: 6566 756c 2077 6865 6e20 6372 6561 7469 eful when creati\n+0019d9f0: 6e67 2028 6479 6e61 6d69 6329 206c 6962 ng (dynamic) lib\n+0019da00: 7261 7269 6573 2066 6f72 2063 6c69 656e raries for clien\n+0019da10: 7420 616e 6420 7365 7276 6572 206f 626a t and server obj\n+0019da20: 6563 7473 2c20 7375 6368 2061 7320 444c ects, such as DL\n+0019da30: 4c73 2061 7320 6465 7363 7269 6265 6420 Ls as described \n+0019da40: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section H\n+0019da70: 6f77 2074 6f20 6372 6561 7465 2044 4c4c ow to create DLL\n+0019da80: 733c 2f61 3e20 2e3c 2f70 3e0a 3c64 6c20 s .

      .
      Note
      One major \n+0019dac0: 6469 7361 6476 616e 7461 6765 206f 6620 disadvantage of \n+0019dad0: 7468 6520 6170 7072 6f61 6368 2070 7265 the approach pre\n+0019dae0: 7365 6e74 6564 2068 6572 6520 6973 2074 sented here is t\n+0019daf0: 6861 7420 7468 6520 7365 7269 616c 697a hat the serializ\n+0019db00: 6572 2066 756e 6374 696f 6e73 2061 7265 er functions are\n+0019db10: 206e 6f20 6c6f 6e67 6572 2061 6363 6573 no longer acces\n+0019db20: 7369 626c 6520 696e 2074 6865 2075 7365 sible in the use\n+0019db30: 7227 7320 736f 7572 6365 2063 6f64 652c r's source code,\n+0019db40: 2062 6563 6175 7365 2073 6572 6961 6c69 because seriali\n+0019db50: 7a65 7273 2077 696c 6c20 6265 2063 6f6e zers will be con\n+0019db60: 7665 7274 6564 2074 6f20 7374 6174 6963 verted to static\n+0019db70: 2066 756e 6374 696f 6e73 2028 746f 2062 functions (to b\n+0019db80: 6520 7573 6564 2062 7920 7468 6520 6765 e used by the ge\n+0019db90: 6e65 7261 7465 6420 7374 7562 2061 6e64 nerated stub and\n+0019dba0: 2073 6b65 6c65 746f 6e20 6675 6e63 7469 skeleton functi\n+0019dbb0: 6f6e 7320 6f6e 6c79 292e 2046 6f72 2065 ons only). For e\n+0019dbc0: 7861 6d70 6c65 2c20 6675 6e63 7469 6f6e xample, function\n+0019dbd0: 7320 7375 6368 2061 7320 3c63 6f64 653e s such as \n+0019dbe0: 736f 6170 5f6e 6577 5f54 3c2f 636f 6465 soap_new_T, soap_de\n+0019dc00: 6661 756c 745f 543c 2f63 6f64 653e 2c20 fault_T, \n+0019dc10: 3c63 6f64 653e 736f 6170 5f77 7269 7465 soap_write\n+0019dc20: 5f54 3c2f 636f 6465 3e2c 203c 636f 6465 _T, soap_read_T, soap_\n+0019dc50: 7075 745f 543c 2f63 6f64 653e 2c20 616e put_T, an\n+0019dc60: 6420 3c63 6f64 653e 736f 6170 5f67 6574 d soap_get\n+0019dc70: 5f54 3c2f 636f 6465 3e20 6361 6e6e 6f74 _T cannot\n+0019dc80: 2062 6520 7573 6564 2061 6e79 206c 6f6e be used any lon\n+0019dc90: 6765 722e 3c2f 6464 3e3c 2f64 6c3e 0a3c ger.
      .<\n+0019dca0: 703e 5573 696e 6720 432b 2b20 6e61 6d65 p>Using C++ name\n+0019dcb0: 7370 6163 6573 2069 7320 6120 6265 7474 spaces is a bett\n+0019dcc0: 6572 2061 6c74 6572 6e61 7469 7665 2077 er alternative w\n+0019dcd0: 6865 6e20 6275 696c 6469 6e67 2061 7070 hen building app\n+0019dce0: 6c69 6361 7469 6f6e 7320 696e 2043 2b2b lications in C++\n+0019dcf0: 2074 6861 7420 636f 6d62 696e 6520 6d75 that combine mu\n+0019dd00: 6c74 6970 6c65 2063 6c69 656e 7473 2061 ltiple clients a\n+0019dd10: 6e64 2073 6572 7669 6365 732e 2054 6f20 nd services. To \n+0019dd20: 6275 696c 6420 6d75 6c74 6970 6c65 206c build multiple l\n+0019dd30: 6962 7261 7269 6573 2c20 796f 7520 6361 ibraries, you ca\n+0019dd40: 6e20 6465 6669 6e65 2061 2043 2b2b 206e n define a C++ n\n+0019dd50: 616d 6573 7061 6365 2069 6e20 796f 7572 amespace in your\n+0019dd60: 2068 6561 6465 7220 6669 6c65 2077 6974 header file wit\n+0019dd70: 6820 3c62 3e3c 636f 6465 3e73 6f61 7063 h soapc\n+0019dd80: 7070 3220 2d71 6e61 6d65 3c2f 636f 6465 pp2 -qname option \n+0019dda0: 3c63 6f64 653e 2d71 6e61 6d65 3c2f 636f -qname, see Sec\n+0019ddc0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion How to build \n+0019de00: 6120 636c 6965 6e74 206f 7220 7365 7276 a client or serv\n+0019de10: 6572 2069 6e20 6120 432b 2b20 636f 6465 er in a C++ code\n+0019de20: 206e 616d 6573 7061 6365 3c2f 613e 2066 namespace f\n+0019de30: 6f72 2064 6574 6169 6c73 2e3c 2f70 3e0a or details.

      .\n+0019de40: 3c70 3e46 6f72 2043 2c20 796f 7520 6361

      For C, you ca\n+0019de50: 6e20 7573 6520 3c62 3e3c 636f 6465 3e73 n use s\n+0019de60: 6f61 7063 7070 3220 2d63 202d 7020 6e61 oapcpp2 -c -p na\n+0019de70: 6d65 3c2f 636f 6465 3e3c 2f62 3e20 6f70 me op\n+0019de80: 7469 6f6e 203c 623e 3c63 6f64 653e 2d70 tion -p\n+0019de90: 206e 616d 653c 2f63 6f64 653e 3c2f 623e name\n+0019dea0: 2074 6f20 7265 6e61 6d65 2074 6865 2067 to rename the g\n+0019deb0: 656e 6572 6174 6564 203c 656d 3e3c 636f enerated soapClientLib\n+0019ded0: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .c a\n+0019dee0: 6e64 203c 656d 3e3c 636f 6465 3e73 6f61 nd soa\n+0019def0: 7053 6572 7665 724c 6962 2e63 3c2f 636f pServerLib.c (and as\n+0019df10: 736f 6369 6174 6564 2920 6669 6c65 732e sociated) files.\n+0019df20: 2054 6865 203c 623e 3c63 6f64 653e 2d70 The -p\n+0019df30: 206e 616d 653c 2f63 6f64 653e 3c2f 623e name\n+0019df40: 206f 7074 696f 6e20 7370 6563 6966 6965 option specifie\n+0019df50: 7320 7468 6520 6669 6c65 203c 656d 3e3c s the file <\n+0019df60: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name\n+0019df70: 3c2f 656d 3e20 7072 6566 6978 2074 6f20 prefix to \n+0019df80: 7265 706c 6163 6520 7468 6520 3c65 6d3e replace the \n+0019df90: 3c63 6f64 653e 736f 6170 3c2f 636f 6465 soap file name\n+0019dfb0: 2070 7265 6669 782e 3c2f 703e 0a3c 703e prefix.

      .

      \n+0019dfc0: 5468 6520 656e 6769 6e65 2064 6f65 7320 The engine does \n+0019dfd0: 6e6f 7420 6465 6669 6e65 2053 4f41 5020 not define SOAP \n+0019dfe0: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n+0019dff0: 2073 6572 6961 6c69 7a65 7273 2074 6861 serializers tha\n+0019e000: 7420 7468 6520 656e 6769 6e65 206e 6565 t the engine nee\n+0019e010: 6473 2e20 5765 2074 6865 7265 666f 7265 ds. We therefore\n+0019e020: 2061 6464 2053 4f41 5020 4865 6164 6572 add SOAP Header\n+0019e030: 2061 6e64 2046 6175 6c74 2073 6572 6961 and Fault seria\n+0019e040: 6c69 7a65 7273 2c20 7768 6963 6820 6172 lizers, which ar\n+0019e050: 6520 636f 6d70 696c 6564 2073 6570 6172 e compiled separ\n+0019e060: 6174 656c 7920 6173 2066 6f6c 6c6f 7773 ately as follows\n+0019e070: 2e20 4669 7273 742c 2063 7265 6174 6520 . First, create \n+0019e080: 6120 6e65 7720 6865 6164 6572 2066 696c a new header fil\n+0019e090: 6520 3c65 6d3e 3c63 6f64 653e 656e 762e e env.\n+0019e0a0: 683c 2f63 6f64 653e 3c2f 656d 3e20 7769 h wi\n+0019e0b0: 7468 2074 6865 2053 4f41 5020 4865 6164 th the SOAP Head\n+0019e0c0: 6572 203c 636f 6465 3e3c 6120 636c 6173 er SOAP_ENV__He\n+0019e130: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader \n+0019e140: 616e 6420 534f 4150 2046 6175 6c74 203c and SOAP Fault <\n+0019e150: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>SO\n+0019e1b0: 4150 5f45 4e56 5f5f 4661 756c 743c 2f61 AP_ENV__Fault structu\n+0019e1d0: 7265 732c 2069 6e63 6c75 6469 6e67 203c res, including <\n+0019e1e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>SOAP_ENV__\n+0019e250: 4465 7461 696c 3c2f 613e 3c2f 636f 6465 Detail if this struct\n+0019e270: 7572 6520 636f 6e74 6169 6e73 206d 656d ure contains mem\n+0019e280: 6265 7273 2074 6861 7420 6172 6520 7365 bers that are se\n+0019e290: 7269 616c 697a 6564 2061 7320 6661 756c rialized as faul\n+0019e2a0: 7420 6465 7461 696c 732e 2059 6f75 2063 t details. You c\n+0019e2b0: 616e 206c 6561 7665 2074 6869 7320 6865 an leave this he\n+0019e2c0: 6164 6572 2066 696c 6520 656d 7074 7920 ader file empty \n+0019e2d0: 6966 2079 6f75 2077 616e 7420 746f 2075 if you want to u\n+0019e2e0: 7365 2074 6865 2064 6566 6175 6c74 2053 se the default S\n+0019e2f0: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F\n+0019e300: 6175 6c74 2e20 486f 7765 7665 722c 2069 ault. However, i\n+0019e310: 6620 534f 4150 2048 6561 6465 7273 2061 f SOAP Headers a\n+0019e320: 7265 2072 6571 7569 7265 6420 7468 656e re required then\n+0019e330: 2079 6f75 2063 616e 6e6f 7420 6c65 6176 you cannot leav\n+0019e340: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the SOAP_ENV_\n+0019e3b0: 5f48 6561 6465 723c 2f61 3e3c 2f63 6f64 _Header structure emp\n+0019e3d0: 7479 2e20 466f 7220 6578 616d 706c 652c ty. For example,\n+0019e3e0: 2074 6865 2057 532d 4164 6472 6573 7369 the WS-Addressi\n+0019e3f0: 6e67 2061 6e64 2057 532d 5365 6375 7269 ng and WS-Securi\n+0019e400: 7479 2070 6c75 6769 6e73 2072 6571 7569 ty plugins requi\n+0019e410: 7265 2053 4f41 5020 4865 6164 6572 7320 re SOAP Headers \n+0019e420: 7768 6963 6820 6361 6e20 6265 2069 6d70 which can be imp\n+0019e430: 6f72 7465 6420 6279 2061 6464 696e 6720 orted by adding \n+0019e440: 3c63 6f64 653e 2369 6d70 6f72 7420 2277 #import \"w\n+0019e450: 7361 352e 6822 3c2f 636f 6465 3e20 616e sa5.h\" an\n+0019e460: 6420 3c63 6f64 653e 2369 6d70 6f72 7420 d #import \n+0019e470: 2277 7373 652e 6822 3c2f 636f 6465 3e2c \"wsse.h\",\n+0019e480: 2072 6573 7065 6374 6976 656c 7920 746f respectively to\n+0019e490: 203c 656d 3e3c 636f 6465 3e65 6e76 2e68 env.h\n+0019e4a0: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 5468 . Th\n+0019e4b0: 656e 2063 6f6d 7069 6c65 2074 6869 7320 en compile this \n+0019e4c0: 6865 6164 6572 2066 696c 6520 7769 7468 header file with\n+0019e4d0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

       soa\n+0019e4f0: 7063 7070 3220 2d70 656e 7620 656e 762e  pcpp2 -penv env.\n+0019e500: 680a 3c2f 7072 653e 3c70 3e20 5468 6520  h.

      The \n+0019e510: 6765 6e65 7261 7465 6420 3c65 6d3e 3c63 generated envC.cpp file ho\n+0019e540: 6c64 7320 7468 6520 534f 4150 2048 6561 lds the SOAP Hea\n+0019e550: 6465 7220 616e 6420 4661 756c 7420 7365 der and Fault se\n+0019e560: 7269 616c 697a 6572 7320 616e 6420 796f rializers and yo\n+0019e570: 7520 6361 6e20 6372 6561 7465 2061 2028 u can create a (\n+0019e580: 6479 6e61 6d69 6329 206c 6962 7261 7279 dynamic) library\n+0019e590: 2066 6f72 2069 7420 746f 206c 696e 6b20 for it to link \n+0019e5a0: 6974 2077 6974 6820 796f 7572 2063 6c69 it with your cli\n+0019e5b0: 656e 7420 616e 6420 7365 7276 6572 2061 ent and server a\n+0019e5c0: 7070 6c69 6361 7469 6f6e 732e 3c2f 703e pplications.

      \n+0019e5d0: 0a3c 703e 596f 7520 7368 6f75 6c64 2074 .

      You should t\n+0019e5e0: 6865 6e20 636f 6d70 696c 6520 7468 6520 hen compile the \n+0019e5f0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+0019e600: 7374 6473 6f61 7032 2e63 7070 3c2f 636f stdsoap2.cpp library\n+0019e620: 2077 6974 6820 7468 6520 636f 6d70 696c with the compil\n+0019e630: 652d 7469 6d65 203c 636f 6465 3e23 5749 e-time #WI\n+0019e640: 5448 5f4e 4f4e 414d 4553 5041 4345 533c TH_NONAMESPACES<\n+0019e650: 2f63 6f64 653e 2066 6c61 673a 203c 2f70 /code> flag:

       c++ -DWI\n+0019e680: 5448 5f4e 4f4e 414d 4553 5041 4345 5320  TH_NONAMESPACES \n+0019e690: 2d63 2073 7464 736f 6170 322e 6370 700a  -c stdsoap2.cpp.\n+0019e6a0: 3c2f 7072 653e 3c70 3e20 5468 6973 206f  

      This o\n+0019e6b0: 6d69 7473 2074 6865 2072 6566 6572 656e mits the referen\n+0019e6c0: 6365 2074 6f20 7468 6520 676c 6f62 616c ce to the global\n+0019e6d0: 206e 616d 6573 7061 6365 7320 7461 626c namespaces tabl\n+0019e6e0: 652c 2077 6869 6368 2069 7320 6e6f 7768 e, which is nowh\n+0019e6f0: 6572 6520 746f 2062 6520 6465 6669 6e65 ere to be define\n+0019e700: 6420 7369 6e63 6520 7765 2077 696c 6c20 d since we will \n+0019e710: 7573 6520 584d 4c20 6e61 6d65 7370 6163 use XML namespac\n+0019e720: 6573 2066 6f72 2065 6163 6820 636c 6965 es for each clie\n+0019e730: 6e74 2f73 6572 7669 6365 2073 6570 6172 nt/service separ\n+0019e740: 6174 656c 792e 2054 6865 7265 666f 7265 ately. Therefore\n+0019e750: 2c20 796f 7520 6d75 7374 2065 7870 6c69 , you must expli\n+0019e760: 6369 746c 7920 7365 7420 7468 6520 6e61 citly set the na\n+0019e770: 6d65 7370 6163 6573 2076 616c 7565 206f mespaces value o\n+0019e780: 6620 7468 6520 3c63 6f64 653e 3c61 2063 f the soap\n+0019e7e0: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n+0019e7f0: 696e 2079 6f75 7220 636f 6465 2065 7665 in your code eve\n+0019e800: 7279 2074 696d 6520 6166 7465 7220 696e ry time after in\n+0019e810: 6974 6961 6c69 7a61 7469 6f6e 206f 6620 itialization of \n+0019e820: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context wi\n+0019e890: 7468 2074 6865 203c 636f 6465 3e3c 6120 th the soa\n+0019e960: 705f 7365 745f 6e61 6d65 7370 6163 6573 p_set_namespaces\n+0019e970: 2873 7472 7563 7420 736f 6170 2a2c 2063 (struct soap*, c\n+0019e980: 6f6e 7374 2073 7472 7563 7420 4e61 6d65 onst struct Name\n+0019e990: 7370 6163 652a 293c 2f61 3e3c 2f63 6f64 space*) function.

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

      For example,\n+0019e9c0: 2073 7570 706f 7365 2077 6520 6861 7665 suppose we have\n+0019e9d0: 2074 776f 2063 6c69 656e 7473 2064 6566 two clients def\n+0019e9e0: 696e 6564 2069 6e20 6865 6164 6572 2066 ined in header f\n+0019e9f0: 696c 6573 203c 656d 3e3c 636f 6465 3e63 iles c\n+0019ea00: 6c69 656e 7431 2e68 3c2f 636f 6465 3e3c lient1.h<\n+0019ea10: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and client2.h. We fir\n+0019ea40: 7374 2067 656e 6572 6174 6520 7468 6520 st generate the \n+0019ea50: 3c65 6d3e 3c63 6f64 653e 656e 7648 2e68 envH.h\n+0019ea60: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+0019ea70: 6520 666f 7220 7468 6520 534f 4150 2048 e for the SOAP H\n+0019ea80: 6561 6465 7220 616e 6420 4661 756c 7420 eader and Fault \n+0019ea90: 6465 6669 6e69 7469 6f6e 733a 203c 2f70 definitions:

       soapcpp2\n+0019eac0: 202d 6320 2d70 656e 7620 656e 762e 680a   -c -penv env.h.\n+0019ead0: 3c2f 7072 653e 3c70 3e20 5468 656e 2077  

      Then w\n+0019eae0: 6520 6765 6e65 7261 7465 2074 6865 2063 e generate the c\n+0019eaf0: 6f64 6520 666f 7220 636c 6965 6e74 3120 ode for client1 \n+0019eb00: 616e 6420 636c 6965 6e74 323a 203c 2f70 and client2:

       soapcpp2\n+0019eb30: 202d 6320 2d6e 202d 706d 7943 6c69 656e   -c -n -pmyClien\n+0019eb40: 7431 2063 6c69 656e 7431 2e68 0a20 736f  t1 client1.h. so\n+0019eb50: 6170 6370 7032 202d 6320 2d6e 202d 706d  apcpp2 -c -n -pm\n+0019eb60: 7943 6c69 656e 7432 2063 6c69 656e 7432  yClient2 client2\n+0019eb70: 2e68 0a3c 2f70 7265 3e3c 703e 2054 6869  .h.

      Thi\n+0019eb80: 7320 6765 6e65 7261 7465 7320 3c65 6d3e s generates \n+0019eb90: 3c63 6f64 653e 6d79 436c 6965 6e74 3143 myClient1C\n+0019eba0: 6c69 656e 744c 6962 2e63 3c2f 636f 6465 lientLib.c and <\n+0019ebc0: 636f 6465 3e6d 7943 6c69 656e 7432 436c code>myClient2Cl\n+0019ebd0: 6965 6e74 4c69 622e 633c 2f63 6f64 653e ientLib.c\n+0019ebe0: 3c2f 656d 3e20 2861 6d6f 6e67 2073 6576 (among sev\n+0019ebf0: 6572 616c 206f 7468 6572 2066 696c 6573 eral other files\n+0019ec00: 292e 2054 6865 7365 2074 776f 2066 696c ). These two fil\n+0019ec10: 6573 2073 686f 756c 6420 6265 2063 6f6d es should be com\n+0019ec20: 7069 6c65 6420 616e 6420 6c69 6e6b 6564 piled and linked\n+0019ec30: 2077 6974 6820 796f 7572 2061 7070 6c69 with your appli\n+0019ec40: 6361 7469 6f6e 2e20 5468 6520 736f 7572 cation. The sour\n+0019ec50: 6365 2063 6f64 6520 6f66 2079 6f75 7220 ce code of your \n+0019ec60: 6170 706c 6963 6174 696f 6e20 7368 6f75 application shou\n+0019ec70: 6c64 2069 6e63 6c75 6465 2074 6865 2067 ld include the g\n+0019ec80: 656e 6572 6174 6564 203c 656d 3e3c 636f enerated envH.h\n+0019eca0: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , myClient1H.h, <\n+0019ecd0: 636f 6465 3e6d 7943 6c69 656e 7432 2e68 code>myClient2.h\n+0019ece0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+0019ecf0: 6573 2061 6e64 203c 656d 3e3c 636f 6465 es and myClient1.nsmap\n+0019ed10: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , myClient\n+0019ed30: 322e 6e73 6d61 703c 2f63 6f64 653e 3c2f 2.nsmap files:

      .<\n+0019ed50: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0019ed60: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      #include "\n+0019eda0: 3b6d 7943 6c69 656e 7431 482e 6826 7175 ;myClient1H.h&qu\n+0019edb0: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; // include clie\n+0019ede0: 6e74 2031 2073 7475 6273 203c 2f73 7061 nt 1 stubs
      .
      #include &\n+0019ee30: 7175 6f74 3b6d 7943 6c69 656e 7432 482e quot;myClient2H.\n+0019ee40: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n+0019ee50: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0019ee60: 656e 7422 3e2f 2f20 696e 636c 7564 6520 ent\">// include \n+0019ee70: 636c 6965 6e74 2032 2073 7475 6273 203c client 2 stubs <\n+0019ee80: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+0019eea0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+0019eeb0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+0019eec0: 6465 2026 7175 6f74 3b65 6e76 482e 6826 de "envH.h&\n+0019eed0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
      ... \n+0019ef10: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
      .\n+0019ef20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      #in\n+0019ef50: 636c 7564 6520 2671 756f 743b 6d79 436c clude "myCl\n+0019ef60: 6965 6e74 3148 2e6e 736d 6170 2671 756f ient1H.nsmap&quo\n+0019ef70: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n+0019ef90: 2f2f 2069 6e63 6c75 6465 2063 6c69 656e // include clien\n+0019efa0: 7420 3120 6e73 6d61 7020 3c2f 7370 616e t 1 nsmap
      .
      #include &q\n+0019eff0: 756f 743b 6d79 436c 6965 6e74 3248 2e6e uot;myClient2H.n\n+0019f000: 736d 6170 2671 756f 743b 3c2f 7370 616e smap" // inclu\n+0019f030: 6465 2063 6c69 656e 7420 3220 6e73 6d61 de client 2 nsma\n+0019f040: 7020 3c2f 7370 616e 3e3c 2f64 6976 3e0a p
      .\n+0019f050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      .
      struct \n+0019f0a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+0019f0d0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+0019f100: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+0019f160: 3c2f 613e 2829 3b3c 2f64 6976 3e0a 3c64 ();
      .\n+0019f180: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_\n+0019f1e0: 6e61 6d65 7370 6163 6573 3c2f 613e 283c namespaces(<\n+0019f1f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0019f200: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0019f210: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0019f220: 6d79 436c 6965 6e74 315f 6e61 6d65 7370 myClient1_namesp\n+0019f230: 6163 6573 293b 203c 2f64 6976 3e0a 3c64 aces);

      .\n+0019f250: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // mak\n+0019f270: 6520 436c 6965 6e74 2031 2069 6e76 6f63 e Client 1 invoc\n+0019f280: 6174 696f 6e73 3c2f 7370 616e 3e3c 2f64 ations.
      ... \n+0019f2c0: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
      .\n+0019f2d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap_se\n+0019f340: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces\n+0019f350: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0019f380: 2c20 6d79 436c 6965 6e74 325f 6e61 6d65 , myClient2_name\n+0019f390: 7370 6163 6573 293b 203c 2f64 6976 3e0a spaces);
      .\n+0019f3a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ... // m\n+0019f3d0: 616b 6520 436c 6965 6e74 2032 2069 6e76 ake Client 2 inv\n+0019f3e0: 6f63 6174 696f 6e73 3c2f 7370 616e 3e3c ocations<\n+0019f3f0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n+0019f410: 4974 2069 7320 696d 706f 7274 616e 7420 It is important \n+0019f420: 746f 2075 7365 203c 623e 3c63 6f64 653e to use \n+0019f430: 736f 6170 6370 7032 202d 6e3c 2f63 6f64 soapcpp2 -n option -n\n+0019f460: 3c2f 623e 2c20 7365 6520 5365 6374 696f , see Sectio\n+0019f470: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n soapcpp2 optio\n+0019f4b0: 6e73 3c2f 613e 2c20 746f 2072 656e 616d ns, to renam\n+0019f4c0: 6520 7468 6520 6e61 6d65 7370 6163 6520 e the namespace \n+0019f4d0: 7461 626c 6573 2073 6f20 7765 2063 616e tables so we can\n+0019f4e0: 2069 6e63 6c75 6465 2074 6865 6d20 616c include them al\n+0019f4f0: 6c20 7769 7468 6f75 7420 7275 6e6e 696e l without runnin\n+0019f500: 6720 696e 746f 2072 6564 6566 696e 6974 g into redefinit\n+0019f510: 696f 6e73 2e3c 2f70 3e0a 3c64 6c20 636c ions.

      .
      Note
      \n+0019f540: 3c64 643e 4c69 6e6b 2063 6f6e 666c 6963
      Link conflic\n+0019f550: 7473 206d 6179 2073 7469 6c6c 206f 6363 ts may still occ\n+0019f560: 7572 2069 6e20 7468 6520 756e 6c69 6b65 ur in the unlike\n+0019f570: 6c79 2073 6974 7561 7469 6f6e 2074 6861 ly situation tha\n+0019f580: 7420 6964 656e 7469 6361 6c20 7365 7276 t identical serv\n+0019f590: 6963 6520 6f70 6572 6174 696f 6e20 6e61 ice operation na\n+0019f5a0: 6d65 7320 6172 6520 6465 6669 6e65 6420 mes are defined \n+0019f5b0: 696e 2074 776f 206f 7220 6d6f 7265 2073 in two or more s\n+0019f5c0: 7475 6220 6f72 2073 6b65 6c65 746f 6e20 tub or skeleton \n+0019f5d0: 6675 6e63 7469 6f6e 7320 7768 656e 2074 functions when t\n+0019f5e0: 6865 7365 206d 6574 686f 6473 2073 6861 hese methods sha\n+0019f5f0: 7265 2074 6865 2073 616d 6520 584d 4c20 re the same XML \n+0019f600: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+0019f610: 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 3ef0 .
      .

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

      .C++ \n+0019f680: 6578 616d 706c 6573 3c2f 6833 3e0a 3c70 examples

      .As an example w\n+0019f6a0: 6520 7769 6c6c 2062 7569 6c64 2061 2044 e will build a D\n+0019f6b0: 656c 6179 6564 2053 746f 636b 2051 756f elayed Stock Quo\n+0019f6c0: 7465 2063 6c69 656e 7420 6c69 6272 6172 te client librar\n+0019f6d0: 7920 616e 6420 6120 4375 7272 656e 6379 y and a Currency\n+0019f6e0: 2045 7863 6861 6e67 6520 5261 7465 2063 Exchange Rate c\n+0019f6f0: 6c69 656e 7420 6c69 6272 6172 792e 3c2f lient library..

      First, we \n+0019f710: 6372 6561 7465 2061 6e20 656d 7074 7920 create an empty \n+0019f720: 6865 6164 6572 2066 696c 6520 3c65 6d3e header file \n+0019f730: 3c63 6f64 653e 656e 762e 683c 2f63 6f64 env.h, which m\n+0019f750: 6179 2062 6520 656d 7074 7920 6f72 2073 ay be empty or s\n+0019f760: 686f 756c 6420 636f 6e74 6169 6e20 534f hould contain SO\n+0019f770: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa\n+0019f780: 756c 7420 6465 6669 6e69 7469 6f6e 7320 ult definitions \n+0019f790: 6173 2065 7870 6c61 696e 6564 2069 6e20 as explained in \n+0019f7a0: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section H\n+0019f7d0: 6f77 2074 6f20 6372 6561 7465 2063 6c69 ow to create cli\n+0019f7e0: 656e 742f 7365 7276 6572 206c 6962 7261 ent/server libra\n+0019f7f0: 7269 6573 3c2f 613e 2c20 616e 6420 636f ries, and co\n+0019f800: 6d70 696c 6520 6974 2061 7320 666f 6c6c mpile it as foll\n+0019f810: 6f77 733a 203c 2f70 3e3c 7072 6520 636c ows:

       \n+0019f830: 736f 6170 6370 7032 202d 7065 6e76 2065  soapcpp2 -penv e\n+0019f840: 6e76 2e68 0a20 632b 2b20 2d63 2065 6e76  nv.h. c++ -c env\n+0019f850: 432e 6370 700a 3c2f 7072 653e 3c70 3e20  C.cpp.

      \n+0019f860: 5765 2061 6c73 6f20 636f 6d70 696c 6520 We also compile \n+0019f870: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+0019f880: 7374 6473 6f61 7032 2e63 7070 3c2f 636f stdsoap2.cpp without\n+0019f8a0: 206e 616d 6573 7061 6365 733a 203c 2f70 namespaces:

       c++ -c -\n+0019f8d0: 4457 4954 485f 4e4f 4e41 4d45 5350 4143  DWITH_NONAMESPAC\n+0019f8e0: 4553 2073 7464 736f 6170 322e 6370 700a  ES stdsoap2.cpp.\n+0019f8f0: 3c2f 7072 653e 3c70 3e20 4966 2079 6f75  

      If you\n+0019f900: 2064 6f20 6e6f 7420 7573 6520 3c63 6f64 do not use #WITH_NONAMESP\n+0019f920: 4143 4553 3c2f 636f 6465 3e20 7468 656e ACES then\n+0019f930: 2079 6f75 2077 696c 6c20 6765 7420 616e you will get an\n+0019f940: 2075 6e72 6573 6f6c 7665 6420 6c69 6e6b unresolved link\n+0019f950: 2065 7272 6f72 2066 6f72 2074 6865 2067 error for the g\n+0019f960: 6c6f 6261 6c20 3c63 6f64 653e 6e61 6d65 lobal name\n+0019f970: 7370 6163 6573 3c2f 636f 6465 3e20 7461 spaces ta\n+0019f980: 626c 652e 2059 6f75 2063 616e 2064 6566 ble. You can def\n+0019f990: 696e 6520 6120 6475 6d6d 7920 7461 626c ine a dummy tabl\n+0019f9a0: 6520 746f 2061 766f 6964 2068 6176 696e e to avoid havin\n+0019f9b0: 6720 746f 2072 6563 6f6d 7069 6c65 203c g to recompile <\n+0019f9c0: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+0019f9d0: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp.

      .

      \n+0019f9f0: 5365 636f 6e64 2c20 7765 2063 7265 6174 Second, we creat\n+0019fa00: 6520 7468 6520 4465 6c61 7965 6420 5374 e the Delayed St\n+0019fa10: 6f63 6b20 5175 6f74 6520 6865 6164 6572 ock Quote header\n+0019fa20: 2066 696c 6520 7370 6563 6966 6963 6174 file specificat\n+0019fa30: 696f 6e2c 2077 6869 6368 206d 6179 2062 ion, which may b\n+0019fa40: 6520 6f62 7461 696e 6564 2075 7369 6e67 e obtained using\n+0019fa50: 2074 6865 2057 5344 4c20 696d 706f 7274 the WSDL import\n+0019fa60: 6572 2e20 4966 2079 6f75 2077 616e 7420 er. If you want \n+0019fa70: 746f 2075 7365 2043 2b2b 206e 616d 6573 to use C++ names\n+0019fa80: 7061 6365 7320 7468 656e 2079 6f75 206e paces then you n\n+0019fa90: 6565 6420 746f 206d 616e 7561 6c6c 7920 eed to manually \n+0019faa0: 6164 6420 7468 6520 3c63 6f64 653e 6e61 add the na\n+0019fab0: 6d65 7370 6163 653c 2f63 6f64 653e 2064 mespace d\n+0019fac0: 6563 6c61 7261 7469 6f6e 2074 6f20 7468 eclaration to th\n+0019fad0: 6520 6765 6e65 7261 7465 6420 6865 6164 e generated head\n+0019fae0: 6572 2066 696c 653a 3c2f 703e 0a3c 6469 er file:

      .
      names\n+0019fb30: 7061 6365 203c 2f73 7061 6e3e 7175 6f74 pace quot\n+0019fb40: 6520 7b3c 2f64 6976 3e0a 3c64 6976 2063 e {
      .
      .
      //gs\n+0019fb90: 6f61 7020 6e73 2073 6572 7669 6365 206e oap ns service n\n+0019fba0: 616d 653a 2053 6572 7669 6365 203c 2f73 ame: Service
      .
      //gsoap ns se\n+0019fbf0: 7276 6963 6520 7374 796c 653a 2072 7063 rvice style: rpc\n+0019fc00: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n+0019fc10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0019fc20: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+0019fc40: 7320 7365 7276 6963 6520 656e 636f 6469 s service encodi\n+0019fc50: 6e67 3a20 656e 636f 6465 6420 3c2f 7370 ng: encoded
      .
      //gsoap ns ser\n+0019fca0: 7669 6365 206c 6f63 6174 696f 6e3a 2068 vice location: h\n+0019fcb0: 7474 703a 2f2f 7365 7276 6963 6573 2e78 ttp://services.x\n+0019fcc0: 6d65 7468 6f64 732e 6e65 742f 736f 6170 methods.net/soap\n+0019fcd0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n+0019fce0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0019fcf0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+0019fd10: 7320 7363 6865 6d61 206e 616d 6573 7061 s schema namespa\n+0019fd20: 6365 3a20 7572 6e3a 786d 6574 686f 6473 ce: urn:xmethods\n+0019fd30: 2d64 656c 6179 6564 2d71 756f 7465 7320 -delayed-quotes \n+0019fd40: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0019fd60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+0019fd80: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n+0019fd90: 6163 7469 6f6e 3a20 6765 7451 756f 7465 action: getQuote\n+0019fda0: 2026 7175 6f74 3b26 7175 6f74 3b20 3c2f ""
      .int ns__getQuote(\n+0019fe00: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *symbol, <\n+0019fe30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0019fe40: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float &Resul\n+0019fe60: 7429 3b20 3c2f 6469 763e 0a3c 6469 7620 t);
      .
      .
      } /\n+0019feb0: 2f20 6e61 6d65 7370 6163 6520 7175 6f74 / namespace quot\n+0019fec0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
      .<\n+0019fed0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      We then\n+0019fef0: 2063 6f6d 7069 6c65 2069 7420 6173 2061 compile it as a\n+0019ff00: 206c 6962 7261 7279 2061 6e64 2077 6520 library and we \n+0019ff10: 7573 6520 6f70 7469 6f6e 203c 623e 3c63 use option -n to prefix the \n+0019ff40: 6765 6e65 7261 7465 6420 6669 6c65 7320 generated files \n+0019ff50: 616e 6420 746f 2072 656e 616d 6520 7468 and to rename th\n+0019ff60: 6520 6e61 6d65 7370 6163 6520 7461 626c e namespace tabl\n+0019ff70: 6520 746f 2061 766f 6964 206c 696e 6b20 e to avoid link \n+0019ff80: 636f 6e66 6c69 6374 7320 6c61 7465 723a conflicts later:\n+0019ff90: 203c 2f70 3e3c 7072 6520 636c 6173 733d

       soap\n+0019ffb0: 6370 7032 202d 6e20 7175 6f74 652e 680a  cpp2 -n quote.h.\n+0019ffc0: 2063 2b2b 202d 6320 7175 6f74 6543 6c69   c++ -c quoteCli\n+0019ffd0: 656e 744c 6962 2e63 7070 0a3c 2f70 7265  entLib.cpp.

      If you don'\n+0019fff0: 7420 7761 6e74 2074 6f20 7573 6520 6120 t want to use a \n+001a0000: 432b 2b20 636f 6465 206e 616d 6573 7061 C++ code namespa\n+001a0010: 6365 2c20 796f 7520 7368 6f75 6c64 2063 ce, you should c\n+001a0020: 6f6d 7069 6c65 203c 656d 3e3c 636f 6465 ompile quote.h<\n+001a0040: 2f65 6d3e 2022 6173 2069 7322 2077 6974 /em> \"as is\" wit\n+001a0050: 6820 6f70 7469 6f6e 203c 623e 3c63 6f64 h option -pquote\n+001a0070: 3c2f 623e 3a20 3c2f 703e 3c70 7265 2063 :

      \n+001a0090: 2073 6f61 7063 7070 3220 2d6e 202d 7071   soapcpp2 -n -pq\n+001a00a0: 756f 7465 2071 756f 7465 2e68 0a20 632b  uote quote.h. c+\n+001a00b0: 2b20 2d63 2071 756f 7465 436c 6965 6e74  + -c quoteClient\n+001a00c0: 4c69 622e 6370 700a 3c2f 7072 653e 3c70  Lib.cpp.
      Third, we crea\n+001a00e0: 7465 2074 6865 2043 7572 7265 6e63 7920 te the Currency \n+001a00f0: 4578 6368 616e 6765 2052 6174 6520 6865 Exchange Rate he\n+001a0100: 6164 6572 2066 696c 6520 7370 6563 6966 ader file specif\n+001a0110: 6963 6174 696f 6e3a 3c2f 703e 0a3c 6469 ication:

      .
      names\n+001a0160: 7061 6365 203c 2f73 7061 6e3e 7261 7465 pace rate\n+001a0170: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
      .
      .
      //gso\n+001a01c0: 6170 206e 7320 7365 7276 6963 6520 6e61 ap ns service na\n+001a01d0: 6d65 3a20 5365 7276 6963 6520 3c2f 7370 me: Service
      .
      //gsoap ns ser\n+001a0220: 7669 6365 2073 7479 6c65 3a20 7270 6320 vice style: rpc \n+001a0230: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001a0250: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+001a0270: 2073 6572 7669 6365 2065 6e63 6f64 696e service encodin\n+001a0280: 673a 2065 6e63 6f64 6564 203c 2f73 7061 g: encoded
      .
      //gsoap ns serv\n+001a02d0: 6963 6520 6c6f 6361 7469 6f6e 3a20 6874 ice location: ht\n+001a02e0: 7470 3a2f 2f73 6572 7669 6365 732e 786d tp://services.xm\n+001a02f0: 6574 686f 6473 2e6e 6574 2f73 6f61 7020 ethods.net/soap \n+001a0300: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001a0320: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+001a0340: 2073 6368 656d 6120 6e61 6d65 7370 6163 schema namespac\n+001a0350: 653a 2075 726e 3a78 6d65 7468 6f64 732d e: urn:xmethods-\n+001a0360: 4375 7272 656e 6379 4578 6368 616e 6765 CurrencyExchange\n+001a0370: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n+001a0380: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a0390: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+001a03b0: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n+001a03c0: 2d61 6374 696f 6e3a 2067 6574 5261 7465 -action: getRate\n+001a03d0: 2026 7175 6f74 3b26 7175 6f74 3b20 3c2f ""
      .int ns__getRate(<\n+001a0430: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a0440: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *country1, \n+001a0460: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *country2,\n+001a0490: 203c 7370 616e 2063 6c61 7373 3d22 6b65 float\n+001a04b0: 3c2f 7370 616e 3e20 2661 6d70 3b52 6573 &Res\n+001a04c0: 756c 7429 3b20 3c2f 6469 763e 0a3c 6469 ult);

    . \n+001a04e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } // namespace ra\n+001a0520: 7465 3c2f 7370 616e 3e3c 2f64 6976 3e0a te
    .\n+001a0530: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Simila\n+001a0550: 7220 746f 2074 6865 2051 756f 7465 2065 r to the Quote e\n+001a0560: 7861 6d70 6c65 2061 626f 7665 2c20 7765 xample above, we\n+001a0570: 2067 656e 6572 6174 6520 736f 7572 6365 generate source\n+001a0580: 2063 6f64 6520 7573 696e 6720 6f70 7469 code using opti\n+001a0590: 6f6e 203c 623e 3c63 6f64 653e 2d6e 3c2f on -n to pre\n+001a05b0: 6669 7820 7468 6520 6765 6e65 7261 7465 fix the generate\n+001a05c0: 6420 6669 6c65 7320 616e 6420 746f 2072 d files and to r\n+001a05d0: 656e 616d 6520 7468 6520 6e61 6d65 7370 ename the namesp\n+001a05e0: 6163 6520 7461 626c 6520 746f 2061 766f ace table to avo\n+001a05f0: 6964 206c 696e 6b20 636f 6e66 6c69 6374 id link conflict\n+001a0600: 733a 203c 2f70 3e3c 7072 6520 636c 6173 s:

     so\n+001a0620: 6170 6370 7032 202d 6e20 7261 7465 2e68  apcpp2 -n rate.h\n+001a0630: 0a3c 2f70 7265 3e3c 703e 2046 6f75 7274  .

    Fourt\n+001a0640: 682c 2077 6520 7573 6520 7468 6520 6765 h, we use the ge\n+001a0650: 6e65 7261 7465 6420 736f 7572 6365 2063 nerated source c\n+001a0660: 6f64 6520 6c69 6272 6172 6965 7320 7769 ode libraries wi\n+001a0670: 7468 2074 6865 206d 6169 6e20 7072 6f67 th the main prog\n+001a0680: 7261 6d2e 3c2f 703e 0a3c 6469 7620 636c ram.

    .
    <\n+001a06a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a06b0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+001a06d0: 6c75 6465 2026 7175 6f74 3b71 756f 7465 lude "quote\n+001a06e0: 482e 682e 6826 7175 6f74 3b3c 2f73 7061 H.h.h"
    .
    #include &\n+001a0730: 7175 6f74 3b72 6174 6548 2e68 2e68 2671 quot;rateH.h.h&q\n+001a0740: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    #\n+001a0780: 696e 636c 7564 6520 2671 756f 743b 7175 include "qu\n+001a0790: 6f74 652e 6e73 6d61 7026 7175 6f74 3b3c ote.nsmap"<\n+001a07a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001a07c0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001a07d0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+001a07e0: 6465 2026 7175 6f74 3b72 6174 652e 6e73 de "rate.ns\n+001a07f0: 6d61 7026 7175 6f74 3b3c 2f73 7061 6e3e map"\n+001a0800: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001a0820: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n+001a0850: 3c2f 7370 616e 3e20 6d61 696e 283c 7370 main(int argc, char *a\n+001a08b0: 7267 765b 5d29 203c 2f64 6976 3e0a 3c64 rgv[])
    .\n+001a08d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n+001a0910: 2861 7267 6320 266c 743b 3d20 3129 203c (argc <= 1) <\n+001a0920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    std::cer\n+001a0960: 7220 266c 743b 266c 743b 203c 7370 616e r << "Usa\n+001a0990: 6765 3a20 6d61 696e 2074 6963 6b65 7220 ge: main ticker \n+001a09a0: 5b63 7572 7265 6e63 795d 2671 756f 743b [currency]"\n+001a09b0: 3c2f 7370 616e 3e20 266c 743b 266c 743b <<\n+001a09c0: 2073 7464 3a3a 656e 646c 203c 2f64 6976 std::endl .
    exit(EXI\n+001a09f0: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    }
    .\n+001a0a20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n+001a0a50: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+001a0a80: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001a0ab0: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = \n+001a0b10: 736f 6170 5f6e 6577 3c2f 613e 2829 3b3c soap_new();<\n+001a0b20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    float\n+001a0b60: 2071 3b20 3c2f 6469 763e 0a3c 6469 7620 q;
    .
    <\n+001a0b80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a0b90: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a0ba0: 705f 5f6e 616d 6573 7061 6365 2e68 746d p__namespace.htm\n+001a0bb0: 6c23 6761 3565 6339 3133 6163 6363 3730 l#ga5ec913accc70\n+001a0bc0: 3563 6361 3332 3936 6162 3735 6261 6539 5cca3296ab75bae9\n+001a0bd0: 3535 6135 223e 736f 6170 5f73 6574 5f6e 55a5\">soap_set_n\n+001a0be0: 616d 6573 7061 6365 733c 2f61 3e28 3c61 amespaces(soap, q\n+001a0c20: 756f 7465 5f6e 616d 6573 7061 6365 7329 uote_namespaces)\n+001a0c30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n+001a0c70: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__\n+001a0c80: 6765 7451 756f 7465 283c 6120 636c 6173 getQuote(\n+001a0cb0: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n+001a0cc0: 4e55 4c4c 2c20 6172 6776 5b31 5d2c 2071 NULL, argv[1], q\n+001a0cd0: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) // get \n+001a0cf0: 7175 6f74 6520 3c2f 7370 616e 3e3c 2f64 quote .
    {
    .\n+001a0d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr\n+001a0d90: 696e 745f 6661 756c 743c 2f61 3e28 3c61 int_fault(soap, s\n+001a0dd0: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .<\n+001a0de0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a0df0: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
    .
    <\n+001a0e10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a0e20: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    . \n+001a0e50: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if (argc > 2) \n+001a0ea0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    float r;
    .\n+001a0f20: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soa\n+001a0f80: 705f 7365 745f 6e61 6d65 7370 6163 6573 p_set_namespaces\n+001a0f90: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001a0fc0: 3c2f 613e 2c20 7261 7465 5f6e 616d 6573 , rate_names\n+001a0fd0: 7061 6365 7329 3b20 3c2f 6469 763e 0a3c paces);
    .<\n+001a0fe0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a0ff0: 3e20 2020 2020 203c 7370 616e 2063 6c61 > if (soap\n+001a1020: 5f63 616c 6c5f 6e73 5f5f 6765 7452 6174 _call_ns__getRat\n+001a1030: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap, NULL, NULL, <\n+001a1070: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001a1080: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001a1090: 3b75 7326 7175 6f74 3b3c 2f73 7061 6e3e ;us"\n+001a10a0: 2c20 6172 6776 5b32 5d2c 2072 2929 203c , argv[2], r)) <\n+001a10b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a10c0: 656e 7422 3e2f 2f20 6765 7420 7261 7465 ent\">// get rate\n+001a10d0: 2069 6e20 5553 2064 6f6c 6c61 7273 203c in US dollars <\n+001a10e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001a1100: 2020 2020 2020 203c 6120 636c 6173 733d soap_p\n+001a1160: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n+001a1170: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a1180: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a1190: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001a11a0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n+001a11b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    else .
    q\n+001a1210: 202a 3d20 723b 203c 7370 616e 2063 6c61 *= r; // \n+001a1230: 636f 6e76 6572 7420 7468 6520 7175 6f74 convert the quot\n+001a1240: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
    .\n+001a1250: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .<\n+001a1270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a1280: 3e20 2020 2073 7464 3a3a 636f 7574 2026 > std::cout &\n+001a1290: 6c74 3b26 6c74 3b20 6172 6776 5b31 5d20 lt;< argv[1] \n+001a12a0: 266c 743b 266c 743b 203c 7370 616e 2063 << ": &qu\n+001a12d0: 6f74 3b3c 2f73 7061 6e3e 2026 6c74 3b26 ot; <&\n+001a12e0: 6c74 3b20 7120 266c 743b 266c 743b 2073 lt; q << s\n+001a12f0: 7464 3a3a 656e 646c 3b20 3c2f 6469 763e td::endl;
    \n+001a1300: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+001a1330: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest\n+001a1390: 726f 793c 2f61 3e28 3c61 2063 6c61 7373 roy(s\n+001a13c0: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    .\n+001a13d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n+001a1490: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_free\n+001a14f0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001a1520: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n+001a1540: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+001a1560: 6e3c 2f73 7061 6e3e 2030 3b20 3c2f 6469 n 0; .
    }
    .

    Compile a\n+001a15b0: 6e64 206c 696e 6b20 7468 6973 2061 7070 nd link this app\n+001a15c0: 6c69 6361 7469 6f6e 2077 6974 6820 3c65 lication with stdsoap2\n+001a15e0: 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .o, \n+001a15f0: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e6f envC.o\n+001a1600: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , quoteSer\n+001a1620: 7665 7250 726f 7879 2e6f 3c2f 636f 6465 verProxy.o, and \n+001a1640: 3c63 6f64 653e 7261 7465 5365 7276 6572 rateServer\n+001a1650: 5072 6f78 792e 6f3c 2f63 6f64 653e 3c2f Proxy.o.

    .

    Inst\n+001a1670: 6561 6420 6f66 2074 6865 2067 656e 6572 ead of the gener\n+001a1680: 6174 6564 203c 636f 6465 3e73 6f61 705f ated soap_\n+001a1690: 6361 6c6c 5f77 6562 6d65 7468 6f64 3c2f call_webmethod stub funct\n+001a16b0: 696f 6e73 2079 6f75 2063 616e 2061 6c73 ions you can als\n+001a16c0: 6f20 7573 6520 3c62 3e3c 636f 6465 3e73 o use s\n+001a16d0: 6f61 7063 7070 3220 2d6a 3c2f 636f 6465 oapcpp2 -j option \n+001a16f0: 3c63 6f64 653e 2d6a 3c2f 636f 6465 3e3c -j<\n+001a1700: 2f62 3e20 6f72 206f 7074 696f 6e20 3c62 /b> or option -i\n+001a1720: 3c2f 623e 2074 6f20 6765 6e65 7261 7465 to generate\n+001a1730: 2043 2b2b 2070 726f 7879 2063 6c61 7373 C++ proxy class\n+001a1740: 6573 2e3c 2f70 3e0a 3c70 3e54 6f20 636f es.

    .

    To co\n+001a1750: 6d70 696c 6520 7365 7276 6572 2069 7320 mpile server is \n+001a1760: 7665 7279 2073 696d 696c 6172 2e20 466f very similar. Fo\n+001a1770: 7220 6578 616d 706c 652c 2061 7373 756d r example, assum\n+001a1780: 6520 7468 6174 2077 6520 6e65 6564 2074 e that we need t\n+001a1790: 6f20 696d 706c 656d 656e 7420 6120 6361 o implement a ca\n+001a17a0: 6c63 756c 6174 6f72 2073 6572 7669 6365 lculator service\n+001a17b0: 2061 6e64 2077 6520 7761 6e74 2074 6f20 and we want to \n+001a17c0: 6372 6561 7465 2061 206c 6962 7261 7279 create a library\n+001a17d0: 2066 6f72 2069 742e 3c2f 703e 0a3c 6469 for it.

    .
    names\n+001a1820: 7061 6365 203c 2f73 7061 6e3e 6361 6c63 pace calc\n+001a1830: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    .
    //gso\n+001a1880: 6170 206e 7320 7365 7276 6963 6520 6e61 ap ns service na\n+001a1890: 6d65 3a20 4361 6c63 203c 2f73 7061 6e3e me: Calc \n+001a18a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+001a18d0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+001a18e0: 6520 7374 796c 653a 2072 7063 203c 2f73 e style: rpc
    .
    //gsoap ns se\n+001a1930: 7276 6963 6520 656e 636f 6469 6e67 3a20 rvice encoding: \n+001a1940: 656e 636f 6465 6420 3c2f 7370 616e 3e3c encoded <\n+001a1950: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+001a1980: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+001a1990: 206c 6f63 6174 696f 6e3a 2068 7474 703a location: http:\n+001a19a0: 2f2f 7777 772e 6373 2e66 7375 2e65 6475 //www.cs.fsu.edu\n+001a19b0: 2f7e 656e 6765 6c65 6e2f 6361 6c63 2e63 /~engelen/calc.c\n+001a19c0: 6769 203c 2f73 7061 6e3e 3c2f 6469 763e gi
    \n+001a19d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+001a1a00: 206e 7320 7363 6865 6d61 206e 616d 6573 ns schema names\n+001a1a10: 7061 6365 3a20 7572 6e3a 6361 6c63 203c pace: urn:calc <\n+001a1a20: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001a1a40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a1a50: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__add(double a, double b\n+001a1ac0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub\n+001a1ae0: 6c65 3c2f 7370 616e 3e20 2661 6d70 3b72 le &r\n+001a1af0: 6573 756c 7429 3b20 3c2f 6469 763e 0a3c esult);
    .<\n+001a1b00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a1b10: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns__sub(double a, double\n+001a1b90: 2062 2c20 3c73 7061 6e20 636c 6173 733d b, do\n+001a1bb0: 7562 6c65 3c2f 7370 616e 3e20 2661 6d70 uble &\n+001a1bc0: 3b72 6573 756c 7429 3b20 3c2f 6469 763e ;result);
    \n+001a1bd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n+001a1c00: 3c2f 7370 616e 3e20 6e73 5f5f 6d75 6c28 ns__mul(\n+001a1c10: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n+001a1c30: 3c2f 7370 616e 3e20 612c 203c 7370 616e a, double b, \n+001a1c80: 646f 7562 6c65 3c2f 7370 616e 3e20 2661 double &a\n+001a1c90: 6d70 3b72 6573 756c 7429 3b20 3c2f 6469 mp;result); .
    i\n+001a1cd0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6469 nt ns__di\n+001a1ce0: 7628 3c73 7061 6e20 636c 6173 733d 226b v(doub\n+001a1d00: 6c65 3c2f 7370 616e 3e20 612c 203c 7370 le a, double b, double \n+001a1d60: 2661 6d70 3b72 6573 756c 7429 3b20 3c2f &result); .
    .<\n+001a1d90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a1da0: 3e7d 203c 7370 616e 2063 6c61 7373 3d22 >} // name\n+001a1dc0: 7370 6163 6520 6361 6c63 3c2f 7370 616e space calc
    .
    <\n+001a1df0: 703e 5765 2067 656e 6572 6174 6520 636f p>We generate co\n+001a1e00: 6465 3a20 3c2f 703e 3c70 7265 2063 6c61 de:

     s\n+001a1e20: 6f61 7063 7070 3220 2d6a 202d 6e20 6361  oapcpp2 -j -n ca\n+001a1e30: 6c63 2e68 0a3c 2f70 7265 3e3c 703e 2048  lc.h.

    H\n+001a1e40: 6572 6520 7765 2075 7365 6420 6f70 7469 ere we used opti\n+001a1e50: 6f6e 203c 623e 3c63 6f64 653e 2d6a 3c2f on -j to gen\n+001a1e70: 6572 6174 6520 6120 432b 2b20 7365 7276 erate a C++ serv\n+001a1e80: 6963 6520 636c 6173 7320 3c65 6d3e 3c63 ice class calcCalcServ\n+001a1ea0: 6963 652e 683c 2f63 6f64 653e 3c2f 656d ice.h and \n+001a1ec0: 6361 6c63 4361 6c63 5365 7276 6963 652e calcCalcService.\n+001a1ed0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2e cpp.\n+001a1ee0: 2054 6865 2065 6666 6563 7420 6f66 2074 The effect of t\n+001a1ef0: 6865 203c 623e 3c63 6f64 653e 2d6e 3c2f he -n option\n+001a1f10: 2069 7320 7468 6174 2069 7420 6372 6561 is that it crea\n+001a1f20: 7465 7320 6c6f 6361 6c20 6e61 6d65 7370 tes local namesp\n+001a1f30: 6163 6520 7461 626c 6573 2061 6e64 2075 ace tables and u\n+001a1f40: 7365 7320 3c65 6d3e 3c63 6f64 653e 6361 ses ca\n+001a1f50: 6c63 3c2f 636f 6465 3e3c 2f65 6d3e 2074 lc t\n+001a1f60: 6f20 7072 6566 6978 2074 6865 2067 656e o prefix the gen\n+001a1f70: 6572 6174 6564 2066 696c 6573 2e3c 2f70 erated files..

    #include &q\n+001a1fd0: 756f 743b 6361 6c63 4361 6c63 5365 7276 uot;calcCalcServ\n+001a1fe0: 6963 652e 6826 7175 6f74 3b3c 2f73 7061 ice.h"
    .
    #include &\n+001a2030: 7175 6f74 3b63 616c 632e 6e73 6d61 7026 quot;calc.nsmap&\n+001a2040: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    .<\n+001a2080: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a2090: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
    \n+001a20b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    c\n+001a20e0: 616c 633a 3a43 616c 6320 6361 6c63 3b20 alc::Calc calc; \n+001a20f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n+001a2110: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a2120: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    calc.se\n+001a2150: 7276 6528 293b 203c 7370 616e 2063 6c61 rve(); // \n+001a2170: 6361 6c6c 7320 7265 7175 6573 7420 6469 calls request di\n+001a2180: 7370 6174 6368 6572 2074 6f20 696e 766f spatcher to invo\n+001a2190: 6b65 206f 6e65 206f 6620 7468 6520 6675 ke one of the fu\n+001a21a0: 6e63 7469 6f6e 7320 6265 6c6f 7720 3c2f nctions below
    . \n+001a21d0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    }.
    .\n+001a2240: 3c73 7061 6e20 636c 6173 733d 226b 6579 int calc::Calc:\n+001a2270: 3a61 6464 283c 7370 616e 2063 6c61 7373 :add(d\n+001a2290: 6f75 626c 653c 2f73 7061 6e3e 2061 2c20 ouble a, \n+001a22a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n+001a22c0: 3c2f 7370 616e 3e20 622c 203c 7370 616e b, double &result)<\n+001a2300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+001a2320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    result = a +\n+001a2340: 2062 3b3c 2f64 6976 3e0a 3c64 6976 2063 b;
    ..}\n+001a2400: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    in\n+001a2450: 743c 2f73 7061 6e3e 2063 616c 633a 3a43 t calc::C\n+001a2460: 616c 633a 3a73 7562 283c 7370 616e 2063 alc::sub(double\n+001a2490: 2061 2c20 3c73 7061 6e20 636c 6173 733d a, do\n+001a24b0: 7562 6c65 3c2f 7370 616e 3e20 622c 203c uble b, <\n+001a24c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a24d0: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n+001a24e0: 2f73 7061 6e3e 2026 616d 703b 7265 7375 /span> &resu\n+001a24f0: 6c74 293c 2f64 6976 3e0a 3c64 6976 2063 lt)
    .
    {.
    result =\n+001a2530: 2061 202d 2062 3b3c 2f64 6976 3e0a 3c64 a - b;
    .\n+001a2550: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+001a2570: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n+001a25d0: 4150 5f4f 4b3c 2f61 3e3b 3c2f 6469 763e AP_OK;
    \n+001a25e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n+001a2610: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int cal\n+001a2650: 633a 3a43 616c 633a 3a6d 756c 283c 7370 c::Calc::mul(double a, double \n+001a26b0: 622c 203c 7370 616e 2063 6c61 7373 3d22 b, dou\n+001a26d0: 626c 653c 2f73 7061 6e3e 2026 616d 703b ble &\n+001a26e0: 7265 7375 6c74 293c 2f64 6976 3e0a 3c64 result)
    .\n+001a2700: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    resu\n+001a2720: 6c74 203d 2061 202a 2062 3b3c 2f64 6976 lt = a * b;.
    \n+001a2760: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK;.
    }
    .\n+001a27f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int\n+001a2840: 2063 616c 633a 3a43 616c 633a 3a64 6976 calc::Calc::div\n+001a2850: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (doubl\n+001a2870: 653c 2f73 7061 6e3e 2061 2c20 3c73 7061 e a, double b, double &\n+001a28d0: 616d 703b 7265 7375 6c74 293c 2f64 6976 amp;result).
    {
    . \n+001a2910: 7265 7375 6c74 203d 2061 202f 2062 3b3c result = a / b;<\n+001a2920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_OK;
    .
    } .

    Th\n+001a2a00: 6520 6578 616d 706c 6520 6162 6f76 6520 e example above \n+001a2a10: 7365 7276 6573 2072 6571 7565 7374 7320 serves requests \n+001a2a20: 6f76 6572 2073 7464 696e 2f6f 7574 2e20 over stdin/out. \n+001a2a30: 5573 6520 7468 6520 6269 6e64 2061 6e64 Use the bind and\n+001a2a40: 2061 6363 6570 7420 6361 6c6c 7320 746f accept calls to\n+001a2a50: 2063 7265 6174 6520 6120 7374 616e 642d create a stand-\n+001a2a60: 616c 6f6e 6520 7365 7276 6572 2074 6f20 alone server to \n+001a2a70: 7365 7276 6963 6520 696e 626f 756e 6420 service inbound \n+001a2a80: 7265 7175 6573 7473 206f 7665 7220 736f requests over so\n+001a2a90: 636b 6574 732c 2073 6565 2053 6563 7469 ckets, see Secti\n+001a2aa0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on H\n+001a2ad0: 6f77 2074 6f20 6372 6561 7465 2061 2073 ow to create a s\n+001a2ae0: 7461 6e64 2d61 6c6f 6e65 2073 6572 7665 tand-alone serve\n+001a2af0: 723c 2f61 3e20 2e3c 2f70 3e0a 3c70 3ef0 r .

    .

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

    .C ex\n+001a2b60: 616d 706c 6573 3c2f 6833 3e0a 3c70 3e54 amples

    .

    T\n+001a2b70: 6869 7320 6973 2074 6865 2073 616d 6520 his is the same \n+001a2b80: 6578 616d 706c 6520 6173 2061 626f 7665 example as above\n+001a2b90: 2c20 6275 7420 7468 6520 636c 6965 6e74 , but the client\n+001a2ba0: 7320 6172 6520 6275 696c 6420 696e 2043 s are build in C\n+001a2bb0: 2e3c 2f70 3e0a 3c70 3e57 6520 6372 6561 .

    .

    We crea\n+001a2bc0: 7465 2061 203c 656d 3e3c 636f 6465 3e65 te a e\n+001a2bd0: 6e76 2e68 3c2f 636f 6465 3e3c 2f65 6d3e nv.h\n+001a2be0: 2074 6861 7420 636f 6e74 6169 6e73 2074 that contains t\n+001a2bf0: 6865 206a 6f69 6e74 2053 4f41 5020 4865 he joint SOAP He\n+001a2c00: 6164 6572 2061 6e64 2053 4f41 5020 4661 ader and SOAP Fa\n+001a2c10: 756c 7420 6465 6669 6e69 7469 6f6e 732e ult definitions.\n+001a2c20: 2059 6f75 206d 6179 2068 6176 6520 746f You may have to\n+001a2c30: 2063 6f70 792d 7061 7374 6520 7468 6573 copy-paste thes\n+001a2c40: 6520 6672 6f6d 2074 6865 206f 7468 6572 e from the other\n+001a2c50: 2068 6561 6465 7220 6669 6c65 732e 2054 header files. T\n+001a2c60: 6865 6e2c 2063 6f6d 7069 6c65 2069 7420 hen, compile it \n+001a2c70: 6173 2066 6f6c 6c6f 7773 3a20 3c2f 703e as follows:

    \n+001a2c80: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     soapcpp2 \n+001a2ca0: 2d63 202d 7065 6e76 2065 6e76 2e68 0a20  -c -penv env.h. \n+001a2cb0: 6363 202d 6320 656e 7643 2e63 0a3c 2f70  cc -c envC.c.

    We also c\n+001a2cd0: 6f6d 7069 6c65 203c 656d 3e3c 636f 6465 ompile gsoap/stdsoap2.\n+001a2cf0: 633c 2f63 6f64 653e 3c2f 656d 3e20 7769 c wi\n+001a2d00: 7468 6f75 7420 6e61 6d65 7370 6163 6573 thout namespaces\n+001a2d10: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     cc \n+001a2d30: 2d63 202d 4457 4954 485f 4e4f 4e41 4d45  -c -DWITH_NONAME\n+001a2d40: 5350 4143 4553 2073 7464 736f 6170 322e  SPACES stdsoap2.\n+001a2d50: 630a 3c2f 7072 653e 3c70 3e20 5365 636f  c.

    Seco\n+001a2d60: 6e64 2c20 7765 2063 7265 6174 6520 7468 nd, we create th\n+001a2d70: 6520 4465 6c61 7965 6420 5374 6f63 6b20 e Delayed Stock \n+001a2d80: 5175 6f74 6520 6865 6164 6572 2066 696c Quote header fil\n+001a2d90: 6520 7370 6563 6966 6963 6174 696f 6e2c e specification,\n+001a2da0: 2077 6869 6368 206d 6179 2062 6520 6f62 which may be ob\n+001a2db0: 7461 696e 6564 2075 7369 6e67 2074 6865 tained using the\n+001a2dc0: 2057 5344 4c20 696d 706f 7274 6572 2e3c WSDL importer.<\n+001a2dd0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    //gsoap ns ser\n+001a2e20: 7669 6365 206e 616d 653a 2053 6572 7669 vice name: Servi\n+001a2e30: 6365 203c 2f73 7061 6e3e 3c2f 6469 763e ce
    \n+001a2e40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+001a2e70: 206e 7320 7365 7276 6963 6520 7374 796c ns service styl\n+001a2e80: 653a 2072 7063 203c 2f73 7061 6e3e 3c2f e: rpc .
    //g\n+001a2ec0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+001a2ed0: 656e 636f 6469 6e67 3a20 656e 636f 6465 encoding: encode\n+001a2ee0: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    .\n+001a2ef0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+001a2f20: 6e73 2073 6572 7669 6365 206c 6f63 6174 ns service locat\n+001a2f30: 696f 6e3a 2068 7474 703a 2f2f 7365 7276 ion: http://serv\n+001a2f40: 6963 6573 2e78 6d65 7468 6f64 732e 6e65 ices.xmethods.ne\n+001a2f50: 742f 736f 6170 203c 2f73 7061 6e3e 3c2f t/soap .
    //g\n+001a2f90: 736f 6170 206e 7320 7363 6865 6d61 206e soap ns schema n\n+001a2fa0: 616d 6573 7061 6365 3a20 7572 6e3a 786d amespace: urn:xm\n+001a2fb0: 6574 686f 6473 2d64 656c 6179 6564 2d71 ethods-delayed-q\n+001a2fc0: 756f 7465 7320 3c2f 7370 616e 3e3c 2f64 uotes .
    //gs\n+001a3000: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n+001a3010: 6574 686f 642d 6163 7469 6f6e 3a20 6765 ethod-action: ge\n+001a3020: 7451 756f 7465 2026 7175 6f74 3b26 7175 tQuote "&qu\n+001a3030: 6f74 3b20 3c2f 7370 616e 3e3c 2f64 6976 ot; .
    in\n+001a3070: 743c 2f73 7061 6e3e 206e 735f 5f67 6574 t ns__get\n+001a3080: 5175 6f74 6528 3c73 7061 6e20 636c 6173 Quote(\n+001a30a0: 6368 6172 3c2f 7370 616e 3e20 2a73 796d char *sym\n+001a30b0: 626f 6c2c 203c 7370 616e 2063 6c61 7373 bol, f\n+001a30d0: 6c6f 6174 3c2f 7370 616e 3e20 2a52 6573 loat *Res\n+001a30e0: 756c 7429 3b3c 2f64 6976 3e0a 3c2f 6469 ult);
    .

    We compile\n+001a3110: 2069 7420 6173 2061 206c 6962 7261 7279 it as a library\n+001a3120: 2061 6e64 2077 6520 7573 6520 6f70 7469 and we use opti\n+001a3130: 6f6e 7320 3c62 3e3c 636f 6465 3e2d 6e3c ons -n<\n+001a3140: 2f63 6f64 653e 3c2f 623e 2061 6e64 203c /code> and <\n+001a3150: 623e 3c63 6f64 653e 2d70 7175 6f74 653c b>-pquote<\n+001a3160: 2f63 6f64 653e 3c2f 623e 2074 6f20 7072 /code> to pr\n+001a3170: 6566 6978 2074 6865 2067 656e 6572 6174 efix the generat\n+001a3180: 6564 2066 696c 6573 2061 6e64 2074 6f20 ed files and to \n+001a3190: 7265 6e61 6d65 2074 6865 206e 616d 6573 rename the names\n+001a31a0: 7061 6365 2074 6162 6c65 2074 6f20 6176 pace table to av\n+001a31b0: 6f69 6420 6c69 6e6b 2063 6f6e 666c 6963 oid link conflic\n+001a31c0: 7473 3a20 3c2f 703e 3c70 7265 2063 6c61 ts:

     s\n+001a31e0: 6f61 7063 7070 3220 2d63 202d 6e20 2d70  oapcpp2 -c -n -p\n+001a31f0: 7175 6f74 6520 7175 6f74 652e 680a 2063  quote quote.h. c\n+001a3200: 6320 2d63 2071 756f 7465 436c 6965 6e74  c -c quoteClient\n+001a3210: 4c69 622e 630a 3c2f 7072 653e 3c70 3e20  Lib.c.

    \n+001a3220: 5468 6972 642c 2077 6520 6372 6561 7465 Third, we create\n+001a3230: 2074 6865 2043 7572 7265 6e63 7920 4578 the Currency Ex\n+001a3240: 6368 616e 6765 2052 6174 6520 6865 6164 change Rate head\n+001a3250: 6572 2066 696c 6520 7370 6563 6966 6963 er file specific\n+001a3260: 6174 696f 6e3a 3c2f 703e 0a3c 6469 7620 ation:

    .
    //gsoap\n+001a32b0: 206e 7320 7365 7276 6963 6520 6e61 6d65 ns service name\n+001a32c0: 3a20 5365 7276 6963 6520 3c2f 7370 616e : Service
    .
    \n+001a3300: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+001a3310: 6365 2073 7479 6c65 3a20 7270 6320 3c2f ce style: rpc
    .//gsoap ns s\n+001a3360: 6572 7669 6365 2065 6e63 6f64 696e 673a ervice encoding:\n+001a3370: 2065 6e63 6f64 6564 203c 2f73 7061 6e3e encoded \n+001a3380: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+001a33b0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+001a33c0: 6520 6c6f 6361 7469 6f6e 3a20 6874 7470 e location: http\n+001a33d0: 3a2f 2f73 6572 7669 6365 732e 786d 6574 ://services.xmet\n+001a33e0: 686f 6473 2e6e 6574 2f73 6f61 7020 3c2f hods.net/soap
    .//gsoap ns s\n+001a3430: 6368 656d 6120 6e61 6d65 7370 6163 653a chema namespace:\n+001a3440: 2075 726e 3a78 6d65 7468 6f64 732d 4375 urn:xmethods-Cu\n+001a3450: 7272 656e 6379 4578 6368 616e 6765 203c rrencyExchange <\n+001a3460: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001a3480: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a3490: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+001a34a0: 7365 7276 6963 6520 6d65 7468 6f64 2d61 service method-a\n+001a34b0: 6374 696f 6e3a 2067 6574 5261 7465 2026 ction: getRate &\n+001a34c0: 7175 6f74 3b26 7175 6f74 3b20 3c2f 7370 quot;"
    .
    int\n+001a3510: 206e 735f 5f67 6574 5261 7465 283c 7370 ns__getRate(char *country1, char *country2, <\n+001a3580: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a3590: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float *Result);<\n+001a35b0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+001a35d0: 5765 2063 6f6d 7069 6c65 2069 7420 6173 We compile it as\n+001a35e0: 2061 206c 6962 7261 7279 2061 6e64 2077 a library and w\n+001a35f0: 6520 7573 6520 6f70 7469 6f6e 7320 3c62 e use options -n\n+001a3610: 3c2f 623e 2061 6e64 203c 623e 3c63 6f64 and -prate<\n+001a3630: 2f62 3e20 746f 2070 7265 6669 7820 7468 /b> to prefix th\n+001a3640: 6520 6765 6e65 7261 7465 6420 6669 6c65 e generated file\n+001a3650: 7320 616e 6420 746f 2072 656e 616d 6520 s and to rename \n+001a3660: 7468 6520 6e61 6d65 7370 6163 6520 7461 the namespace ta\n+001a3670: 626c 6520 746f 2061 766f 6964 206c 696e ble to avoid lin\n+001a3680: 6b20 636f 6e66 6c69 6374 733a 203c 2f70 k conflicts:

     soapcpp2\n+001a36b0: 202d 6320 2d6e 202d 7072 6174 6520 7261   -c -n -prate ra\n+001a36c0: 7465 2e68 0a20 6363 202d 6320 7261 7465  te.h. cc -c rate\n+001a36d0: 436c 6965 6e74 4c69 622e 630a 3c2f 7072  ClientLib.c.

    The main p\n+001a36f0: 726f 6772 616d 2069 733a 3c2f 703e 0a3c rogram is:

    .<\n+001a3700: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001a3710: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #include "\n+001a3750: 3b71 756f 7465 482e 6826 7175 6f74 3b3c ;quoteH.h"<\n+001a3760: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001a3780: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001a3790: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+001a37a0: 6465 2026 7175 6f74 3b72 6174 6548 2e68 de "rateH.h\n+001a37b0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    #include "\n+001a3800: 7175 6f74 652e 6e73 6d61 7026 7175 6f74 quote.nsmap"\n+001a3810: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001a3820: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a3830: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+001a3850: 6c75 6465 2026 7175 6f74 3b72 6174 652e lude "rate.\n+001a3860: 6e73 6d61 7026 7175 6f74 3b3c 2f73 7061 nsmap"
    .
    .
    i\n+001a38c0: 6e74 3c2f 7370 616e 3e20 6d61 696e 283c nt main(<\n+001a38d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a38e0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int argc, char \n+001a3920: 2a61 7267 765b 5d29 203c 2f64 6976 3e0a *argv[])
    .\n+001a3930: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (argc <= 1)\n+001a3990: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    fprint\n+001a39d0: 6628 7374 6465 7272 2c20 3c73 7061 6e20 f(stderr, "Usag\n+001a3a00: 653a 206d 6169 6e20 7469 636b 6572 205b e: main ticker [\n+001a3a10: 6375 7272 656e 6379 5d5c 6e26 7175 6f74 currency]\\n"\n+001a3a20: 3b3c 2f73 7061 6e3e 293b 203c 2f64 6976 ;); .
    exit(EXI\n+001a3a50: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    }
    .\n+001a3a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n+001a3ab0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+001a3ae0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001a3b10: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = \n+001a3b70: 736f 6170 5f6e 6577 3c2f 613e 2829 3b20 soap_new(); \n+001a3b80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    float q;
    . \n+001a3be0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_\n+001a3c40: 6e61 6d65 7370 6163 6573 3c2f 613e 283c namespaces(<\n+001a3c50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a3c60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a3c70: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001a3c80: 7175 6f74 655f 6e61 6d65 7370 6163 6573 quote_namespaces\n+001a3c90: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    if (soap_call_ns_\n+001a3ce0: 5f67 6574 5175 6f74 6528 3c61 2063 6c61 _getQuote(soap, NULL,\n+001a3d20: 204e 554c 4c2c 2061 7267 765b 315d 2c20 NULL, argv[1], \n+001a3d30: 2661 6d70 3b71 2929 203c 7370 616e 2063 &q)) /\n+001a3d50: 2f20 6765 7420 7175 6f74 6520 3c2f 7370 / get quote
    .
    \n+001a3d80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_print_fa\n+001a3de0: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n+001a3e10: 6f61 703c 2f61 3e2c 2073 7464 6572 7229 oap, stderr)\n+001a3e20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    else
    .
    {<\n+001a3e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if \n+001a3ec0: 2861 7267 6320 2667 743b 2032 2920 3c2f (argc > 2) .
    {.
    soap_set_names\n+001a3f70: 7061 6365 733c 2f61 3e28 3c61 2063 6c61 paces(soap, rate_\n+001a3fb0: 6e61 6d65 7370 6163 6573 293b 203c 2f64 namespaces); .
    float r;
    . \n+001a4020: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n+001a4040: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n+001a4050: 616c 6c5f 6e73 5f5f 6765 7452 6174 6528 all_ns__getRate(\n+001a4060: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001a4090: 204e 554c 4c2c 204e 554c 4c2c 203c 7370 NULL, NULL, "u\n+001a40c0: 7326 7175 6f74 3b3c 2f73 7061 6e3e 2c20 s", \n+001a40d0: 6172 6776 5b32 5d2c 2026 616d 703b 7229 argv[2], &r)\n+001a40e0: 2920 3c73 7061 6e20 636c 6173 733d 2263 ) // get r\n+001a4100: 6174 6520 696e 2055 5320 646f 6c6c 6172 ate in US dollar\n+001a4110: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
    .\n+001a4120: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    <\n+001a45a0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001a45b0: 3c70 3e43 6f6d 7069 6c65 2061 6e64 206c

    Compile and l\n+001a45c0: 696e 6b20 7468 6973 2061 7070 6c69 6361 ink this applica\n+001a45d0: 7469 6f6e 2077 6974 6820 3c65 6d3e 3c63 tion with stdsoap2.o, \n+001a4600: 3c63 6f64 653e 656e 7643 2e6f 3c2f 636f envC.o, quoteClientL\n+001a4630: 6962 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e ib.o\n+001a4640: 2c20 616e 6420 3c65 6d3e 3c63 6f64 653e , and \n+001a4650: 7261 7465 436c 6965 6e74 4c69 622e 6f3c rateClientLib.o<\n+001a4660: 2f63 6f64 653e 3c2f 656d 3e2e 3c2f 703e /code>.

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

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

    .

    \n+001a46d0: 0a48 6f77 2074 6f20 6368 6169 6e20 4320 .How to chain C \n+001a46e0: 7365 7276 6963 6573 2074 6f20 6163 6365 services to acce\n+001a46f0: 7074 206d 6573 7361 6765 7320 6f6e 2074 pt messages on t\n+001a4700: 6865 2073 616d 6520 706f 7274 3c2f 6833 he same port.

    When combin\n+001a4720: 696e 6720 6d75 6c74 6970 6c65 2073 6572 ing multiple ser\n+001a4730: 7669 6365 7320 696e 746f 206f 6e65 2061 vices into one a\n+001a4740: 7070 6c69 6361 7469 6f6e 2c20 796f 7520 pplication, you \n+001a4750: 6361 6e20 7275 6e20 7773 646c 3268 206f can run wsdl2h o\n+001a4760: 6e20 6d75 6c74 6970 6c65 2057 5344 4c73 n multiple WSDLs\n+001a4770: 2074 6f20 6765 6e65 7261 7465 2074 6865 to generate the\n+001a4780: 2073 696e 676c 6520 616c 6c2d 696e 636c single all-incl\n+001a4790: 7573 6976 6520 7365 7276 6963 6520 6465 usive service de\n+001a47a0: 6669 6e69 7469 6f6e 7320 696e 7465 7266 finitions interf\n+001a47b0: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n+001a47c0: 666f 7220 736f 6170 6370 7032 2e20 5468 for soapcpp2. Th\n+001a47d0: 6973 2068 6561 6465 7220 6669 6c65 2069 is header file i\n+001a47e0: 7320 7468 656e 2070 726f 6365 7373 6564 s then processed\n+001a47f0: 2077 6974 6820 736f 6170 6370 7032 2074 with soapcpp2 t\n+001a4800: 6f20 6765 6e65 7261 7465 2073 6b65 6c65 o generate skele\n+001a4810: 746f 6e20 6675 6e63 7469 6f6e 7320 696e ton functions in\n+001a4820: 2043 2e3c 2f70 3e0a 3c70 3e57 6861 7420 C.

    .

    What \n+001a4830: 6966 2077 6520 6765 6e65 7261 7465 206d if we generate m\n+001a4840: 756c 7469 706c 6520 7365 7276 6963 6573 ultiple services\n+001a4850: 2c20 6561 6368 2066 726f 6d20 6120 5753 , each from a WS\n+001a4860: 444c 2073 6570 6172 6174 656c 792c 2061 DL separately, a\n+001a4870: 6e64 2077 616e 7420 746f 2064 6570 6c6f nd want to deplo\n+001a4880: 7920 7468 656d 206f 6e20 7468 6520 7361 y them on the sa\n+001a4890: 6d65 2070 6f72 743f 2054 6869 7320 7265 me port? This re\n+001a48a0: 7175 6972 6573 206c 6973 7465 6e69 6e67 quires listening\n+001a48b0: 2074 6f20 7468 6520 7361 6d65 2070 6f72 to the same por\n+001a48c0: 7420 616e 6420 7468 656e 2063 6861 696e t and then chain\n+001a48d0: 696e 6720 7468 6520 7365 7276 6963 6520 ing the service \n+001a48e0: 6469 7370 6174 6368 6573 2073 6f20 7468 dispatches so th\n+001a48f0: 6174 2065 6163 6820 7365 7276 6963 6520 at each service \n+001a4900: 6361 6e20 7365 7276 6520 6120 7265 7175 can serve a requ\n+001a4910: 6573 742e 3c2f 703e 0a3c 703e 4669 7273 est.

    .

    Firs\n+001a4920: 7420 7765 2063 7265 6174 6520 6120 3c65 t we create a env.h that c\n+001a4950: 6f6e 7461 696e 7320 7468 6520 6a6f 696e ontains the join\n+001a4960: 7420 534f 4150 2048 6561 6465 7220 616e t SOAP Header an\n+001a4970: 6420 534f 4150 2046 6175 6c74 2064 6566 d SOAP Fault def\n+001a4980: 696e 6974 696f 6e73 2c20 666f 7220 6578 initions, for ex\n+001a4990: 616d 706c 6520 6279 2063 6f70 792d 7061 ample by copy-pa\n+001a49a0: 7374 696e 6720 7468 6573 6520 6672 6f6d sting these from\n+001a49b0: 2074 6865 206f 7468 6572 2068 6561 6465 the other heade\n+001a49c0: 7220 6669 6c65 7320 6765 6e65 7261 7465 r files generate\n+001a49d0: 6420 6279 2077 7364 6c32 682e 204f 7220 d by wsdl2h. Or \n+001a49e0: 7468 6973 2066 696c 6520 6973 2065 6d70 this file is emp\n+001a49f0: 7479 2069 6620 6e6f 2073 7065 6369 616c ty if no special\n+001a4a00: 697a 6564 2053 4f41 5020 4865 6164 6572 ized SOAP Header\n+001a4a10: 7320 616e 6420 4661 756c 7473 2061 7265 s and Faults are\n+001a4a20: 2075 7365 642e 2057 6520 636f 6d70 696c used. We compil\n+001a4a30: 6520 6974 2061 7320 666f 6c6c 6f77 733a e it as follows:\n+001a4a40: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     soap\n+001a4a60: 6370 7032 202d 6320 2d70 656e 7620 656e  cpp2 -c -penv en\n+001a4a70: 762e 680a 2063 6320 2d63 2065 6e76 432e  v.h. cc -c envC.\n+001a4a80: 630a 3c2f 7072 653e 3c70 3e20 5765 2061  c.

    We a\n+001a4a90: 6c73 6f20 636f 6d70 696c 6520 3c65 6d3e lso compile \n+001a4aa0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n+001a4ab0: 6f61 7032 2e63 3c2f 636f 6465 3e3c 2f65 oap2.c without names\n+001a4ad0: 7061 6365 733a 203c 2f70 3e3c 7072 6520 paces:

     cc -c -DWITH_N\n+001a4b00: 4f4e 414d 4553 5041 4345 5320 7374 6473  ONAMESPACES stds\n+001a4b10: 6f61 7032 2e63 0a3c 2f70 7265 3e3c 703e  oap2.c.

    \n+001a4b20: 2053 6179 2066 6f72 2065 7861 6d70 6c65 Say for example\n+001a4b30: 2074 6861 7420 7765 2068 6176 6520 6120 that we have a \n+001a4b40: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti\n+001a4b50: 6f6e 2069 6e20 3c65 6d3e 3c63 6f64 653e on in \n+001a4b60: 7175 6f74 652e 683c 2f63 6f64 653e 3c2f quote.h. We compile \n+001a4b80: 6974 2061 7320 6120 6c69 6272 6172 7920 it as a library \n+001a4b90: 616e 6420 7765 2075 7365 206f 7074 696f and we use optio\n+001a4ba0: 6e73 203c 623e 3c63 6f64 653e 2d6e 3c2f ns -n and -pquote to pre\n+001a4be0: 6669 7820 7468 6520 6765 6e65 7261 7465 fix the generate\n+001a4bf0: 6420 6669 6c65 7320 616e 6420 746f 2072 d files and to r\n+001a4c00: 656e 616d 6520 7468 6520 6e61 6d65 7370 ename the namesp\n+001a4c10: 6163 6520 7461 626c 6520 746f 2061 766f ace table to avo\n+001a4c20: 6964 206c 696e 6b20 636f 6e66 6c69 6374 id link conflict\n+001a4c30: 733a 203c 2f70 3e3c 7072 6520 636c 6173 s:

     so\n+001a4c50: 6170 6370 7032 202d 6320 2d6e 202d 7071  apcpp2 -c -n -pq\n+001a4c60: 756f 7465 2071 756f 7465 2e68 0a20 6363  uote quote.h. cc\n+001a4c70: 202d 6320 7175 6f74 6543 6c69 656e 744c   -c quoteClientL\n+001a4c80: 6962 2e63 0a3c 2f70 7265 3e3c 703e 2057  ib.c.

    W\n+001a4c90: 6520 646f 2074 6865 2073 616d 6520 666f e do the same fo\n+001a4ca0: 7220 6120 7365 7276 6963 6520 6465 6669 r a service defi\n+001a4cb0: 6e69 7469 6f6e 2069 6e20 3c65 6d3e 3c63 nition in rate.h:

    soapcpp2 -c -\n+001a4d00: 6e20 2d70 7261 7465 2072 6174 652e 680a n -prate rate.h.\n+001a4d10: 2063 6320 2d63 2072 6174 6543 6c69 656e cc -c rateClien\n+001a4d20: 744c 6962 2e63 0a3c 2f70 7265 3e3c 703e tLib.c.

    \n+001a4d30: 2054 6f20 7365 7276 6520 626f 7468 2074 To serve both t\n+001a4d40: 6865 2071 756f 7465 2061 6e64 2072 6174 he quote and rat\n+001a4d50: 6520 7365 7276 6963 6573 206f 6e20 7468 e services on th\n+001a4d60: 6520 7361 6d65 2070 6f72 742c 2077 6520 e same port, we \n+001a4d70: 6368 6169 6e20 7468 6520 7365 7276 6963 chain the servic\n+001a4d80: 6520 6469 7370 6174 6368 6572 7320 6173 e dispatchers as\n+001a4d90: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 follows:

    .
    #include "\n+001a4df0: 7175 6f74 6548 2e68 2671 756f 743b 3c2f quoteH.h"
    .#includ\n+001a4e40: 6520 2671 756f 743b 7261 7465 482e 6826 e "rateH.h&\n+001a4e50: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    \n+001a4e90: 2369 6e63 6c75 6465 2026 7175 6f74 3b71 #include "q\n+001a4ea0: 756f 7465 2e6e 736d 6170 2671 756f 743b uote.nsmap"\n+001a4eb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001a4ed0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n+001a4ef0: 7564 6520 2671 756f 743b 7261 7465 2e6e ude "rate.n\n+001a4f00: 736d 6170 2671 756f 743b 3c2f 7370 616e smap"
    .
    .
    struct\n+001a4f60: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+001a4f90: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001a4fc0: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = \n+001a5020: 736f 6170 5f6e 6577 3c2f 613e 2829 3b20 soap_new(); \n+001a5030: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .\n+001a51c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+001a51f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a5200: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (1)
    .\n+001a5220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+001a5250: 2020 3c73 7061 6e20 636c 6173 733d 226b if (
    soap_va\n+001a52d0: 6c69 645f 736f 636b 6574 3c2f 613e 283c lid_socket(<\n+001a52e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a52f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a5300: 705f 5f69 6f2e 6874 6d6c 2367 6165 6330 p__io.html#gaec0\n+001a5310: 6531 6165 6363 3264 3534 3739 6438 3039 e1aecc2d5479d809\n+001a5320: 3937 3632 6665 6234 3731 3363 3622 3e73 9762feb4713c6\">s\n+001a5330: 6f61 705f 6163 6365 7074 3c2f 613e 283c oap_accept(<\n+001a5340: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a5350: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a5360: 6874 6d6c 223e 736f 6170 3c2f 613e 2929 html\">soap))\n+001a5370: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {<\n+001a5390: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.\n+001a5470: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    \n+001a5490: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n+001a55c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a55d0: 3e20 2020 2020 203c 6120 636c 6173 733d > so\n+001a5630: 6170 5f73 6574 5f6e 616d 6573 7061 6365 ap_set_namespace\n+001a5640: 733c 2f61 3e28 3c61 2063 6c61 7373 3d22 s(soa\n+001a5670: 703c 2f61 3e2c 2071 756f 7465 5f6e 616d p, quote_nam\n+001a5680: 6573 7061 6365 7329 3b3c 2f64 6976 3e0a espaces);
    .\n+001a5690: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (quo\n+001a56d0: 7465 5f73 6572 7665 5f72 6571 7565 7374 te_serve_request\n+001a56e0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a5710: 2920 3d3d 203c 6120 636c 6173 733d 2263 ) == SOAP_NO\n+001a5770: 5f4d 4554 484f 443c 2f61 3e29 203c 2f64 _METHOD) .
    {.
    soap_set_na\n+001a5820: 6d65 7370 6163 6573 3c2f 613e 283c 6120 mespaces(soap, ra\n+001a5860: 7465 5f6e 616d 6573 7061 6365 7329 3b3c te_namespaces);<\n+001a5870: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+001a5890: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (rate_serve_\n+001a58c0: 7265 7175 6573 7428 3c61 2063 6c61 7373 request(s\n+001a58f0: 6f61 703c 2f61 3e29 293c 2f64 6976 3e0a oap))
    .\n+001a5900: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap\n+001a5970: 5f73 656e 645f 6661 756c 743c 2f61 3e28 _send_fault(\n+001a5980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001a59b0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // send \n+001a59d0: 6661 756c 7420 746f 2063 6c69 656e 7420 fault to client \n+001a59e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001a5a00: 2020 2020 2020 7d20 3c2f 6469 763e 0a3c }
    .<\n+001a5a10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a5a20: 3e20 2020 2020 203c 7370 616e 2063 6c61 > else if\n+001a5a70: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e\n+001a5af0: 7272 6f72 3c2f 613e 2920 3c2f 6469 763e rror)
    \n+001a5b00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    \n+001a5b20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_\n+001a5b90: 7365 6e64 5f66 6175 6c74 3c2f 613e 283c send_fault(<\n+001a5ba0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a5bb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a5bc0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001a5bd0: 203c 7370 616e 2063 6c61 7373 3d22 636f // send f\n+001a5bf0: 6175 6c74 2074 6f20 636c 6965 6e74 203c ault to client <\n+001a5c00: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001a5c20: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    . \n+001a5c40: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    \n+001a5c60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+001a5c80: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap->\n+001a5ce0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 errnum<\n+001a5d30: 2f61 3e29 203c 7370 616e 2063 6c61 7373 /a>) // ac\n+001a5d50: 6365 7074 2066 6169 6c65 642c 2074 7279 cept failed, try\n+001a5d60: 2061 6761 696e 2061 6674 6572 2031 2073 again after 1 s\n+001a5d70: 6563 6f6e 643c 2f73 7061 6e3e 3c2f 6469 econd.
    {
    \n+001a5da0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n+001a5e10: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+001a5e20: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a5e50: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
    sleep(\n+001a5e80: 3129 3b3c 2f64 6976 3e0a 3c64 6976 2063 1);
    .
    \n+001a5ea0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    <\n+001a5ec0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a5ed0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
    .
    \n+001a5f00: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n+001a5f20: 2066 7072 696e 7466 2873 7464 6572 722c fprintf(stderr,\n+001a5f30: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+001a5f50: 6f74 3b73 6572 7665 7220 7469 6d65 6420 ot;server timed \n+001a5f60: 6f75 745c 6e26 7175 6f74 3b3c 2f73 7061 out\\n");
    . \n+001a5f90: 2020 2020 3c73 7061 6e20 636c 6173 733d br\n+001a5fb0: 6561 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 eak; .
    }
    \n+001a5fe0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n+001a6050: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap); <\n+001a6090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_end(soap); \n+001a6140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    }
    .<\n+001a6190: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a61a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a61b0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001a61c0: 6761 6637 6430 3137 3631 3631 6539 6465 gaf7d0176161e9de\n+001a61d0: 6633 3639 3831 6532 3466 6161 3139 3133 f36981e24faa1913\n+001a61e0: 6439 223e 736f 6170 5f64 6573 7472 6f79 d9\">soap_destroy\n+001a61f0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001a6220: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    .\n+001a6240: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .
    soap_free(\n+001a6350: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001a6380: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n+001a63a0: 703e 5468 6973 2063 6861 696e 696e 6720 p>This chaining \n+001a63b0: 6361 6e20 6265 2061 7262 6974 7261 7269 can be arbitrari\n+001a63c0: 6c79 2064 6565 702e 2057 6865 6e20 7468 ly deep. When th\n+001a63d0: 6520 7072 6576 696f 7573 2072 6571 7565 e previous reque\n+001a63e0: 7374 2066 6169 6c73 2077 6974 6820 6120 st fails with a \n+001a63f0: 3c63 6f64 653e 2353 4f41 505f 4e4f 5f4d #SOAP_NO_M\n+001a6400: 4554 484f 443c 2f63 6f64 653e 2074 6865 ETHOD the\n+001a6410: 6e20 6e65 7874 2072 6571 7565 7374 2064 n next request d\n+001a6420: 6973 7061 7463 6865 7220 6361 6e20 6265 ispatcher can be\n+001a6430: 2074 7269 6564 2e3c 2f70 3e0a 3c70 3e54 tried.

    .

    T\n+001a6440: 6865 2073 6572 7665 7220 7368 6f75 6c64 he server should\n+001a6450: 2061 6c73 6f20 6465 6669 6e65 2074 6865 also define the\n+001a6460: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+001a6470: 6f6e 733a 3c2f 703e 0a3c 6469 7620 636c ons:

    .
    <\n+001a6490: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a64a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns__getQuo\n+001a64d0: 7465 283c 7370 616e 2063 6c61 7373 3d22 te(struct<\n+001a64f0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001a6520: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001a6550: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, char *\n+001a6580: 7379 6d62 6f6c 2c20 3c73 7061 6e20 636c symbol, float *\n+001a65b0: 5265 7375 6c74 293b 203c 2f64 6976 3e0a Result);
    .\n+001a65c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    *R\n+001a65f0: 6573 756c 7420 3d20 2e2e 2e20 3b20 3c2f esult = ... ; .
    return\n+001a6640: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n+001a66a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    .\n+001a66f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__getRate\n+001a6720: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001a6770: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001a67a0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, char *co\n+001a67d0: 756e 7472 7931 2c20 3c73 7061 6e20 636c untry1, char *c\n+001a6800: 6f75 6e74 7279 322c 203c 7370 616e 2063 ountry2, float \n+001a6830: 2a52 6573 756c 7429 3b20 3c2f 6469 763e *Result);
    \n+001a6840: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    *\n+001a6870: 5265 7375 6c74 203d 202e 2e2e 203b 203c Result = ... ; <\n+001a6880: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_OK;
    .
    }.

    Ho\n+001a6960: 7765 7665 722c 2074 6865 2077 6869 6c65 wever, the while\n+001a6970: 206c 6f6f 7020 6974 6572 6174 6573 2066 loop iterates f\n+001a6980: 6f72 2065 6163 6820 6e65 7720 636f 6e6e or each new conn\n+001a6990: 6563 7469 6f6e 2074 6861 7420 6973 2065 ection that is e\n+001a69a0: 7374 6162 6c69 7368 6564 2077 6974 6820 stablished with \n+001a69b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s\n+001a6a30: 6f61 705f 6163 6365 7074 3c2f 613e 3c2f oap_accept and does n\n+001a6a50: 6f74 2061 6c6c 6f77 2066 6f72 2048 5454 ot allow for HTT\n+001a6a60: 5020 6b65 6570 2d61 6c69 7665 2063 6f6e P keep-alive con\n+001a6a70: 6e65 6374 696f 6e73 2074 6f20 7065 7273 nections to pers\n+001a6a80: 6973 742e 2046 6f72 206f 7572 2066 696e ist. For our fin\n+001a6a90: 616c 2069 6d70 726f 7665 6d65 6e74 2077 al improvement w\n+001a6aa0: 6520 7761 6e74 2074 6f20 7375 7070 6f72 e want to suppor\n+001a6ab0: 7420 4854 5450 206b 6565 702d 616c 6976 t HTTP keep-aliv\n+001a6ac0: 6520 636f 6e6e 6563 7469 6f6e 7320 7468 e connections th\n+001a6ad0: 6174 2072 6571 7569 7265 206c 6f6f 7069 at require loopi\n+001a6ae0: 6e67 206f 7665 7220 7468 6520 7365 7276 ng over the serv\n+001a6af0: 6963 6520 6469 7370 6174 6368 6573 2075 ice dispatches u\n+001a6b00: 6e74 696c 2074 6865 2063 6f6e 6e65 6374 ntil the connect\n+001a6b10: 696f 6e20 636c 6f73 6573 206f 6e20 6569 ion closes on ei\n+001a6b20: 7468 6572 2065 6e64 2c20 6166 7465 7220 ther end, after \n+001a6b30: 7768 6963 6820 7765 2072 6573 756d 6520 which we resume \n+001a6b40: 7468 6520 6f75 7465 7220 6c6f 6f70 2e20 the outer loop. \n+001a6b50: 5468 6520 7265 7375 6c74 696e 6720 636f The resulting co\n+001a6b60: 6465 2069 7320 7665 7279 2063 6c6f 7365 de is very close\n+001a6b70: 2074 6f20 7468 6520 736f 6170 6370 7032 to the soapcpp2\n+001a6b80: 2d67 656e 6572 6174 6564 203c 636f 6465 -generated \n+001a6c00: 736f 6170 5f73 6572 7665 3c2f 613e 3c2f soap_serve code and t\n+001a6c20: 6865 203c 636f 6465 3e73 6572 7665 3c2f he serve service cl\n+001a6c40: 6173 7320 6d65 7468 6f64 732c 2077 6974 ass methods, wit\n+001a6c50: 6820 7468 6520 6164 6469 7469 6f6e 206f h the addition o\n+001a6c60: 6620 7468 6520 6368 6169 6e20 6f66 2073 f the chain of s\n+001a6c70: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n+001a6c80: 7320 696e 2074 6865 206c 6f6f 7020 626f s in the loop bo\n+001a6c90: 6479 3a3c 2f70 3e0a 3c64 6976 2063 6c61 dy:

    .
    \n+001a6cc0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n+001a6ce0: 7564 6520 2671 756f 743b 7175 6f74 6548 ude "quoteH\n+001a6cf0: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"<\n+001a6d00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #include &quo\n+001a6d40: 743b 7261 7465 482e 6826 7175 6f74 3b3c t;rateH.h"<\n+001a6d50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001a6d70: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001a6d80: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+001a6d90: 6465 2026 7175 6f74 3b71 756f 7465 2e6e de "quote.n\n+001a6da0: 736d 6170 2671 756f 743b 3c2f 7370 616e smap"
    .
    #include &q\n+001a6df0: 756f 743b 7261 7465 2e6e 736d 6170 2671 uot;rate.nsmap&q\n+001a6e00: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    .struct soap *soap = soap_n\n+001a6f20: 6577 3c2f 613e 2829 3b20 3c2f 6469 763e ew();
    \n+001a6f30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if<\n+001a6f60: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_v\n+001a6fc0: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket(\n+001a6fd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+001a7020: 736f 6170 5f62 696e 643c 2f61 3e28 3c61 soap_bind(soap, N\n+001a7060: 554c 4c2c 2038 3038 302c 2031 3029 2929 ULL, 8080, 10)))\n+001a7070: 203c 7370 616e 2063 6c61 7373 3d22 636f // small \n+001a7090: 4241 434b 4c4f 4720 666f 7220 6974 6572 BACKLOG for iter\n+001a70a0: 6174 6976 6520 7365 7276 6572 733c 2f73 ative servers
    .
    {.
    while \n+001a7110: 2831 293c 2f64 6976 3e0a 3c64 6976 2063 (1)
    .
    {<\n+001a7130: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if \n+001a7170: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_valid_so\n+001a71d0: 636b 6574 3c2f 613e 283c 6120 636c 6173 cket(soap_ac\n+001a7230: 6365 7074 3c2f 613e 283c 6120 636c 6173 cept(\n+001a7260: 736f 6170 3c2f 613e 2929 293c 2f64 6976 soap))).
    {
    .\n+001a7290: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    \n+001a7420: 2020 203c 7370 616e 2063 6c61 7373 3d22 do<\n+001a7440: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001a7460: 2020 2020 207b 3c2f 6469 763e 0a3c 6469 {
    . \n+001a7480: 2020 2020 2020 203c 7370 616e 2063 6c61 if ((soap->\n+001a74e0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;keep_a\n+001a7530: 6c69 7665 3c2f 613e 2026 6774 3b20 3029 live > 0)\n+001a7540: 2026 616d 703b 2661 6d70 3b20 283c 6120 && (soap->\n+001a7580: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;max_ke\n+001a75d0: 6570 5f61 6c69 7665 3c2f 613e 2026 6774 ep_alive >\n+001a75e0: 3b20 3029 293c 2f64 6976 3e0a 3c64 6976 ; 0))
    . \n+001a7600: 2020 2020 2020 2020 3c61 2063 6c61 7373 s\n+001a7630: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->keep_alive<\n+001a7690: 2f61 3e2d 2d3b 3c2f 6469 763e 0a3c 6469 /a>--;
    . \n+001a76b0: 2020 2020 2020 203c 7370 616e 2063 6c61 if (soap\n+001a7730: 5f62 6567 696e 5f73 6572 7665 3c2f 613e _begin_serve\n+001a7740: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a7770: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
    .
    \n+001a7790: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    \n+001a77b0: 2020 2020 2020 203c 7370 616e 2063 6c61 if (soap->\n+001a7810: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error >= SOA\n+001a78c0: 505f 5354 4f50 3c2f 613e 2920 3c73 7061 P_STOP) // if a plugin\n+001a78f0: 2068 6173 2073 6572 7665 6420 7468 6520 has served the \n+001a7900: 7265 7175 6573 743c 2f73 7061 6e3e 3c2f request.
    \n+001a7930: 2020 203c 7370 616e 2063 6c61 7373 3d22 con\n+001a7950: 7469 6e75 653c 2f73 7061 6e3e 3b20 2020 tinue; \n+001a7960: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001a7970: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // then co\n+001a7990: 6e74 696e 7565 2077 6974 6820 7468 6520 ntinue with the \n+001a79a0: 6e65 7874 2072 6571 7565 7374 3c2f 7370 next request
    .
    \n+001a79d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+001a79f0: 6272 6561 6b3c 2f73 7061 6e3e 3b20 2020 break; \n+001a7a00: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001a7a10: 2020 2020 203c 7370 616e 2063 6c61 7373 // an\n+001a7a30: 2065 7272 6f72 206f 6363 7572 7265 643c error occurred<\n+001a7a40: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001a7a60: 2020 2020 2020 207d 3c2f 6469 763e 0a3c }
    .<\n+001a7a70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a7a80: 3e20 2020 2020 2020 203c 6120 636c 6173 > \n+001a7ae0: 736f 6170 5f73 6574 5f6e 616d 6573 7061 soap_set_namespa\n+001a7af0: 6365 733c 2f61 3e28 3c61 2063 6c61 7373 ces(s\n+001a7b20: 6f61 703c 2f61 3e2c 2071 756f 7465 5f6e oap, quote_n\n+001a7b30: 616d 6573 7061 6365 7329 3b3c 2f64 6976 amespaces);.
    if \n+001a7b80: 2871 756f 7465 5f73 6572 7665 5f72 6571 (quote_serve_req\n+001a7b90: 7565 7374 283c 6120 636c 6173 733d 2263 uest(soap\n+001a7bc0: 3c2f 613e 2920 3d3d 203c 6120 636c 6173 ) == SOA\n+001a7c20: 505f 4e4f 5f4d 4554 484f 443c 2f61 3e29 P_NO_METHOD)\n+001a7c30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001a7c50: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+001a7c70: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soa\n+001a7cd0: 705f 7365 745f 6e61 6d65 7370 6163 6573 p_set_namespaces\n+001a7ce0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001a7d10: 3c2f 613e 2c20 7261 7465 5f6e 616d 6573 , rate_names\n+001a7d20: 7061 6365 7329 3b3c 2f64 6976 3e0a 3c64 paces);
    .\n+001a7d40: 2020 2020 2020 2020 2020 3c73 7061 6e20 if (r\n+001a7d70: 6174 655f 7365 7276 655f 7265 7175 6573 ate_serve_reques\n+001a7d80: 7428 3c61 2063 6c61 7373 3d22 636f 6465 t(soap))
    ..
    \n+001a7ec0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . \n+001a7ee0: 2020 2020 2020 203c 7370 616e 2063 6c61 else if
    \n+001a7f30: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e\n+001a7fb0: 7272 6f72 3c2f 613e 2920 3c2f 6469 763e rror)
    \n+001a7fc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {.
    <\n+001a8000: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a8010: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a8020: 705f 5f69 6f2e 6874 6d6c 2367 6162 3033 p__io.html#gab03\n+001a8030: 6537 6132 6332 3630 3530 3034 6337 6637 e7a2c2605004c7f7\n+001a8040: 3462 6532 3737 3338 6363 3632 3922 3e73 4be27738cc629\">s\n+001a8050: 6f61 705f 7365 6e64 5f66 6175 6c74 3c2f oap_send_fault(soap); // se\n+001a80b0: 6e64 2066 6175 6c74 2074 6f20 636c 6965 nd fault to clie\n+001a80c0: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
    \n+001a80d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n+001a8260: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    } while (soap->\n+001a8320: 6b65 6570 5f61 6c69 7665 3c2f 613e 293b keep_alive);\n+001a8330: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    else\n+001a8390: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n+001a83e0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->errnum) <\n+001a8440: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a8450: 656e 7422 3e2f 2f20 6163 6365 7074 2066 ent\">// accept f\n+001a8460: 6169 6c65 642c 2074 7279 2061 6761 696e ailed, try again\n+001a8470: 2061 6674 6572 2031 2073 6563 6f6e 643c after 1 second<\n+001a8480: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001a84a0: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    \n+001a84c0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print\n+001a8520: 5f66 6175 6c74 3c2f 613e 283c 6120 636c _fault(soap, stde\n+001a8560: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
    . \n+001a8580: 2020 2020 736c 6565 7028 3129 3b3c 2f64 sleep(1);.
    } .
    else.
    {.
    fprin\n+001a8630: 7466 2873 7464 6572 722c 203c 7370 616e tf(stderr, "ser\n+001a8660: 7665 7220 7469 6d65 6420 6f75 745c 6e26 ver timed out\\n&\n+001a8670: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); <\n+001a8680: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    break;
    . \n+001a86e0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    ..\n+001a87a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n+001a8850: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .}\n+001a8880: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n+001a88f0: 6170 5f64 6573 7472 6f79 3c2f 613e 283c ap_destroy(<\n+001a8900: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a8910: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a8920: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001a8930: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s\n+001a89a0: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); .

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

    .<\n+001a8ae0: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.How to create\n+001a8b10: 2044 4c4c 733c 2f68 323e 0a3c 703e f09f DLLs.

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

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

    .Creatin\n+001a8b80: 6720 7468 6520 6261 7365 2073 7464 736f g the base stdso\n+001a8b90: 6170 322e 646c 6c3c 2f68 333e 0a3c 703e ap2.dll

    .

    \n+001a8ba0: 5468 6520 656e 6769 6e65 2064 6f65 7320 The engine does \n+001a8bb0: 6e6f 7420 6465 6669 6e65 2053 4f41 5020 not define SOAP \n+001a8bc0: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n+001a8bd0: 2073 6572 6961 6c69 7a65 7273 2074 6861 serializers tha\n+001a8be0: 7420 7468 6520 656e 6769 6e65 206e 6565 t the engine nee\n+001a8bf0: 6473 2077 6865 6e20 696e 7374 616c 6c65 ds when installe\n+001a8c00: 6420 6173 2061 206c 6962 7261 7279 2e20 d as a library. \n+001a8c10: 5765 2074 6865 7265 666f 7265 2061 6464 We therefore add\n+001a8c20: 2053 4f41 5020 4865 6164 6572 2061 6e64 SOAP Header and\n+001a8c30: 2046 6175 6c74 2073 6572 6961 6c69 7a65 Fault serialize\n+001a8c40: 7273 2c20 7768 6963 6820 6172 6520 636f rs, which are co\n+001a8c50: 6d70 696c 6564 2073 6570 6172 6174 656c mpiled separatel\n+001a8c60: 7920 6173 2066 6f6c 6c6f 7773 2e20 4669 y as follows. Fi\n+001a8c70: 7273 742c 2063 7265 6174 6520 6120 6e65 rst, create a ne\n+001a8c80: 7720 6865 6164 6572 2066 696c 6520 3c65 w header file env.h with t\n+001a8cb0: 6865 2053 4f41 5020 4865 6164 6572 203c he SOAP Header <\n+001a8cc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+001a8d20: 534f 4150 5f45 4e56 5f5f 4865 6164 6572 SOAP_ENV__Header\n+001a8d30: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+001a8d40: 534f 4150 2046 6175 6c74 203c 636f 6465 SOAP Fault SOAP_E\n+001a8db0: 4e56 5f5f 4661 756c 743c 2f61 3e3c 2f63 NV__Fault structures,\n+001a8dd0: 2069 6e63 6c75 6469 6e67 203c 636f 6465 including SOAP_ENV__Deta\n+001a8e50: 696c 3c2f 613e 3c2f 636f 6465 3e20 6966 il if\n+001a8e60: 2074 6869 7320 7374 7275 6374 7572 6520 this structure \n+001a8e70: 636f 6e74 6169 6e73 206d 656d 6265 7273 contains members\n+001a8e80: 2074 6861 7420 6172 6520 7365 7269 616c that are serial\n+001a8e90: 697a 6564 2061 7320 6661 756c 7420 6465 ized as fault de\n+001a8ea0: 7461 696c 732e 2059 6f75 2063 616e 206c tails. You can l\n+001a8eb0: 6561 7665 2074 6869 7320 6865 6164 6572 eave this header\n+001a8ec0: 2066 696c 6520 656d 7074 7920 6966 2079 file empty if y\n+001a8ed0: 6f75 2077 616e 7420 746f 2075 7365 2074 ou want to use t\n+001a8ee0: 6865 2064 6566 6175 6c74 2053 4f41 5020 he default SOAP \n+001a8ef0: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault\n+001a8f00: 2e20 486f 7765 7665 722c 2069 6620 534f . However, if SO\n+001a8f10: 4150 2048 6561 6465 7273 2061 7265 2072 AP Headers are r\n+001a8f20: 6571 7569 7265 6420 7468 656e 2079 6f75 equired then you\n+001a8f30: 2063 616e 6e6f 7420 6c65 6176 6520 7468 cannot leave th\n+001a8f40: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e SOAP_ENV__Hea\n+001a8fb0: 6465 723c 2f61 3e3c 2f63 6f64 653e 2073 der s\n+001a8fc0: 7472 7563 7475 7265 2065 6d70 7479 2e20 tructure empty. \n+001a8fd0: 466f 7220 6578 616d 706c 652c 2074 6865 For example, the\n+001a8fe0: 2057 532d 4164 6472 6573 7369 6e67 2061 WS-Addressing a\n+001a8ff0: 6e64 2057 532d 5365 6375 7269 7479 2070 nd WS-Security p\n+001a9000: 6c75 6769 6e73 2072 6571 7569 7265 2053 lugins require S\n+001a9010: 4f41 5020 4865 6164 6572 7320 7768 6963 OAP Headers whic\n+001a9020: 6820 6361 6e20 6265 2069 6d70 6f72 7465 h can be importe\n+001a9030: 6420 6279 2061 6464 696e 6720 3c63 6f64 d by adding #import \"wsa5.\n+001a9050: 6822 3c2f 636f 6465 3e20 616e 6420 3c63 h\" and #import \"wss\n+001a9070: 652e 6822 3c2f 636f 6465 3e2c 2072 6573 e.h\", res\n+001a9080: 7065 6374 6976 656c 7920 746f 203c 656d pectively to env.h. Then c\n+001a90b0: 6f6d 7069 6c65 2074 6869 7320 6865 6164 ompile this head\n+001a90c0: 6572 2066 696c 6520 7769 7468 3a20 3c2f er file with:

     soapcpp\n+001a90f0: 3220 2d70 656e 7620 656e 762e 680a 3c2f  2 -penv env.h.

    The gene\n+001a9110: 7261 7465 6420 3c65 6d3e 3c63 6f64 653e rated \n+001a9120: 656e 7643 2e63 7070 3c2f 636f 6465 3e3c envC.cpp<\n+001a9130: 2f65 6d3e 2066 696c 6520 686f 6c64 7320 /em> file holds \n+001a9140: 7468 6520 534f 4150 2048 6561 6465 7220 the SOAP Header \n+001a9150: 616e 6420 4661 756c 7420 7365 7269 616c and Fault serial\n+001a9160: 697a 6572 732e 2057 6520 6361 6e20 6569 izers. We can ei\n+001a9170: 7468 6572 2063 7265 6174 6520 6120 7365 ther create a se\n+001a9180: 7061 7261 7465 203c 656d 3e3c 636f 6465 parate envC.dll\n+001a91a0: 3c2f 656d 3e20 444c 4c20 666f 7220 7468 DLL for th\n+001a91b0: 6973 2074 6861 7420 616c 6c20 636c 6965 is that all clie\n+001a91c0: 6e74 7320 616e 6420 7365 7276 6963 6520 nts and service \n+001a91d0: 6170 706c 6963 6174 696f 6e73 2077 696c applications wil\n+001a91e0: 6c20 7573 652c 206f 7220 636f 6d62 696e l use, or combin\n+001a91f0: 6520 3c65 6d3e 3c63 6f64 653e 656e 7643 e envC\n+001a9200: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n+001a9210: 2077 6974 6820 7468 6520 3c65 6d3e 3c63 with the stdsoap2.dll\n+001a9230: 3c2f 636f 6465 3e3c 2f65 6d3e 2077 6520 we \n+001a9240: 6372 6561 7465 2c20 7768 6963 6820 7765 create, which we\n+001a9250: 2077 696c 6c20 6578 706c 6169 6e20 6675 will explain fu\n+001a9260: 7274 6865 722e 3c2f 703e 0a3c 703e 5468 rther.

    .

    Th\n+001a9270: 6520 6e65 7874 2073 7465 7020 6973 2074 e next step is t\n+001a9280: 6f20 6372 6561 7465 203c 656d 3e3c 636f o create stdsoap2.dll<\n+001a92a0: 2f63 6f64 653e 3c2f 656d 3e20 7768 6963 /code> whic\n+001a92b0: 6820 636f 6e73 6973 7473 206f 6620 7468 h consists of th\n+001a92c0: 6520 6669 6c65 203c 656d 3e3c 636f 6465 e file gsoap/stdsoap2.\n+001a92e0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n+001a92f0: 616e 6420 3c65 6d3e 3c63 6f64 653e 656e and en\n+001a9300: 7643 2e63 7070 3c2f 636f 6465 3e3c 2f65 vC.cpp and optionall\n+001a9320: 7920 7468 6520 706c 7567 696e 7320 796f y the plugins yo\n+001a9330: 7520 7761 6e74 2074 6f20 7573 6520 7375 u want to use su\n+001a9340: 6368 2061 7320 3c65 6d3e 3c63 6f64 653e ch as \n+001a9350: 7773 7365 6170 692e 6370 703c 2f63 6f64 wsseapi.cpp (we need\n+001a9370: 2074 6f20 7265 6e61 6d65 2061 6c6c 203c to rename all <\n+001a9380: 656d 3e3c 636f 6465 3e2e 633c 2f63 6f64 em>.c files to\n+001a93a0: 203c 656d 3e3c 636f 6465 3e2e 6370 703c .cpp<\n+001a93b0: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n+001a93c0: 7320 746f 2061 766f 6964 2069 7373 7565 s to avoid issue\n+001a93d0: 7320 7769 7468 204d 5356 432b 2b29 2e20 s with MSVC++). \n+001a93e0: 5468 6973 2044 4c4c 2063 6f6e 7461 696e This DLL contain\n+001a93f0: 7320 616c 6c20 636f 6d6d 6f6e 2066 756e s all common fun\n+001a9400: 6374 696f 6e73 206e 6565 6465 6420 666f ctions needed fo\n+001a9410: 7220 616c 6c20 6f74 6865 7220 636c 6965 r all other clie\n+001a9420: 6e74 7320 616e 6420 7365 7276 6572 7320 nts and servers \n+001a9430: 6261 7365 6420 6f6e 2067 534f 4150 2e20 based on gSOAP. \n+001a9440: 436f 6d70 696c 6520 3c65 6d3e 3c63 6f64 Compile envC.cpp and <\n+001a9470: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n+001a9480: 6170 322e 6370 703c 2f63 6f64 653e 3c2f ap2.cpp into stdsoap2.dll<\n+001a94b0: 2f63 6f64 653e 3c2f 656d 3e20 7573 696e /code> usin\n+001a94c0: 6720 7468 6520 636f 6d70 696c 6572 206f g the compiler o\n+001a94d0: 7074 696f 6e20 3c63 6f64 653e 2f44 3c2f ption /D #WIT\n+001a94f0: 485f 4e4f 4e41 4d45 5350 4143 4553 3c2f H_NONAMESPACES and the MS\n+001a9510: 5643 2050 7265 2d50 726f 6365 7373 6f72 VC Pre-Processor\n+001a9520: 2064 6566 696e 6974 696f 6e73 203c 636f definitions SOAP_FMAC1=__\n+001a9540: 6465 636c 7370 6563 2864 6c6c 6578 706f declspec(dllexpo\n+001a9550: 7274 293c 2f63 6f64 653e 2c20 3c63 6f64 rt), SOAP_FMAC3=__d\n+001a9570: 6563 6c73 7065 6328 646c 6c65 7870 6f72 eclspec(dllexpor\n+001a9580: 7429 3c2f 636f 6465 3e2c 2061 6e64 2074 t), and t\n+001a9590: 6865 203c 636f 6465 3e23 534f 4150 5f53 he #SOAP_S\n+001a95a0: 5444 5f45 5850 4f52 5453 3c2f 636f 6465 TD_EXPORTS macro set as s\n+001a95c0: 686f 776e 2062 656c 6f77 2066 726f 6d20 hown below from \n+001a95d0: 7468 6520 4d53 5643 2063 6f6d 6d61 6e64 the MSVC command\n+001a95e0: 2070 726f 6d70 743a 203c 2f70 3e3c 7072 prompt:

    C:> cl /c \n+001a9610: 2f49 2e20 2f45 4873 6320 2f44 5749 5448 /I. /EHsc /DWITH\n+001a9620: 5f4e 4f4e 414d 4553 5041 4345 5320 2f44 _NONAMESPACES /D\n+001a9630: 534f 4150 5f46 4d41 4331 3d5f 5f64 6563 SOAP_FMAC1=__dec\n+001a9640: 6c73 7065 6328 646c 6c65 7870 6f72 7429 lspec(dllexport)\n+001a9650: 202f 4453 4f41 505f 464d 4143 333d 5f5f /DSOAP_FMAC3=__\n+001a9660: 6465 636c 7370 6563 2864 6c6c 6578 706f declspec(dllexpo\n+001a9670: 7274 2920 2f44 534f 4150 5f53 5444 5f45 rt) /DSOAP_STD_E\n+001a9680: 5850 4f52 5453 2065 6e76 432e 6370 7020 XPORTS envC.cpp \n+001a9690: 7374 6473 6f61 7032 2e63 7070 0a43 3a26 stdsoap2.cpp.C:&\n+001a96a0: 6774 3b20 6c69 6e6b 202f 4c49 4250 4154 gt; link /LIBPAT\n+001a96b0: 4820 7773 325f 3332 2e6c 6962 202f 4f55 H ws2_32.lib /OU\n+001a96c0: 543a 6d79 6773 6f61 702e 646c 6c20 2f44 T:mygsoap.dll /D\n+001a96d0: 4c4c 2065 6e76 432e 6f62 6a20 7374 6473 LL envC.obj stds\n+001a96e0: 6f61 7032 2e6f 626a 0a3c 2f70 7265 3e3c oap2.obj.
    <\n+001a96f0: 703e 204e 6f74 653a 2061 7320 6f66 2067 p> Note: as of g\n+001a9700: 534f 4150 2032 2e38 2e33 3020 616e 6420 SOAP 2.8.30 and \n+001a9710: 6c61 7465 722c 2074 6865 2044 4c4c 2065 later, the DLL e\n+001a9720: 7870 6f72 7420 6d61 6372 6f73 2073 686f xport macros sho\n+001a9730: 776e 2068 6572 6520 6172 6520 616c 6c20 wn here are all \n+001a9740: 7365 7420 7769 7468 206f 6e65 2070 7265 set with one pre\n+001a9750: 2d70 726f 6365 7373 6f72 2064 6566 696e -processor defin\n+001a9760: 6974 696f 6e20 3c63 6f64 653e 2353 4f41 ition #SOA\n+001a9770: 505f 5354 445f 4558 504f 5254 533c 2f63 P_STD_EXPORTS.

    .

    Alt\n+001a9790: 6572 6e61 7469 7665 6c79 2c20 796f 7520 ernatively, you \n+001a97a0: 6361 6e20 636f 6d70 696c 6520 7769 7468 can compile with\n+001a97b0: 203c 636f 6465 3e2f 443c 2f63 6f64 653e /D\n+001a97c0: 203c 636f 6465 3e23 5749 5448 5f53 4f41 #WITH_SOA\n+001a97d0: 5044 4546 535f 483c 2f63 6f64 653e 2061 PDEFS_H a\n+001a97e0: 6e64 2070 7574 2074 6865 206d 6163 726f nd put the macro\n+001a97f0: 2064 6566 696e 6974 696f 6e73 2069 6e20 definitions in \n+001a9800: 3c65 6d3e 3c63 6f64 653e 736f 6170 6465 soapde\n+001a9810: 6673 2e68 3c2f 636f 6465 3e3c 2f65 6d3e fs.h\n+001a9820: 2e20 5468 6973 2065 7870 6f72 7473 2061 . This exports a\n+001a9830: 6c6c 2066 756e 6374 696f 6e73 2077 6869 ll functions whi\n+001a9840: 6368 2061 7265 2070 7265 6365 6465 6420 ch are preceded \n+001a9850: 6279 2074 6865 206d 6163 726f 203c 636f by the macro #SOAP_FMAC1 in the soapcpp2.\n+001a9890: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n+001a98a0: 736f 7572 6365 2066 696c 6520 616e 6420 source file and \n+001a98b0: 6d61 6372 6f20 3c63 6f64 653e 2353 4f41 macro #SOA\n+001a98c0: 505f 464d 4143 333c 2f63 6f64 653e 2069 P_FMAC3 i\n+001a98d0: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n+001a98e0: 656e 7643 2e63 7070 3c2f 636f 6465 3e3c envC.cpp<\n+001a98f0: 2f65 6d3e 2073 6f75 7263 6520 6669 6c65 /em> source file\n+001a9900: 2e3c 2f70 3e0a 3c70 3e46 696e 616c 6c79 .

    .

    Finally\n+001a9910: 2c20 6e6f 7465 2074 6861 7420 7468 6520 , note that the \n+001a9920: 6753 4f41 5020 736f 7572 6365 2063 6f64 gSOAP source cod\n+001a9930: 6520 7061 636b 6167 6520 636f 6e74 6169 e package contai\n+001a9940: 6e73 2061 206c 6f74 206f 6620 3c65 6d3e ns a lot of \n+001a9950: 3c63 6f64 653e 2e63 3c2f 636f 6465 3e3c .c<\n+001a9960: 2f65 6d3e 2073 6f75 7263 6520 636f 6465 /em> source code\n+001a9970: 2066 696c 6573 2e20 4d69 7869 6e67 2043 files. Mixing C\n+001a9980: 2077 6974 6820 432b 2b20 6669 6c65 7320 with C++ files \n+001a9990: 6973 206e 6f74 2072 6563 6f6d 6d65 6e64 is not recommend\n+001a99a0: 6564 2077 6974 6820 5669 7375 616c 2053 ed with Visual S\n+001a99b0: 7475 6469 6f20 616e 6420 7769 6c6c 206c tudio and will l\n+001a99c0: 6561 6420 746f 2072 756e 2d74 696d 6520 ead to run-time \n+001a99d0: 6572 726f 7273 2077 6865 6e20 6275 696c errors when buil\n+001a99e0: 6469 6e67 2044 4c4c 732e 2054 6865 7265 ding DLLs. There\n+001a99f0: 666f 7265 2c20 616c 7761 7973 2072 656e fore, always ren\n+001a9a00: 616d 6520 3c65 6d3e 3c63 6f64 653e 2e63 ame .c\n+001a9a10: 3c2f 636f 6465 3e3c 2f65 6d3e 2073 6f75 sou\n+001a9a20: 7263 6520 636f 6465 2066 696c 6573 2074 rce code files t\n+001a9a30: 6f20 3c65 6d3e 3c63 6f64 653e 2e63 7070 o .cpp\n+001a9a40: 3c2f 636f 6465 3e3c 2f65 6d3e 2073 6f75 sou\n+001a9a50: 7263 6520 636f 6465 2066 696c 6573 2077 rce code files w\n+001a9a60: 6865 6e20 6372 6561 7469 6e67 2044 4c4c hen creating DLL\n+001a9a70: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

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

    ..Cre\n+001a9ae0: 6174 696e 6720 636c 6965 6e74 2061 6e64 ating client and\n+001a9af0: 2073 6572 7665 7220 444c 4c73 3c2f 6833 server DLLs.

    Compile the\n+001a9b10: 203c 656d 3e3c 636f 6465 3e73 6f61 7043 soapC\n+001a9b20: 6c69 656e 744c 6962 2e63 7070 3c2f 636f lientLib.cpp and soapServe\n+001a9b50: 724c 6962 2e63 7070 3c2f 636f 6465 3e3c rLib.cpp<\n+001a9b60: 2f65 6d3e 2073 6f75 7263 6573 2061 7320 /em> sources as \n+001a9b70: 444c 4c73 2062 7920 7573 696e 6720 7468 DLLs by using th\n+001a9b80: 6520 4d53 5643 2050 7265 2d50 726f 6365 e MSVC Pre-Proce\n+001a9b90: 7373 6f72 2064 6566 696e 6974 696f 6e73 ssor definitions\n+001a9ba0: 203c 636f 6465 3e53 4f41 505f 464d 4143 SOAP_FMAC\n+001a9bb0: 353d 5f5f 6465 636c 7370 6563 2864 6c6c 5=__declspec(dll\n+001a9bc0: 6578 706f 7274 293c 2f63 6f64 653e 2061 export) a\n+001a9bd0: 6e64 203c 636f 6465 3e53 4f41 505f 434d nd SOAP_CM\n+001a9be0: 4143 3d5f 5f64 6563 6c73 7065 6328 646c AC=__declspec(dl\n+001a9bf0: 6c65 7870 6f72 7429 3c2f 636f 6465 3e2c lexport),\n+001a9c00: 2061 6e64 2062 7920 7573 696e 6720 7468 and by using th\n+001a9c10: 6520 432b 2b20 636f 6d70 696c 6572 206f e C++ compiler o\n+001a9c20: 7074 696f 6e20 3c63 6f64 653e 2f44 3c2f ption /D #WIT\n+001a9c40: 485f 4e4f 4e41 4d45 5350 4143 4553 3c2f H_NONAMESPACES. All of th\n+001a9c60: 6573 6520 6d61 6372 6f73 2061 7265 2073 ese macros are s\n+001a9c70: 6574 2061 7320 6120 7368 6f72 7468 616e et as a shorthan\n+001a9c80: 6420 7769 7468 206f 6e65 2070 7265 2d70 d with one pre-p\n+001a9c90: 726f 6365 7373 6f72 2064 6566 696e 6974 rocessor definit\n+001a9ca0: 696f 6e20 3c63 6f64 653e 2353 4f41 505f ion #SOAP_\n+001a9cb0: 5354 445f 4558 504f 5254 533c 2f63 6f64 STD_EXPORTS (requires gSO\n+001a9cd0: 4150 2032 2e38 2e33 3020 6f72 206c 6174 AP 2.8.30 or lat\n+001a9ce0: 6572 292e 3c2f 703e 0a3c 703e 5468 6973 er).

    .

    This\n+001a9cf0: 2044 4c4c 206c 696e 6b73 2074 6f20 3c65 DLL links to stdsoap2\n+001a9d10: 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e .dll\n+001a9d20: 2077 6520 6372 6561 7465 6420 696e 2053 we created in S\n+001a9d30: 6563 7469 6f6e 203c 6120 636c 6173 733d ection C\n+001a9d60: 7265 6174 696e 6720 7468 6520 6261 7365 reating the base\n+001a9d70: 2073 7464 736f 6170 322e 646c 6c3c 2f61 stdsoap2.dll.

    .

    To cre\n+001a9d90: 6174 6520 6d75 6c74 6970 6c65 2044 4c4c ate multiple DLL\n+001a9da0: 7320 696e 2074 6865 2073 616d 6520 7072 s in the same pr\n+001a9db0: 6f6a 6563 7420 6469 7265 6374 6f72 792c oject directory,\n+001a9dc0: 2079 6f75 2073 686f 756c 6420 7573 6520 you should use \n+001a9dd0: 3c62 3e3c 636f 6465 3e73 6f61 7063 7070 soapcpp\n+001a9de0: 3220 2d70 206e 616d 653c 2f63 6f64 653e 2 -p name\n+001a9df0: 3c2f 623e 206f 7074 696f 6e20 3c62 3e3c option <\n+001a9e00: 636f 6465 3e2d 7020 6e61 6d65 3c2f 636f code>-p name to renam\n+001a9e20: 6520 7468 6520 6765 6e65 7261 7465 6420 e the generated \n+001a9e30: 3c65 6d3e 3c63 6f64 653e 736f 6170 436c soapCl\n+001a9e40: 6965 6e74 4c69 622e 6370 703c 2f63 6f64 ientLib.cpp and \n+001a9e60: 3c63 6f64 653e 736f 6170 5365 7276 6572 soapServer\n+001a9e70: 4c69 622e 6370 703c 2f63 6f64 653e 3c2f Lib.cpp (and associa\n+001a9e90: 7465 6429 2066 696c 6573 2e20 5468 6520 ted) files. The \n+001a9ea0: 3c62 3e3c 636f 6465 3e2d 7020 6e61 6d65 -p name\n+001a9eb0: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+001a9ec0: 6f6e 2073 7065 6369 6669 6573 2061 203c on specifies a <\n+001a9ed0: 656d 3e3c 636f 6465 3e6e 616d 653c 2f63 em>name prefix\n+001a9ef0: 2074 6f20 7265 706c 6163 6520 7468 6520 to replace the \n+001a9f00: 3c65 6d3e 3c63 6f64 653e 736f 6170 3c2f soap file \n+001a9f20: 6e61 6d65 2070 7265 6669 782e 2041 6e6f name prefix. Ano\n+001a9f30: 7468 6572 2077 6179 2069 7320 746f 2075 ther way is to u\n+001a9f40: 7365 2043 2b2b 206e 616d 6573 7061 6365 se C++ namespace\n+001a9f50: 7320 7769 7468 203c 623e 3c63 6f64 653e s with \n+001a9f60: 736f 6170 6370 7032 202d 7120 6e61 6d65 soapcpp2 -q name\n+001a9f70: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+001a9f80: 6f6e 203c 623e 3c63 6f64 653e 2d71 206e on -q n\n+001a9f90: 616d 653c 2f63 6f64 653e 3c2f 623e 2c20 ame, \n+001a9fa0: 6966 2074 6865 2069 6e74 6572 6661 6365 if the interface\n+001a9fb0: 2068 6561 6465 7220 6669 6c65 2069 6e70 header file inp\n+001a9fc0: 7574 2074 6f20 736f 6170 6370 7032 2064 ut to soapcpp2 d\n+001a9fd0: 6f65 7320 6e6f 7420 616c 7265 6164 7920 oes not already \n+001a9fe0: 6465 636c 6172 6520 6120 432b 2b20 6e61 declare a C++ na\n+001a9ff0: 6d65 7370 6163 652e 2041 2063 6c65 616e mespace. A clean\n+001aa000: 2073 6570 6172 6174 696f 6e20 6f66 206c separation of l\n+001aa010: 6962 7261 7269 6573 2063 616e 2061 6c73 ibraries can als\n+001aa020: 6f20 6265 2061 6368 6965 7665 6420 7769 o be achieved wi\n+001aa030: 7468 2043 2b2b 206e 616d 6573 7061 6365 th C++ namespace\n+001aa040: 732c 2073 6565 2053 6563 7469 6f6e 203c s, see Section <\n+001aa050: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001aa060: 663d 2269 6e64 6578 2e68 746d 6c23 636f f=\"index.html#co\n+001aa070: 6465 6e61 6d65 7370 6163 6522 3e48 6f77 denamespace\">How\n+001aa080: 2074 6f20 6275 696c 6420 6120 636c 6965 to build a clie\n+001aa090: 6e74 206f 7220 7365 7276 6572 2069 6e20 nt or server in \n+001aa0a0: 6120 432b 2b20 636f 6465 206e 616d 6573 a C++ code names\n+001aa0b0: 7061 6365 3c2f 613e 202e 3c2f 703e 0a3c pace .

    .<\n+001aa0c0: 703e 556e 6c65 7373 2079 6f75 2075 7365 p>Unless you use\n+001aa0d0: 2074 6865 2063 6c69 656e 7420 7072 6f78 the client prox\n+001aa0e0: 7920 616e 6420 7365 7276 6572 206f 626a y and server obj\n+001aa0f0: 6563 7420 636c 6173 7365 7320 283c 656d ect classes (soapXYZPr\n+001aa110: 6f78 792e 683c 2f63 6f64 653e 3c2f 656d oxy.h and \n+001aa130: 736f 6170 5859 5a53 6572 7669 6365 2e68 soapXYZService.h\n+001aa140: 3c2f 636f 6465 3e3c 2f65 6d3e 292c 2061 ), a\n+001aa150: 6c6c 2063 6c69 656e 7420 616e 6420 7365 ll client and se\n+001aa160: 7276 6572 2061 7070 6c69 6361 7469 6f6e rver application\n+001aa170: 7320 6d75 7374 2065 7870 6c69 6369 746c s must explicitl\n+001aa180: 7920 7365 7420 7468 6520 6e61 6d65 7370 y set the namesp\n+001aa190: 6163 6573 2076 616c 7565 206f 6620 7468 aces value of th\n+001aa1a0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context with\n+001aa210: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    soap_set_na\n+001aa2a0: 6d65 7370 6163 6573 3c2f 613e 283c 6120 mespaces(soap, namespaces<\n+001aa340: 2f61 3e29 3b3c 2f64 6976 3e0a 3c2f 6469 /a>);
    .

    where the \n+001aa370: 3c63 6f64 653e 6e61 6d65 7370 6163 6573 namespaces\n+001aa380: 5b5d 3c2f 636f 6465 3e20 7461 626c 6520 [] table \n+001aa390: 7368 6f75 6c64 2062 6520 6465 6669 6e65 should be define\n+001aa3a0: 6420 696e 2074 6865 2063 6c69 656e 742f d in the client/\n+001aa3b0: 7365 7276 6572 2073 6f75 7263 652e 2054 server source. T\n+001aa3c0: 6865 7365 2074 6162 6c65 7320 6172 6520 hese tables are \n+001aa3d0: 6765 6e65 7261 7465 6420 696e 2074 6865 generated in the\n+001aa3e0: 203c 656d 3e3c 636f 6465 3e2e 6e73 6d61 .nsma\n+001aa3f0: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi\n+001aa400: 6c65 732e 2054 6865 2074 6162 6c65 7320 les. The tables \n+001aa410: 6172 6520 7265 6e61 6d65 6420 666f 7220 are renamed for \n+001aa420: 636f 6e76 656e 6965 6e63 6520 7573 696e convenience usin\n+001aa430: 6720 3c62 3e3c 636f 6465 3e73 6f61 7063 g soapc\n+001aa440: 7070 3220 2d6e 3c2f 636f 6465 3e3c 2f62 pp2 -n option -n,\n+001aa470: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section soa\n+001aa4b0: 7063 7070 3220 6f70 7469 6f6e 733c 2f61 pcpp2 options .

    .

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

    .\n+001aa520: 3c2f 613e 0a48 6f77 2074 6f20 6275 696c .How to buil\n+001aa530: 6420 6d6f 6475 6c65 7320 616e 6420 6c69 d modules and li\n+001aa540: 6272 6172 6965 7320 7769 7468 2074 6865 braries with the\n+001aa550: 2023 6d6f 6475 6c65 2064 6972 6563 7469 #module directi\n+001aa560: 7665 3c2f 6832 3e0a 3c70 3e54 6865 203c ve.

    The <\n+001aa570: 636f 6465 3e23 6d6f 6475 6c65 3c2f 636f code>#module directive is\n+001aa590: 2075 7365 6420 746f 2062 7569 6c64 206d used to build m\n+001aa5a0: 6f64 756c 6573 2077 6974 6820 736f 6170 odules with soap\n+001aa5b0: 6370 7032 2e20 4120 6c69 6272 6172 7920 cpp2. A library \n+001aa5c0: 6361 6e20 6265 2062 7569 6c74 2066 726f can be built fro\n+001aa5d0: 6d20 6120 6d6f 6475 6c65 2061 6e64 206c m a module and l\n+001aa5e0: 696e 6b65 6420 7769 7468 206d 756c 7469 inked with multi\n+001aa5f0: 706c 6520 5765 6220 7365 7276 6963 6573 ple Web services\n+001aa600: 2061 7070 6c69 6361 7469 6f6e 732e 2054 applications. T\n+001aa610: 6865 2064 6972 6563 7469 7665 2073 686f he directive sho\n+001aa620: 756c 6420 6170 7065 6172 2061 7420 7468 uld appear at th\n+001aa630: 6520 746f 7020 6f66 2074 6865 2069 6e74 e top of the int\n+001aa640: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+001aa650: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 \n+001aa660: 616e 6420 6861 7320 7468 6520 666f 6c6c and has the foll\n+001aa670: 6f77 696e 6720 666f 726d 6174 733a 3c2f owing formats:.

    #module &q\n+001aa6d0: 756f 743b 6e61 6d65 2671 756f 743b 3c2f uot;name"
    .

    and

    .<\n+001aa710: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001aa720: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    #module "\n+001aa760: 6e61 6d65 2671 756f 743b 3c2f 7370 616e name" "fullname\n+001aa780: 2671 756f 743b 3c2f 6469 763e 0a3c 2f64 "
    .

    where the\n+001aa7b0: 203c 636f 6465 3e6e 616d 653c 2f63 6f64 name must be a uni\n+001aa7d0: 7175 6520 7368 6f72 7420 6e61 6d65 2066 que short name f\n+001aa7e0: 6f72 2074 6865 206d 6f64 756c 652e 2054 or the module. T\n+001aa7f0: 6865 206e 616d 6520 6973 2063 6173 6520 he name is case \n+001aa800: 696e 7365 6e73 6974 6976 6520 616e 6420 insensitive and \n+001aa810: 6d75 7374 206e 6f74 2065 7863 6565 6420 must not exceed \n+001aa820: 3420 6368 6172 6163 7465 7273 2069 6e20 4 characters in \n+001aa830: 6c65 6e67 7468 2e20 5468 6520 3c63 6f64 length. The fullname, when present,\n+001aa860: 2072 6570 7265 7365 6e74 7320 7468 6520 represents the \n+001aa870: 6675 6c6c 206e 616d 6520 6f66 2074 6865 full name of the\n+001aa880: 206d 6f64 756c 6520 616e 6420 6973 2075 module and is u\n+001aa890: 7365 6420 746f 2070 7265 6669 7820 7468 sed to prefix th\n+001aa8a0: 6520 6675 6e63 7469 6f6e 206e 616d 6573 e function names\n+001aa8b0: 206f 6620 7468 6520 6765 6e65 7261 7465 of the generate\n+001aa8c0: 6420 7365 7269 616c 697a 6572 7320 7265 d serializers re\n+001aa8d0: 706c 6163 696e 6720 7468 6520 7573 7561 placing the usua\n+001aa8e0: 6c20 3c63 6f64 653e 736f 6170 3c2f 636f l soap prefix. If a\n+001aa900: 6273 656e 742c 2074 6865 2073 686f 7274 bsent, the short\n+001aa910: 206e 616d 6520 6973 2075 7365 6420 746f name is used to\n+001aa920: 2070 7265 6669 7820 7468 6520 6675 6e63 prefix the func\n+001aa930: 7469 6f6e 206e 616d 6573 206f 6620 7468 tion names of th\n+001aa940: 6520 7365 7269 616c 697a 6572 732e 3c2f e serializers..

    The rest o\n+001aa960: 6620 7468 6520 636f 6e74 656e 7420 6f66 f the content of\n+001aa970: 2074 6865 2069 6e74 6572 6661 6365 2068 the interface h\n+001aa980: 6561 6465 7220 6669 6c65 2069 6e63 6c75 eader file inclu\n+001aa990: 6465 7320 7479 7065 2064 6563 6c61 7261 des type declara\n+001aa9a0: 7469 6f6e 7320 616e 6420 6f70 7469 6f6e tions and option\n+001aa9b0: 616c 6c79 2074 6865 2064 6563 6c61 7261 ally the declara\n+001aa9c0: 7469 6f6e 7320 6f66 2073 6572 7669 6365 tions of service\n+001aa9d0: 206f 7065 7261 7469 6f6e 7320 616e 6420 operations and \n+001aa9e0: 534f 4150 2048 6561 6465 7273 2061 6e64 SOAP Headers and\n+001aa9f0: 2046 6175 6c74 7320 7468 6174 2061 7265 Faults that are\n+001aaa00: 2075 6e69 7665 7273 616c 6c79 2075 7365 universally use\n+001aaa10: 6420 6279 2053 4f41 5020 7365 7276 6963 d by SOAP servic\n+001aaa20: 6573 2c20 7768 656e 2061 7070 6c69 6361 es, when applica\n+001aaa30: 626c 652e 2057 6865 6e20 7468 6520 736f ble. When the so\n+001aaa40: 6170 6370 7032 2074 6f6f 6c20 7072 6f63 apcpp2 tool proc\n+001aaa50: 6573 7365 7320 7468 6520 6865 6164 6572 esses the header\n+001aaa60: 2066 696c 6520 6d6f 6475 6c65 2c20 6974 file module, it\n+001aaa70: 2077 696c 6c20 6765 6e65 7261 7465 2074 will generate t\n+001aaa80: 6865 2073 6f75 7263 6520 636f 6465 7320 he source codes \n+001aaa90: 666f 7220 6120 6c69 6272 6172 792e 2054 for a library. T\n+001aaaa0: 6865 2057 6562 2073 6572 7669 6365 7320 he Web services \n+001aaab0: 6170 706c 6963 6174 696f 6e20 7468 6174 application that\n+001aaac0: 2075 7365 7320 7468 6520 6c69 6272 6172 uses the librar\n+001aaad0: 7920 7368 6f75 6c64 2075 7365 2061 2068 y should use a h\n+001aaae0: 6561 6465 7220 6669 6c65 2074 6861 7420 eader file that \n+001aaaf0: 696d 706f 7274 7320 7468 6520 6d6f 6475 imports the modu\n+001aab00: 6c65 2077 6974 6820 7468 6520 3c63 6f64 le with the #import\n+001aab20: 2064 6972 6563 7469 7665 2c20 666f 7220 directive, for \n+001aab30: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

    .
    /* Co\n+001aab80: 6e74 656e 7473 206f 6620 6669 6c65 2026 ntents of file &\n+001aab90: 7175 6f74 3b6d 6f64 756c 652e 6826 7175 quot;module.h&qu\n+001aaba0: 6f74 3b20 2a2f 3c2f 7370 616e 3e20 3c2f ot; */ .
    #module "\n+001aabf0: 7465 7374 2671 756f 743b 3c2f 7370 616e test"
    .
    .
    // typ\n+001aac50: 6573 2061 6e64 2074 7970 6564 6566 7320 es and typedefs \n+001aac60: 6265 636f 6d65 206d 6f64 756c 652d 7370 become module-sp\n+001aac70: 6563 6966 6963 3c2f 7370 616e 3e3c 2f64 ecific.
    type\n+001aacb0: 6465 663c 2f73 7061 6e3e 203c 6120 636c def LON\n+001aad10: 4736 343c 2f61 3e20 7873 645f 5f6c 6f6e G64 xsd__lon\n+001aad20: 673b 3c2f 6469 763e 0a3c 6469 7620 636c g;
    .
    char\n+001aad60: 2a3b 3c2f 6469 763e 0a3c 6469 7620 636c *;
    .
    .
    // a \n+001aadb0: 6d6f 6475 6c65 2d73 7065 6369 6669 6320 module-specific \n+001aadc0: 7374 7275 6374 3c2f 7370 616e 3e3c 2f64 struct.
    stru\n+001aae00: 6374 203c 2f73 7061 6e3e 6e73 5f5f 5320 ct ns__S \n+001aae10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+001aae30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // members
    .
    };.

    Th\n+001aaeb0: 6520 3c65 6d3e 3c63 6f64 653e 6d6f 6475 e modu\n+001aaec0: 6c65 2e68 3c2f 636f 6465 3e3c 2f65 6d3e le.h\n+001aaed0: 2064 6174 6120 6269 6e64 696e 6720 696e data binding in\n+001aaee0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n+001aaef0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n+001aaf00: 2064 6563 6c61 7265 7320 6d6f 6475 6c65 declares module\n+001aaf10: 2d73 7065 6369 6669 6320 7365 7269 616c -specific serial\n+001aaf20: 697a 6162 6c65 2074 7970 6573 203c 636f izable types LONG64\n+001aaf40: 2c20 3c63 6f64 653e 7873 645f 5f6c 6f6e , xsd__lon\n+001aaf50: 673c 2f63 6f64 653e 2c20 3c63 6f64 653e g, \n+001aaf60: 6368 6172 2a3c 2f63 6f64 653e 2c20 616e char*, an\n+001aaf70: 6420 6120 3c63 6f64 653e 7374 7275 6374 d a struct\n+001aaf80: 206e 735f 5f53 3c2f 636f 6465 3e2e 2054 ns__S. T\n+001aaf90: 6865 206d 6f64 756c 6520 6e61 6d65 2069 he module name i\n+001aafa0: 7320 2274 6573 7422 2c20 736f 2074 6865 s \"test\", so the\n+001aafb0: 2073 6f61 7063 7070 3220 746f 6f6c 2070 soapcpp2 tool p\n+001aafc0: 726f 6475 6365 7320 6120 3c65 6d3e 3c63 roduces a testC.cpp file w\n+001aaff0: 6974 6820 7468 6520 584d 4c20 7365 7269 ith the XML seri\n+001ab000: 616c 697a 6572 7320 666f 7220 7468 6573 alizers for thes\n+001ab010: 6520 7479 7065 732e 2054 6865 203c 656d e types. The testC.cpp\n+001ab030: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6174 dat\n+001ab040: 6120 6269 6e64 696e 6720 696d 706c 656d a binding implem\n+001ab050: 656e 7461 7469 6f6e 2073 6f75 7263 6520 entation source \n+001ab060: 636f 6465 2063 616e 2062 6520 7365 7061 code can be sepa\n+001ab070: 7261 7465 6c79 2063 6f6d 7069 6c65 6420 rately compiled \n+001ab080: 616e 6420 6c69 6e6b 6564 2077 6974 6820 and linked with \n+001ab090: 616e 2061 7070 6c69 6361 7469 6f6e 2e20 an application. \n+001ab0a0: 4966 2073 6572 7669 6365 206f 7065 7261 If service opera\n+001ab0b0: 7469 6f6e 7320 6172 6520 6465 636c 6172 tions are declar\n+001ab0c0: 6564 2069 6e20 7468 6520 696e 7465 7266 ed in the interf\n+001ab0d0: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n+001ab0e0: 6173 2066 756e 6374 696f 6e20 7072 6f74 as function prot\n+001ab0f0: 6f74 7970 6573 2c20 7765 2061 6c73 6f20 otypes, we also \n+001ab100: 6765 7420 3c65 6d3e 3c63 6f64 653e 7465 get te\n+001ab110: 7374 436c 6965 6e74 2e63 7070 3c2f 636f stClient.cpp client \n+001ab130: 7374 7562 2066 756e 6374 696f 6e73 2061 stub functions a\n+001ab140: 6e64 203c 656d 3e3c 636f 6465 3e74 6573 nd tes\n+001ab150: 7453 6572 7665 722e 6370 703c 2f63 6f64 tServer.cpp server s\n+001ab170: 6b65 6c65 746f 6e20 6675 6e63 7469 6f6e keleton function\n+001ab180: 732e 3c2f 703e 0a3c 703e 5468 6572 6520 s.

    .

    There \n+001ab190: 6172 6520 736f 6d65 206c 696d 6974 6174 are some limitat\n+001ab1a0: 696f 6e73 2066 6f72 206d 6f64 756c 6520 ions for module \n+001ab1b0: 696d 706f 7274 733a 3c2f 703e 0a3c 756c imports:

    ..
  • A module m\n+001ab1d0: 7573 7420 6265 2069 6d70 6f72 7465 6420 ust be imported \n+001ab1e0: 696e 746f 2061 6e6f 7468 6572 2069 6e74 into another int\n+001ab1f0: 6572 6661 6365 2068 6561 6465 7220 746f erface header to\n+001ab200: 2075 7365 2074 6865 206d 6f64 756c 6527 use the module'\n+001ab210: 7320 7479 7065 2064 6566 696e 6974 696f s type definitio\n+001ab220: 6e73 2e3c 2f6c 693e 0a3c 6c69 3e57 6865 ns.
  • .
  • Whe\n+001ab230: 6e20 6d75 6c74 6970 6c65 206d 6f64 756c n multiple modul\n+001ab240: 6573 2061 7265 2069 6d70 6f72 7465 642c es are imported,\n+001ab250: 2074 6865 2074 7970 6573 2074 6861 7420 the types that \n+001ab260: 7468 6579 2064 6563 6c61 7265 206d 7573 they declare mus\n+001ab270: 7420 6265 2064 6563 6c61 7265 6420 696e t be declared in\n+001ab280: 206f 6e65 206d 6f64 756c 6520 6f6e 6c79 one module only\n+001ab290: 2074 6f20 6176 6f69 6420 6e61 6d65 2063 to avoid name c\n+001ab2a0: 6c61 7368 6573 2061 6e64 206c 696e 6b20 lashes and link \n+001ab2b0: 6572 726f 7273 2e20 596f 7520 6361 6e6e errors. You cann\n+001ab2c0: 6f74 2063 7265 6174 6520 7477 6f20 6d6f ot create two mo\n+001ab2d0: 6475 6c65 7320 7468 6174 2064 6563 6c61 dules that decla\n+001ab2e0: 7265 206f 7220 7573 6520 7468 6520 7361 re or use the sa\n+001ab2f0: 6d65 2074 7970 6520 616e 6420 696d 706f me type and impo\n+001ab300: 7274 2074 6865 7365 206d 6f64 756c 6573 rt these modules\n+001ab310: 2073 6570 6172 6174 656c 7920 696e 746f separately into\n+001ab320: 2061 6e6f 7468 6572 2068 6561 6465 7220 another header \n+001ab330: 6669 6c65 2e20 5768 656e 2075 7369 6e67 file. When using\n+001ab340: 206d 6f64 756c 6573 2c20 636f 6e73 6964 modules, consid\n+001ab350: 6572 2063 7265 6174 696e 6720 6120 6d6f er creating a mo\n+001ab360: 6475 6c65 2068 6965 7261 7263 6879 2073 dule hierarchy s\n+001ab370: 7563 6820 7468 6174 2074 7970 6573 2061 uch that types a\n+001ab380: 7265 2064 6563 6c61 7265 6420 6f6e 6c79 re declared only\n+001ab390: 206f 6e63 6520 616e 6420 6279 206f 6e6c once and by onl\n+001ab3a0: 7920 6f6e 6520 6d6f 6475 6c65 2077 6865 y one module whe\n+001ab3b0: 6e20 7468 6573 6520 6d6f 6475 6c65 7320 n these modules \n+001ab3c0: 6d75 7374 2062 6520 6c69 6e6b 6564 2e3c must be linked.<\n+001ab3d0: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e 5769 /li>..

    Wi\n+001ab3e0: 7468 206d 6f64 756c 6573 2c20 7468 6520 th modules, the \n+001ab3f0: 736f 7572 6365 2063 6f64 6520 7365 7269 source code seri\n+001ab400: 616c 697a 6572 7320 666f 7220 7468 6520 alizers for the \n+001ab410: 7479 7065 7320 6465 6669 6e65 6420 696e types defined in\n+001ab420: 2074 6865 206d 6f64 756c 6573 2061 7265 the modules are\n+001ab430: 2067 656e 6572 6174 6564 2077 6974 6820 generated with \n+001ab440: 736f 6170 6370 7032 2073 6570 6172 6174 soapcpp2 separat\n+001ab450: 656c 792e 2046 6f72 2065 7861 6d70 6c65 ely. For example\n+001ab460: 2c20 6173 7375 6d65 2074 6861 7420 7765 , assume that we\n+001ab470: 2068 6176 6520 6120 6d6f 6475 6c65 203c have a module <\n+001ab480: 656d 3e3c 636f 6465 3e6d 6f64 756c 652e em>module.\n+001ab490: 683c 2f63 6f64 653e 3c2f 656d 3e3a 3c2f h:.

    /* Contents of \n+001ab4f0: 6669 6c65 2026 7175 6f74 3b6d 6f64 756c file "modul\n+001ab500: 652e 6826 7175 6f74 3b20 2a2f 3c2f 7370 e.h" */
    .
    #module &\n+001ab550: 7175 6f74 3b74 6573 7426 7175 6f74 3b3c quot;test"<\n+001ab560: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001ab580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n+001ab5b0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n+001ab5c0: 5f53 3c2f 6469 763e 0a3c 6469 7620 636c _S
    .
    {.
    char *\n+001ab620: 6e61 6d65 3b3c 2f64 6976 3e0a 3c64 6976 name;
    . \n+001ab640: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+001ab660: 2f73 7061 6e3e 2061 6d6f 756e 743b 3c2f /span> amount;.
    };
    .\n+001ab690: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    and a \n+001ab6b0: 6865 6164 6572 2066 696c 6520 3c65 6d3e header file \n+001ab6c0: 3c63 6f64 653e 6578 616d 706c 652e 683c example.h<\n+001ab6d0: 2f63 6f64 653e 3c2f 656d 3e20 7468 6174 /code> that\n+001ab6e0: 2075 7365 7320 6974 3a3c 2f70 3e0a 3c64 uses it:

    .
    /* C\n+001ab730: 6f6e 7465 6e74 7320 6f66 2066 696c 6520 ontents of file \n+001ab740: 2671 756f 743b 6578 616d 706c 652e 6826 "example.h&\n+001ab750: 7175 6f74 3b20 2a2f 3c2f 7370 616e 3e3c quot; */<\n+001ab760: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #import "\n+001ab7a0: 3b6d 6f64 756c 652e 6826 7175 6f74 3b3c ;module.h"<\n+001ab7b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001ab7d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n+001ab810: 5f5f 7765 626d 6574 686f 6428 3c73 7061 __webmethod(const <\n+001ab840: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ab850: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *code, struct \n+001ab890: 6e73 5f5f 5320 2a72 6563 6f72 642c 203c ns__S *record, <\n+001ab8a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ab8b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int *result); \n+001ab8d0: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
    .
  • <\n+001ab8f0: 703e 5468 6520 6d6f 6475 6c65 2069 7320 p>The module is \n+001ab900: 636f 6d70 696c 6564 2061 7320 666f 6c6c compiled as foll\n+001ab910: 6f77 733a 203c 2f70 3e3c 7072 6520 636c ows:

    s\n+001ab930: 6f61 7063 7070 3220 6d6f 6475 6c65 312e  oapcpp2 module1.\n+001ab940: 680a 3c2f 7072 653e 3c70 3e20 5468 6973  h.

    This\n+001ab950: 2067 656e 6572 6174 6573 2074 6865 2066 generates the f\n+001ab960: 696c 6573 203c 656d 3e3c 636f 6465 3e74 iles t\n+001ab970: 6573 7453 7475 622e 683c 2f63 6f64 653e estStub.h\n+001ab980: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , testH.h<\n+001ab9a0: 2f65 6d3e 2c20 616e 6420 3c65 6d3e 3c63 /em>, and testC.cpp with s\n+001ab9d0: 6572 6961 6c69 7a65 7273 2066 6f72 203c erializers for <\n+001ab9e0: 636f 6465 3e73 7472 7563 7420 6e73 5f5f code>struct ns__\n+001ab9f0: 533c 2f63 6f64 653e 2062 7574 2061 6c73 S but als\n+001aba00: 6f20 666f 7220 3c63 6f64 653e 6368 6172 o for char\n+001aba10: 2a3c 2f63 6f64 653e 2061 6e64 203c 636f * and int..

    Running so\n+001aba40: 6170 6370 7032 206f 6e20 3c65 6d3e 3c63 apcpp2 on example.h import\n+001aba70: 7320 7468 6520 6d6f 6475 6c65 2064 6566 s the module def\n+001aba80: 696e 6974 696f 6e73 2c20 6275 7420 646f initions, but do\n+001aba90: 6573 206e 6f74 2067 656e 6572 6174 6520 es not generate \n+001abaa0: 7365 7269 616c 697a 6572 7320 666f 7220 serializers for \n+001abab0: 3c63 6f64 653e 7374 7275 6374 206e 735f struct ns_\n+001abac0: 5f53 3c2f 636f 6465 3e2c 203c 636f 6465 _S, char* an\n+001abae0: 6420 3c63 6f64 653e 696e 743c 2f63 6f64 d int since these a\n+001abb00: 7265 2064 6566 696e 6564 2062 7920 3c65 re defined by module.h\n+001abb20: 3c2f 636f 6465 3e3c 2f65 6d3e 3a20 3c2f :

    soapcpp2\n+001abb50: 202d 434c 2065 7861 6d70 6c65 2e68 0a3c   -CL example.h.<\n+001abb60: 2f70 7265 3e3c 703e 2041 6e20 6578 616d  /pre>

    An exam\n+001abb70: 706c 6520 636c 6965 6e74 2061 7070 6c69 ple client appli\n+001abb80: 6361 7469 6f6e 2074 6861 7420 6361 6c6c cation that call\n+001abb90: 7320 7468 6520 636c 6965 6e74 2073 7475 s the client stu\n+001abba0: 6220 6675 6e63 7469 6f6e 3a3c 2f70 3e0a b function:

    .\n+001abbb0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n+001abc00: 743b 736f 6170 482e 6826 7175 6f74 3b3c t;soapH.h"<\n+001abc10: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+001abc30: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001abc40: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+001abc50: 6465 2026 7175 6f74 3b6e 732e 6e73 6d61 de "ns.nsma\n+001abc60: 7026 7175 6f74 3b3c 2f73 7061 6e3e 3c2f p".
    .<\n+001abc90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001abca0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main().
    {
    . \n+001abd00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap\n+001abd50: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001abd80: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+001abde0: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    str\n+001abe20: 7563 7420 3c2f 7370 616e 3e6e 735f 5f53 uct ns__S\n+001abe30: 2073 3b3c 2f64 6976 3e0a 3c64 6976 2063 s;
    .
    so\n+001abe50: 6170 5f64 6566 6175 6c74 5f6e 735f 5f53 ap_default_ns__S\n+001abe60: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001abe90: 2c20 2661 6d70 3b73 293b 3c2f 6469 763e , &s);
    \n+001abea0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n+001abf90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    s.amount = 1\n+001abfb0: 3234 3b3c 2f64 6976 3e0a 3c64 6976 2063 24;
    .
    int n;
    . \n+001ac010: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n+001ac040: 735f 5f77 6562 6d65 7468 6f64 283c 6120 s__webmethod(
    soap, en\n+001ac080: 6470 6f69 6e74 2c20 4e55 4c4c 2c20 3c73 dpoint, NULL, "\n+001ac0b0: 636f 6465 2671 756f 743b 3c2f 7370 616e code", &s, &\n+001ac0d0: 6e29 293c 2f64 6976 3e0a 3c64 6976 2063 n))
    .
    \n+001ac0f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_print_fa\n+001ac150: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n+001ac180: 6f61 703c 2f61 3e2c 2073 7464 6572 7229 oap, stderr)\n+001ac190: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    else
    .
    pr\n+001ac1f0: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("OK n = %d\n+001ac220: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n+001ac230: 206e 293b 3c2f 6469 763e 0a3c 6469 7620 n);
    .
    <\n+001ac250: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001ac260: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001ac270: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001ac280: 6761 6637 6430 3137 3631 3631 6539 6465 gaf7d0176161e9de\n+001ac290: 6633 3639 3831 6532 3466 6161 3139 3133 f36981e24faa1913\n+001ac2a0: 6439 223e 736f 6170 5f64 6573 7472 6f79 d9\">soap_destroy\n+001ac2b0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001ac2e0: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n+001ac300: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_end(soap);
    ..
    }.

    We\n+001ac480: 2063 6f6d 7069 6c65 2074 6869 7320 6578 compile this ex\n+001ac490: 616d 706c 6520 6173 2066 6f6c 6c6f 7773 ample as follows\n+001ac4a0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

    c++ \n+001ac4c0: 2d6f 2065 7861 6d70 6c65 2065 7861 6d70  -o example examp\n+001ac4d0: 6c65 2e63 7070 2074 6573 7443 2e63 7070  le.cpp testC.cpp\n+001ac4e0: 2073 6f61 7043 2e63 7070 2073 6f61 7043   soapC.cpp soapC\n+001ac4f0: 6c69 656e 742e 6370 7020 7374 6473 6f61  lient.cpp stdsoa\n+001ac500: 7032 2e63 7070 0a3c 2f70 7265 3e3c 703e  p2.cpp.

    \n+001ac510: 204d 6f64 756c 6573 206d 6179 2068 656c Modules may hel\n+001ac520: 7020 746f 2064 6566 696e 6520 6120 6d6f p to define a mo\n+001ac530: 6475 6c61 7220 6869 6572 6172 6368 7920 dular hierarchy \n+001ac540: 6f66 206c 6962 7261 7269 6573 2077 6974 of libraries wit\n+001ac550: 6820 7265 7573 6162 6c65 2073 6572 6961 h reusable seria\n+001ac560: 6c69 7a61 626c 6520 7479 7065 732e 3c2f lizable types..

    .... Back to t\n+001ac590: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents\n+001ac5a0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    \n+001ac5d0: 0a50 6c75 6769 6e73 2c20 6d6f 6475 6c65 .Plugins, module\n+001ac5e0: 732c 2061 6e64 2065 7874 656e 7369 6f6e s, and extension\n+001ac5f0: 733c 2f68 323e 0a3c 703e 506c 7567 696e s

    .

    Plugin\n+001ac600: 7320 6f66 6665 7220 6120 636f 6e76 656e s offer a conven\n+001ac610: 6965 6e74 2065 7874 656e 7369 6f6e 206d ient extension m\n+001ac620: 6563 6861 6e69 736d 2066 6f72 2074 6865 echanism for the\n+001ac630: 2067 534f 4150 2074 6f6f 6c6b 6974 2062 gSOAP toolkit b\n+001ac640: 7920 6578 7465 6e64 696e 6720 7468 6520 y extending the \n+001ac650: 6361 7061 6269 6c69 7469 6573 206f 6620 capabilities of \n+001ac660: 6974 7320 656e 6769 6e65 2e20 5768 656e its engine. When\n+001ac670: 2074 6865 2070 6c75 6769 6e20 7265 6769 the plugin regi\n+001ac680: 7374 6572 7320 7769 7468 2074 6865 2067 sters with the g\n+001ac690: 534f 4150 2065 6e67 696e 652c 2069 7420 SOAP engine, it \n+001ac6a0: 6861 7320 6675 6c6c 2061 6363 6573 7320 has full access \n+001ac6b0: 746f 2074 6865 2072 756e 2d74 696d 6520 to the run-time \n+001ac6c0: 7365 7474 696e 6773 2061 6e64 2074 6865 settings and the\n+001ac6d0: 2065 6e67 696e 6527 7320 6675 6e63 7469 engine's functi\n+001ac6e0: 6f6e 2063 616c 6c62 6163 6b73 2e20 5570 on callbacks. Up\n+001ac6f0: 6f6e 2072 6567 6973 7472 792c 2074 6865 on registry, the\n+001ac700: 2070 6c75 6769 6e27 7320 6c6f 6361 6c20 plugin's local \n+001ac710: 6461 7461 2069 7320 6173 736f 6369 6174 data is associat\n+001ac720: 6564 2077 6974 6820 7468 6520 3c63 6f64 ed with the so\n+001ac780: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n+001ac790: 6e74 6578 742e 2042 7920 6f76 6572 7269 ntext. By overri\n+001ac7a0: 6469 6e67 2074 6865 2063 616c 6c62 6163 ding the callbac\n+001ac7b0: 6b73 2077 6974 6820 7468 6520 706c 7567 ks with the plug\n+001ac7c0: 696e 2773 2063 616c 6c62 6163 6b73 2c20 in's callbacks, \n+001ac7d0: 7468 6520 706c 7567 696e 2065 7874 656e the plugin exten\n+001ac7e0: 6473 206f 7220 6d6f 6469 6669 6573 2074 ds or modifies t\n+001ac7f0: 6865 2065 6e67 696e 6527 7320 6361 7061 he engine's capa\n+001ac800: 6269 6c69 7469 6573 2e20 5468 6520 6c6f bilities. The lo\n+001ac810: 6361 6c20 706c 7567 696e 2064 6174 6120 cal plugin data \n+001ac820: 6361 6e20 6265 2061 6363 6573 7365 6420 can be accessed \n+001ac830: 7468 726f 7567 6820 6120 6c6f 6f6b 7570 through a lookup\n+001ac840: 2066 756e 6374 696f 6e2c 2075 7375 616c function, usual\n+001ac850: 6c79 2069 6e76 6f6b 6564 2077 6974 6869 ly invoked withi\n+001ac860: 6e20 6120 6361 6c6c 6261 636b 2066 756e n a callback fun\n+001ac870: 6374 696f 6e20 746f 2061 6363 6573 7320 ction to access \n+001ac880: 7468 6520 706c 7567 696e 2064 6174 612e the plugin data.\n+001ac890: 2054 6865 2072 6567 6973 7472 7920 616e The registry an\n+001ac8a0: 6420 6c6f 6f6b 7570 2066 756e 6374 696f d lookup functio\n+001ac8b0: 6e73 2061 7265 3a3c 2f70 3e0a 3c64 6976 ns are:

    .
    in\n+001ac900: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t soa\n+001ac960: 705f 7265 6769 7374 6572 5f70 6c75 6769 p_register_plugi\n+001ac970: 6e5f 6172 673c 2f61 3e28 3c73 7061 6e20 n_arg(\n+001ac990: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+001ac9d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001ac9e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001ac9f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001aca00: 3c73 7061 6e20 636c 6173 733d 226b 6579 int (*fcreate)(\n+001aca30: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001aca80: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001acab0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , stru\n+001acad0: 6374 3c2f 7370 616e 3e20 736f 6170 5f70 ct soap_p\n+001acae0: 6c75 6769 6e20 2a70 2c20 3c73 7061 6e20 lugin *p, void \n+001acb10: 2a61 7267 292c 203c 7370 616e 2063 6c61 *arg), void *ar\n+001acb40: 6729 3c2f 6469 763e 0a3c 6469 7620 636c g)
    .
    in\n+001acc30: 7420 736f 6170 5f72 6567 6973 7465 725f t soap_register_\n+001acc40: 706c 7567 696e 5f61 7267 2873 7472 7563 plugin_arg(struc\n+001acc50: 7420 736f 6170 202a 736f 6170 2c20 696e t soap *soap, in\n+001acc60: 7428 2a66 6372 6561 7465 2928 7374 7275 t(*fcreate)(stru\n+001acc70: 6374 2073 6f61 7020 2a2c 2073 7472 7563 ct soap *, struc\n+001acc80: 7420 736f 6170 5f70 6c75 6769 6e20 2a2c t soap_plugin *,\n+001acc90: 2076 6f69 6420 2a29 2c20 766f 6964 202a void *), void *\n+001acca0: 6172 6729 3c2f 6469 763e 3c64 6976 2063 arg)
    Reg\n+001accc0: 6973 7465 7220 6120 706c 7567 696e 2077 ister a plugin w\n+001accd0: 6974 6820 616e 2061 7267 756d 656e 742e ith an argument.\n+001acce0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .
    void* soap_lookup_\n+001acd60: 706c 7567 696e 283c 7370 616e 2063 6c61 plugin(str\n+001acd80: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap*, const \n+001acde0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*);
    .<\n+001ace10: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The so\n+001acee0: 6170 5f63 6f70 793c 2f61 3e3c 2f63 6f64 ap_copy function retu\n+001acf00: 726e 7320 6120 6e65 7720 6479 6e61 6d69 rns a new dynami\n+001acf10: 6361 6c6c 7920 616c 6c6f 6361 7465 6420 cally allocated \n+001acf20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context that i\n+001acf90: 7320 6120 636f 7079 206f 6620 616e 6f74 s a copy of anot\n+001acfa0: 6865 722c 2073 7563 6820 7468 6174 206e her, such that n\n+001acfb0: 6f20 6461 7461 2069 7320 7368 6172 6564 o data is shared\n+001acfc0: 2062 6574 7765 656e 2074 6865 2063 6f70 between the cop\n+001acfd0: 7920 616e 6420 7468 6520 6f72 6967 696e y and the origin\n+001acfe0: 616c 2063 6f6e 7465 7874 2e20 5468 6520 al context. The \n+001acff0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_copy function i\n+001ad0c0: 6e76 6f6b 6573 2074 6865 2063 6f70 7920 nvokes the copy \n+001ad0d0: 6675 6e63 7469 6f6e 7320 6f66 2074 6865 functions of the\n+001ad0e0: 2072 6567 6973 7465 7265 6420 706c 7567 registered plug\n+001ad0f0: 696e 7320 746f 2063 6f70 7920 7468 6520 ins to copy the \n+001ad100: 706c 7567 696e 7327 206c 6f63 616c 2064 plugins' local d\n+001ad110: 6174 612e 2054 6865 203c 636f 6465 3e3c ata. The <\n+001ad120: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001ad130: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001ad140: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+001ad150: 3238 6565 3866 6463 6635 3030 3434 3365 28ee8fdcf500443e\n+001ad160: 3065 3531 3735 3033 3234 6161 3661 3161 0e51750324aa6a1a\n+001ad170: 2220 7469 746c 653d 2246 696e 616c 697a \" title=\"Finaliz\n+001ad180: 6520 7468 6520 6769 7665 6e20 736f 6170 e the given soap\n+001ad190: 2063 6f6e 7465 7874 2c20 692e 652e 2077 context, i.e. w\n+001ad1a0: 6865 6e20 7468 6520 736f 6170 2063 6f6e hen the soap con\n+001ad1b0: 7465 7874 2069 7320 7374 6163 6b20 616c text is stack al\n+001ad1c0: 6c6f 6361 7465 642c 2061 7574 6f6d 6174 located, automat\n+001ad1d0: 6963 616c 6c79 2069 6e76 6f6b 6564 2e2e ically invoked..\n+001ad1e0: 2e22 3e73 6f61 705f 646f 6e65 3c2f 613e .\">soap_done\n+001ad1f0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap_free<\n+001ad2b0: 2f63 6f64 653e 2066 756e 6374 696f 6e73 /code> functions\n+001ad2c0: 2064 652d 7265 6769 7374 6572 7320 616c de-registers al\n+001ad2d0: 6c20 706c 7567 696e 2e3c 2f70 3e0a 3c70 l plugin.

    .The follow exam\n+001ad2f0: 706c 6520 6f76 6572 7269 6465 7320 7468 ple overrides th\n+001ad300: 6520 7365 6e64 2061 6e64 2072 6563 6569 e send and recei\n+001ad310: 7665 2063 616c 6c62 6163 6b73 2074 6f20 ve callbacks to \n+001ad320: 636f 7079 2061 6c6c 206d 6573 7361 6765 copy all message\n+001ad330: 7320 7468 6174 2061 7265 2073 656e 7420 s that are sent \n+001ad340: 616e 6420 7265 6365 6976 6564 2074 6f20 and received to \n+001ad350: 7468 6520 7465 726d 696e 616c 2028 7374 the terminal (st\n+001ad360: 6465 7272 292e 3c2f 703e 0a3c 703e 4669 derr).

    .

    Fi\n+001ad370: 7273 742c 2077 6520 7772 6974 6520 6120 rst, we write a \n+001ad380: 6865 6164 6572 2066 696c 6520 3c65 6d3e header file \n+001ad390: 3c63 6f64 653e 706c 7567 696e 2e68 3c2f plugin.h to de\n+001ad3b0: 6669 6e65 2074 6865 206c 6f63 616c 2070 fine the local p\n+001ad3c0: 6c75 6769 6e20 6461 7461 2073 7472 7563 lugin data struc\n+001ad3d0: 7475 7265 2873 2920 616e 6420 7765 2064 ture(s) and we d\n+001ad3e0: 6566 696e 6520 6120 676c 6f62 616c 206e efine a global n\n+001ad3f0: 616d 6520 746f 2069 6465 6e74 6966 7920 ame to identify \n+001ad400: 7468 6520 706c 7567 696e 3a3c 2f70 3e0a the plugin:

    .\n+001ad410: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n+001ad460: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;stdsoa\n+001ad490: 7032 2e68 3c2f 613e 2671 756f 743b 3c2f p2.h"
    .<\n+001ad4c0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001ad4d0: 726f 6365 7373 6f72 223e 2364 6566 696e rocessor\">#defin\n+001ad4e0: 6520 504c 5547 494e 5f49 4420 2671 756f e PLUGIN_ID &quo\n+001ad4f0: 743b 504c 5547 494e 2d31 2e30 2671 756f t;PLUGIN-1.0&quo\n+001ad500: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n+001ad520: 2f2f 2073 6f6d 6520 6e61 6d65 2074 6f20 // some name to \n+001ad530: 6964 656e 7469 6679 2070 6c75 6769 6e20 identify plugin \n+001ad540: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001ad560: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001ad590: 7374 7275 6374 203c 2f73 7061 6e3e 706c struct pl\n+001ad5a0: 7567 696e 5f64 6174 6120 3c73 7061 6e20 ugin_data \n+001ad5c0: 2f2f 206c 6f63 616c 2070 6c75 6769 6e20 // local plugin \n+001ad5d0: 6461 7461 203c 2f73 7061 6e3e 3c2f 6469 data .
    {
    . \n+001ad610: 2069 6e74 2028 2a66 7365 6e64 2928 3c73 int (*fsend)(struct soap*, const<\n+001ad690: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char*, s\n+001ad6c0: 697a 655f 7429 3b20 3c73 7061 6e20 636c ize_t); //\n+001ad6e0: 2074 6f20 7361 7665 2061 6e64 2075 7365 to save and use\n+001ad6f0: 2073 656e 6420 6361 6c6c 6261 636b 203c send callback <\n+001ad700: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001ad720: 2073 697a 655f 7420 282a 3c61 2063 6c61 size_t (*frecv)(struct \n+001ad7b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap*\n+001ad7e0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char\n+001ad800: 3c2f 7370 616e 3e2a 2c20 7369 7a65 5f74 *, size_t\n+001ad810: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // to s\n+001ad830: 6176 6520 616e 6420 7573 6520 7265 6376 ave and use recv\n+001ad840: 2063 616c 6c62 6163 6b20 3c2f 7370 616e callback
    .
    }; .
    \n+001ad8a0: 696e 743c 2f73 7061 6e3e 2070 6c75 6769 int plugi\n+001ad8b0: 6e28 3c73 7061 6e20 636c 6173 733d 226b n(struct soa\n+001ad900: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001ad930: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, st\n+001ad950: 7275 6374 3c2f 7370 616e 3e20 736f 6170 ruct soap\n+001ad960: 5f70 6c75 6769 6e20 2a70 6c75 6769 6e2c _plugin *plugin,\n+001ad970: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n+001ad990: 2f73 7061 6e3e 202a 6172 6729 3b3c 2f64 /span> *arg);.
    \n+001ad9e0: 3c61 2068 7265 663d 2273 7464 736f 6170 stdso\n+001ada00: 6170 322e 683c 2f61 3e3c 2f64 6976 3e3c ap2.h
    <\n+001ada10: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001ada20: 223e 5468 6973 2066 696c 6520 6465 6669 \">This file defi\n+001ada30: 6e65 7320 7468 6520 636f 6d6d 6f6e 206d nes the common m\n+001ada40: 6163 726f 732c 2074 7970 6573 2061 6e64 acros, types and\n+001ada50: 2066 756e 6374 696f 6e73 206f 6620 7468 functions of th\n+001ada60: 6520 6753 4f41 5020 4150 4920 6772 6f75 e gSOAP API grou\n+001ada70: 7065 6420 6279 206d 6f64 756c 6573 3c2f ped by modules
    .

    It i\n+001b0200: 7320 7468 6520 7265 7370 6f6e 7369 6269 s the responsibi\n+001b0210: 6c69 7479 206f 6620 7468 6520 706c 7567 lity of the plug\n+001b0220: 696e 2074 6f20 6861 6e64 6c65 2072 6567 in to handle reg\n+001b0230: 6973 7472 7920 2869 6e69 7429 2c20 636f istry (init), co\n+001b0240: 7079 2c20 616e 6420 6465 6c65 7469 6f6e py, and deletion\n+001b0250: 206f 6620 7468 6520 706c 7567 696e 2064 of the plugin d\n+001b0260: 6174 6120 616e 6420 7265 7365 7420 6361 ata and reset ca\n+001b0270: 6c6c 6261 636b 732e 3c2f 703e 0a3c 703e llbacks.

    .

    \n+001b0280: 5468 6520 3c63 6f64 653e 6664 656c 6574 The fdelet\n+001b0290: 653c 2f63 6f64 653e 2063 616c 6c62 6163 e callbac\n+001b02a0: 6b20 6f66 203c 636f 6465 3e73 7472 7563 k of struc\n+001b02b0: 7420 736f 6170 5f70 6c75 6769 6e3c 2f63 t soap_plugin must be set\n+001b02d0: 2074 6f20 6465 2d72 6567 6973 7465 7220 to de-register \n+001b02e0: 7468 6520 706c 7567 696e 2061 6e64 206c the plugin and l\n+001b02f0: 6574 2069 7420 6465 6c65 7465 2069 7473 et it delete its\n+001b0300: 2072 6573 6f75 7263 6573 2e3c 2f70 3e0a resources.

    .\n+001b0310: 3c70 3e41 2070 6c75 6769 6e20 6973 2063

    A plugin is c\n+001b0320: 6f70 6965 6420 616c 6f6e 6720 7769 7468 opied along with\n+001b0330: 2069 7473 2063 6f72 7265 7370 6f6e 6469 its correspondi\n+001b0340: 6e67 203c 636f 6465 3e3c 6120 636c 6173 ng soap context wit\n+001b03b0: 6820 7468 6520 3c63 6f64 653e 3c61 2063 h the soap_copy\n+001b0470: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n+001b0480: 2e20 5468 6973 2066 756e 6374 696f 6e20 . This function \n+001b0490: 636f 7069 6573 2061 203c 636f 6465 3e3c copies a <\n+001b04a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001b04b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+001b04c0: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n+001b04d0: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n+001b04e0: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n+001b04f0: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n+001b0500: 7874 2061 6e64 2074 6865 2063 6861 696e xt and the chain\n+001b0510: 206f 6620 706c 7567 696e 732e 2049 7420 of plugins. It \n+001b0520: 6973 2075 7020 746f 2074 6865 2070 6c75 is up to the plu\n+001b0530: 6769 6e20 696d 706c 656d 656e 7461 7469 gin implementati\n+001b0540: 6f6e 2074 6f20 7368 6172 6520 7468 6520 on to share the \n+001b0550: 706c 7567 696e 2064 6174 6120 6f72 206e plugin data or n\n+001b0560: 6f74 2061 7320 666f 6c6c 6f77 733a 3c2f ot as follows:.

      .
    • if t\n+001b0580: 6865 203c 636f 6465 3e66 636f 7079 2829 he fcopy()\n+001b0590: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n+001b05a0: 2069 7320 7365 7420 6279 2074 6865 2070 is set by the p\n+001b05b0: 6c75 6769 6e20 696e 6974 6961 6c69 7a61 lugin initializa\n+001b05c0: 7469 6f6e 2c20 7468 6973 2063 616c 6c62 tion, this callb\n+001b05d0: 6163 6b20 7769 6c6c 2062 6520 6361 6c6c ack will be call\n+001b05e0: 6564 2074 6f20 616c 6c6f 7720 7468 6520 ed to allow the \n+001b05f0: 706c 7567 696e 2074 6f20 636f 7079 2069 plugin to copy i\n+001b0600: 7473 206c 6f63 616c 2064 6174 6120 7570 ts local data up\n+001b0610: 6f6e 2061 203c 636f 6465 3e3c 6120 636c on a soap_copy<\n+001b06d0: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c2e /a> call.\n+001b06e0: 2057 6865 6e20 3c63 6f64 653e 3c61 2063 When \n+001b07b0: 736f 6170 5f64 6f6e 653c 2f61 3e3c 2f63 soap_done or so\n+001b0870: 6170 5f66 7265 653c 2f61 3e3c 2f63 6f64 ap_free is called on \n+001b0890: 7468 6973 203c 636f 6465 3e3c 6120 636c this soap<\n+001b08f0: 2f63 6f64 653e 2063 6f6e 7465 7874 2063 /code> context c\n+001b0900: 6f70 792c 2074 6865 203c 636f 6465 3e66 opy, the f\n+001b0910: 6465 6c65 7465 2829 3c2f 636f 6465 3e20 delete() \n+001b0920: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+001b0930: 6564 2066 6f72 2064 6561 6c6c 6f63 6174 ed for deallocat\n+001b0940: 696f 6e20 616e 6420 636c 6561 6e75 7020 ion and cleanup \n+001b0950: 6f66 2074 6865 206c 6f63 616c 2064 6174 of the local dat\n+001b0960: 612e 3c2f 6c69 3e0a 3c6c 693e 6966 2074 a.
    • .
    • if t\n+001b0970: 6865 203c 636f 6465 3e66 636f 7079 2829 he fcopy()\n+001b0980: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n+001b0990: 2069 7320 6e6f 7420 7365 742c 2074 6865 is not set, the\n+001b09a0: 6e20 7468 6520 706c 7567 696e 2064 6174 n the plugin dat\n+001b09b0: 6120 7769 6c6c 2062 6520 7368 6172 6564 a will be shared\n+001b09c0: 2028 692e 652e 2074 6865 2064 6174 6120 (i.e. the data \n+001b09d0: 706f 696e 7465 7220 706f 696e 7473 2074 pointer points t\n+001b09e0: 6f20 7468 6520 7361 6d65 2061 6464 7265 o the same addre\n+001b09f0: 7373 292e 2054 6865 203c 636f 6465 3e66 ss). The f\n+001b0a00: 6465 6c65 7465 2829 3c2f 636f 6465 3e20 delete() \n+001b0a10: 6361 6c6c 6261 636b 2077 696c 6c20 6e6f callback will no\n+001b0a20: 7420 6265 2063 616c 6c65 6420 7570 6f6e t be called upon\n+001b0a30: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soa\n+001b0b00: 705f 646f 6e65 3c2f 613e 3c2f 636f 6465 p_done on a copy of t\n+001b0b20: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap context . T\n+001b0b90: 6865 203c 636f 6465 3e66 6465 6c65 7465 he fdelete\n+001b0ba0: 2829 3c2f 636f 6465 3e20 6361 6c6c 6261 () callba\n+001b0bb0: 636b 2077 696c 6c20 6265 2063 616c 6c65 ck will be calle\n+001b0bc0: 6420 666f 7220 7468 6520 6f72 6967 696e d for the origin\n+001b0bd0: 616c 203c 636f 6465 3e3c 6120 636c 6173 al soap context wit\n+001b0c40: 6820 7768 6963 6820 7468 6520 706c 7567 h which the plug\n+001b0c50: 696e 2077 6173 2072 6567 6973 7465 7265 in was registere\n+001b0c60: 642e 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 d.
    • .
    .The example plu\n+001b0c80: 6769 6e20 7368 6f75 6c64 2062 6520 7573 gin should be us\n+001b0c90: 6564 2061 7320 666f 6c6c 6f77 733a 3c2f ed as follows:.
    struct <\n+001b0cf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b0d00: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b0d10: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001b0d20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001b0d50: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+001b0db0: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n+001b0dd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_registe\n+001b0e30: 725f 706c 7567 696e 3c2f 613e 283c 6120 r_plugin(soap, pl\n+001b0e70: 7567 696e 293b 203c 2f64 6976 3e0a 3c2f ugin);
    .

    To pass \n+001b0ea0: 6120 3c63 6f64 653e 766f 6964 2a3c 2f63 a void* argument to\n+001b0ec0: 2074 6865 2070 6c75 6769 6e27 7320 7265 the plugin's re\n+001b0ed0: 6769 7374 7279 2066 756e 6374 696f 6e20 gistry function \n+001b0ee0: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    <\n+001b0f00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b0f10: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+001b0f60: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001b0f90: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+001b0ff0: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); ..

    Additiona\n+001b10f0: 6c20 646f 6375 6d65 6e74 6174 696f 6e20 l documentation \n+001b1100: 666f 7220 7468 6520 6772 6f77 696e 6720 for the growing \n+001b1110: 6e75 6d62 6572 206f 6620 6753 4f41 5020 number of gSOAP \n+001b1120: 706c 7567 696e 7320 6361 6e20 6265 2066 plugins can be f\n+001b1130: 6f75 6e64 2061 7420 3c61 2068 7265 663d ound at ht\n+001b1160: 7470 733a 2f2f 7777 772e 6765 6e69 7669 tps://www.genivi\n+001b1170: 612e 636f 6d2f 646f 633c 2f61 3e2e 2041 a.com/doc. A\n+001b1180: 206e 756d 6265 7220 6f66 2065 7861 6d70 number of examp\n+001b1190: 6c65 2070 6c75 6769 6e73 2061 7265 2069 le plugins are i\n+001b11a0: 6e63 6c75 6465 6420 696e 2074 6865 2067 ncluded in the g\n+001b11b0: 534f 4150 2073 6f75 7263 6520 636f 6465 SOAP source code\n+001b11c0: 2070 6163 6b61 6765 2773 203c 656d 3e3c package's <\n+001b11d0: 636f 6465 3e67 736f 6170 2f70 6c75 6769 code>gsoap/plugi\n+001b11e0: 6e3c 2f63 6f64 653e 3c2f 656d 3e20 6469 n di\n+001b11f0: 7265 6374 6f72 792e 2053 6f6d 6520 6f66 rectory. Some of\n+001b1200: 2074 6865 7365 2070 6c75 6769 6e73 2061 these plugins a\n+001b1210: 7265 2064 6973 6375 7373 6564 2069 6e20 re discussed in \n+001b1220: 7468 6520 6e65 7874 2073 6563 7469 6f6e the next section\n+001b1230: 732e 3c2f 703e 0a3c 703e 5365 6520 616c s.

    .

    See al\n+001b1240: 736f 2041 5049 2064 6f63 756d 656e 7461 so API documenta\n+001b1250: 7469 6f6e 204d 6f64 756c 6520 3c61 2063 tion Module Plugi\n+001b1290: 6e73 2061 6e64 2070 6c75 6769 6e20 7265 ns and plugin re\n+001b12a0: 6769 7374 7279 2066 756e 6374 696f 6e73 gistry functions\n+001b12b0: 3c2f 613e 202e 3c2f 703e 0a3c 703e f09f .

    .

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

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

    \n+001b1310: 3c2f 613e 0a44 4f4d 2041 5049 206f 7665 .DOM API ove\n+001b1320: 7276 6965 773c 2f68 333e 0a3c 703e 5468 rview

    .

    Th\n+001b1330: 6520 444f 4d20 4150 4920 6973 206e 6f74 e DOM API is not\n+001b1340: 2061 2070 6c75 6769 6e2c 2062 7574 2061 a plugin, but a\n+001b1350: 6e20 6578 7465 6e73 696f 6e20 7468 6174 n extension that\n+001b1360: 2070 726f 7669 6465 7320 6120 444f 4d20 provides a DOM \n+001b1370: 4150 4920 6173 2061 2073 6570 6172 6174 API as a separat\n+001b1380: 6520 736f 7572 6365 2063 6f64 6520 6669 e source code fi\n+001b1390: 6c65 2074 6f20 636f 6d70 696c 6520 616e le to compile an\n+001b13a0: 6420 6c69 6e6b 2077 6974 6820 6753 4f41 d link with gSOA\n+001b13b0: 5020 6170 706c 6963 6174 696f 6e73 2074 P applications t\n+001b13c0: 6f20 656e 6162 6c65 6420 7468 6520 6753 o enabled the gS\n+001b13d0: 4f41 5020 444f 4d2e 2058 4d4c 2044 4f4d OAP DOM. XML DOM\n+001b13e0: 2070 726f 6365 7373 696e 6720 6973 206f processing is o\n+001b13f0: 7074 696f 6e61 6c2c 2061 6e64 2065 6e61 ptional, and ena\n+001b1400: 626c 6564 2077 6974 6820 3c61 2068 7265 bled with wsdl2h -d\n+001b1430: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+001b1440: 6f6e 203c 623e 3c63 6f64 653e 2d64 3c2f on -d to\n+001b1460: 2067 656e 6572 6174 6520 444f 4d20 7374 generate DOM st\n+001b1470: 7275 6374 7572 6573 2066 6f72 203c 656d ructures for xsd:anyTy\n+001b1490: 7065 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 pe, \n+001b14a0: 3c65 6d3e 3c63 6f64 653e 7873 643a 616e xsd:an\n+001b14b0: 793c 2f63 6f64 653e 3c2f 656d 3e2c 2061 y, a\n+001b14c0: 6e64 203c 656d 3e3c 636f 6465 3e78 7364 nd xsd\n+001b14d0: 3a61 6e79 4174 7472 6962 7574 653c 2f63 :anyAttribute schema\n+001b14f0: 2063 6f6d 706f 6e65 6e74 732c 2077 6869 components, whi\n+001b1500: 6368 2061 7265 2065 6e61 626c 6564 2077 ch are enabled w\n+001b1510: 6974 6820 3c63 6f64 653e 2369 6d70 6f72 ith #impor\n+001b1520: 7420 2264 6f6d 2e68 223c 2f63 6f64 653e t \"dom.h\"\n+001b1530: 2069 6e20 616e 2069 6e74 6572 6661 6365 in an interface\n+001b1540: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n+001b1550: 2073 6f61 7063 7070 322e 2054 6869 7320 soapcpp2. This \n+001b1560: 696d 706f 7274 7320 3c65 6d3e 3c63 6f64 imports gsoap/import/d\n+001b1580: 6f6d 2e68 3c2f 636f 6465 3e3c 2f65 6d3e om.h\n+001b1590: 2e20 5468 656e 2063 6f6d 7069 6c65 203c . Then compile <\n+001b15a0: 656d 3e3c 636f 6465 3e67 736f 6170 2f64 em>gsoap/d\n+001b15b0: 6f6d 2e63 3c2f 636f 6465 3e3c 2f65 6d3e om.c\n+001b15c0: 2066 6f72 2043 206f 7220 3c65 6d3e 3c63 for C or gsoap/dom.cp\n+001b15e0: 703c 2f63 6f64 653e 3c2f 656d 3e20 666f p fo\n+001b15f0: 7220 432b 2b20 7769 7468 2079 6f75 7220 r C++ with your \n+001b1600: 6170 706c 6963 6174 696f 6e2e 3c2f 703e application.

    \n+001b1610: 0a3c 703e 546f 2075 7365 2074 6865 2044 .

    To use the D\n+001b1620: 4f4d 2041 5049 2077 6974 6820 5765 6220 OM API with Web \n+001b1630: 7365 7276 6963 6573 2c20 6164 6420 3c63 services, add #import \"dom\n+001b1650: 2e68 223c 2f63 6f64 653e 2074 6f20 7468 .h\" to th\n+001b1660: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head\n+001b1670: 6572 2066 696c 6520 6f72 2075 7365 203c er file or use <\n+001b1680: 6120 6872 6566 3d22 2377 7364 6c32 682d a href=\"#wsdl2h-\n+001b1690: 6422 3e3c 623e 3c63 6f64 653e 7773 646c d\">wsdl\n+001b16a0: 3268 202d 643c 2f63 6f64 653e 3c2f 623e 2h -d\n+001b16b0: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -d:

    .
    \n+001b1700: 3c73 7061 6e20 636c 6173 733d 2270 7265 #impo\n+001b1720: 7274 2026 7175 6f74 3b64 6f6d 2e68 2671 rt "dom.h&q\n+001b1730: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.

    This\n+001b1760: 2064 6563 6c61 7265 7320 3c63 6f64 653e declares \n+001b1770: 7873 645f 5f61 6e79 5479 7065 3c2f 636f xsd__anyType and xs\n+001b1790: 645f 5f61 6e79 4174 7472 6962 7574 653c d__anyAttribute<\n+001b17a0: 2f63 6f64 653e 2074 7970 6573 2e3c 2f70 /code> types..

    A DOM eleme\n+001b17c0: 6e74 206e 6f64 6520 6973 2073 6572 6961 nt node is seria\n+001b17d0: 6c69 7a65 6420 7769 7468 2074 6865 203c lized with the <\n+001b17e0: 636f 6465 3e78 7364 5f5f 616e 7954 7970 code>xsd__anyTyp\n+001b17f0: 653c 2f63 6f64 653e 2073 6572 6961 6c69 e seriali\n+001b1800: 7a61 626c 6520 7479 7065 2e20 5468 6520 zable type. The \n+001b1810: 756e 6465 726c 7969 6e67 2069 6d70 6c65 underlying imple\n+001b1820: 6d65 6e74 6174 696f 6e20 7479 7065 206f mentation type o\n+001b1830: 6620 3c63 6f64 653e 7873 645f 5f61 6e79 f xsd__any\n+001b1840: 5479 7065 3c2f 636f 6465 3e20 6973 203c Type is <\n+001b1850: 636f 6465 3e73 6f61 705f 646f 6d5f 656c code>soap_dom_el\n+001b1860: 656d 656e 743c 2f63 6f64 653e 2e20 4f6e ement. On\n+001b1870: 6520 6f72 206d 6f72 6520 444f 4d20 6174 e or more DOM at\n+001b1880: 7472 6962 7574 6520 6e6f 6465 7320 6172 tribute nodes ar\n+001b1890: 6520 7365 7269 616c 697a 6564 2077 6974 e serialized wit\n+001b18a0: 6820 7468 6520 3c63 6f64 653e 7873 645f h the xsd_\n+001b18b0: 5f61 6e79 4174 7472 6962 7574 653c 2f63 _anyAttribute serializabl\n+001b18d0: 6520 7479 7065 2e20 5468 6520 756e 6465 e type. The unde\n+001b18e0: 726c 7969 6e67 2069 6d70 6c65 6d65 6e74 rlying implement\n+001b18f0: 6174 696f 6e20 7479 7065 206f 6620 3c63 ation type of xsd__anyAttr\n+001b1910: 6962 7574 653c 2f63 6f64 653e 2069 7320 ibute is \n+001b1920: 3c63 6f64 653e 736f 6170 5f64 6f6d 5f61 soap_dom_a\n+001b1930: 7474 7269 6275 7465 3c2f 636f 6465 3e2c ttribute,\n+001b1940: 2077 6869 6368 2069 7320 6120 6c69 6e6b which is a link\n+001b1950: 6564 206c 6973 742e 3c2f 703e 0a3c 6469 ed list.

    .
    \n+001b19a0: 2369 6d70 6f72 7420 2671 756f 743b 646f #import "do\n+001b19b0: 6d2e 6826 7175 6f74 3b3c 2f73 7061 6e3e m.h"\n+001b19c0: 203c 7370 616e 2063 6c61 7373 3d22 636f // import\n+001b19e0: 7320 7873 645f 5f61 6e79 5479 7065 2061 s xsd__anyType a\n+001b19f0: 7320 6120 444f 4d20 6e6f 6465 3c2f 7370 s a DOM node
    .
    .
    clas\n+001b1a50: 7320 3c2f 7370 616e 3e6e 735f 5f64 6174 s ns__dat\n+001b1a60: 6120 3a20 3c73 7061 6e20 636c 6173 733d a : public\n+001b1a80: 3c2f 7370 616e 3e20 7873 645f 5f61 6e79 xsd__any\n+001b1a90: 5479 7065 3c2f 6469 763e 0a3c 6469 7620 Type
    .
    { <\n+001b1ab0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b1ac0: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord\">public:
    .
    \n+001b1af0: 7873 645f 5f61 6e79 5479 7065 2a20 666f xsd__anyType* fo\n+001b1b00: 6f3b 2020 2020 2020 2020 2020 2020 2020 o; \n+001b1b10: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Store\n+001b1b30: 2026 6c74 3b66 6f6f 2667 743b 2065 6c65 <foo> ele\n+001b1b40: 6d65 6e74 2069 6e20 444f 4d20 736f 6170 ment in DOM soap\n+001b1b50: 5f64 6f6d 5f65 6c65 6d65 6e74 3c2f 7370 _dom_element
    .
    \n+001b1b80: 7873 645f 5f61 6e79 5479 7065 205f 5f61 xsd__anyType __a\n+001b1b90: 6e79 3b20 2020 2020 2020 2020 2020 2020 ny; \n+001b1ba0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Store\n+001b1bc0: 2061 6e79 2065 6c65 6d65 6e74 2063 6f6e any element con\n+001b1bd0: 7465 6e74 2069 6e20 444f 4d20 736f 6170 tent in DOM soap\n+001b1be0: 5f64 6f6d 5f65 6c65 6d65 6e74 3c2f 7370 _dom_element
    .
    @ \n+001b1c10: 7873 645f 5f61 6e79 4174 7472 6962 7574 xsd__anyAttribut\n+001b1c20: 6520 5f5f 616e 7941 7474 7269 6275 7465 e __anyAttribute\n+001b1c30: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // Store\n+001b1c50: 2061 6e79 4174 7472 6962 7574 6520 636f anyAttribute co\n+001b1c60: 6e74 656e 7420 696e 2044 4f4d 2073 6f61 ntent in DOM soa\n+001b1c70: 705f 646f 6d5f 6174 7472 6962 7574 6520 p_dom_attribute \n+001b1c80: 6c69 6e6b 6564 206e 6f64 6520 7374 7275 linked node stru\n+001b1c90: 6374 7572 653c 2f73 7061 6e3e 3c2f 6469 cture.
    };
    .

    To manip\n+001b1ce0: 756c 6174 6520 7468 6520 444f 4d20 656c ulate the DOM el\n+001b1cf0: 656d 656e 7473 2061 6e64 2061 7474 7269 ements and attri\n+001b1d00: 6275 7465 7320 7765 2075 7365 2074 6865 butes we use the\n+001b1d10: 2044 4f4d 2041 5049 2066 756e 6374 696f DOM API functio\n+001b1d20: 6e73 2064 6f63 756d 656e 7465 6420 696e ns documented in\n+001b1d30: 2074 6865 2067 534f 4150 203c 6120 6872 the gSOAP X\n+001b1d60: 4d4c 2044 4f4d 2041 5049 2064 6f63 756d ML DOM API docum\n+001b1d70: 656e 7461 7469 6f6e 3c2f 613e 2e3c 2f70 entation..

    .... Back to ta\n+001b1da0: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents<\n+001b1db0: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

    .

    .The messag\n+001b1df0: 6520 6c6f 6767 696e 6720 706c 7567 696e e logging plugin\n+001b1e00: 3c2f 6833 3e0a 3c70 3e54 6865 206d 6573

    .

    The mes\n+001b1e10: 7361 6765 203c 636f 6465 3e3c 6120 636c sage lo\n+001b1ea0: 6767 696e 673c 2f61 3e3c 2f63 6f64 653e gging\n+001b1eb0: 2070 6c75 6769 6e20 6361 6e20 6265 2075 plugin can be u\n+001b1ec0: 7365 6420 746f 2073 656c 6563 7469 7665 sed to selective\n+001b1ed0: 6c79 206c 6f67 2069 6e62 6f75 6e64 2061 ly log inbound a\n+001b1ee0: 6e64 206f 7574 626f 756e 6420 6d65 7373 nd outbound mess\n+001b1ef0: 6167 6573 2074 6f20 6120 6669 6c65 206f ages to a file o\n+001b1f00: 7220 7374 7265 616d 2e20 4974 2061 6c73 r stream. It als\n+001b1f10: 6f20 6b65 6570 7320 6163 6365 7373 2073 o keeps access s\n+001b1f20: 7461 7469 7374 6963 7320 746f 206c 6f67 tatistics to log\n+001b1f30: 2074 6865 2074 6f74 616c 206e 756d 6265 the total numbe\n+001b1f40: 7220 6f66 2062 7974 6573 2073 656e 7420 r of bytes sent \n+001b1f50: 616e 6420 7265 6365 6976 6564 2e3c 2f70 and received..

    To use the \n+001b1f70: 706c 7567 696e 2c20 636f 6d70 696c 6520 plugin, compile \n+001b1f80: 616e 6420 6c69 6e6b 2079 6f75 7220 6170 and link your ap\n+001b1f90: 706c 6963 6174 696f 6e20 7769 7468 203c plication with <\n+001b1fa0: 656d 3e3c 636f 6465 3e6c 6f67 6769 6e67 em>logging\n+001b1fb0: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 206c .c l\n+001b1fc0: 6f63 6174 6564 2069 6e20 7468 6520 3c65 ocated in the gsoap/pl\n+001b1fe0: 7567 696e 3c2f 636f 6465 3e3c 2f65 6d3e ugin\n+001b1ff0: 2064 6972 6563 746f 7279 206f 6620 7468 directory of th\n+001b2000: 6520 6753 4f41 5020 7061 636b 6167 652e e gSOAP package.\n+001b2010: 2054 6f20 656e 6162 6c65 2074 6865 2070 To enable the p\n+001b2020: 6c75 6769 6e20 696e 2079 6f75 7220 636f lugin in your co\n+001b2030: 6465 2c20 7265 6769 7374 6572 2074 6865 de, register the\n+001b2040: 2070 6c75 6769 6e20 616e 6420 7365 7420 plugin and set \n+001b2050: 7468 6520 7374 7265 616d 7320 6173 2066 the streams as f\n+001b2060: 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 ollows:

    .
    #\n+001b20b0: 696e 636c 7564 6520 2671 756f 743b 6c6f include "lo\n+001b20c0: 6767 696e 672e 6826 7175 6f74 3b3c 2f73 gging.h"
    . <\n+001b20f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n+001b2120: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n+001b2190: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b21a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b21b0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001b21c0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n+001b21d0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n+001b21e0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n+001b21f0: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
    .
    size_t bytes_in; .
    size_t b\n+001b2280: 7974 6573 5f6f 7574 3b20 3c2f 6469 763e ytes_out;
    \n+001b2290: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n+001b23e0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // f\n+001b2400: 6169 6c65 6420 746f 2072 6567 6973 7465 ailed to registe\n+001b2410: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    .\n+001b2420: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //
    .soap_set_loggin\n+001b24d0: 675f 696e 626f 756e 643c 2f61 3e28 3c61 g_inbound(soap, s\n+001b2510: 7464 6f75 7429 3b20 3c2f 6469 763e 0a3c tdout);
    .<\n+001b2520: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b2530: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_set_log\n+001b2590: 6769 6e67 5f6f 7574 626f 756e 643c 2f61 ging_outbound(soap, stdout); .
    ... /\n+001b2610: 2f20 7072 6f63 6573 7320 6d65 7373 6167 / process messag\n+001b2620: 6573 3c2f 7370 616e 3e3c 2f64 6976 3e0a es
    .\n+001b2630: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+001b2720: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_set_l\n+001b2790: 6f67 6769 6e67 5f6f 7574 626f 756e 643c ogging_outbound<\n+001b27a0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001b27d0: 2f61 3e2c 204e 554c 4c29 3b20 3c73 7061 /a>, NULL); // disable log\n+001b2800: 6769 6e67 203c 2f73 7061 6e3e 3c2f 6469 ging .
    soap_log\n+001b2880: 6769 6e67 5f73 7461 7473 3c2f 613e 283c ging_stats(<\n+001b2890: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b28a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b28b0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001b28c0: 2661 6d70 3b62 7974 6573 5f6f 7574 2c20 &bytes_out, \n+001b28d0: 2661 6d70 3b62 7974 6573 5f69 6e29 3b3c &bytes_in);<\n+001b28e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.\n+001b2ac0: 766f 6964 2073 6f61 705f 7365 745f 6c6f void soap_set_lo\n+001b2ad0: 6767 696e 675f 6f75 7462 6f75 6e64 2873 gging_outbound(s\n+001b2ae0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+001b2af0: 2c20 4649 4c45 202a 6664 293c 2f64 6976 , FILE *fd)
    Specify outb\n+001b2b20: 6f75 6e64 206d 6573 7361 6765 206c 6f67 ound message log\n+001b2b30: 6769 6e67 2077 6974 6820 7468 6520 6c6f ging with the lo\n+001b2b40: 6767 696e 6720 706c 7567 696e 2e3c 2f64 gging plugin.
    .
    voi\n+001b2c40: 6420 736f 6170 5f72 6573 6574 5f6c 6f67 d soap_reset_log\n+001b2c50: 6769 6e67 5f73 7461 7473 2873 7472 7563 ging_stats(struc\n+001b2c60: 7420 736f 6170 202a 736f 6170 293c 2f64 t soap *soap)
    Reset mess\n+001b2c90: 6167 696e 6720 7374 6174 6973 7469 6373 aging statistics\n+001b2ca0: 2077 6974 6820 7468 6520 6c6f 6767 696e with the loggin\n+001b2cb0: 6720 706c 7567 696e 2e3c 2f64 6976 3e3c g plugin.
    <\n+001b2cc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+001b2d90: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+001b2da0: 6922 3e76 6f69 6420 736f 6170 5f6c 6f67 i\">void soap_log\n+001b2db0: 6769 6e67 5f73 7461 7473 2873 7472 7563 ging_stats(struc\n+001b2dc0: 7420 736f 6170 202a 736f 6170 2c20 7369 t soap *soap, si\n+001b2dd0: 7a65 5f74 202a 7365 6e74 2c20 7369 7a65 ze_t *sent, size\n+001b2de0: 5f74 202a 7265 6376 293c 2f64 6976 3e3c _t *recv)
    <\n+001b2df0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001b2e00: 223e 436f 6c6c 6563 7420 6d65 7373 6167 \">Collect messag\n+001b2e10: 696e 6720 7374 6174 6973 7469 6373 2077 ing statistics w\n+001b2e20: 6974 6820 7468 6520 6c6f 6767 696e 6720 ith the logging \n+001b2e30: 706c 7567 696e 2e3c 2f64 6976 3e3c 2f64 plugin.
    .
    soap_set_loggin\n+001b2f00: 675f 696e 626f 756e 643c 2f61 3e3c 2f64 g_inbound
    void soap\n+001b2f30: 5f73 6574 5f6c 6f67 6769 6e67 5f69 6e62 _set_logging_inb\n+001b2f40: 6f75 6e64 2873 7472 7563 7420 736f 6170 ound(struct soap\n+001b2f50: 202a 736f 6170 2c20 4649 4c45 202a 6664 *soap, FILE *fd\n+001b2f60: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Specif\n+001b2f80: 7920 696e 626f 756e 6420 6d65 7373 6167 y inbound messag\n+001b2f90: 6520 6c6f 6767 696e 6720 7769 7468 2074 e logging with t\n+001b2fa0: 6865 206c 6f67 6769 6e67 2070 6c75 6769 he logging plugi\n+001b2fb0: 6e2e 3c2f 6469 763e 3c2f 6469 763e 0a3c n.
    .<\n+001b2fc0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+001b2fd0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+001b2fe0: 705f 5f64 6562 7567 5f68 746d 6c5f 6761 p__debug_html_ga\n+001b2ff0: 6336 3337 3934 3564 3038 3639 6439 3161 c637945d0869d91a\n+001b3000: 3462 3030 6463 3164 6461 6365 6435 3337 4b00dc1ddaced537\n+001b3010: 223e 3c64 6976 2063 6c61 7373 3d22 7474 \">int logging(str\n+001b30a0: 7563 7420 736f 6170 202a 2c20 7374 7275 uct soap *, stru\n+001b30b0: 6374 2073 6f61 705f 706c 7567 696e 202a ct soap_plugin *\n+001b30c0: 2c20 766f 6964 202a 293c 2f64 6976 3e3c , void *)
    <\n+001b30d0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001b30e0: 223e 5468 6520 6c6f 6767 696e 6720 706c \">The logging pl\n+001b30f0: 7567 696e 2072 6567 6973 7472 6174 696f ugin registratio\n+001b3100: 6e20 6675 6e63 7469 6f6e 2e3c 2f64 6976 n function.
    .
    <\n+001b3130: 703e 4966 2079 6f75 2075 7365 203c 636f p>If you use so\n+001b31f0: 6170 5f63 6f70 793c 2f61 3e3c 2f63 6f64 ap_copy to copy the <\n+001b3210: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+001b3270: 2063 6f6e 7465 7874 2077 6974 6820 7468 context with th\n+001b3280: 6520 706c 7567 696e 2c20 7468 6520 706c e plugin, the pl\n+001b3290: 7567 696e 2773 2073 7461 7465 2077 696c ugin's state wil\n+001b32a0: 6c20 6265 2073 6861 7265 6420 6279 2074 l be shared by t\n+001b32b0: 6865 2063 6f70 792e 2054 6865 2070 6c75 he copy. The plu\n+001b32c0: 6769 6e20 6973 2074 6872 6561 642d 7361 gin is thread-sa\n+001b32d0: 6665 2c20 6275 7420 646f 6573 206e 6f74 fe, but does not\n+001b32e0: 2075 7365 2061 206c 6f63 6b20 746f 2070 use a lock to p\n+001b32f0: 726f 7465 6374 2074 6865 2069 6e74 6572 rotect the inter\n+001b3300: 6e61 6c20 7374 6174 6973 7469 6373 2063 nal statistics c\n+001b3310: 6f75 6e74 6572 7320 746f 2065 6e73 7572 ounters to ensur\n+001b3320: 6520 7468 6520 7370 6565 6420 6f66 206d e the speed of m\n+001b3330: 6573 7361 6769 6e67 2069 7320 6e6f 7420 essaging is not \n+001b3340: 636f 6d70 726f 6d69 7365 642c 206d 6561 compromised, mea\n+001b3350: 6e69 6e67 2074 6861 7420 796f 7520 7368 ning that you sh\n+001b3360: 6f75 6c64 206e 6f74 2066 756c 6c79 2072 ould not fully r\n+001b3370: 656c 7920 6f6e 2074 6865 2073 7461 7469 ely on the stati\n+001b3380: 7374 6963 7320 746f 2062 6520 3130 3025 stics to be 100%\n+001b3390: 2061 6363 7572 6174 6520 666f 7220 6d75 accurate for mu\n+001b33a0: 6c74 692d 7468 7265 6164 6564 2073 6572 lti-threaded ser\n+001b33b0: 7669 6365 732e 3c2f 703e 0a3c 703e 5365 vices.

    .

    Se\n+001b33c0: 6520 616c 736f 203c 636f 6465 3e3c 6120 e also \n+001b3450: 6c6f 6767 696e 673c 2f61 3e3c 2f63 6f64 logging.

    .

    .... \n+001b3470: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n+001b3480: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n+001b3490: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..R\n+001b34d0: 4553 5466 756c 2073 6572 7665 722d 7369 ESTful server-si\n+001b34e0: 6465 2041 5049 2077 6974 6820 7468 6520 de API with the \n+001b34f0: 4854 5450 2047 4554 2070 6c75 6769 6e3c HTTP GET plugin<\n+001b3500: 2f68 333e 0a3c 703e 5365 7276 6572 2d73 /h3>.

    Server-s\n+001b3510: 6964 6520 7573 6520 6f66 2052 4553 5466 ide use of RESTf\n+001b3520: 756c 2048 5454 5020 4745 5420 6f70 6572 ul HTTP GET oper\n+001b3530: 6174 696f 6e73 2069 7320 7375 7070 6f72 ations is suppor\n+001b3540: 7465 6420 7769 7468 2074 6865 203c 636f ted with the http_get\n+001b35e0: 3c2f 636f 6465 3e20 4854 5450 2047 4554 HTTP GET\n+001b35f0: 2070 6c75 6769 6e20 3c65 6d3e 3c63 6f64 plugin gsoap/plugin/h\n+001b3610: 7474 7067 6574 2e63 3c2f 636f 6465 3e3c ttpget.c<\n+001b3620: 2f65 6d3e 2e3c 2f70 3e0a 3c70 3e54 6865 /em>.

    .

    The\n+001b3630: 2048 5454 5020 4745 5420 706c 7567 696e HTTP GET plugin\n+001b3640: 2061 6c6c 6f77 7320 796f 7572 2073 6572 allows your ser\n+001b3650: 7665 7220 746f 2068 616e 646c 6520 5245 ver to handle RE\n+001b3660: 5354 6675 6c20 4854 5450 2047 4554 2072 STful HTTP GET r\n+001b3670: 6571 7565 7374 7320 616e 6420 6174 2074 equests and at t\n+001b3680: 6865 2073 616d 6520 7469 6d65 2073 7469 he same time sti\n+001b3690: 6c6c 2073 6572 7665 2053 4f41 502d 6261 ll serve SOAP-ba\n+001b36a0: 7365 6420 504f 5354 2072 6571 7565 7374 sed POST request\n+001b36b0: 732e 2054 6865 2070 6c75 6769 6e20 7072 s. The plugin pr\n+001b36c0: 6f76 6964 6573 2073 7570 706f 7274 2074 ovides support t\n+001b36d0: 6f20 636c 6965 6e74 2061 7070 6c69 6361 o client applica\n+001b36e0: 7469 6f6e 7320 746f 2069 7373 7565 2048 tions to issue H\n+001b36f0: 5454 5020 4745 5420 6f70 6572 6174 696f TTP GET operatio\n+001b3700: 6e73 2074 6f20 6120 7365 7276 6572 2e3c ns to a server.<\n+001b3710: 2f70 3e0a 3c70 3e4e 6f74 6520 7468 6174 /p>.

    Note that\n+001b3720: 2048 5454 5020 4745 5420 7265 7175 6573 HTTP GET reques\n+001b3730: 7473 2063 616e 2061 6c73 6f20 6265 2068 ts can also be h\n+001b3740: 616e 646c 6564 2061 7420 7468 6520 7365 andled at the se\n+001b3750: 7276 6572 2073 6964 6520 7769 7468 2074 rver side with t\n+001b3760: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap:\n+001b3830: 3a66 6765 743c 2f61 3e3c 2f63 6f64 653e :fget\n+001b3840: 2063 616c 6c62 6163 6b2c 2073 6565 2053 callback, see S\n+001b3850: 6563 7469 6f6e 203c 6120 636c 6173 733d ection \n+001b3880: 4675 6e63 7469 6f6e 2063 616c 6c62 6163 Function callbac\n+001b3890: 6b73 2066 6f72 2063 7573 746f 6d69 7a65 ks for customize\n+001b38a0: 6420 492f 4f20 616e 6420 4854 5450 2068 d I/O and HTTP h\n+001b38b0: 616e 646c 696e 673c 2f61 3e20 2e20 486f andling . Ho\n+001b38c0: 7765 7665 722c 2074 6865 2048 5454 5020 wever, the HTTP \n+001b38d0: 4745 5420 706c 7567 696e 2061 6c73 6f20 GET plugin also \n+001b38e0: 6b65 6570 7320 7374 6174 6973 7469 6373 keeps statistics\n+001b38f0: 206f 6e20 7468 6520 6e75 6d62 6572 206f on the number o\n+001b3900: 6620 7375 6363 6573 7366 756c 2050 4f53 f successful POS\n+001b3910: 5420 616e 6420 4745 5420 6578 6368 616e T and GET exchan\n+001b3920: 6765 7320 616e 6420 6661 696c 6564 206f ges and failed o\n+001b3930: 7065 7261 7469 6f6e 7320 2848 5454 5020 perations (HTTP \n+001b3940: 6661 756c 7473 2c20 534f 4150 2046 6175 faults, SOAP Fau\n+001b3950: 6c74 732c 2065 7463 2e29 2e20 4974 2061 lts, etc.). It a\n+001b3960: 6c73 6f20 6b65 6570 7320 6869 7420 6869 lso keeps hit hi\n+001b3970: 7374 6f67 7261 6d73 2061 6363 756d 756c stograms accumul\n+001b3980: 6174 6564 2066 6f72 2075 7020 746f 2061 ated for up to a\n+001b3990: 2079 6561 7220 6f66 2072 756e 6e69 6e67 year of running\n+001b39a0: 2074 696d 652e 3c2f 703e 0a3c 703e 546f time.

    .

    To\n+001b39b0: 2075 7365 2074 6865 203c 636f 6465 3e3c use the <\n+001b39c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001b39d0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001b39e0: 5f69 6f2e 6874 6d6c 2367 6130 6563 6463 _io.html#ga0ecdc\n+001b39f0: 3433 6135 3365 3439 3465 6463 3466 3834 43a53e494edc4f84\n+001b3a00: 6538 6331 3335 3635 3962 6122 2074 6974 e8c135659ba\" tit\n+001b3a10: 6c65 3d22 5468 6520 4854 5450 2047 4554 le=\"The HTTP GET\n+001b3a20: 2070 6c75 6769 6e20 7265 6769 7374 7261 plugin registra\n+001b3a30: 7469 6f6e 2066 756e 6374 696f 6e2e 223e tion function.\">\n+001b3a40: 6874 7470 5f67 6574 3c2f 613e 3c2f 636f http_get plugin, comp\n+001b3a60: 696c 6520 616e 6420 6c69 6e6b 2079 6f75 ile and link you\n+001b3a70: 7220 6170 706c 6963 6174 696f 6e20 7769 r application wi\n+001b3a80: 7468 203c 656d 3e3c 636f 6465 3e68 7474 th htt\n+001b3a90: 7067 6574 2e63 3c2f 636f 6465 3e3c 2f65 pget.c located in th\n+001b3ab0: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n+001b3ac0: 702f 706c 7567 696e 3c2f 636f 6465 3e3c p/plugin<\n+001b3ad0: 2f65 6d3e 2064 6972 6563 746f 7279 206f /em> directory o\n+001b3ae0: 6620 7468 6520 6753 4f41 5020 7061 636b f the gSOAP pack\n+001b3af0: 6167 652e 2054 6f20 656e 6162 6c65 2074 age. To enable t\n+001b3b00: 6865 2070 6c75 6769 6e20 696e 2079 6f75 he plugin in you\n+001b3b10: 7220 636f 6465 2c20 7265 6769 7374 6572 r code, register\n+001b3b20: 2074 6865 2070 6c75 6769 6e20 7769 7468 the plugin with\n+001b3b30: 2079 6f75 7220 4854 5450 2047 4554 2068 your HTTP GET h\n+001b3b40: 616e 646c 6572 2066 756e 6374 696f 6e20 andler function \n+001b3b50: 6173 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a as follows:

    .\n+001b3b60: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n+001b3bb0: 743b 6874 7470 6765 742e 6826 7175 6f74 t;httpget.h"\n+001b3bc0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+001b3bd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b3be0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n+001b3c20: 6d61 696e 2829 3c2f 6469 763e 0a3c 6469 main()
    .{\n+001b3c40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n+001b3c80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b3c90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b3ca0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001b3cb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001b3ce0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+001b3d40: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    . \n+001b3d60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_r\n+001b3de0: 6567 6973 7465 725f 706c 7567 696e 5f61 egister_plugin_a\n+001b3df0: 7267 3c2f 613e 283c 6120 636c 6173 733d rg(so\n+001b3e20: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, http_get\n+001b3e80: 3c2f 613e 2c20 283c 7370 616e 2063 6c61 , (void*)my\n+001b3eb0: 5f68 7474 705f 6765 745f 6861 6e64 6c65 _http_get_handle\n+001b3ec0: 7229 2920 3c2f 6469 763e 0a3c 6469 7620 r))
    .
    \n+001b3ee0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+001b3f40: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n+001b3f70: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n+001b3f80: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // fail\n+001b3fa0: 6564 2074 6f20 7265 6769 7374 6572 203c ed to register <\n+001b3fb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001b3fd0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... //
    .
    <\n+001b4010: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b4020: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct http_get_data\n+001b4040: 202a 6874 7470 6765 7464 6174 613b 203c *httpgetdata; <\n+001b4050: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    httpge\n+001b4070: 7464 6174 6120 3d20 283c 7370 616e 2063 tdata = (s\n+001b4090: 7472 7563 7420 3c2f 7370 616e 3e68 7474 truct htt\n+001b40a0: 705f 6765 745f 6461 7461 2a29 736f 6170 p_get_data*)soap\n+001b40b0: 5f6c 6f6f 6b75 705f 706c 7567 696e 283c _lookup_plugin(<\n+001b40c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b40d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b40e0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001b40f0: 6874 7470 5f67 6574 5f69 6429 3b20 3c2f http_get_id); .
    if (!h\n+001b4140: 7474 7067 6574 6461 7461 2920 3c2f 6469 ttpgetdata) .
    ... // if the plu\n+001b4190: 6769 6e20 7265 6769 7374 6572 6564 204f gin registered O\n+001b41a0: 4b2c 2074 6865 7265 2069 7320 6365 7274 K, there is cert\n+001b41b0: 6169 6e6c 7920 6461 7461 2062 7574 2063 ainly data but c\n+001b41c0: 616e 2623 3339 3b74 2068 7572 7420 746f an't hurt to\n+001b41d0: 2063 6865 636b 203c 2f73 7061 6e3e 3c2f check .
    ... // process me\n+001b4220: 7373 6167 6573 3c2f 7370 616e 3e3c 2f64 ssages.
    size_t \n+001b4270: 6765 745f 6f6b 203d 2068 7474 7067 6574 get_ok = httpget\n+001b4280: 6461 7461 2d26 6774 3b73 7461 745f 6765 data->stat_ge\n+001b4290: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    size_t post_ok = \n+001b42e0: 6874 7470 6765 7464 6174 612d 2667 743b httpgetdata->\n+001b42f0: 7374 6174 5f70 6f73 743b 203c 2f64 6976 stat_post; .
    \n+001b4330: 7369 7a65 5f74 3c2f 7370 616e 3e20 6572 size_t er\n+001b4340: 726f 7273 203d 2068 7474 7067 6574 6461 rors = httpgetda\n+001b4350: 7461 2d26 6774 3b73 7461 745f 6661 696c ta->stat_fail\n+001b4360: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    tim\n+001b4380: 655f 7420 6e6f 7720 3d20 7469 6d65 284e e_t now = time(N\n+001b4390: 554c 4c29 3b20 3c2f 6469 763e 0a3c 6469 ULL);
    . \n+001b43b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct tm *T; .
    T = local\n+001b4400: 7469 6d65 2826 616d 703b 6e6f 7729 3b20 time(&now); \n+001b4410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t hitsthisminut\n+001b4460: 6520 3d20 6874 7470 6765 7464 6174 612d e = httpgetdata-\n+001b4470: 2667 743b 6869 7374 5f6d 696e 5b54 2d26 >hist_min[T-&\n+001b4480: 6774 3b74 6d5f 6d69 6e5d 3b20 3c2f 6469 gt;tm_min]; .
    size_t h\n+001b44d0: 6974 7374 6869 7368 6f75 7220 3d20 6874 itsthishour = ht\n+001b44e0: 7470 6765 7464 6174 612d 2667 743b 6869 tpgetdata->hi\n+001b44f0: 7374 5f68 6f75 725b 542d 2667 743b 746d st_hour[T->tm\n+001b4500: 5f68 6f75 725d 3b20 3c2f 6469 763e 0a3c _hour];
    .<\n+001b4510: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b4520: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > siz\n+001b4540: 655f 743c 2f73 7061 6e3e 2068 6974 7374 e_t hitst\n+001b4550: 6f64 6179 203d 2068 7474 7067 6574 6461 oday = httpgetda\n+001b4560: 7461 2d26 6774 3b68 6973 745f 6461 795b ta->hist_day[\n+001b4570: 542d 2667 743b 746d 5f79 6461 795d 3b3c T->tm_yday];<\n+001b4580: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+001b45a0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    An HTT\n+001b45c0: 5020 4745 5420 6861 6e64 6c65 7220 6361 P GET handler ca\n+001b45d0: 6e20 7369 6d70 6c79 2070 726f 6475 6365 n simply produce\n+001b45e0: 2073 6f6d 6520 4854 4d4c 2063 6f6e 7465 some HTML conte\n+001b45f0: 6e74 2c20 6f72 2061 6e79 206f 7468 6572 nt, or any other\n+001b4600: 2074 7970 6520 6f66 2063 6f6e 7465 6e74 type of content\n+001b4610: 2062 7920 7365 6e64 696e 6720 6461 7461 by sending data\n+001b4620: 2075 7369 6e67 203c 636f 6465 3e3c 6120 using soap_response\n+001b46e0: 3c2f 613e 3c2f 636f 6465 3e3a 3c2f 703e :

    \n+001b46f0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int my\n+001b4740: 5f68 7474 705f 6765 745f 6861 6e64 6c65 _http_get_handle\n+001b4750: 7228 3c73 7061 6e20 636c 6173 733d 226b r(struct soa\n+001b47a0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001b47d0: 6170 3c2f 613e 2920 3c2f 6469 763e 0a3c ap)
    .<\n+001b47e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b47f0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    soap->\n+001b4840: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;http_c\n+001b4890: 6f6e 7465 6e74 3c2f 613e 203d 203c 7370 ontent = "t\n+001b48c0: 6578 742f 6874 6d6c 2671 756f 743b 3c2f ext/html";
    .\n+001b48f0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_resp\n+001b4970: 6f6e 7365 3c2f 613e 283c 6120 636c 6173 onse(\n+001b49a0: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, SOAP_F\n+001b4a00: 494c 453c 2f61 3e29 3c2f 6469 763e 0a3c ILE)
    .<\n+001b4a10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b4a20: 3e20 2020 7c7c 203c 6120 636c 6173 733d > || soap_send\n+001b4a80: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001b4ab0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "<html\n+001b4ae0: 2667 743b 4865 6c6c 6f26 6c74 3b2f 6874 >Hello</ht\n+001b4af0: 6d6c 2667 743b 2671 756f 743b 3c2f 7370 ml>")
    .. \n+001b4bd0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+001b4bf0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap_c\n+001b4c50: 6c6f 7365 736f 636b 3c2f 613e 283c 6120 losesock(soap);.
    return\n+001b4cd0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n+001b4d30: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // retur\n+001b4d50: 6e20 534f 4150 5f4f 4b20 6f72 2048 5454 n SOAP_OK or HTT\n+001b4d60: 5020 6572 726f 7220 636f 6465 2c20 652e P error code, e.\n+001b4d70: 672e 2034 3034 203c 2f73 7061 6e3e 3c2f g. 404 .
    }
    .<\n+001b4da0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    If you \n+001b4dc0: 7573 6520 3c63 6f64 653e 3c61 2063 6c61 use soap_copy to cop\n+001b4e90: 7920 7468 6520 3c63 6f64 653e 3c61 2063 y the soap\n+001b4ef0: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n+001b4f00: 7769 7468 2074 6865 2070 6c75 6769 6e2c with the plugin,\n+001b4f10: 2074 6865 2070 6c75 6769 6e27 7320 6461 the plugin's da\n+001b4f20: 7461 2077 696c 6c20 6265 2073 6861 7265 ta will be share\n+001b4f30: 6420 6279 2074 6865 2063 6f70 792e 2054 d by the copy. T\n+001b4f40: 6865 7265 666f 7265 2c20 7468 6520 7374 herefore, the st\n+001b4f50: 6174 6973 7469 6373 2061 7265 206e 6f74 atistics are not\n+001b4f60: 2031 3030 2520 6775 6172 616e 7465 6564 100% guaranteed\n+001b4f70: 2074 6f20 6265 2061 6363 7572 6174 6520 to be accurate \n+001b4f80: 666f 7220 6d75 6c74 692d 7468 7265 6164 for multi-thread\n+001b4f90: 6564 2073 6572 7669 6365 7320 7369 6e63 ed services sinc\n+001b4fa0: 6520 7261 6365 2063 6f6e 6469 7469 6f6e e race condition\n+001b4fb0: 7320 6f6e 2074 6865 2063 6f75 6e74 6572 s on the counter\n+001b4fc0: 7320 6d61 7920 6f63 6375 722e 204d 7574 s may occur. Mut\n+001b4fd0: 6578 2069 7320 6e6f 7420 7573 6564 2074 ex is not used t\n+001b4fe0: 6f20 7570 6461 7465 2074 6865 2063 6f75 o update the cou\n+001b4ff0: 6e74 6572 7320 746f 2061 766f 6964 2069 nters to avoid i\n+001b5000: 6e74 726f 6475 6369 6e67 2065 7870 656e ntroducing expen\n+001b5010: 7369 7665 2073 796e 6368 726f 6e69 7a61 sive synchroniza\n+001b5020: 7469 6f6e 2070 6f69 6e74 732e 2049 6620 tion points. If \n+001b5030: 3130 3025 2073 6572 7665 722d 7369 6465 100% server-side\n+001b5040: 2061 6363 7572 6163 7920 6973 2072 6571 accuracy is req\n+001b5050: 7569 7265 642c 2061 6464 206d 7574 6578 uired, add mutex\n+001b5060: 2061 7420 7468 6520 706f 696e 7473 2069 at the points i\n+001b5070: 6e64 6963 6174 6564 2069 6e20 7468 6520 ndicated in the \n+001b5080: 3c65 6d3e 3c63 6f64 653e 6874 7470 6765 httpge\n+001b5090: 742e 633c 2f63 6f64 653e 3c2f 656d 3e20 t.c \n+001b50a0: 636f 6465 2e3c 2f70 3e0a 3c70 3e54 6865 code.

    .

    The\n+001b50b0: 2063 6c69 656e 742d 7369 6465 2075 7365 client-side use\n+001b50c0: 206f 6620 4854 5450 2047 4554 2069 7320 of HTTP GET is \n+001b50d0: 7072 6f76 6964 6564 2062 7920 7468 6520 provided by the \n+001b50e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_G\n+001b5160: 4554 3c2f 613e 3c2f 636f 6465 3e20 6f70 ET op\n+001b5170: 6572 6174 696f 6e2e 2054 6f20 7265 6365 eration. To rece\n+001b5180: 6976 6520 6120 534f 4150 2f58 4d4c 2028 ive a SOAP/XML (\n+001b5190: 7265 7370 6f6e 7365 2920 6d65 7373 6167 response) messag\n+001b51a0: 6520 3c65 6d3e 3c63 6f64 653e 6e73 3a6d e ns:m\n+001b51b0: 6574 686f 6452 6573 706f 6e73 653c 2f63 ethodResponse, use:<\n+001b51d0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n+001b5220: 206d 6169 6e28 293c 2f64 6976 3e0a 3c64 main()
    .\n+001b5240: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n+001b5280: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001b52b0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001b52e0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+001b5340: 3c2f 613e 2829 3b3c 2f64 6976 3e0a 3c64 ();
    .\n+001b5360: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_GET<\n+001b53e0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001b5410: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, en\n+001b5460: 6470 6f69 6e74 3c2f 613e 2c20 4e55 4c4c dpoint, NULL\n+001b5470: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    \n+001b5490: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n+001b54b0: 6f72 3c2f 7370 616e 3e3c 2f64 6976 3e0a or
    .\n+001b54c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n+001b54f0: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se if (s\n+001b5520: 6f61 705f 7265 6376 5f6e 735f 5f77 6562 oap_recv_ns__web\n+001b5530: 6d65 7468 6f64 5265 7370 6f6e 7365 283c methodResponse(<\n+001b5540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b5550: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b5560: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001b5570: 2e2e 2e29 2920 3c2f 6469 763e 0a3c 6469 ...))
    . \n+001b5590: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+001b55b0: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    else .
    ... // success
    .soap_destroy<\n+001b56c0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001b56f0: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    .<\n+001b5710: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b5720: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b5730: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001b5740: 6761 3831 6130 3039 6165 3165 6138 3235 ga81a009ae1ea825\n+001b5750: 6130 3565 3532 3431 6532 6237 6138 6563 a05e5241e2b7a8ec\n+001b5760: 6539 223e 736f 6170 5f65 6e64 3c2f 613e e9\">soap_end\n+001b5770: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b57a0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_done(<\n+001b5820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b5830: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b5840: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001b5850: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001b5910: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_GET\n+001b5930: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+001b5940: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n+001b5950: 656e 6470 6f69 6e74 2c20 636f 6e73 7420 endpoint, const \n+001b5960: 6368 6172 202a 6163 7469 6f6e 293c 2f64 char *action)
    HTTP GET c\n+001b5990: 6f6e 7465 6e74 2066 726f 6d20 7365 7276 ontent from serv\n+001b59a0: 6572 2e3c 2f64 6976 3e3c 2f64 6976 3e0a er.
    .\n+001b59b0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    To rec\n+001b59d0: 6569 7665 2061 6e79 2048 5454 5020 426f eive any HTTP Bo\n+001b59e0: 6479 2064 6174 6120 696e 746f 2061 2062 dy data into a b\n+001b59f0: 7566 6665 722c 2075 7365 3a3c 2f70 3e0a uffer, use:

    .\n+001b5a00: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int mai\n+001b5a50: 6e28 293c 2f64 6976 3e0a 3c64 6976 2063 n()
    .
    {.
    st\n+001b5aa0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n+001b5b10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b5b20: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b5b30: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001b5b40: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n+001b5b50: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n+001b5b60: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n+001b5b70: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
    .
    char *response = \n+001b5bc0: 4e55 4c4c 3b20 3c2f 6469 763e 0a3c 6469 NULL;
    . \n+001b5be0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n+001b5c00: 743c 2f73 7061 6e3e 2072 6573 706f 6e73 t respons\n+001b5c10: 655f 6c65 6e3b 3c2f 6469 763e 0a3c 6469 e_len;
    . \n+001b5c30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_GET(soap, end\n+001b5d30: 706f 696e 743c 2f61 3e2c 204e 554c 4c29 point, NULL)\n+001b5d40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    || (\n+001b5d60: 7265 7370 6f6e 7365 203d 203c 6120 636c response = soap_\n+001b5dc0: 6874 7470 5f67 6574 5f62 6f64 793c 2f61 http_get_body(soap, &response\n+001b5e10: 5f6c 656e 2929 203d 3d20 4e55 4c4c 3c2f _len)) == NULL.. \n+001b5ef0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n+001b5f10: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    \n+001b5f50: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... // use the res\n+001b5fa0: 706f 6e73 6520 7374 7269 6e67 2028 4e55 ponse string (NU\n+001b5fb0: 4c4c 2069 6e64 6963 6174 6573 206e 6f20 LL indicates no \n+001b5fc0: 626f 6479 206f 7220 6572 726f 7229 3c2f body or error)
    . \n+001b5ff0: 3c61 2063 6c61 7373 3d22 636f 6465 2220
    soap_destro\n+001b6050: 793c 2f61 3e28 2661 6d70 3b3c 6120 636c y(&soap); .
    soa\n+001b6100: 705f 656e 643c 2f61 3e28 2661 6d70 3b3c p_end(&<\n+001b6110: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b6120: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b6130: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001b6140: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap_done(&\n+001b61c0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+001b61f0: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .}<\n+001b6210: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+001b62c0: 705f 656e 645f 7265 6376 3c2f 613e 3c2f p_end_recv
    int soap\n+001b62f0: 5f65 6e64 5f72 6563 7628 7374 7275 6374 _end_recv(struct\n+001b6300: 2073 6f61 7020 2a73 6f61 7029 3c2f 6469 soap *soap)
    Finalize th\n+001b6330: 6520 636f 6e74 6578 7420 6166 7465 7220 e context after \n+001b6340: 7265 6365 6976 696e 672e 3c2f 6469 763e receiving.
    \n+001b6350: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ch\n+001b6430: 6172 202a 2073 6f61 705f 6874 7470 5f67 ar * soap_http_g\n+001b6440: 6574 5f62 6f64 7928 7374 7275 6374 2073 et_body(struct s\n+001b6450: 6f61 7020 2a73 6f61 702c 2073 697a 655f oap *soap, size_\n+001b6460: 7420 2a6c 656e 293c 2f64 6976 3e3c 6469 t *len)
    \n+001b6480: 4765 7420 7468 6520 4854 5450 2062 6f64 Get the HTTP bod\n+001b6490: 7920 6d65 7373 6167 6520 6173 2061 2073 y message as a s\n+001b64a0: 7472 696e 672e 3c2f 6469 763e 3c2f 6469 tring.
    .

    See\n+001b64d0: 2061 6c73 6f20 3c63 6f64 653e 3c61 2063 also htt\n+001b6560: 705f 6765 743c 2f61 3e3c 2f63 6f64 653e p_get\n+001b6570: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t\n+001b6590: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte\n+001b65a0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    \n+001b65b0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .R\n+001b65e0: 4553 5466 756c 2073 6572 7665 722d 7369 ESTful server-si\n+001b65f0: 6465 2041 5049 2077 6974 6820 7468 6520 de API with the \n+001b6600: 4854 5450 2050 4f53 5420 706c 7567 696e HTTP POST plugin\n+001b6610: 3c2f 6833 3e0a 3c70 3e53 6572 7665 722d

    .

    Server-\n+001b6620: 7369 6465 2075 7365 206f 6620 5245 5354 side use of REST\n+001b6630: 6675 6c20 4854 5450 2050 4f53 542c 2050 ful HTTP POST, P\n+001b6640: 5554 2c20 5041 5443 482c 2061 6e64 2044 UT, PATCH, and D\n+001b6650: 454c 4554 4520 6f70 6572 6174 696f 6e73 ELETE operations\n+001b6660: 2061 7265 2073 7570 706f 7274 6564 2077 are supported w\n+001b6670: 6974 6820 7468 6520 3c63 6f64 653e 3c61 ith the \n+001b6700: 6874 7470 5f70 6f73 743c 2f61 3e3c 2f63 http_post HTTP POST p\n+001b6720: 6c75 6769 6e20 3c65 6d3e 3c63 6f64 653e lugin \n+001b6730: 6773 6f61 702f 706c 7567 696e 2f68 7474 gsoap/plugin/htt\n+001b6740: 7070 6f73 742e 633c 2f63 6f64 653e 3c2f ppost.c.

    .

    The \n+001b6760: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_pos\n+001b67f0: 743c 2f61 3e3c 2f63 6f64 653e 2048 5454 t HTT\n+001b6800: 5020 504f 5354 2070 6c75 6769 6e20 616c P POST plugin al\n+001b6810: 6c6f 7773 2079 6f75 7220 7365 7276 6572 lows your server\n+001b6820: 2074 6f20 6861 6e64 6c65 2052 4553 5466 to handle RESTf\n+001b6830: 756c 2048 5454 5020 504f 5354 2072 6571 ul HTTP POST req\n+001b6840: 7565 7374 7320 616e 6420 6174 2074 6865 uests and at the\n+001b6850: 2073 616d 6520 7469 6d65 2073 7469 6c6c same time still\n+001b6860: 2073 6572 7665 2053 4f41 502d 6261 7365 serve SOAP-base\n+001b6870: 6420 504f 5354 2072 6571 7565 7374 732e d POST requests.\n+001b6880: 2054 6865 2070 6c75 6769 6e20 616c 736f The plugin also\n+001b6890: 2070 726f 7669 6465 7320 7375 7070 6f72 provides suppor\n+001b68a0: 7420 666f 7220 636c 6965 6e74 2061 7070 t for client app\n+001b68b0: 6c69 6361 7469 6f6e 7320 746f 2069 7373 lications to iss\n+001b68c0: 7565 2048 5454 5020 504f 5354 206f 7065 ue HTTP POST ope\n+001b68d0: 7261 7469 6f6e 7320 746f 2061 2073 6572 rations to a ser\n+001b68e0: 7665 722e 3c2f 703e 0a3c 703e 546f 2073 ver.

    .

    To s\n+001b68f0: 696d 706c 6966 7920 7468 6520 7365 7276 implify the serv\n+001b6900: 6572 2d73 6964 6520 6861 6e64 6c69 6e67 er-side handling\n+001b6910: 206f 6620 504f 5354 2072 6571 7565 7374 of POST request\n+001b6920: 732c 2068 616e 646c 6572 7320 6361 6e20 s, handlers can \n+001b6930: 6265 2061 7373 6f63 6961 7465 6420 7769 be associated wi\n+001b6940: 7468 206d 6564 6961 2074 7970 6573 3a3c th media types:<\n+001b6950: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct \n+001b69a0: 6874 7470 5f70 6f73 745f 6861 6e64 6c65 http_post_handle\n+001b69b0: 7273 206d 795f 6861 6e64 6c65 7273 5b5d rs my_handlers[]\n+001b69c0: 203d 203c 2f64 6976 3e0a 3c64 6976 2063 =
    .
    {.
    { "imag\n+001b6a20: 652f 6a70 6726 7175 6f74 3b3c 2f73 7061 e/jpg", jpeg_handler\n+001b6a40: 207d 2c20 3c2f 6469 763e 0a3c 6469 7620 },
    .
    {\n+001b6a60: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+001b6a80: 6f74 3b69 6d61 6765 2f2a 2671 756f 743b ot;image/*"\n+001b6a90: 3c2f 7370 616e 3e2c 2020 2069 6d61 6765 , image\n+001b6aa0: 5f68 616e 646c 6572 207d 2c20 3c2f 6469 _handler }, .
    { "text/\n+001b6af0: 6874 6d6c 2671 756f 743b 3c2f 7370 616e html", html_handler \n+001b6b10: 7d2c 203c 2f64 6976 3e0a 3c64 6976 2063 },
    .
    { \n+001b6b30: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+001b6b50: 743b 7465 7874 2f2a 2671 756f 743b 3c2f t;text/*", text_h\n+001b6b70: 616e 646c 6572 207d 2c20 3c2f 6469 763e andler },
    \n+001b6b80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { "POST&qu\n+001b6bc0: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n+001b6bd0: 2067 656e 6572 6963 5f50 4f53 545f 6861 generic_POST_ha\n+001b6be0: 6e64 6c65 7220 7d2c 203c 2f64 6976 3e0a ndler },
    .\n+001b6bf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "PUT"\n+001b6c30: 3b3c 2f73 7061 6e3e 2c20 2020 2020 2020 ;, \n+001b6c40: 6765 6e65 7269 635f 5055 545f 6861 6e64 generic_PUT_hand\n+001b6c50: 6c65 7220 7d2c 203c 2f64 6976 3e0a 3c64 ler },
    .\n+001b6c70: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+001b6c90: 2671 756f 743b 5041 5443 4826 7175 6f74 "PATCH"\n+001b6ca0: 3b3c 2f73 7061 6e3e 2c20 2020 2020 6765 ;, ge\n+001b6cb0: 6e65 7269 635f 5041 5443 485f 6861 6e64 neric_PATCH_hand\n+001b6cc0: 6c65 7220 7d2c 203c 2f64 6976 3e0a 3c64 ler },
    .\n+001b6ce0: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+001b6d00: 2671 756f 743b 4445 4c45 5445 2671 756f "DELETE&quo\n+001b6d10: 743b 3c2f 7370 616e 3e2c 2020 2020 6765 t;, ge\n+001b6d20: 6e65 7269 635f 4445 4c45 5445 5f68 616e neric_DELETE_han\n+001b6d30: 646c 6572 207d 2c20 3c2f 6469 763e 0a3c dler },
    .<\n+001b6d40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b6d50: 3e20 207b 204e 554c 4c20 7d20 3c2f 6469 > { NULL } .
    };
    .

    Note tha\n+001b6da0: 7420 3c63 6f64 653e 2a3c 2f63 6f64 653e t *\n+001b6db0: 2061 6e64 203c 636f 6465 3e2d 3c2f 636f and - can be used \n+001b6dd0: 6173 2077 696c 6463 6172 6473 2074 6f20 as wildcards to \n+001b6de0: 6d61 7463 6820 616e 7920 7465 7874 2061 match any text a\n+001b6df0: 6e64 2061 6e79 2063 6861 7261 6374 6572 nd any character\n+001b6e00: 2c20 7265 7370 6563 7469 7665 6c79 2e20 , respectively. \n+001b6e10: 4d65 6469 6120 7479 7065 7320 6d61 7920 Media types may \n+001b6e20: 6861 7665 206f 7074 696f 6e61 6c20 7061 have optional pa\n+001b6e30: 7261 6d65 7465 7273 2061 6674 6572 203c rameters after <\n+001b6e40: 636f 6465 3e3b 3c2f 636f 6465 3e20 7375 code>; su\n+001b6e50: 6368 2061 7320 3c63 6f64 653e 6368 6172 ch as char\n+001b6e60: 7365 743c 2f63 6f64 653e 2061 6e64 203c set and <\n+001b6e70: 636f 6465 3e62 6f75 6e64 6172 793c 2f63 code>boundary. These para\n+001b6e90: 6d65 7465 7273 2063 616e 2062 6520 6d61 meters can be ma\n+001b6ea0: 7463 6865 6420 6279 2074 6865 206d 6564 tched by the med\n+001b6eb0: 6961 2074 7970 6520 7061 7474 6572 6e73 ia type patterns\n+001b6ec0: 2069 6e20 7468 6520 7461 626c 652e 2050 in the table. P\n+001b6ed0: 6174 7465 726e 7320 7468 6174 2061 7265 atterns that are\n+001b6ee0: 206d 6f72 6520 7370 6563 6966 6963 206d more specific m\n+001b6ef0: 7573 7420 7072 6563 6564 6520 7061 7474 ust precede patt\n+001b6f00: 6572 6e73 2074 6861 7420 6172 6520 6c65 erns that are le\n+001b6f10: 7373 2073 7065 6369 6669 6320 696e 2074 ss specific in t\n+001b6f20: 6865 2074 6162 6c65 2e20 466f 7220 6578 he table. For ex\n+001b6f30: 616d 706c 652c 203c 636f 6465 3e22 7465 ample, \"te\n+001b6f40: 7874 2f78 6d6c 3b2a 6368 6172 7365 743d xt/xml;*charset=\n+001b6f50: 7574 662d 382a 223c 2f63 6f64 653e 206d utf-8*\" m\n+001b6f60: 7573 7420 7072 6563 6564 6520 3c63 6f64 ust precede \"text/xml\" which must p\n+001b6f90: 7265 6365 6465 203c 636f 6465 3e22 7465 recede \"te\n+001b6fa0: 7874 2f2a 223c 2f63 6f64 653e 2e20 4e6f xt/*\". No\n+001b6fb0: 7465 2074 6861 7420 3c63 6f64 653e 2274 te that \"t\n+001b6fc0: 6578 742f 786d 6c22 3c2f 636f 6465 3e20 ext/xml\" \n+001b6fd0: 616c 736f 206d 6174 6368 6573 2061 6e79 also matches any\n+001b6fe0: 2070 6172 616d 6574 6572 7320 6f66 2074 parameters of t\n+001b6ff0: 6865 206d 6564 6961 2074 7970 6520 6f66 he media type of\n+001b7000: 2074 6865 206d 6573 7361 6765 2072 6576 the message rev\n+001b7010: 6569 7665 642c 2073 7563 6820 6173 203c eived, such as <\n+001b7020: 636f 6465 3e22 7465 7874 2f78 6d6c 3b20 code>\"text/xml; \n+001b7030: 6368 6172 7365 743d 7574 662d 3822 3c2f charset=utf-8\" (only sinc\n+001b7050: 6520 6753 4f41 5020 7665 7273 696f 6e20 e gSOAP version \n+001b7060: 322e 382e 3735 292e 3c2f 703e 0a3c 703e 2.8.75).

    .

    \n+001b7070: 5468 6520 6861 6e64 6c65 7273 2061 7265 The handlers are\n+001b7080: 2066 756e 6374 696f 6e73 2074 6861 7420 functions that \n+001b7090: 7769 6c6c 2062 6520 696e 766f 6b65 6420 will be invoked \n+001b70a0: 7768 656e 2061 2050 4f53 5465 6420 7265 when a POSTed re\n+001b70b0: 7175 6573 7420 6d65 7373 6167 6520 6d61 quest message ma\n+001b70c0: 7463 6869 6e67 206d 6564 6961 2074 7970 tching media typ\n+001b70d0: 6520 6973 2073 656e 7420 746f 2074 6865 e is sent to the\n+001b70e0: 2073 6572 7665 722e 3c2f 703e 0a3c 703e server.

    .

    \n+001b70f0: 416e 2065 7861 6d70 6c65 2069 6d61 6765 An example image\n+001b7100: 2068 616e 646c 6572 2074 6861 7420 6368 handler that ch\n+001b7110: 6563 6b73 2074 6865 2073 7065 6369 6669 ecks the specifi\n+001b7120: 6320 696d 6167 6520 7479 7065 3a3c 2f70 c image type:.

    int i\n+001b7180: 6d61 6765 5f68 616e 646c 6572 283c 7370 mage_handler(struct\n+001b71b0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001b71e0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap)
    .
    {.
    co\n+001b7260: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001b7290: 202a 6275 663b 203c 2f64 6976 3e0a 3c64 *buf;
    .\n+001b72b0: 2020 3c73 7061 6e20 636c 6173 733d 226b size\n+001b72d0: 5f74 3c2f 7370 616e 3e20 6c65 6e3b 203c _t len; <\n+001b72e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+001b7310: 2f2f 2069 6620 6e65 6365 7373 6172 792c // if necessary,\n+001b7320: 2063 6865 636b 2074 7970 6520 696e 2073 check type in s\n+001b7330: 6f61 702d 2667 743b 6874 7470 5f63 6f6e oap->http_con\n+001b7340: 7465 6e74 203c 2f73 7061 6e3e 3c2f 6469 tent .
    if (soap->\n+001b73c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 http_co\n+001b7410: 6e74 656e 743c 2f61 3e20 2661 6d70 3b26 ntent &&\n+001b7420: 616d 703b 2021 3c61 2063 6c61 7373 3d22 amp; !soap_tag\n+001b7480: 5f63 6d70 3c2f 613e 283c 6120 636c 6173 _cmp(\n+001b74b0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->http_conte\n+001b7510: 6e74 3c2f 613e 2c20 3c73 7061 6e20 636c nt, "image/\n+001b7540: 6769 6626 7175 6f74 3b3c 2f73 7061 6e3e gif"\n+001b7550: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    <\n+001b7570: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b7580: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+001b7590: 2f73 7061 6e3e 2034 3034 3b20 3c73 7061 /span> 404; // HTTP error \n+001b75c0: 3430 3420 3c2f 7370 616e 3e3c 2f64 6976 404 .
    if ((buf =\n+001b75f0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_http_get_b\n+001b7650: 6f64 793c 2f61 3e28 3c61 2063 6c61 7373 ody(s\n+001b7680: 6f61 703c 2f61 3e2c 2026 616d 703b 6c65 oap, &le\n+001b7690: 6e29 2920 3d3d 204e 554c 4c29 3c2f 6469 n)) == NULL).
    return\n+001b76e0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001b7710: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er\n+001b7760: 726f 723c 2f61 3e3b 203c 2f64 6976 3e0a ror;
    .\n+001b7770: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // ...\n+001b77a0: 206e 6f77 2070 726f 6365 7373 2069 6d61 now process ima\n+001b77b0: 6765 2069 6e20 6275 6620 3c2f 7370 616e ge in buf
    .
    // reply with \n+001b7800: 656d 7074 7920 4854 5450 2032 3030 204f empty HTTP 200 O\n+001b7810: 4b20 7265 7370 6f6e 7365 3a20 3c2f 7370 K response:
    .\n+001b7910: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    \n+001b7a00: 696e 7420 736f 6170 5f74 6167 5f63 6d70 int soap_tag_cmp\n+001b7a10: 2863 6f6e 7374 2063 6861 7220 2a73 7472 (const char *str\n+001b7a20: 696e 672c 2063 6f6e 7374 2063 6861 7220 ing, const char \n+001b7a30: 2a70 6174 7465 726e 293c 2f64 6976 3e3c *pattern)
    <\n+001b7a40: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001b7a50: 223e 436f 6d70 6172 6520 7374 7269 6e67 \">Compare string\n+001b7a60: 2074 6f20 6120 7061 7474 6572 6e2e 3c2f to a pattern.
    .

    For cl\n+001b8250: 6965 6e74 2061 7070 6c69 6361 7469 6f6e ient application\n+001b8260: 7320 746f 2075 7365 2048 5454 5020 504f s to use HTTP PO\n+001b8270: 5354 2c20 7573 6520 7468 6520 3c63 6f64 ST, use the soap_POST operat\n+001b8310: 696f 6e3a 3c2f 703e 0a3c 6469 7620 636c ion:

    .
    <\n+001b8330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b8340: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+001b8390: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001b83c0: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+001b8420: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    ... /\n+001b8460: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n+001b8470: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b8480: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >char<\n+001b84a0: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *buf; \n+001b8510: 2f2f 2068 6f6c 6473 2074 6865 2048 5454 // holds the HTT\n+001b8520: 5020 7265 7175 6573 742f 7265 7370 6f6e P request/respon\n+001b8530: 7365 2062 6f64 7920 6461 7461 203c 2f73 se body data
    .
    size_t len; \n+001b85a0: 2f2f 206c 656e 6774 6820 6f66 2064 6174 // length of dat\n+001b85b0: 6120 3c2f 7370 616e 3e3c 2f64 6976 3e0a a
    .\n+001b85c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // p\n+001b85f0: 6f70 756c 6174 6520 6275 6620 616e 6420 opulate buf and \n+001b8600: 6c65 6e20 7769 7468 206d 6573 7361 6765 len with message\n+001b8610: 2074 6f20 7365 6e64 3c2f 7370 616e 3e3c to send<\n+001b8620: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soa\n+001b86b0: 705f 504f 5354 3c2f 613e 283c 6120 636c p_POST(soap, "UR\n+001b8710: 4c26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 L", \n+001b8720: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+001b8740: 743b 534f 4150 2061 6374 696f 6e20 6f72 t;SOAP action or\n+001b8750: 204e 554c 4c26 7175 6f74 3b3c 2f73 7061 NULL", \n+001b8780: 2671 756f 743b 6d65 6469 6120 7479 7065 "media type\n+001b8790: 2671 756f 743b 3c2f 7370 616e 3e29 203c ") <\n+001b87a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    || soap\n+001b8810: 5f73 656e 645f 7261 773c 2f61 3e28 3c61 _send_raw(soap, <\n+001b8850: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b8860: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b8870: 6874 6d6c 2361 6364 6131 3733 3666 6261 html#acda1736fba\n+001b8880: 6163 3037 3236 3132 3236 6265 6665 3136 ac07261226befe16\n+001b8890: 3561 3536 3831 223e 6275 663c 2f61 3e2c 5a5681\">buf,\n+001b88a0: 206c 656e 293b 203c 2f64 6976 3e0a 3c64 len);
    .\n+001b88c0: 207c 7c20 3c61 2063 6c61 7373 3d22 636f || soap_end_sen\n+001b8920: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa\n+001b8950: 703c 2f61 3e29 2920 3c2f 6469 763e 0a3c p))
    .<\n+001b8960: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b8970: 3e20 2e2e 2e20 3c73 7061 6e20 636c 6173 > ... // e\n+001b8990: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    if\n+001b89d0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_be\n+001b8a30: 6769 6e5f 7265 6376 3c2f 613e 2826 616d gin_recv(&am\n+001b8a40: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap)
    ..\n+001b8cf0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro\n+001b8d50: 793c 2f61 3e28 3c61 2063 6c61 7373 3d22 y(soa\n+001b8d80: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n+001b8da0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .
    soap_free(<\n+001b8eb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b8ec0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b8ed0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001b8ee0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int so\n+001b9100: 6170 5f50 4f53 5428 7374 7275 6374 2073 ap_POST(struct s\n+001b9110: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+001b9120: 2063 6861 7220 2a65 6e64 706f 696e 742c char *endpoint,\n+001b9130: 2063 6f6e 7374 2063 6861 7220 2a61 6374 const char *act\n+001b9140: 696f 6e2c 2063 6f6e 7374 2063 6861 7220 ion, const char \n+001b9150: 2a74 7970 6529 3c2f 6469 763e 3c64 6976 *type)
    H\n+001b9170: 5454 5020 504f 5354 2063 6f6e 7465 6e74 TTP POST content\n+001b9180: 2074 6f20 7365 7276 6572 2e3c 2f64 6976 to server.
    .
    <\n+001b91b0: 703e 5369 6d69 6c61 726c 792c 203c 636f p>Similarly, soap_PUT
    , \n+001b9250: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_PATCH, and <\n+001b92e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+001b9360: 5f44 454c 4554 453c 2f61 3e3c 2f63 6f64 _DELETE commands are \n+001b9380: 7072 6f76 6964 6564 2066 6f72 2050 5554 provided for PUT\n+001b9390: 2c20 5041 5443 482c 2061 6e64 2044 454c , PATCH, and DEL\n+001b93a0: 4554 4520 6861 6e64 6c69 6e67 2e3c 2f70 ETE handling..

    To support \n+001b93c0: 4854 5450 2070 6970 656c 696e 696e 6720 HTTP pipelining \n+001b93d0: 7765 2075 7365 2074 6865 203c 636f 6465 we use the http_pi\n+001b9470: 7065 3c2f 613e 3c2f 636f 6465 3e20 706c pe pl\n+001b9480: 7567 696e 2c20 7768 6963 6820 6361 6e20 ugin, which can \n+001b9490: 6265 2075 7365 6420 6174 2074 6865 2073 be used at the s\n+001b94a0: 6572 7665 7220 7369 6465 2074 6f20 656e erver side to en\n+001b94b0: 6162 6c65 2048 5454 5020 7069 7065 6c69 able HTTP pipeli\n+001b94c0: 6e69 6e67 2061 7574 6f6d 6174 6963 616c ning automatical\n+001b94d0: 6c79 2c20 7768 656e 2072 6567 6973 7465 ly, when registe\n+001b94e0: 7265 642e 2054 6865 2070 6c75 6769 6e20 red. The plugin \n+001b94f0: 6361 6e20 616c 736f 2062 6520 7573 6564 can also be used\n+001b9500: 2061 7420 7468 6520 636c 6965 6e74 2073 at the client s\n+001b9510: 6964 652c 2074 686f 7567 6820 7468 6973 ide, though this\n+001b9520: 2069 7320 6f6e 6c79 206e 6563 6573 7361 is only necessa\n+001b9530: 7279 2069 6e20 7363 656e 6172 696f 7320 ry in scenarios \n+001b9540: 7468 6174 2072 6571 7569 7265 2074 6865 that require the\n+001b9550: 2063 6c69 656e 7420 746f 2072 6563 6569 client to recei\n+001b9560: 7665 206d 756c 7469 706c 6520 6d65 7373 ve multiple mess\n+001b9570: 6167 6573 2077 6974 686f 7574 2069 6e74 ages without int\n+001b9580: 6572 6d69 7474 656e 6420 7365 6e64 732c ermittend sends,\n+001b9590: 2069 2e65 2e20 6d75 6c74 6970 6c65 2073 i.e. multiple s\n+001b95a0: 656e 6473 2066 6f6c 6c6f 7765 6420 6279 ends followed by\n+001b95b0: 206d 756c 7469 706c 6520 7265 6365 6976 multiple receiv\n+001b95c0: 6573 2062 7920 7468 6520 7361 6d65 2074 es by the same t\n+001b95d0: 6872 6561 6420 7573 696e 6720 7468 6520 hread using the \n+001b95e0: 7361 6d65 203c 636f 6465 3e3c 6120 636c same soap<\n+001b9640: 2f63 6f64 653e 2063 6f6e 7465 7874 2e20 /code> context. \n+001b9650: 486f 7765 7665 722c 2063 6c69 656e 7473 However, clients\n+001b9660: 2073 686f 756c 6420 7573 6520 6d75 6c74 should use mult\n+001b9670: 6970 6c65 2074 6872 6561 6473 2077 6865 iple threads whe\n+001b9680: 6e20 4854 5450 2070 6970 656c 696e 696e n HTTP pipelinin\n+001b9690: 6720 6973 2075 7365 6420 746f 2070 7265 g is used to pre\n+001b96a0: 7665 6e74 2062 6c6f 636b 696e 672e 2053 vent blocking. S\n+001b96b0: 6565 2074 6865 203c 656d 3e3c 636f 6465 ee the gsoap/samples/a\n+001b96d0: 7379 6e63 3c2f 636f 6465 3e3c 2f65 6d3e sync\n+001b96e0: 2066 6f6c 6465 7220 696e 2074 6865 2067 folder in the g\n+001b96f0: 534f 4150 2070 6163 6b61 6765 2066 6f72 SOAP package for\n+001b9700: 2065 7870 6c61 6e61 7469 6f6e 2061 6e64 explanation and\n+001b9710: 2065 7861 6d70 6c65 732e 3c2f 703e 0a3c examples.

    .<\n+001b9720: 703e 5365 6520 616c 736f 203c 636f 6465 p>See also http_post\n+001b97c0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and http_p\n+001b9860: 6970 653c 2f61 3e3c 2f63 6f64 653e 2e3c ipe.<\n+001b9870: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to \n+001b9890: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content\n+001b98a0: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

    .

    .The HTTP \n+001b98e0: 6469 6765 7374 2061 7574 6865 6e74 6963 digest authentic\n+001b98f0: 6174 696f 6e20 706c 7567 696e 3c2f 6833 ation plugin.

    The HTTP di\n+001b9910: 6765 7374 2061 7574 6865 6e74 6963 6174 gest authenticat\n+001b9920: 696f 6e20 706c 7567 696e 2065 6e61 626c ion plugin enabl\n+001b9930: 6573 2061 206d 6f72 6520 7365 6375 7265 es a more secure\n+001b9940: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+001b9950: 7363 6865 6d65 2063 6f6d 7061 7265 6420 scheme compared \n+001b9960: 746f 2062 6173 6963 2061 7574 6865 6e74 to basic authent\n+001b9970: 6963 6174 696f 6e2e 2048 5454 5020 6261 ication. HTTP ba\n+001b9980: 7369 6320 6175 7468 656e 7469 6361 7469 sic authenticati\n+001b9990: 6f6e 2073 656e 6473 2075 6e65 6e63 7279 on sends unencry\n+001b99a0: 7074 6564 2075 7365 7269 6473 2061 6e64 pted userids and\n+001b99b0: 2070 6173 7377 6f72 6473 206f 7665 7220 passwords over \n+001b99c0: 7468 6520 6e65 742c 2077 6869 6c65 2064 the net, while d\n+001b99d0: 6967 6573 7420 6175 7468 656e 7469 6361 igest authentica\n+001b99e0: 7469 6f6e 2064 6f65 7320 6e6f 7420 6578 tion does not ex\n+001b99f0: 6368 616e 6765 2070 6173 7377 6f72 6473 change passwords\n+001b9a00: 2062 7574 2065 7863 6861 6e67 6573 2063 but exchanges c\n+001b9a10: 6865 636b 7375 6d73 206f 6620 7061 7373 hecksums of pass\n+001b9a20: 776f 7264 7320 2861 6e64 206f 7468 6572 words (and other\n+001b9a30: 2064 6174 6120 7375 6368 2061 7320 6e6f data such as no\n+001b9a40: 6e63 6573 2074 6f20 6176 6f69 6420 7265 nces to avoid re\n+001b9a50: 706c 6179 2061 7474 6163 6b73 292e 2046 play attacks). F\n+001b9a60: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n+001b9a70: 2070 6c65 6173 6520 7365 6520 5246 4320 please see RFC \n+001b9a80: 3236 3137 2e3c 2f70 3e0a 3c70 3e54 6865 2617.

    .

    The\n+001b9a90: 2048 5454 5020 6469 6765 7374 2061 7574 HTTP digest aut\n+001b9aa0: 6865 6e74 6963 6174 696f 6e20 6361 6e20 hentication can \n+001b9ab0: 6265 2075 7365 6420 6e65 7874 2074 6f20 be used next to \n+001b9ac0: 7468 6520 6275 696c 742d 696e 2062 6173 the built-in bas\n+001b9ad0: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio\n+001b9ae0: 6e2c 206f 7220 6261 7369 6320 6175 7468 n, or basic auth\n+001b9af0: 656e 7469 6361 7469 6f6e 2063 616e 2062 entication can b\n+001b9b00: 6520 7265 6a65 6374 6564 2074 6f20 7469 e rejected to ti\n+001b9b10: 6768 7465 6e20 7365 6375 7269 7479 2e20 ghten security. \n+001b9b20: 5468 6520 7365 7276 6572 206d 7573 7420 The server must \n+001b9b30: 6861 7665 2061 2064 6174 6162 6173 6520 have a database \n+001b9b40: 7769 7468 2075 7365 7269 6427 7320 616e with userid's an\n+001b9b50: 6420 7061 7373 776f 7264 7320 2869 6e20 d passwords (in \n+001b9b60: 706c 6169 6e20 7465 7874 2066 6f72 6d29 plain text form)\n+001b9b70: 2e20 5468 6520 636c 6965 6e74 2c20 7768 . The client, wh\n+001b9b80: 656e 2063 6861 6c6c 656e 6765 6420 6279 en challenged by\n+001b9b90: 2074 6865 2073 6572 7665 722c 2063 6865 the server, che\n+001b9ba0: 636b 7320 7468 6520 6175 7468 656e 7469 cks the authenti\n+001b9bb0: 6361 7469 6f6e 2072 6561 6c6d 2070 726f cation realm pro\n+001b9bc0: 7669 6465 6420 6279 2074 6865 2073 6572 vided by the ser\n+001b9bd0: 7665 7220 616e 6420 7365 7473 2074 6865 ver and sets the\n+001b9be0: 2075 7365 7269 6420 616e 6420 7061 7373 userid and pass\n+001b9bf0: 776f 7264 7320 666f 7220 6469 6765 7374 words for digest\n+001b9c00: 2061 7574 6865 6e74 6963 6174 696f 6e2e authentication.\n+001b9c10: 2054 6865 2063 6c69 656e 7420 6170 706c The client appl\n+001b9c20: 6963 6174 696f 6e20 6361 6e20 7465 6d70 ication can temp\n+001b9c30: 6f72 6172 696c 7920 7374 6f72 6520 7468 orarily store th\n+001b9c40: 6520 7573 6572 6964 2061 6e64 2070 6173 e userid and pas\n+001b9c50: 7377 6f72 6420 666f 7220 6120 7365 7175 sword for a sequ\n+001b9c60: 656e 6365 206f 6620 6d65 7373 6167 6520 ence of message \n+001b9c70: 6578 6368 616e 6765 7320 7769 7468 2074 exchanges with t\n+001b9c80: 6865 2073 6572 7665 722c 2077 6869 6368 he server, which\n+001b9c90: 2069 7320 6661 7374 6572 2074 6861 6e20 is faster than \n+001b9ca0: 7265 7065 6174 6564 2061 7574 686f 7269 repeated authori\n+001b9cb0: 7a61 7469 6f6e 2063 6861 6c6c 656e 6765 zation challenge\n+001b9cc0: 7320 616e 6420 6175 7468 656e 7469 6361 s and authentica\n+001b9cd0: 7469 6f6e 2072 6573 706f 6e73 6573 2e3c tion responses.<\n+001b9ce0: 2f70 3e0a 3c70 3e41 7420 7468 6520 636c /p>.

    At the cl\n+001b9cf0: 6965 6e74 2073 6964 652c 2074 6865 2070 ient side, the p\n+001b9d00: 6c75 6769 6e20 6973 2072 6567 6973 7465 lugin is registe\n+001b9d10: 7265 6420 616e 6420 7365 7276 6963 6520 red and service \n+001b9d20: 696e 766f 6361 7469 6f6e 7320 6172 6520 invocations are \n+001b9d30: 6368 6563 6b65 6420 666f 7220 6175 7468 checked for auth\n+001b9d40: 6f72 697a 6174 696f 6e20 6368 616c 6c65 orization challe\n+001b9d50: 6e67 6573 2028 4854 5450 2065 7272 6f72 nges (HTTP error\n+001b9d60: 2063 6f64 6520 3430 3129 2e20 5768 656e code 401). When\n+001b9d70: 2074 6865 2073 6572 7665 7220 6368 616c the server chal\n+001b9d80: 6c65 6e67 6573 2074 6865 2063 6c69 656e lenges the clien\n+001b9d90: 742c 2074 6865 2063 6c69 656e 7420 7368 t, the client sh\n+001b9da0: 6f75 6c64 2073 6574 2074 6865 2075 7365 ould set the use\n+001b9db0: 7269 6420 616e 6420 7061 7373 776f 7264 rid and password\n+001b9dc0: 2061 6e64 2072 6574 7279 2074 6865 2069 and retry the i\n+001b9dd0: 6e76 6f63 6174 696f 6e2e 2054 6865 2063 nvocation. The c\n+001b9de0: 6c69 656e 7420 6361 6e20 6465 7465 726d lient can determ\n+001b9df0: 696e 6520 7468 6520 7573 6572 6964 2061 ine the userid a\n+001b9e00: 6e64 2070 6173 7377 6f72 6420 6261 7365 nd password base\n+001b9e10: 6420 6f6e 2074 6865 2061 7574 6865 6e74 d on the authent\n+001b9e20: 6963 6174 696f 6e20 7265 616c 6d20 7061 ication realm pa\n+001b9e30: 7274 206f 6620 7468 6520 7365 7276 6572 rt of the server\n+001b9e40: 2773 2063 6861 6c6c 656e 6765 2e20 5468 's challenge. Th\n+001b9e50: 6520 6175 7468 656e 7469 6361 7469 6f6e e authentication\n+001b9e60: 2069 6e66 6f72 6d61 7469 6f6e 2063 616e information can\n+001b9e70: 2062 6520 7465 6d70 6f72 6172 696c 7920 be temporarily \n+001b9e80: 7361 7665 6420 666f 7220 6d75 6c74 6970 saved for multip\n+001b9e90: 6c65 2069 6e76 6f63 6174 696f 6e73 2e3c le invocations.<\n+001b9ea0: 2f70 3e0a 3c70 3e43 6c69 656e 742d 7369 /p>.

    Client-si\n+001b9eb0: 6465 2065 7861 6d70 6c65 3a3c 2f70 3e0a de example:

    .\n+001b9ec0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo\n+001b9f10: 743b 6874 7470 6461 2e68 2671 756f 743b t;httpda.h"\n+001b9f20: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+001b9f30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b9f40: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n+001b9f80: 6d61 696e 2829 3c2f 6469 763e 0a3c 6469 main()
    .{\n+001b9fa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

    .
    struct <\n+001b9fe0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b9ff0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001ba000: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001ba010: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001ba040: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+001ba0a0: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    . \n+001ba0c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if soap_re\n+001ba140: 6769 7374 6572 5f70 6c75 6769 6e3c 2f61 gister_plugin(soap, http_da)) .
    exit(E\n+001ba1b0: 5849 545f 4641 494c 5552 4529 3b20 3c73 XIT_FAILURE); // failed to\n+001ba1e0: 2072 6567 6973 7465 7220 3c2f 7370 616e register
    .
    .
    {.
    if (soap-&g\n+001ba310: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error\n+001ba360: 3c2f 613e 203d 3d20 3430 3129 203c 7370 == 401) // challenge:\n+001ba390: 2048 5454 5020 6175 7468 656e 7469 6361 HTTP authentica\n+001ba3a0: 7469 6f6e 2072 6571 7569 7265 6420 3c2f tion required
    . \n+001ba3d0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+001ba3f0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!strcmp(<\n+001ba420: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001ba430: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001ba440: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001ba450: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;auth\n+001ba4a0: 7265 616c 6d3c 2f61 3e2c 203c 6120 636c realm, authrealm)) // opt\n+001ba520: 696f 6e61 6c6c 7920 6465 7465 726d 696e ionally determin\n+001ba530: 6520 6175 7468 656e 7469 6361 7469 6f6e e authentication\n+001ba540: 2072 6561 6c6d 3c2f 7370 616e 3e3c 2f64 realm.
    {.
    struct http_da_info i\n+001ba5c0: 6e66 6f3b 203c 7370 616e 2063 6c61 7373 nfo; // to\n+001ba5e0: 2073 746f 7265 2075 7365 7269 6420 616e store userid an\n+001ba5f0: 6420 7061 7373 7764 203c 2f73 7061 6e3e d passwd \n+001ba600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001ba620: 2068 7474 705f 6461 5f73 6176 6528 3c61 http_da_save(soap, &\n+001ba660: 616d 703b 696e 666f 2c20 6175 7468 7265 amp;info, authre\n+001ba670: 616c 6d2c 2075 7365 7269 642c 2070 6173 alm, userid, pas\n+001ba680: 7377 6429 3b20 3c73 7061 6e20 636c 6173 swd); // s\n+001ba6a0: 6574 2075 7365 7269 6420 616e 6420 7061 et userid and pa\n+001ba6b0: 7373 7764 2066 6f72 2074 6869 7320 7265 sswd for this re\n+001ba6c0: 616c 6d3c 2f73 7061 6e3e 3c2f 6469 763e alm
    \n+001ba6d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (\n+001ba710: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we\n+001ba720: 626d 6574 686f 6428 3c61 2063 6c61 7373 bmethod(s\n+001ba750: 6f61 703c 2f61 3e2c 202e 2e2e 2929 203c oap, ...)) <\n+001ba760: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001ba770: 656e 7422 3e2f 2f20 7265 7472 7920 3c2f ent\">// retry
    . \n+001ba7a0: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    .\n+001ba7c0: 2020 2020 2020 2020 2020 2e2e 2e20 3c73 ... //
    ..\n+001ba900: 2020 2020 2020 2020 2020 6874 7470 5f64 http_d\n+001ba910: 615f 7265 7374 6f72 6528 3c61 2063 6c61 a_restore(soap, &\n+001ba950: 696e 666f 293b 203c 7370 616e 2063 6c61 info); // \n+001ba970: 7265 7374 6f72 6520 7573 6572 6964 2061 restore userid a\n+001ba980: 6e64 2070 6173 7377 6420 3c2f 7370 616e nd passwd
    .
    \n+001ba9b0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n+001ba9d0: 3c2f 7370 616e 3e20 2821 736f 6170 5f63 (!soap_c\n+001ba9e0: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho\n+001ba9f0: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap, ...)) /\n+001baa40: 2f20 616e 6f74 6865 7220 6361 6c6c 203c / another call <\n+001baa50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001baa70: 2020 2020 2020 2020 2020 202e 2e2e 203c ... <\n+001baa80: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001baa90: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    }\n+001baac0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }\n+001baae0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    }
    \n+001bab20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    http_da_rel\n+001bab40: 6561 7365 283c 6120 636c 6173 733d 2263 ease(soap\n+001bab70: 3c2f 613e 2c20 2661 6d70 3b69 6e66 6f29 , &info)\n+001bab80: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // to re\n+001baba0: 6d6f 7665 2061 6c6c 2075 7365 7269 6420 move all userid \n+001babb0: 616e 6420 7061 7373 7764 3c2f 7370 616e and passwd
    ..
    soap_end(\n+001bacf0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001bad20: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_free(<\n+001bada0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001badb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001badc0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001badd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n+001badf0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    This \n+001bae10: 636f 6465 2073 7570 706f 7274 7320 626f code supports bo\n+001bae20: 7468 2062 6173 6963 2061 6e64 2064 6967 th basic and dig\n+001bae30: 6573 7420 6175 7468 656e 7469 6361 7469 est authenticati\n+001bae40: 6f6e 2e3c 2f70 3e0a 3c70 3e54 6865 2073 on.

    .

    The s\n+001bae50: 6572 7665 7220 6361 6e20 6368 616c 6c65 erver can challe\n+001bae60: 6e67 6520 6120 636c 6965 6e74 2075 7369 nge a client usi\n+001bae70: 6e67 2048 5454 5020 636f 6465 2034 3031 ng HTTP code 401\n+001bae80: 2e20 5769 7468 2074 6865 2070 6c75 6769 . With the plugi\n+001bae90: 6e2c 2048 5454 5020 6469 6765 7374 2061 n, HTTP digest a\n+001baea0: 7574 6865 6e74 6963 6174 696f 6e20 6368 uthentication ch\n+001baeb0: 616c 6c65 6e67 6573 2061 7265 2073 656e allenges are sen\n+001baec0: 642e 2057 6974 686f 7574 2074 6865 2070 d. Without the p\n+001baed0: 6c75 6769 6e2c 2062 6173 6963 2061 7574 lugin, basic aut\n+001baee0: 6865 6e74 6963 6174 696f 6e20 6368 616c hentication chal\n+001baef0: 6c65 6e67 6573 2061 7265 2073 656e 642e lenges are send.\n+001baf00: 3c2f 703e 0a3c 703e 4561 6368 2073 6572

    .

    Each ser\n+001baf10: 7665 7220 6d65 7468 6f64 2063 616e 2069 ver method can i\n+001baf20: 6d70 6c65 6d65 6e74 2061 7574 6865 6e74 mplement authent\n+001baf30: 6963 6174 696f 6e20 6173 2064 6573 6972 ication as desir\n+001baf40: 6564 2061 6e64 206d 6179 2065 6e66 6f72 ed and may enfor\n+001baf50: 6365 2064 6967 6573 7420 6175 7468 656e ce digest authen\n+001baf60: 7469 6361 7469 6f6e 206f 7220 6d61 7920 tication or may \n+001baf70: 616c 736f 2061 6363 6570 7420 6261 7369 also accept basi\n+001baf80: 6320 6175 7468 656e 7469 6361 7469 6f6e c authentication\n+001baf90: 2072 6573 706f 6e73 6573 2e20 546f 2076 responses. To v\n+001bafa0: 6572 6966 7920 6469 6765 7374 2061 7574 erify digest aut\n+001bafb0: 6865 6e74 6963 6174 696f 6e20 7265 7370 hentication resp\n+001bafc0: 6f6e 7365 732c 2074 6865 2073 6572 7665 onses, the serve\n+001bafd0: 7220 7368 6f75 6c64 2063 6f6d 7075 7465 r should compute\n+001bafe0: 2061 6e64 2063 6f6d 7061 7265 2074 6865 and compare the\n+001baff0: 2063 6865 636b 7375 6d73 2075 7369 6e67 checksums using\n+001bb000: 2074 6865 2070 6c75 6769 6e27 7320 3c63 the plugin's http_da_veri\n+001bb020: 6679 5f70 6f73 743c 2f63 6f64 653e 2066 fy_post f\n+001bb030: 756e 6374 696f 6e20 666f 7220 4854 5450 unction for HTTP\n+001bb040: 2050 4f53 5420 7265 7175 6573 7473 2028 POST requests (\n+001bb050: 616e 6420 3c63 6f64 653e 6874 7470 5f64 and http_d\n+001bb060: 615f 7665 7269 6679 5f67 6574 3c2f 636f a_verify_get for HTTP GET\n+001bb080: 2072 6571 7565 7374 7320 7769 7468 2074 requests with t\n+001bb090: 6865 2048 5454 5020 4745 5420 706c 7567 he HTTP GET plug\n+001bb0a0: 696e 2920 6173 2066 6f6c 6c6f 7773 3a3c in) as follows:<\n+001bb0b0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #include \n+001bb100: 2671 756f 743b 6874 7470 6461 2e68 2671 "httpda.h&q\n+001bb110: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; .
    .<\n+001bb150: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bb160: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
    \n+001bb180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n+001bb1b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bb1c0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n+001bb230: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n+001bb290: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
    \n+001bb2a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+001bb2d0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (so\n+001bb330: 6170 5f72 6567 6973 7465 725f 706c 7567 ap_register_plug\n+001bb340: 696e 3c2f 613e 283c 6120 636c 6173 733d in(so\n+001bb370: 6170 3c2f 613e 2c20 6874 7470 5f64 6129 ap, http_da)\n+001bb380: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    e\n+001bb3a0: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n+001bb3b0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // fail\n+001bb3d0: 6564 2074 6f20 7265 6769 7374 6572 203c ed to register <\n+001bb3e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001bb400: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // us\n+001bb420: 6520 736f 6170 5f62 696e 6420 616e 6420 e soap_bind and \n+001bb430: 736f 6170 5f61 6363 6570 7420 696e 2061 soap_accept in a\n+001bb440: 2028 6d75 6c74 692d 7468 7265 6164 6564 (multi-threaded\n+001bb450: 2920 7365 7276 6963 6520 6c6f 6f70 3c2f ) service loop
    . \n+001bb480: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_serve<\n+001bb500: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001bb530: 2f61 3e29 293c 2f64 6976 3e0a 3c64 6976 /a>))
    . \n+001bb550: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n+001bb5b0: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap, stder\n+001bb5f0: 7229 3b3c 2f64 6976 3e0a 3c64 6976 2063 r);
    .
    ..\n+001bb610: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    ..
    soap_end(\n+001bb760: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001bb790: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_free(<\n+001bb810: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001bb820: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001bb830: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001bb840: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n+001bb860: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int ns__webmethod(\n+001bb8c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001bb910: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001bb940: 3c2f 613e 2c20 2e2e 2e29 203c 2f64 6976 , ...) .
    {
    . \n+001bb980: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap\n+001bb9d0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->userid &am\n+001bba30: 703b 2661 6d70 3b20 3c61 2063 6c61 7373 p;& s\n+001bba60: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->passwd)\n+001bbac0: 203c 7370 616e 2063 6c61 7373 3d22 636f // client\n+001bbae0: 2075 7365 6420 6261 7369 6320 6175 7468 used basic auth\n+001bbaf0: 656e 7469 6361 7469 6f6e 203c 2f73 7061 entication
    .
    {.
    // may decide n\n+001bbb60: 6f74 2074 6f20 6861 6e64 6c65 2c20 6275 ot to handle, bu\n+001bbb70: 7420 6966 206f 6b20 7468 656e 2067 6f20 t if ok then go \n+001bbb80: 6168 6561 6420 616e 6420 636f 6d70 6172 ahead and compar\n+001bbb90: 6520 696e 666f 3a20 3c2f 7370 616e 3e3c e info: <\n+001bbba0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if \n+001bbbe0: 2821 7374 7263 6d70 283c 6120 636c 6173 (!strcmp(\n+001bbc10: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->userid\n+001bbc70: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , useri\n+001bbcc0: 643c 2f61 3e29 2026 616d 703b 2661 6d70 d) &&\n+001bbcd0: 3b20 2173 7472 636d 7028 3c61 2063 6c61 ; !strcmp(soap->passwd, pass\n+001bbdb0: 7764 3c2f 613e 2929 203c 2f64 6976 3e0a wd))
    .\n+001bbdc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .\n+001bbdf0: 2020 2020 2020 2e2e 2e20 3c73 7061 6e20 ... \n+001bbe10: 2f2f 2068 616e 646c 6520 7265 7175 6573 // handle reques\n+001bbe20: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
    .<\n+001bbe30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bbe40: 3e20 2020 2020 203c 7370 616e 2063 6c61 > return <\n+001bbe70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001bbe80: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001bbe90: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n+001bbea0: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n+001bbeb0: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n+001bbec0: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0\">SOAP_OK; \n+001bbed0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } <\n+001bbef0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    else if\n+001bbf70: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->a\n+001bbff0: 7574 6872 6561 6c6d 3c2f 613e 2026 616d uthrealm &am\n+001bc000: 703b 2661 6d70 3b20 3c61 2063 6c61 7373 p;& s\n+001bc030: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->userid)\n+001bc090: 203c 7370 616e 2063 6c61 7373 3d22 636f // Digest\n+001bc0b0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+001bc0c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+001bc0e0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    ..
    <\n+001bc1d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bc1e0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!strcmp(soap->\n+001bc230: 3c61 2063 6c61 7373 3d22 636f 6465 2220 authrea\n+001bc280: 6c6d 3c2f 613e 2c20 3c61 2063 6c61 7373 lm, authrealm) \n+001bc2e0: 2661 6d70 3b26 616d 703b 2021 7374 7263 && !strc\n+001bc2f0: 6d70 283c 6120 636c 6173 733d 2263 6f64 mp(soap->\n+001bc370: 7573 6572 6964 3c2f 613e 2c20 3c61 2063 userid, userid)\n+001bc3d0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {\n+001bc3f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+001bc410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bc420: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!http_da_ver\n+001bc440: 6966 795f 706f 7374 283c 6120 636c 6173 ify_post(\n+001bc470: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, passwd)) \n+001bc4d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {\n+001bc4f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+001bc510: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // ha\n+001bc530: 6e64 6c65 2072 6571 7565 7374 3c2f 7370 ndle request
    .
    \n+001bc560: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n+001bc580: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+001bc5e0: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    } .
    } .
    }
    \n+001bc650: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n+001bc690: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->authrealm \n+001bc6f0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = authr\n+001bc740: 6561 6c6d 3c2f 613e 3b20 3c73 7061 6e20 ealm; \n+001bc760: 2f2f 2073 6574 2072 6561 6c6d 2066 6f72 // set realm for\n+001bc770: 2063 6861 6c6c 656e 6765 203c 2f73 7061 challenge
    .
    return 401; \n+001bc7e0: 2f2f 204e 6f74 2061 7574 686f 7269 7a65 // Not authorize\n+001bc7f0: 642c 2063 6861 6c6c 656e 6765 2064 6967 d, challenge dig\n+001bc800: 6573 7420 6175 7468 656e 7469 6361 7469 est authenticati\n+001bc810: 6f6e 203c 2f73 7061 6e3e 3c2f 6469 763e on
    \n+001bc820: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+001bd290: 3c70 3e54 6869 7320 696d 706f 7274 7320

    This imports \n+001bd2a0: 7468 6520 534f 4150 2068 6561 6465 7220 the SOAP header \n+001bd2b0: 656c 656d 656e 7473 2072 6571 7569 7265 elements require\n+001bd2c0: 6420 6279 2057 532d 4164 6472 6573 7369 d by WS-Addressi\n+001bd2d0: 6e67 2e3c 2f70 3e0a 3c70 3e46 6f72 206d ng.

    .

    For m\n+001bd2e0: 6f72 6520 6465 7461 696c 732c 2073 6565 ore details, see\n+001bd2f0: 2074 6865 203c 6120 6872 6566 3d22 2e2e the WS-Addr\n+001bd320: 6573 7369 6e67 2070 6c75 6769 6e3c 2f61 essing plugin documentation.\n+001bd340: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+001bd360: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+001bd370: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n+001bd380: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001bd390: 2069 643d 2277 7372 6d70 6c75 6769 6e22 id=\"wsrmplugin\"\n+001bd3a0: 3e3c 2f61 3e0a 5468 6520 5753 2d52 656c >.The WS-Rel\n+001bd3b0: 6961 626c 654d 6573 7361 6769 6e67 2070 iableMessaging p\n+001bd3c0: 6c75 6769 6e3c 2f68 333e 0a3c 703e 5468 lugin

    .

    Th\n+001bd3d0: 6520 706c 7567 696e 2063 6f64 6520 6973 e plugin code is\n+001bd3e0: 206c 6f63 6174 6564 2069 6e20 7468 6520 located in the \n+001bd3f0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+001bd400: 706c 7567 696e 3c2f 636f 6465 3e3c 2f65 plugin directory con\n+001bd420: 7461 696e 696e 6720 3c65 6d3e 3c63 6f64 taining wsrmapi.h and \n+001bd450: 3c63 6f64 653e 7773 726d 6170 692e 633c wsrmapi.c<\n+001bd460: 2f63 6f64 653e 3c2f 656d 3e20 2874 6f20 /code> (to \n+001bd470: 6265 2075 7365 6420 696e 2043 2061 6e64 be used in C and\n+001bd480: 2043 2b2b 292e 3c2f 703e 0a3c 703e 416c C++).

    .

    Al\n+001bd490: 736f 206e 6565 6465 6420 6172 6520 3c65 so needed are threads.\n+001bd4b0: 683c 2f63 6f64 653e 3c2f 656d 3e20 616e h an\n+001bd4c0: 6420 3c65 6d3e 3c63 6f64 653e 7468 7265 d thre\n+001bd4d0: 6164 732e 633c 2f63 6f64 653e 3c2f 656d ads.c for multi-thre\n+001bd4f0: 6164 696e 6720 616e 6420 6c6f 636b 696e ading and lockin\n+001bd500: 6720 7375 7070 6f72 742e 3c2f 703e 0a3c g support.

    .<\n+001bd510: 703e 546f 2065 6e61 626c 6520 5753 2d52 p>To enable WS-R\n+001bd520: 656c 6961 626c 654d 6573 7361 6769 6e67 eliableMessaging\n+001bd530: 2c20 7468 6520 7365 7276 6963 6520 6465 , the service de\n+001bd540: 6669 6e69 7469 6f6e 7320 6865 6164 6572 finitions header\n+001bd550: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp\n+001bd560: 7032 2073 686f 756c 6420 696e 636c 7564 p2 should includ\n+001bd570: 6520 7468 6520 666f 6c6c 6f77 696e 6720 e the following \n+001bd580: 696d 706f 7274 733a 3c2f 703e 0a3c 6469 imports:

    .
    \n+001bd5d0: 2369 6d70 6f72 7420 2671 756f 743b 696d #import "im\n+001bd5e0: 706f 7274 2f77 7372 6d2e 6826 7175 6f74 port/wsrm.h"\n+001bd5f0: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    .\n+001bd600: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #im\n+001bd630: 706f 7274 2026 7175 6f74 3b69 6d70 6f72 port "impor\n+001bd640: 742f 7773 6135 2e68 2671 756f 743b 3c2f t/wsa5.h"
    .

    This impor\n+001bd680: 7473 2074 6865 2053 4f41 5020 6865 6164 ts the SOAP head\n+001bd690: 6572 2065 6c65 6d65 6e74 7320 7265 7175 er elements requ\n+001bd6a0: 6972 6564 2062 7920 5753 2d52 656c 6961 ired by WS-Relia\n+001bd6b0: 626c 654d 6573 7361 6769 6e67 2e3c 2f70 bleMessaging..

    For more de\n+001bd6d0: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the <\n+001bd6e0: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 7773 a href=\"../../ws\n+001bd6f0: 726d 2f68 746d 6c2f 7773 726d 5f30 2e68 rm/html/wsrm_0.h\n+001bd700: 746d 6c22 3e57 532d 5265 6c69 6162 6c65 tml\">WS-Reliable\n+001bd710: 4d65 7373 6167 696e 6720 706c 7567 696e Messaging plugin\n+001bd720: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n+001bd730: 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 on.

    .

    .... \n+001bd740: 3c61 2068 7265 663d 2223 223e 4261 636b Back\n+001bd750: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con\n+001bd760: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..The WS-\n+001bd7a0: 5365 6375 7269 7479 2070 6c75 6769 6e3c Security plugin<\n+001bd7b0: 2f68 333e 0a3c 703e 5468 6520 706c 7567 /h3>.

    The plug\n+001bd7c0: 696e 2063 6f64 6520 6973 206c 6f63 6174 in code is locat\n+001bd7d0: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the gsoap/plugin\n+001bd7f0: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir\n+001bd800: 6563 746f 7279 2063 6f6e 7461 696e 696e ectory containin\n+001bd810: 6720 3c65 6d3e 3c63 6f64 653e 7773 7365 g wsse\n+001bd820: 6170 692e 683c 2f63 6f64 653e 3c2f 656d api.h and \n+001bd840: 7773 7365 6170 692e 633c 2f63 6f64 653e wsseapi.c\n+001bd850: 3c2f 656d 3e20 2874 6f20 6265 2075 7365 (to be use\n+001bd860: 6420 696e 2043 2061 6e64 2043 2b2b 292e d in C and C++).\n+001bd870: 3c2f 703e 0a3c 703e 416c 736f 206e 6565

    .

    Also nee\n+001bd880: 6465 6420 6172 653a 203c 656d 3e3c 636f ded are: smdevp.h and \n+001bd8b0: 3c63 6f64 653e 736d 6465 7670 2e63 3c2f smdevp.c for s\n+001bd8d0: 7472 6561 6d69 6e67 2058 4d4c 2073 6967 treaming XML sig\n+001bd8e0: 6e61 7475 7265 2061 6e64 206d 6573 7361 nature and messa\n+001bd8f0: 6765 2064 6967 6573 7420 656e 6769 6e65 ge digest engine\n+001bd900: 2c20 3c65 6d3e 3c63 6f64 653e 6d65 6365 , mece\n+001bd910: 7670 2e68 3c2f 636f 6465 3e3c 2f65 6d3e vp.h\n+001bd920: 2061 6e64 203c 656d 3e3c 636f 6465 3e6d and m\n+001bd930: 6563 6576 702e 633c 2f63 6f64 653e 3c2f ecevp.c for the stre\n+001bd950: 616d 696e 6720 584d 4c20 656e 6372 7970 aming XML encryp\n+001bd960: 7469 6f6e 2065 6e67 696e 652c 203c 656d tion engine, threads.h\n+001bd980: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n+001bd990: 203c 656d 3e3c 636f 6465 3e74 6872 6561 threa\n+001bd9a0: 6473 2e63 3c2f 636f 6465 3e3c 2f65 6d3e ds.c\n+001bd9b0: 2066 6f72 206d 756c 7469 2d74 6872 6561 for multi-threa\n+001bd9c0: 6469 6e67 2061 6e64 206c 6f63 6b69 6e67 ding and locking\n+001bd9d0: 2073 7570 706f 7274 2e3c 2f70 3e0a 3c70 support.

    .To enable WS-Se\n+001bd9f0: 6375 7269 7479 2c20 7468 6520 7365 7276 curity, the serv\n+001bda00: 6963 6520 6465 6669 6e69 7469 6f6e 7320 ice definitions \n+001bda10: 6865 6164 6572 2066 696c 6520 666f 7220 header file for \n+001bda20: 736f 6170 6370 7032 2073 686f 756c 6420 soapcpp2 should \n+001bda30: 696e 636c 7564 6520 7468 6520 666f 6c6c include the foll\n+001bda40: 6f77 696e 6720 696d 706f 7274 733a 3c2f owing imports:.
    #import &q\n+001bdaa0: 756f 743b 696d 706f 7274 2f77 7373 652e uot;import/wsse.\n+001bdab0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 3c2f h".

    T\n+001bdae0: 6869 7320 696d 706f 7274 7320 7468 6520 his imports the \n+001bdaf0: 534f 4150 2068 6561 6465 7220 656c 656d SOAP header elem\n+001bdb00: 656e 7473 2072 6571 7569 7265 6420 6279 ents required by\n+001bdb10: 2057 532d 5365 6375 7269 7479 2e3c 2f70 WS-Security..

    For more de\n+001bdb30: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the <\n+001bdb40: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 7773 a href=\"../../ws\n+001bdb50: 7365 2f68 746d 6c2f 7773 7365 2e68 746d se/html/wsse.htm\n+001bdb60: 6c22 3e57 532d 5365 6375 7269 7479 2070 l\">WS-Security p\n+001bdb70: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume\n+001bdb80: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

    .

    \n+001bdb90: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o\n+001bdbb0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Th\n+001bdbf0: 6520 5753 2d44 6973 636f 7665 7279 2070 e WS-Discovery p\n+001bdc00: 6c75 6769 6e3c 2f68 333e 0a3c 703e 4261 lugin

    .

    Ba\n+001bdc10: 7369 6361 6c6c 792c 2074 6f20 6164 6420 sically, to add \n+001bdc20: 5753 2d44 6973 636f 7665 7279 2073 7570 WS-Discovery sup\n+001bdc30: 706f 7274 2074 6865 2066 6f6c 6c6f 7769 port the followi\n+001bdc40: 6e67 2065 7665 6e74 2068 616e 646c 6572 ng event handler\n+001bdc50: 7320 6d75 7374 2062 6520 6465 6669 6e65 s must be define\n+001bdc60: 6420 616e 6420 6c69 6e6b 6564 3a3c 2f70 d and linked:.

    void \n+001bdcc0: 7773 6464 5f65 7665 6e74 5f48 656c 6c6f wsdd_event_Hello\n+001bdcd0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001bdd20: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001bdd50: 703c 2f61 3e2c 203c 2f64 6976 3e0a 3c64 p,
    .\n+001bdd70: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n+001bdd90: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int I\n+001bddc0: 6e73 7461 6e63 6549 642c 203c 2f64 6976 nstanceId, .
    const<\n+001bde00: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Se\n+001bde30: 7175 656e 6365 4964 2c20 3c2f 6469 763e quenceId,
    \n+001bde40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    uns\n+001bde70: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int MessageNumber,\n+001bdeb0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001bdee0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *MessageID, <\n+001bdf20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n+001bdf50: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001bdf80: 202a 5265 6c61 7465 7354 6f2c 203c 2f64 *RelatesTo, .
    cons\n+001bdfc0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bdff0: 456e 6470 6f69 6e74 5265 6665 7265 6e63 EndpointReferenc\n+001be000: 652c 203c 2f64 6976 3e0a 3c64 6976 2063 e,
    .
    const <\n+001be040: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be050: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *Types, .
    cons\n+001be0a0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001be0d0: 5363 6f70 6573 2c20 3c2f 6469 763e 0a3c Scopes,
    .<\n+001be0e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001be0f0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n+001be130: 6172 3c2f 7370 616e 3e20 2a4d 6174 6368 ar *Match\n+001be140: 4279 2c20 3c2f 6469 763e 0a3c 6469 7620 By,
    .
    const \n+001be180: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *XAddrs, <\n+001be1b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned int<\n+001be210: 2f73 7061 6e3e 204d 6574 6164 6174 6156 /span> MetadataV\n+001be220: 6572 7369 6f6e 293c 2f64 6976 3e0a 3c2f ersion)
    .
    void wsdd_event_By\n+001be2a0: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa\n+001be2f0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001be320: 6170 3c2f 613e 2c20 3c2f 6469 763e 0a3c ap,
    .<\n+001be330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001be340: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >unsig\n+001be360: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned int \n+001be390: 496e 7374 616e 6365 4964 2c20 3c2f 6469 InstanceId, .
    const\n+001be3d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *S\n+001be400: 6571 7565 6e63 6549 642c 203c 2f64 6976 equenceId, .
    un\n+001be440: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed int MessageNumber\n+001be480: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *MessageID, \n+001be4f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n+001be520: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *RelatesTo, .
    con\n+001be590: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001be5c0: 2a45 6e64 706f 696e 7452 6566 6572 656e *EndpointReferen\n+001be5d0: 6365 2c20 3c2f 6469 763e 0a3c 6469 7620 ce,
    .
    const \n+001be610: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *Types, .
    con\n+001be670: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001be6a0: 2a53 636f 7065 732c 203c 2f64 6976 3e0a *Scopes,
    .\n+001be6b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n+001be700: 6861 723c 2f73 7061 6e3e 202a 4d61 7463 har *Matc\n+001be710: 6842 792c 203c 2f64 6976 3e0a 3c64 6976 hBy,
    .const
    \n+001be750: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001be770: 2f73 7061 6e3e 202a 5841 6464 7273 2c20 /span> *XAddrs, \n+001be780: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    unsigned int\n+001be7e0: 3c2f 7370 616e 3e20 4d65 7461 6461 7461 Metadata\n+001be7f0: 5665 7273 696f 6e29 3c2f 6469 763e 0a3c Version)
    .<\n+001be800: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>
    so\n+001be840: 6170 5f77 7364 645f 6d6f 6465 2077 7364 ap_wsdd_mode wsd\n+001be850: 645f 6576 656e 745f 5072 6f62 6528 3c73 d_event_Probe(struct soap *soap,
    .
    const \n+001be920: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *MessageID\n+001be950: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *ReplyTo, .
    con\n+001be9f0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001bea20: 2a54 7970 6573 2c20 3c2f 6469 763e 0a3c *Types,
    .<\n+001bea30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bea40: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n+001bea80: 6172 3c2f 7370 616e 3e20 2a53 636f 7065 ar *Scope\n+001bea90: 732c 203c 2f64 6976 3e0a 3c64 6976 2063 s,
    .
    const <\n+001bead0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001beae0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *MatchBy, <\n+001beb00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n+001beb30: 7275 6374 3c2f 7370 616e 3e20 7773 6464 ruct wsdd\n+001beb40: 5f5f 5072 6f62 654d 6174 6368 6573 5479 __ProbeMatchesTy\n+001beb50: 7065 202a 5072 6f62 654d 6174 6368 6573 pe *ProbeMatches\n+001beb60: 293c 2f64 6976 3e0a 3c2f 6469 763e 3c21 )
    .
    <\n+001beb80: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001beb90: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    void wsd\n+001bebd0: 645f 6576 656e 745f 5072 6f62 654d 6174 d_event_ProbeMat\n+001bebe0: 6368 6573 283c 7370 616e 2063 6c61 7373 ches(struc\n+001bec00: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+001bec30: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, .
    un\n+001beca0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed int InstanceId, <\n+001bece0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n+001bed10: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001bed40: 202a 5365 7175 656e 6365 4964 2c20 3c2f *SequenceId, .
    unsigned\n+001bed90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int MessageNum\n+001bedc0: 6265 722c 203c 2f64 6976 3e0a 3c64 6976 ber,
    .const\n+001bee00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001bee20: 2f73 7061 6e3e 202a 4d65 7373 6167 6549 /span> *MessageI\n+001bee30: 442c 203c 2f64 6976 3e0a 3c64 6976 2063 D,
    .
    const <\n+001bee70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bee80: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *RelatesTo,\n+001beea0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n+001beed0: 7374 7275 6374 3c2f 7370 616e 3e20 7773 struct ws\n+001beee0: 6464 5f5f 5072 6f62 654d 6174 6368 6573 dd__ProbeMatches\n+001beef0: 5479 7065 202a 5072 6f62 654d 6174 6368 Type *ProbeMatch\n+001bef00: 6573 293c 2f64 6976 3e0a 3c2f 6469 763e es)
    .
    \n+001bef10: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d .<\n+001bf3b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bf3c0: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype\">unsigne\n+001bf3d0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d int Me\n+001bf400: 7373 6167 654e 756d 6265 722c 203c 2f64 ssageNumber, .
    cons\n+001bf440: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bf470: 4d65 7373 6167 6549 442c 203c 2f64 6976 MessageID, .
    const<\n+001bf4b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Re\n+001bf4e0: 6c61 7465 7354 6f2c 203c 2f64 6976 3e0a latesTo,
    .\n+001bf4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n+001bf540: 6861 723c 2f73 7061 6e3e 202a 456e 6470 har *Endp\n+001bf550: 6f69 6e74 5265 6665 7265 6e63 652c 203c ointReference, <\n+001bf560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co\n+001bf590: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001bf5c0: 202a 5479 7065 732c 203c 2f64 6976 3e0a *Types,
    .\n+001bf5d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n+001bf620: 6861 723c 2f73 7061 6e3e 202a 5363 6f70 har *Scop\n+001bf630: 6573 2c20 3c2f 6469 763e 0a3c 6469 7620 es,
    .
    const \n+001bf670: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *MatchBy, \n+001bf6a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n+001bf6d0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *XAddrs, .
    un\n+001bf740: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed int MetadataVersi\n+001bf780: 6f6e 293c 2f64 6976 3e0a 3c2f 6469 763e on)
    .
    \n+001bf790: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    which\n+001bfae0: 2077 696c 6c20 6c69 7374 656e 2066 6f72 will listen for\n+001bfaf0: 203c 636f 6465 3e74 696d 656f 7574 3c2f timeout seconds to\n+001bfb10: 2069 6e62 6f75 6e64 2057 532d 4469 7363 inbound WS-Disc\n+001bfb20: 6f76 6572 7920 6d65 7373 6167 6573 206f overy messages o\n+001bfb30: 6e20 6120 706f 7274 2061 6e64 2064 6973 n a port and dis\n+001bfb40: 7061 7463 6865 7320 7468 656d 2074 6f20 patches them to \n+001bfb50: 7468 6520 6576 656e 7420 6861 6e64 6c65 the event handle\n+001bfb60: 7273 2e20 4120 6e65 6761 7469 7665 203c rs. A negative <\n+001bfb70: 636f 6465 3e74 696d 656f 7574 3c2f 636f code>timeout value specif\n+001bfb90: 6965 7320 7468 6520 7469 6d65 6f75 7420 ies the timeout \n+001bfba0: 696e 206d 6963 726f 7365 636f 6e64 732e in microseconds.\n+001bfbb0: 3c2f 703e 0a3c 703e 466f 7220 6d6f 7265

    .

    For more\n+001bfbc0: 2064 6574 6169 6c73 2c20 7365 6520 7468 details, see th\n+001bfbd0: 6520 3c61 2068 7265 663d 222e 2e2f 2e2e e WS-Disco\n+001bfc00: 7665 7279 2070 6c75 6769 6e3c 2f61 3e20 very plugin \n+001bfc10: 646f 6375 6d65 6e74 6174 696f 6e2e 3c2f documentation..

    .Cop\n+001bfc50: 7972 6967 6874 3c2f 6831 3e0a 3c70 3e3c yright

    .

    <\n+001bfc60: 656d 3e43 6f70 7972 6967 6874 2028 6329 em>Copyright (c)\n+001bfc70: 2032 3030 302d 3230 3230 2c20 526f 6265 2000-2020, Robe\n+001bfc80: 7274 2041 2e20 7661 6e20 456e 6765 6c65 rt A. van Engele\n+001bfc90: 6e2c 2047 656e 6976 6961 2049 6e63 2e3c n, Genivia Inc.<\n+001bfca0: 6272 2020 2f3e 0a41 6c6c 2072 6967 6874 br />.All right\n+001bfcb0: 7320 7265 7365 7276 6564 2e3c 2f65 6d3e s reserved.\n+001bfcc0: 203c 2f70 3e0a 3c2f 6469 763e 3c2f 6469

    .
    ..
    ..Copyright (C)\n+001bfd50: 2032 3032 312c 2052 6f62 6572 7420 7661 2021, Robert va\n+001bfd60: 6e20 456e 6765 6c65 6e2c 2047 656e 6976 n Engelen, Geniv\n+001bfd70: 6961 2049 6e63 2e2c 2041 6c6c 2052 6967 ia Inc., All Rig\n+001bfd80: 6874 7320 5265 7365 7276 6564 2e0a 3c2f hts Reserved....Convert\n+001bfdc0: 6564 206f 6e20 4d6f 6e20 4d61 7220 3820 ed on Mon Mar 8 \n+001bfdd0: 3230 3231 2031 333a 3036 3a32 3320 6279 2021 13:06:23 by\n+001bfde0: 203c 6120 7461 7267 6574 3d22 5f62 6c61 Dox\n+001bfe20: 7967 656e 3c2f 613e 2031 2e39 2e31 3c2f ygen 1.9.1\n+001bfe40: 0a3c 6272 3e0a 3c64 6976 2073 7479 6c65 .
    .
    ..\n+001bfe80: 3c2f 6874 6d6c 3e0a .\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "comments": ["error from `html2text {}` (a):", "Input recoding failed due to invalid input sequence. Unconverted part of text follows.", "\ufffdS\ufffd"], "unified_diff": "@@ -0,0 +1,17016 @@\n+\n+\n+\n+ gSOAP user guide\n+\u00a0[Genivia] Home Documentation \u00a0\n+ updated Mon Mar 8 2021 by Robert van Engelen\n+gSOAP user guide\n+**** Table of Contents ****\n+ * User_guide\n+ * Introduction\n+ * Notational_conventions\n+ * Tooling_characteristics\n+ * API_documentation_modules\n+ * Getting_started\n+ o Where_to_find_examples\n+ o Creating_a_SOAP/XML_client_application\n+ o Creating_a_SOAP/XML_service_application\n+ * Introduction_to_XML_data_bindings\n+ * A_quick_user_guide\n+ o How_to_build_Web_API_clients\n+ # Example\n+ # XML_namespace_considerations\n+ # Example\n+ # How_to_generate_C++_client_proxy_classes\n+ # XSD_type_serialization\n+ # Example\n+ # How_to_change_the_response_element_name\n+ # Example\n+ # How_to_specify_multiple_output_parameters\n+ # Example\n+ # How_to_specify_output_parameters_with_compound_data_types\n+ # Example\n+ # How_to_specify_anonymous_parameter_names\n+ # How_to_specify_a_service_operation_with_no_input_parameters\n+ # How_to_specify_a_service_operation_with_no_output_parameters\n+ # How_to_switch_to_REST_from_SOAP\n+ o How_to_build_Web_services_APIs\n+ # Example\n+ # MSVC++_builds\n+ # How_to_create_a_stand-alone_server\n+ # How_to_create_a_multi-threaded_stand-alone_service\n+ # How_to_pass_application_state_info_to_service_operations\n+ # How_to_generate_C++_server_classes\n+ # How_to_chain_C++_server_classes_to_accept_messages_on_the\n+ same_port\n+ # How_to_generate_WSDL_service_descriptions\n+ # Example\n+ # How_to_make_client-side_calls_within_a_service_operation\n+ # How_to_switch_to_REST_from_SOAP\n+ o Asynchronous_one-way_message_passing\n+ o How_to_use_XML_serializers_to_save_and_load_application_data\n+ # Converting_WSDL,_WADL,_and_XML_schema_to_C/C++_with_wsdl2h\n+ # Mapping_C/C++_to_XML_schema_with_soapcpp2\n+ # Serializing_C/C++_data_to_XML\n+ # Example\n+ # Default_values_for_omitted_XML_elements_and_attributes\n+ * The_wsdl2h_tool\n+ o wsdl2h_options\n+ # wsdl2h_-a\n+ # wsdl2h_-b\n+ # wsdl2h_-c_-c++_-c++11\n+ # wsdl2h_-D\n+ # wsdl2h_-d\n+ # wsdl2h_-e\n+ # wsdl2h_-F\n+ # wsdl2h_-f\n+ # wsdl2h_-g\n+ # wsdl2h_-h\n+ # wsdl2h_-I\n+ # wsdl2h_-i\n+ # wsdl2h_-j\n+ # wsdl2h_-k\n+ # wsdl2h_-L\n+ # wsdl2h_-l\n+ # wsdl2h_-M\n+ # wsdl2h_-m\n+ # wsdl2h_-N\n+ # wsdl2h_-n\n+ # wsdl2h_-O\n+ # wsdl2h_-o\n+ # wsdl2h_-P\n+ # wsdl2h_-p\n+ # wsdl2h_-Q\n+ # wsdl2h_-q\n+ # wsdl2h_-R\n+ # wsdl2h_-r\n+ # wsdl2h_-S\n+ # wsdl2h_-s\n+ # wsdl2h_-t\n+ # wsdl2h_-U\n+ # wsdl2h_-u\n+ # wsdl2h_-V\n+ # wsdl2h_-v\n+ # wsdl2h_-W\n+ # wsdl2h_-w\n+ # wsdl2h_-X\n+ # wsdl2h_-x\n+ # wsdl2h_-y\n+ # wsdl2h_-z\n+ # wsdl2h_-_\n+ o Customizing_XML_data_bindings_with_the_typemap.dat_file\n+ * The_soapcpp2_tool\n+ o soapcpp2_options\n+ # soapcpp2_-0\n+ # soapcpp2_-1\n+ # soapcpp2_-2\n+ # soapcpp2_-A\n+ # soapcpp2_-a\n+ # soapcpp2_-b\n+ # soapcpp2_-C\n+ # soapcpp2_-c_-c++_-c++11\n+ # soapcpp2_-d\n+ # soapcpp2_-Ec_-Ed_-Et\n+ # soapcpp2_-e\n+ # soapcpp2_-f\n+ # soapcpp2_-g\n+ # soapcpp2_-h\n+ # soapcpp2_-I\n+ # soapcpp2_-i\n+ # soapcpp2_-j\n+ # soapcpp2_-L\n+ # soapcpp2_-l\n+ # soapcpp2_-m\n+ # soapcpp2_-n\n+ # soapcpp2_-p\n+ # soapcpp2_-Q\n+ # soapcpp2_-q\n+ # soapcpp2_-r\n+ # soapcpp2_-S\n+ # soapcpp2_-s\n+ # soapcpp2_-T\n+ # soapcpp2_-t\n+ # soapcpp2_-u\n+ # soapcpp2_-V\n+ # soapcpp2_-v\n+ # soapcpp2_-w\n+ # soapcpp2_-x\n+ # soapcpp2_-y\n+ # soapcpp2_-z\n+ o The_#import_directive\n+ o The_#include_and_#define_directives\n+ o Service_operation_specification_format\n+ # Service_operation_parameter_passing\n+ o C/C++_identifier_name_to_XML_tag_name_translation\n+ o Generating_a_SOAP/XML_client_application_with_soapcpp2\n+ o Generating_a_SOAP/XML_Web_service_application_with_soapcpp2\n+ o Generating_an_auto_test_server_for_client_testing\n+ o Generating_deep_copy_and_deletion_functions\n+ * Serialization_and_deserialization_rules\n+ o SOAP_RPC_encoding_versus_document/literal_style_messaging\n+ o SOAP_1.1_versus_SOAP_1.2_and_dynamic_switching\n+ o Primitive_type_serialization\n+ # xsd:anyURI\n+ # xsd:base64Binary\n+ # xsd:boolean\n+ # xsd:byte\n+ # xsd:dateTime\n+ # xsd:date\n+ # xsd:decimal\n+ # xsd:double\n+ # xsd:duration\n+ # xsd:float\n+ # xsd:hexBinary\n+ # xsd:int\n+ # xsd:integer\n+ # xsd:long\n+ # xsd:negativeInteger\n+ # xsd:nonNegativeInteger\n+ # xsd:nonPositiveInteger\n+ # xsd:normalizedString\n+ # xsd:positiveInteger\n+ # xsd:short\n+ # xsd:string\n+ # xsd:time\n+ # xsd:token\n+ # xsd:unsignedByte\n+ # xsd:unsignedInt\n+ # xsd:unsignedLong\n+ # xsd:unsignedShort\n+ # How_to_use_multiple_C/C++_types_for_a_single_primitive_XSD\n+ type\n+ # How_to_use_C++_wrapper_classes_to_specify_polymorphic\n+ primitive_types\n+ # Multi-reference_strings\n+ # Smart_string_mixed-content_deserialization\n+ # Changing_the_precision_of_float_and_double_types\n+ # INF,_-INF,_and_NaN_values_of_float_and_double_types\n+ o Enumeration_serialization\n+ # Serialization_of_symbolic_enumeration_constants\n+ # How_to_reuse_symbolic_enumeration_constants\n+ # Boolean_enumeration_serialization_for_C\n+ # Bitmask_enumeration_serialization\n+ o Struct_and_class_serialization\n+ # Example\n+ # Class_methods\n+ # Get_and_set_methods\n+ # Updating_and_checking_instances_with_get_and_set_methods\n+ # Polymorphism,_derived_types,_and_dynamic_binding_in_C++\n+ # Polymorphism,_derived_types,_and_dynamic_binding_in_C\n+ # How_to_declare_XML_attributes\n+ # How_to_use_QName_attributes_and_elements\n+ o Union_serialization\n+ o Pointer_type_serialization\n+ # Multi-referenced_data_serialization\n+ # NULL_pointers_and_nil_elements\n+ o Void_pointer_serialization\n+ o Fixed-size_array_serialization\n+ o Dynamic_array_serialization\n+ # SOAP-encoded_array_bounds\n+ # One-dimensional_dynamic_SOAP-encoded_arrays\n+ # One-dimensional_dynamic_SOAP-encoded_arrays_with_non-zero\n+ offsets\n+ # Nested_one-dimensional_dynamic_SOAP-encoded_arrays\n+ # Multi-dimensional_dynamic_SOAP-encoded_arrays\n+ # Non-SOAP_dynamic_arrays\n+ # STL_containers\n+ # Polymorphic_dynamic_arrays_and_lists\n+ # How_to_change_the_tag_names_of_array_item_elements\n+ o base64Binary_serialization\n+ o hexBinary_serialization\n+ o SOAP_RPC_encoded_versus_document/literal_style\n+ # Serializing_mixed_content_with_literal_XML_strings\n+ * XML_validation\n+ o Default_values\n+ o Occurrence_constraints\n+ # Elements_with_minOccurs_and_maxOccurs_restrictions\n+ # Required_and_prohibited_attributes\n+ o Value_constraints\n+ # Data_length_restrictions\n+ # Value_range_restrictions\n+ # Pattern_restrictions\n+ o Element_and_attribute_qualified/unqualified_forms\n+ * XML_namespaces_and_the_namespace_mapping_table\n+ * SOAP_Header_processing\n+ * SOAP_Fault_processing\n+ * MIME_attachments\n+ o Sending_a_collection_of_MIME_attachments_(SwA)\n+ o Retrieving_a_collection_of_MIME/MTOM_attachments_(SwA)\n+ * DIME_attachments\n+ o Sending_a_collection_of_DIME_attachments\n+ o Retrieving_a_collection_of_DIME_attachments\n+ o Serializing_binary_data_with_DIME_attachments\n+ o Streaming_DIME\n+ o Streaming_chunked_DIME\n+ o WSDL_bindings_for_DIME_attachments\n+ * MTOM_attachments\n+ o Generating_MultipartRelated_MIME_attachment_bindings_in_WSDL\n+ o Sending_and_receiving_MTOM_attachments\n+ o Streaming_MIME/MTOM\n+ o Redirecting_inbound_MIME/MTOM_streams_based_on_SOAP_body_content\n+ o Streaming_chunked_MIME/MTOM\n+ * SOAP/XML_over_UDP\n+ o Using_WS-Addressing_with_SOAP-over-UDP\n+ # Client-side_one-way_UDP_unicast\n+ # Client-side_one-way_UDP_multicast\n+ # Client-side_request-response_UDP_unicast\n+ # Client-side_request-response_multicast\n+ o SOAP-over-UDP_server\n+ # SOAP-over-UDP_multicast_receiving_server\n+ * Compile-time_flags\n+ o Using_the_soapdefs.h_header_file\n+ * Run-time_flags\n+ * Run-time_error_codes\n+ * Memory_management\n+ * Intra-class_memory_management\n+ * Debugging\n+ * Limitations\n+ * Advanced_features\n+ o Internationalization\n+ o Directives\n+ # Service_directives\n+ # Service_method_directives\n+ # Schema_directives\n+ # Schema_type_directives\n+ # Example\n+ o Transient_data_types\n+ o Serialization_\"as_is\"_of_volatile_data_types\n+ o How_to_declare_custom_serializers_and_deserializers\n+ o Function_callbacks_for_customized_I/O_and_HTTP_handling\n+ # fpost\n+ # fresponse\n+ # fposthdr\n+ # fparse\n+ # fparsehdr\n+ # fget\n+ # fput\n+ # fpatch\n+ # fdel\n+ # fopt\n+ # fhead\n+ # fform\n+ # fheader\n+ # fignore\n+ # fsvalidate\n+ # fwvalidate\n+ # fseterror\n+ # fopen\n+ # faccept\n+ # fclose\n+ # fresolve\n+ # fconnect\n+ # fdisconnect\n+ # fclosesocket\n+ # fshutdownsocket\n+ # fpoll\n+ # frecv\n+ # fsend\n+ # fserverloop\n+ # fmalloc\n+ # user_variable\n+ # Examples\n+ o How_to_handle_HTTP_307_temporary_redirect\n+ o How_to_implement_HTTP_GET,_PUT,_and_PATCH_services\n+ o TCP_and_HTTP_keep-alive\n+ o HTTP_chunked_transfer_encoding\n+ o HTTP_buffered_sends\n+ o HTTP_authentication\n+ # HTTP_bearer_authentication\n+ # HTTP_basic_authentication\n+ # HTTP_NTLM_authentication\n+ # HTTP_proxy_NTLM_authentication\n+ # HTTP_proxy_basic_authentication\n+ o Performance_improvement_tips\n+ o Safety_guards\n+ o Timeout_management_for_non-blocking_operations\n+ o Closing_connections_by_force\n+ o Socket_options_and_flags\n+ o Overriding_the_host_and_port_to_connect\n+ o Secure_Web_services_with_HTTPS\n+ o Secure_clients_with_HTTPS\n+ o SSL_authentication_callbacks\n+ o SSL_certificates_and_key_files\n+ o SSL_hardware_acceleration\n+ o SSL_on_Windows\n+ o Zlib_compression\n+ o Client-side_cookie_support\n+ o Server-side_cookie_support\n+ o Connecting_clients_through_proxy_servers\n+ o Bind_before_connect_and_setting_the_client_interface_address\n+ o FastCGI\n+ o How_to_minimize_application_memory_footprint\n+ o How_to_remove_the_BSD_socket_library_requirement\n+ o How_to_combine_multiple_client_and_server_implementations_into_one\n+ executable\n+ o How_to_build_a_client_or_server_in_a_C++_code_namespace\n+ o How_to_create_client/server_libraries\n+ # C++_examples\n+ # C_examples\n+ # How_to_chain_C_services_to_accept_messages_on_the_same_port\n+ o How_to_create_DLLs\n+ # Creating_the_base_stdsoap2.dll\n+ # Creating_client_and_server_DLLs\n+ o How_to_build_modules_and_libraries_with_the_#module_directive\n+ o Plugins,_modules,_and_extensions\n+ # DOM_API_overview\n+ # The_message_logging_plugin\n+ # RESTful_server-side_API_with_the_HTTP_GET_plugin\n+ # RESTful_server-side_API_with_the_HTTP_POST_plugin\n+ # The_HTTP_digest_authentication_plugin\n+ # The_HTTP_sessions_plugin\n+ # The_Apache_module_plugin\n+ # The_ISAPI_extension_plugin\n+ # The_CURL_plugin\n+ # The_WinInet_plugin\n+ # The_WS-Addressing_plugin\n+ # The_WS-ReliableMessaging_plugin\n+ # The_WS-Security_plugin\n+ # The_WS-Discovery_plugin\n+ * Copyright\n+ User guide\n+ Copyright (c) 2000-2020, Genivia Inc.\n+ All rights reserved.\n+ Introduction\n+The gSOAP toolkit offers C/C++ tools and libraries to implement efficient and\n+secure SOAP, XML, JSON and REST client and service Web API applications. The\n+tools also offer XML data bindings for C and C++ to generate XML serializers to\n+efficiently read and write C/C++ data to and from files and streams.\n+The gSOAP wsdl2h tool consumes WSDL and XSD schema files to converts them to C/\n+C++ source code to implement XML messaging infrastructures. This frees the\n+developer to focus on application functionality rather than on infrastructure.\n+More specifically, the wsdl2h tool consumes WSDLs to generate a C or C++\n+interface header file, which uses a developer-friendly C/C++ header file\n+syntax. This allows developers to inspect Web services and XML schemas from a\n+functionality point of view, rather than getting bogged down into the\n+underlying SOAP-based infrastructure details of WSDLs and XSDs.\n+The soapcpp2 tool generates all the Web service binding source code with XML\n+serializers necessary to quickly develop server-side and client-side Web\n+service APIs.\n+The soapcpp2 tool can also be used to produce, rather than consume, WSDL and\n+XSD files to deploy XML Web services or to develop XML applications. This\n+approach allows the deployment of legacy C/C++ applications as services. Simply\n+describe the Web API in a C or C++ interface header file for the soapcpp2 tool\n+to generate the C/C++ source code that glues everything together.\n+Besides SOAP-based services, also non-SOAP XML and JSON REST services can be\n+implemented with the gSOAP tools. Either described by WSDLs or by XML schemas\n+converted to C/C++ source code by wsdl2h, or by using the JSON libraries\n+included with gSOAP to develop JSON applications.\n+Furthermore, the gSOAP tools can be just as easily used to develop C/C++\n+applications that efficiently consume and produce XML by leveraging XML data\n+bindings for C/C++ based on XML schemas. Basically, an XML schema has an\n+equivalent set of C/C++ data types for the components described by the schema.\n+So XML schema strings are just C/C++ strings, XML schema enumerations are C/C++\n+enums, XML schema complex types are just structs and classes in C/C++, and so\n+on. This enhances the reliability and safety of XML applications, because type-\n+safe serializable C/C++ data types are serialized and validated in XML\n+automatically.\n+This XML data binding means that your XML data is simply represented as C/C++\n+data. Reading and writing XML is a lot easier than using a DOM or SAX library\n+for XML. This is not more expensive or more complex than it sounds. In fact,\n+the generated XML serializers are very efficient to parse and validate XML and\n+may run more than 30 times faster than validating XML parsers such as Apache\n+Xerces C++.\n+In summary, gSOAP offers a type-safe and transparent approach to develop XML\n+applications that has proven to be quicker to develop (by auto-coding), safer\n+(by XML validation and type-safety), more reliable (by auto-generation of XML\n+test messages and warnings), and higher performing (by efficient serializers\n+and XML parsers generated in C/C++), compared to DOM and SAX libraries.\n+This user guide explains the gSOAP tools and libraries. This user guide and\n+additional documentation for the growing number of gSOAP plugins can be found\n+at https://www.genivia.com/doc. A getting-started guide for developers is\n+available at https://www.genivia.com/dev.html with a tutorial on common topics\n+at https://www.genivia.com/tutorials.html. Various examples ranging from simple\n+calculator service APIs to very large protocols spanning dozens of WSDLs can be\n+found at https://www.genivia.com/examples.html. For frequently asked questions\n+see https://www.genivia.com/resources.html for help.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Notational conventions\n+The typographical conventions used by this document are:\n+ * Courier denotes C and C++ source code.\n+ * Courier denotes XML content, JSON content, file and path names, and URIs.\n+ * Courier denotes HTTP content, text file content, and shell commands with\n+ command line options and arguments.\n+The keywords \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\",\n+\"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be\n+interpreted as described in RFC-2119.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Tooling characteristics\n+ * Safety: the tools generate type-safe XML serialization functions for\n+ native and user-defined C and C++ data structures.\n+ * Protocols: WSDL 1.1, WSDL 2.0, REST, SOAP 1.1, SOAP 1.2, SOAP RPC\n+ encoding style, SOAP document/literal style, SOAP-over-UDP, WS-Security,\n+ WS-Addressing, WS-ReliableMessaging, WS-Discovery, WS-Trust, WS-Policy,\n+ JSON REST/RPC, XML-RPC, Atom and RSS. JSON is supported as a library\n+ bundled with the XML-RPC library to switch between XML-RPC and JSON\n+ protocols (since these are similar, speaking data wise). For more\n+ details, see the gsoap/samples/xml-rpc-json folder in the gSOAP package\n+ and the XML-RPC_and_JSON documentation.\n+ * SOAP: implements the full range of SOAP 1.1/1.2 specifications, including\n+ RPC encoding and document/literal messaging styles.\n+ * XSD: supports all XML schema 1.0 and 1.1 schema type constructs and has\n+ been tested against the W3C XML Schema Patterns for Databinding\n+ Interoperability working group.\n+ * XML: implements a fast schema-specific XML pull parser that does not\n+ require intermediate storage of XML in a DOM to deserialize data.\n+ * HTTP: HTTP 1.0/1.1 (HTTP 2.0 will be available soon), IPv4 and IPv6,\n+ HTTPS (requires OpenSSL or GNUTLS), cookies, authentication, Zlib deflate\n+ and gzip compression, and connecting through HTTP proxies.\n+ * Attachments: MIME (SwA), DIME, and MTOM attachments are supported.\n+ Streaming capabilities to direct the data stream to/from resources using\n+ user-defined callbacks. gSOAP is the only toolkit that supports streaming\n+ MIME, DIME, and MTOM attachment transfers, which allows you to exchange\n+ binary data of practically unlimited size in the fastest possible way by\n+ streaming, while ensuring the usefulness of XML interoperability.\n+ * Debugging: compilation of client and service applications in #DEBUG mode\n+ traces their engine activity for debugging, verifies memory usage (leak\n+ detection), and saves message logs for inspection.\n+ * Testing: soapcpp2 -T generates server source code that automatically\n+ implements echo message services for testing. The testmsgr tool generates\n+ XML messages from message templates for server-side and client-side\n+ black-box testing, see Test_Messenger documentation. In addition, the\n+ soapcpp2 tool generates sample SOAP/XML input and output messages for\n+ verification and testing.\n+ * Speed: the soapcpp2-generated high-performance XML serializers are ideal\n+ for building efficient Web services that are compute-intensive and are\n+ therefore best written in C or C++.\n+ * Portability: source code is portable and compiles on Windows, Unix,\n+ Linux, Mac OS X, Symbian, VXWorks, and embedded systems that run WinCE,\n+ Symbian, embedded Linux, and so on. The memory footprint of gSOAP client\n+ and service applications is small.\n+ * Footprint: input and output buffering is used to increase efficiency and\n+ reduce memory usage. Input and output messages are not fully buffered or\n+ stored in a DOM unless required or specified. As a result, large messages\n+ can be transmitted by low-memory devices.\n+\ud83d\udd1d Back_to_table_of_contents\n+ API documentation modules\n+The API documentation is broken down into the following functional\n+documentation modules that drill down into the lower-level API of macros,\n+functions, context and context variables, plugins and more:\n+ This module defines compile-time flags\n+Debugging_and_logging and functions for run-time debugging and\n+ logging\n+ This module defines the WITH_MACRO\n+WITH_MACRO_compile-time_flags compile-time flags to configure the\n+ engine build\n+ This module defines the SOAP_MACRO\n+SOAP_MACRO_compile-time_values compile-time values to configure the\n+ engine build\n+ This module defines the SOAP_MACRO run-\n+SOAP_MACRO_run-time_flags time soap_mode flags to set the engine\n+ mode\n+ This module defines the SOAP_MACRO run-\n+SOAP_MACRO_run-time_error_codes time soap_status error codes returned by\n+ functions and stored in soap::error\n+ This module defines the soap context\n+Context_with_engine_state structure with the engine state and\n+ functions to allocate, initialize, copy\n+ and delete contexts\n+ This module defines the callback\n+Callback_functions functions of the soap context to modify\n+ its behavior, as is done by plugins\n+SSL/TLS_context_and_functions This module defines functions to set the\n+ SSL/TLS context for HTTPS and WS-Security\n+ This module defines functions for HTTP\n+HTTP_and_IO_functions operations and functions for receiving\n+ and sending data\n+HTTP_cookie_functions This module defines functions to set and\n+ get HTTP cookies at the server side\n+ This module defines conversion functions\n+Conversion_functions of values of various types to and from\n+ strings\n+ This module defines the Namespace XML\n+XML_namespace_tables namespace structure and function to\n+ activate a table\n+ This module defines the SOAP_ENV__Header\n+Header_structure_and_functions structure and soap_header function to\n+ allocate the header\n+ This module defines the SOAP_ENV__Fault\n+Fault_structure_and_functions structure and functions to set and get\n+ fault information\n+DIME_attachment_functions This module defines functions to set and\n+ get DIME attachments\n+MIME_attachment_functions This module defines functions to set and\n+ get MIME/MTOM attachments\n+Plugins_and_plugin_registry_functions This module defines plugin registry\n+ functions to register plugins\n+Thread_and_mutex_functions This module defines portable thread and\n+ mutex functions\n+Miscellaneous_functions This module defines other useful\n+ functions\n+\ud83d\udd1d Back_to_table_of_contents\n+ Getting started\n+To start using gSOAP, you will need:\n+ * The gSOAP software from https://www.genivia.com/Products/downloads.html.\n+ Select the gSOAP toolkit commercial edition to download (a download key\n+ is provided with the commercial-use license), or download the GPLv2 open\n+ source version from SourceForge https://sourceforge.net/projects/gsoap2.\n+ * A C or C++ compiler.\n+ * OpenSSL (or GNUTLS) and the Zlib libraries to enable SSL (HTTPS) and\n+ compression. These libraries are available for most platforms and are\n+ often already installed.\n+ * Flex http://flex.sourceforge.net and Bison http://www.gnu.org/software/\n+ bison to build the soapcpp2 tool. You can also build soapcpp2 without\n+ Bison and Flex installed, see https://www.genivia.com/downloads.html for\n+ details.\n+The gSOAP source code package includes:\n+ * The wsdl2h data binding tool that converts WSDLs and XSDs to generate\n+ interface header files for soapcpp2. The source code of the wsdl2h tool\n+ is located in gsoap/wsdl.\n+ * The soapcpp2 code generation tool that takes an interface header file and\n+ generates the C/C++ Web service binding implementation source code. The\n+ source code of the soapcpp2 tool is located in gsoap/src.\n+ * The run-time engine gsoap/stdsoap2.h and source code gsoap/stdsoap2.c for\n+ C and gsoap/stdsoap2.cpp for C++. These are compiled into the C libraries\n+ gsoap/libgsoap.a (without OpenSSL/GNUTLS for SSL/TLS), gsoap/\n+ libgsoapssl.a (with OpenSSL/GNUTLS for SSL/TLS and with gsoap/dom.c for\n+ DOM API), and the C++ libraries gsoap/libgsoap++.a (without OpenSSL/\n+ GNUTLS for SSL/TLS), gsoap/libgsoapssl++.a (with OpenSSL/GNUTLS for SSL/\n+ TLS and with gsoap/dom.cpp for DOM API). There are two more versions of\n+ these libraries with HTTP cookies enabled.\n+ * Several examples of gSOAP applications and other development tools that\n+ are build with wsdl2h and soapcpp2 are located in gsoap/samples.\n+ * XML DOM API and the domcpp code generation tool located in gsoap/samples/\n+ dom, see also the XML_DOM_API_and_domcpp documentation.\n+ * JSON and XML-RPC libraries and the jsoncpp code generation tool located\n+ in gsoap/samples/xml-rpc-json, see also the XML-RPC_and_JSON\n+ documentation.\n+ * An XML Web API testing tool located in gsoap/samples/testmsgr, see also\n+ the Test_Messenger documentation.\n+ * Plugins to enhance the capabilities of the engine and to support WS\n+ protocols such as WS-Security, WS-Addressing, WS-ReliableMessaging, and\n+ WS-Discovery. The plugins are located in gsoap/plugin and gsoap/\n+ mod_gsoap. Most but not all plugins are imported into interface header\n+ files for soapcpp2 with the #import directive. See also API documentation\n+ Module Plugins_and_plugin_registry_functions.\n+ * Custom serializers for several C and C++ types to enhance the\n+ capabilities of XML serialization, located in gsoap/custom. Custom\n+ serializers are imported into interface header files for soapcpp2 with\n+ the #import directive. This is usually done via a typemap.dat file for\n+ wsdl2h that specifies bindings for XML schema types to C/C++ types,\n+ including custom serializers when desired.\n+The wsdl2h and soapcpp2 tools and the gSOAP libraries are build with ./\n+configure and make, see the download and installation page https://\n+www.genivia.com/downloads.html for the most recent versions of gSOAP and gSOAP\n+software installation details. The examples and other tools are build with ./\n+configure --enable-samples and make.\n+Non-SSL-enabled (that is, not HTTPS capable) versions of the binaries of the\n+wsdl2h and soapcpp2 tools are also included in the gSOAP package in gsoap/bin\n+for Windows and Mac OS platforms. The SSL-enabled and HTTPS-capable wsdl2h tool\n+is only available for download from https://www.genivia.com/downloads.html with\n+a commercial-use license and download key.\n+Although gSOAP tools are available in binary format for several platforms, the\n+code generated by these tools is equivalent. This means that the generated\n+source code files can be transferred between platforms and locally compiled.\n+The examples given in this document do not require the libraries of the engine\n+to be build, but rather show the use of the source code: gsoap/stdsoap2.c and\n+gsoap/dom.c (or gsoap/stdsoap2.cpp and gsoap/dom.cpp for C++). Using the source\n+code instead of the libraries gives more control when we use the -DWITH_MACRO\n+and -DSOAP_MACRO compile-time options, see also Modules WITH_MACRO_compile-time\n+flags and SOAP_MACRO_compile-time_values.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Where to find examples\n+Introductory examples can be found online at https://www.genivia.com/dev.html.\n+Additional examples can be found online at https://www.genivia.com/\n+examples.html.\n+The gSOAP package also contains numerous examples in the gsoap/samples\n+directory. Run make inside these directories to build the example applications.\n+The examples are meant to demonstrate basic to advanced features of gSOAP. Some\n+examples are actually development tools and libraries, such as Test Messenger\n+located in gsoap/samples/testmsgr to test XML Web APIs, the XML DOM API and\n+domcpp located in gsoap/samples/dom to generate XML DOM API source code from\n+XML files, the JSON API and jsoncpp located in gsoap/samples/xml-rpc-json to\n+generate JSON API source code from JSON files.\n+Advanced examples include a streaming MTOM attachment server and client\n+application demonstrate high-performance file exchanges, located in gsoap/\n+samples/mtom-stream. An SSL-secure Web server application demonstrates the\n+generation of dynamic content for Web browsing and Web services functionality\n+at the same time, located in gsoap/samples/webservice.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Creating a SOAP/XML client application\n+This section explains the basics to develop a SOAP/XML client application in C\n+and C++. We refer to https://www.genivia.com/dev.html for additional\n+introductory examples of SOAP/XML, XML REST and JSON applications in C and C++.\n+The wsdl2h tool imports one or more WSDLs and XML schemas and generates a gSOAP\n+interface file for soapcpp2 with familiar C/C++ header file syntax to define\n+the Web service operations and the C/C++ data types. The soapcpp2 tool then\n+takes this header file and generates XML serializers for the data types\n+(soapStub.h, soapH.h, and soapC.cpp), the client-side stub functions\n+(soapClient.cpp), and server-side skeleton functions (soapServer.cpp).\n+The soapcpp2 tool can also generate WSDL definitions to implement a service\n+from scratch, i.e. without defining a WSDL first. This \"closes the loop\" in\n+that it enables Web services development from WSDL or directly from a set of C/\n+C++ operations declared as functions in an interface header file for soapcpp2\n+without the need for users to be experts in WSDL and XSD.\n+You only need to follow a few steps to execute the tools from the command line\n+or using a Makefile (see also MSVC++ project examples in the gsoap/samples\n+directory with tool integration in the MSVC++ IDE). For example, to generate\n+code for the calculator Web service, we run the wsdl2h tool from the command\n+line on the URL of the WSDL and use wsdl2h_-o_calc.h_option_-o_calc.h to\n+specify the calc.h interface file to output:\n+ wsdl2h -o calc.h http://www.genivia.com/calc.wsdl\n+This generates the calc.h service definition interface file with service\n+operation definitions and types to pass with the operation parameters. This\n+interface file is then input to the soapcpp2 tool to generate the stub and\n+skeleton source code and XML serialization functions. The calc.h file includes\n+documentation extracted form the WSDL and introductions to process the file\n+with soapcpp2. You can use Doxygen (http://www.doxygen.org) to automatically\n+generate the documentation pages for your development from the generated calc.h\n+interface file. To generate a markdown report for your client, use soapcpp2 -\n+r option -r which has more details than the calc.h file.\n+In this example we will develop a C++ API for the calculator service. By\n+default, the wsdl2h tool assumes C++ with STL. To build without STL, use wsdl2h\n+-s_option_-s:\n+ wsdl2h -s -o calc.h http://www.genivia.com/calc.wsdl\n+ Note\n+ Visual Studio IDE users should make sure to compile all gSOAP source code\n+ files in C++ compilation mode. If you migrate to a project file .vcproj,\n+ please set CompileAs=\"2\" in your .vcproj file.\n+We have not yet generated the stub functions and serializers for our C++ client\n+application to invoke remote service operations. To do so, we run the soapcpp2\n+tool as follows:\n+ soapcpp2 -j -C -Iimport calc.h\n+Option -j (and alternatively option -i) indicates that we want C++ proxy and\n+server objects that include the client (and server) code, option -C indicates\n+client-side only files are generated (soapcpp2 generates both client stub\n+functions and server skeleton functions by default). Option -I is needed to\n+import the stlvector.h file from the gsoap/import directory located in the\n+gSOAP source code package to support serialization of STL vectors, when\n+applicable.\n+We use the generated soapcalcProxy class declared and defined in\n+soapcalcProxy.h and soapcalcProxy.cpp, and calc.nsmap XML namespace mapping\n+table to access the Web service. The soapcalcProxy.h file includes\n+documentation on the proxy class. The soapcalcProxy class is a proxy to invoke\n+the remote service:\n+// File: calclient.cpp\n+#include \"soapcalcProxy.h\"\n+#include \"calc.nsmap\"\n+int main()\n+{\n+calcProxy service;\n+double result;\n+if (service.add(1.0, 2.0, result) == SOAP_OK)\n+std::cout << \"The sum of 1.0 and 2.0 is \" << result << std::endl;\n+else\n+service.soap_stream_fault(std::cerr);\n+service.destroy(); // delete data and release memory\n+}\n+SOAP_OK\n+#define SOAP_OK\n+The soap_status code for no error (zero)\n+Definition: stdsoap2.h:2269\n+To complete the build, compile the code above and compile this with the\n+generated soapC.cpp and soapcalcProxy.cpp files, and link the engine with -\n+lgsoap++:\n+c++ -o calcclient calcclient.cpp soapcalcProxy.cpp soapC.cpp -lgsoap++\n+Alternatively, compile gsoap/stdsoap2.cpp:\n+c++ -o calcclient calcclient.cpp soapcalcProxy.cpp soapC.cpp stdsoap2.cpp\n+In both cases it is assumed that stdsoap2.h and the soapcpp2-generated\n+soapcalcProxy.h, soapStub.h, soapH.h, and calc.nsmap files are located in the\n+current directory.\n+Then run the example:\n+./calcclient\n+The sum of 1.0 and 2.0 is 3\n+To build a pure C application, use wsdl2h_-c_option_-c and run soapcpp2 -C to\n+generate the client stub functions and serializers:\n+ wsdl2h -c -o calc.h http://www.genivia.com/calc.wsdl\n+ soapcpp2 -C -Iimport calc.h\n+In this case our code uses a simple C function call to invoke the service and\n+we also need to explicitly delete data and the context with soap_end and\n+soap_free:\n+// File: calclient.c\n+#include \"soapH.h\" // include the generated declarations\n+#include \"calc.nsmap\" // include the generated namespace table\n+int main()\n+{\n+struct soap *soap = soap_new();\n+double result;\n+if (soap_call_ns__add(soap, 1.0, 2.0, &result) == SOAP_OK)\n+printf(\"The sum of 1.0 and 2.0 is %lg\\n\", result);\n+else\n+soap_print_fault(soap, stderr);\n+soap_destroy(soap); // delete managed objects\n+soap_end(soap); // delete managed data and temporaries\n+soap_free(soap); // finalize and delete the context\n+}\n+soap_free\n+void soap_free(struct soap *soap)\n+Finalize and free the given soap context from unmanaged heap memory.\n+soap_end\n+void soap_end(struct soap *soap)\n+Delete all data from heap memory managed by the specified soap context and\n+release the freed memory b...\n+soap_new\n+struct soap * soap_new()\n+Allocate and initialize a new soap context.\n+soap_destroy\n+void soap_destroy(struct soap *soap)\n+Delete all dynamically-allocated C++ objects managed by the specified soap\n+context.\n+soap_print_fault\n+void soap_print_fault(struct soap *soap, FILE *fd)\n+Print error message on the specified output.\n+soap\n+Context with the engine state.\n+Definition: stdsoap2.h:2804\n+To complete the build, compile the code above and compile this with the\n+generated soapC.c and soapClient.c files, and link the engine with -lgsoap:\n+cc -o calcclient calclient.c soapClient.c soapC.c -lgsoap\n+Alternatively, compile gsoap/stdsoap2.c:\n+cc -o calcclient calclient.c soapClient.c soapC.c stdsoap2.c\n+In both cases it is assumed that stdsoap2.h and the soapcpp2-generated\n+soapStub.h, soapH.h, and calc.nsmap files are located in the current directory.\n+Then run the example:\n+./calcclient\n+The sum of 1.0 and 2.0 is 3\n+The calculator example is fairly simple and used here to illustrate the\n+development steps from code generation to running the application. The\n+development steps for large-scale XML applications is similar.\n+See https://www.genivia.com/dev.html for additional introductory examples of\n+SOAP/XML, XML REST and JSON applications in C and C++. See https://\n+www.genivia.com/examples and the examples located in the gSOAP source code\n+package in the gsoap/samples directory.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Creating a SOAP/XML service application\n+This section explains the basics to develop a SOAP/XML service application in C\n+and C++. We refer to https://www.genivia.com/dev.html for additional\n+introductory examples of SOAP/XML, XML REST and JSON applications in C and C++.\n+Developing a service application is easy. In this example we will demonstrate a\n+service deployed with the Common Gateway Interface (CGI) because it is a simple\n+mechanism. This is not the preferred deployment mechanism. Because CGI is slow\n+and stateless. FastCGI improves the speed of CGI applications, but is still\n+stateless. Faster services can be developed as a stand-alone gSOAP HTTP/HTTPS\n+servers as explained in this section further below.\n+To deploy services in a public and possibly hostile environment, we recommend\n+the use of Apache module or IIS ISAPI extension to manage and protect services.\n+An Apache module plugin and ISAPI extension plugin is included in the gSOAP\n+package under gsoap/mod_gsoap. For details, see:\n+ * gSOAP_Apache_module documentation\n+ * gSOAP_ISAPI_extension documentation\n+To deploy gSOAP stand-alone services in a public environment make sure to\n+protect your service application as explained in Sections Safety_guards and\n+Timeout_management_for_non-blocking_operations. See also our tutorials https://\n+www.genivia.com/tutorials.html with instructions to protect your online gSOAP\n+Web APIs.\n+Let's get started. Suppose we want to implement a simple CGI-based service that\n+returns the time in GMT. For this example we start with an interface header\n+file for soapcpp2, currentTime.h which contains the service definitions. Such a\n+file can be obtained from a WSDL using wsdl2h when a WSDL is available. When a\n+WSDL is not available, you can define the service in C/C++ definitions in a\n+newly created interface header file and let the soapcpp2 tool generate the\n+source code and WSDL for you.\n+The currenTime service operation of our Web service has only one output\n+parameter, which is the current time defined in our currentTime.h service\n+specification:\n+// File: currentTime.h\n+//gsoap ns service name: currentTime\n+//gsoap ns service namespace: urn:currentTime\n+//gsoap ns service location: http://www.yourdomain.com/currentTime.cgi\n+int ns__currentTime(time_t& response);\n+Note that we associate an XML namespace prefix ns and namespace name urn:\n+currentTime with the service WSDL and SOAP/XML messages. The gSOAP tools use a\n+special convention for identifier names that are part of a namespace: a\n+namespace prefix (ns in this case) followed by a double underscore __. This\n+convention is used to resolve namespaces and to avoid name clashes. The ns\n+namespace prefix is bound to the urn:currentTime namespace name with the //\n+gsoap directive. The //gsoap directives are used to set the properties of the\n+service, in this case the name, namespace, and location endpoint.\n+The service implementation for CGI simply requires a soap_serve call on a soap\n+context created with soap_new. The service operations are implemented as\n+functions, which are called by the service skeleton functions via the service\n+request dispatcher soap_serve:\n+// File: currentTime.cpp\n+#include \"soapH.h\" // include the generated declarations\n+#include \"currentTime.nsmap\" // include the generated namespace table\n+int main()\n+{\n+// create soap context and serve one CGI-based request:\n+struct soap *soap = soap_new1(SOAP_XML_INDENT);\n+soap_serve(soap);\n+soap_destroy(soap); // delete managed class instances\n+soap_end(soap); // delete managed data and temporaries\n+soap_free(soap); // finalize and free the context\n+}\n+int ns__currentTime(struct soap *soap, time_t& response)\n+{\n+response = time(0);\n+return SOAP_OK;\n+}\n+soap_new1\n+struct soap * soap_new1(soap_mode input_and_output_mode)\n+Allocate and initialize a new soap context with input and output soap_mode\n+flags.\n+SOAP_XML_INDENT\n+#define SOAP_XML_INDENT\n+soap_mode XML output flag value to enable XML (and JSON) message indentation in\n+messages sent\n+Definition: stdsoap2.h:1821\n+soap_serve\n+int soap_serve(struct soap *soap)\n+Serve a pending request.\n+Note that we pass the soap context with the engine context information to the\n+service operation function as the first argument. The soap context comes in\n+handy to determine properties of the connection and to dynamically allocate\n+data with soap_malloc or with the generated soap_new_T functions for\n+serializable types T that will be automatically deleted by calling soap_destroy\n+and soap_end when the service operation is done and the service loop rolls\n+over.\n+We run the soapcpp2 tool on the header file to generate the server-side code:\n+ soapcpp2 -S currentTime.h\n+and then compile the CGI binary:\n+ c++ -o currentTime.cgi currentTime.cpp soapServer.cpp soapC.cpp stdsoap2.cpp\n+To activate the service, copy the currentTime.cgi binary to your bin-cgi\n+directory and set the proper file permissions.\n+The soapcpp2 tool generated the WSDL definitions currentTime.wsdl. You can use\n+the WSDL to advertise your service. You don't need to use this WSDL to develop\n+a gSOAP client. You can use the currentTime.h file with soapcpp2 -C option -\n+C to generate client-side code.\n+Since CGI is very simple, a convenient aspect of CGI is that it exchanges\n+messages over standard input and output. Therefore, you can run the CGI binary\n+on the auto-generated example request XML file currentTime.currentTime.req.xml\n+to test your server:\n+ ./currentTime.cgi < currentTime.currentTime.req.xml\n+and this displays the HTTP server response:\n+Status: 200 OK\n+Server: gSOAP/2.8\n+X-Frame-Options: SAMEORIGIN\n+Content-Type: text/xml; charset=utf-8\n+Content-Length: 460\n+Connection: close\n+\n+\n+\n+\n+2018-10-25T17:17:03Z\n+\n+\n+\n+The above approach works also for C. Just use soapcpp2 -c -S option -c in\n+addition to the -S option to generate C code. Of course, in C we use pointers\n+instead of references and the currentTime.h file should be adjusted to use C\n+syntax and types.\n+Run soapcpp2 -r -c -S option -r to generate a soapReadme.md report. This report\n+includes many details about the service operations and serializable C/C++ data\n+types declared in the interface header file. This markdown file can be\n+converted to HTML or other document formats with tools such as Doxygen.\n+A more elegant server implementation in C++ can be obtained by using soapcpp2 -\n+j -S option -j (or option -i) to generate C++ client-side proxy and server-side\n+service objects as classes that you can use to build clients and services in\n+C++. The option removes the generation of soapClient.cpp and soapServer.cpp,\n+since these are no longer needed when we have classes that implement the client\n+and server logic:\n+ soapcpp2 -j -S currentTime.h\n+This generates soapcurrentTimeService.h and soapcurrentTimeService.cpp files,\n+as well as auxiliary files soapStub.h, soapH.h, and soapC.cpp and\n+currentTime.nsmap. The soapcurrentTimeService.h file includes documentation on\n+the service class.\n+Now using the currentTimeService class we can improve the CGI service\n+application:\n+// File: currentTime.cpp\n+#include \"soapcurrentTimeService.h\" // include the proxy declarations\n+#include \"currentTime.nsmap\" // include the generated namespace table\n+int main()\n+{\n+// create server and serve one CGI-based request:\n+currentTimeService server(SOAP_XML_INDENT);\n+server.serve();\n+server.destroy();\n+}\n+int currentTimeService::currentTime(time_t& response)\n+{\n+response = time(0);\n+return SOAP_OK;\n+}\n+We compile this with:\n+ c++ -o currentTime.cgi currentTime.cpp soapcurrentTimeService.cpp soapC.cpp\n+stdsoap2.cpp\n+and install the binary as a CGI application.\n+To run the server as a stand-alone iterative (i.e. non-multi-hreaded) server on\n+port 8080 until a the accept times out or an error occurs:\n+if (server.run(8080) != SOAP_OK)\n+server.soap_stream_fault(std::cerr);\n+To run the server as a stand-alone iterative server on port 8080 while ignoring\n+common errors until a TCP occurs:\n+while (server.run(8080) != SOAP_OK)\n+{\n+if (server.soap->error == SOAP_TCP_ERROR)\n+break;\n+server.soap_stream_fault(std::cerr);\n+}\n+SOAP_TCP_ERROR\n+#define SOAP_TCP_ERROR\n+A soap_status error code: a TCP/IP connection error occured.\n+Definition: stdsoap2.h:2601\n+To implement stand-alone and multi-threaded services, see Sections How_to\n+create_a_stand-alone_server and How_to_create_a_multi-threaded_stand-alone\n+service. These stand-alone Web Services handle multiple SOAP requests by\n+spawning a thread for each request. Thread pooling is also an option. The use\n+of Apache modules and ISAPI extensions to deploy gSOAP services is recommended\n+to ensure load balancing, access control, tracing, and so on.\n+For more information on server-side service classes, see Section How_to\n+generate_C++_server_classes . For more information on client-side proxy\n+classes, see Section How_to_generate_C++_client_proxy_classes .\n+See https://www.genivia.com/dev.html for additional introductory examples of\n+SOAP/XML, XML REST and JSON applications in C and C++. See https://\n+www.genivia.com/examples and the gSOAP source code package gsoap/samples for\n+more examples.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Introduction to XML data bindings\n+This section is a basic introduction to XML data bindings in C/C++. Because\n+gSOAP offers many options to implement XML data bindings, we wrote a separate C\n+and_C++_XML_data_bindings document on this topic that contains an in-depth\n+discussion of XML schema mappings to C/C++ types, using wsdl2h with typemap.dat\n+to customize these bindings, memory management to allocate and release\n+serializable types, and how to use soapcpp2_options to generate deep data\n+structure copy and delete functions for serializable types.\n+Basically, the C/C++ XML data binding in gSOAP provides and automated mechanism\n+to serialize any C and C++ data structure in XML and to deserialize XML back\n+into C/C++ data structures. To facilitate XML data bindings, a WSDL or an XML\n+schema (XSD file) can converted with wsdl2h into a set of serializable C or C++\n+data type declarations. These C/C++ type declarations can be readily\n+incorporated into your application to manipulate XML directly as C/C++ data\n+structures with much more ease than DOM or SAX. For example, XML schema strings\n+are just C/C++ strings, XML schema enumerations are C/C++ enums, XML schema\n+complex types are just structs or classes in C/C++, and so on. In this way, an\n+automatic mapping between XML elements of the XML schema and members of a class\n+is created. No DOM traversals and SAX events are needed.\n+More importantly, the XML C/C++ data binding makes XML manipulation type safe.\n+That is, the type safety of C/C++ ensures that only valid XML documents can be\n+parsed and generated.\n+The wsdl2h tool performs the mapping of WSDL and XML schemas to C and/or C++\n+automatically. The output of wsdl2h is a \"data binding interface file\" which is\n+simply an annotated C/C++ header file with the serializable C/C++ data types\n+that represent XML schema components. This file also includes comments and\n+documentation of the serializable data types. For WSDLs, also functions are\n+declared in this interface file that represent XML Web services operations.\n+Let's illustrate XML data bindings with an example. Suppose we have an XML\n+document with a book record:\n+\n+Farewell John Doe\n+ABC's is our Name\n+\n+An example XML schema (XSD file) that defines the book element and type could\n+be:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+Now, using wsdl2h we translate this XML schema that defines the book type and\n+root element into a C++ class definition:\n+class book\n+{ public:\n+@ ULONG64 isbn;\n+std::string title;\n+std::string publisher;\n+};\n+ULONG64\n+#define ULONG64\n+User-definable macro that represents a portable unsigned 64 bit integer type.\n+Definition: stdsoap2.h:1288\n+Note that annotations such as @ are used to distinguish attributes from\n+elements. These annotations are gSOAP-specific and are handled by the soapcpp2\n+tool that reads this generated interface file and generates the XML data\n+binding implementation with serializers for the data types declared in the\n+interface file.\n+That is, the soapcpp2 tool generates all the necessary code to parse and\n+generate XML for book objects. Validation constraints such as minOccurs=\"1\" and\n+use=\"required\" are included in the generated code as checks that are enforced\n+with the #SOAP_XML_STRICT flag.\n+To write the XML representation of a book object instantiated in our C++\n+application, we first create a soap engine context and use it with\n+soap_write_book (a function generated by soapcpp2) to write the object in XML\n+to standard output:\n+struct soap *soap = soap_new1(SOAP_XML_INDENT); // new context\n+book bk;\n+bk.isbn = 1234567890;\n+bk.title = \"Farewell John Doe\";\n+bk.publisher = \"ABC's is our Name\";\n+if (soap_write_book(soap, &bk) != SOAP_OK)\n+... // error\n+soap_destroy(soap); // delete managed class instances\n+soap_end(soap); // delete managed data and temporaries\n+soap_free(soap); // finalize and free the context\n+The soap context holds the engine state and run-time flags, such as\n+#SOAP_XML_INDENT, serialization options, and other I/O settings. This means\n+that we can simply set the output file descriptor int soap::sendfd or output\n+stream std::ostream* soap::os of the context to redirect the content to a file\n+or string. Also, when serializing a graph with #SOAP_XML_GRAPH rather than an\n+XML tree, the XML output contains id-ref attributes to reference nodes in the\n+XML graph, similar to the way SOAP encoding with multi-reference id-ref/href\n+works, see Section How_to_use_XML_serializers_to_save_and_load_application_data\n+for details.\n+To read the XML representation from standard input into a book class instance:\n+struct soap *soap = soap_new1(SOAP_XML_STRICT); // new context\n+book bk;\n+if (soap_read_book(soap, &bk) != SOAP_OK)\n+... // error\n+else\n+cout << bk.isbn << \", \" << bk.title << \", \" << bk.publisher << endl;\n+... // further use of bk\n+soap_destroy(soap); // delete managed class instances\n+soap_end(soap); // delete managed data and temporaries\n+soap_free(soap); // finalize and free the context\n+SOAP_XML_STRICT\n+#define SOAP_XML_STRICT\n+soap_mode XML input flag value to enable strict XML validation of messages\n+received\n+Definition: stdsoap2.h:1809\n+Automatic built-in strict XML validation is enabled with #SOAP_XML_STRICT,\n+which ensures that data members are present so we can safely print them in this\n+example, thus ensuring consistency of data with the XML schema.\n+We can set the int soap::recvfd file descriptor or the std::istream* soap::is\n+input stream to read from a file or string stream instead of stdin.\n+The soap_destroy and soap_end calls deallocate the deserialized data, so use\n+these with care. Memory management is automatic in gSOAP to avoid leaks.\n+The above example uses a very simple example schema. The gSOAP toolkit handles\n+all XML schema constructs defined by the XML schema standard. The toolkit is\n+also able to serialize pointer-based C/C++ data structures, including cyclic\n+graphs, structs/classes, unions, enums, STL containers, and even special data\n+types such as struct tm. Therefore, the toolkit works in two directions: from\n+WSDL/schema to C/C++ and from C/C++ to WSDL/schema.\n+The gSOAP toolkit also handles multiple schemas defined in multiple namespaces.\n+Normally the namespace prefixes of XML namespaces are added to the C/C++ type\n+definitions to ensure type uniqueness. For example, if we would combine two\n+schemas in the same application where both schemas define a book object, we\n+need to resolve this conflict. In gSOAP this is done using namespace prefixes,\n+rather than C++ namespaces (research has pointed out that XML namespaces are\n+not equivalent to C++ namespaces). Thus, the book class might actually be bound\n+to an XML namespace and the class would be named ns__book, where ns is bound to\n+the corresponding namespace.\n+For example, the following run-time flags are available to control\n+serialization as an XML tree or graph:\n+struct soap *soap = soap_new();\n+soap_set_mode(soap, SOAP_XML_TREE); // use this for XML without id-ref (no\n+cycles!)\n+soap_set_mode(soap, SOAP_XML_GRAPH); // or use this for XML with id-ref\n+(including cycles)\n+soap_set_mode\n+void soap_set_mode(struct soap *soap, soap_mode input_and_output_mode)\n+Set input and output soap_mode flags of the given soap context.\n+SOAP_XML_TREE\n+#define SOAP_XML_TREE\n+soap_mode XML input/output flag value to serialize C/C++ data structures as XML\n+trees without id-href...\n+Definition: stdsoap2.h:2000\n+SOAP_XML_GRAPH\n+#define SOAP_XML_GRAPH\n+soap_mode XML input/output flag value to serialize C/C++ (cyclic) data\n+structures in XML with id-ref ...\n+Definition: stdsoap2.h:2016\n+Other flags can be used to format XML, see Section Run-time_flags .\n+For more details on XML databinding support for C and C++, see Section How_to\n+use_XML_serializers_to_save_and_load_application_data and the C_and_C++_XML\n+data_bindings document.\n+\ud83d\udd1d Back_to_table_of_contents\n+ A quick user guide\n+This section of the user guide presents a quick overview to get started with\n+gSOAP. In principle, XML SOAP and REST clients and services can be developed in\n+C and C++ with the soapcpp2 tool without a detailed understanding of XML, XML\n+schema, WSDL, and the XML SOAP protocol.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to build Web API clients\n+The implementation of a client application that invokes remote service\n+operations by serializing application data in XML for the remote operation\n+request, also called XML marshalling in remote procedure calling. This requires\n+a \"stub function\", also called \"service proxy\", for each service operation that\n+the client invokes. The primary stub's responsibility is to serialize the\n+parameter data in XML, send the request with the parameters to the designated\n+SOAP service over the wire, to wait for the response, and to deserialize the\n+parameter data of the response when it arrives. With the stub function in\n+place, the client application invokes a remote service operation as if it would\n+invoke a local function. To write a client stub function in C or C++ by hand is\n+a tedious task, especially if the input and output parameters of a service\n+operation contain elaborate data structures that must meet XML validation\n+constraints. Fortunately, the wsdl2h tool and soapcpp2 tool automate the\n+development of SOAP/XML Web service client and server applications.\n+The soapcpp2 tool generates the necessary gluing code (the client stub\n+functions and server skeleton functions) to build web service clients and\n+services. The input to the soapcpp2 tool consists of an interface file with\n+familiar C/C++ header file syntax. This interface header file can be\n+automatically generated from a WSDL (Web Service Description Language)\n+documentation of a service with the gSOAP wsdl2h tool.\n+The following command:\n+ wsdl2h -o calc.h http://www.genivia.com/calc.wsdl\n+generates the calc.h interface header file for soapcpp2. The WSDL specification\n+may consist of multiple imported WSDL files and XSD schema files. The WSDLs and\n+XSDs are then translated to C or C++, replacing WSDL service operation by C/C++\n+functions and XML schema data types by C/C++ data types.\n+To generate C code, we use wsdl2h_-c_option_-c:\n+ wsdl2h -c -o calc.h http://www.genivia.com/calc.wsdl\n+For more details on the wsdl2h tool and its options, see Section The_wsdl2h\n+tool .\n+When upgrading gSOAP to a newer version it is often not necessary to perform\n+this first step again, since newer versions are backward compatible to previous\n+interface header files generated by wsdl2h.\n+Looking into the file calc.h we see that the SOAP service methods are specified\n+as function prototypes. For example, the add function to add two doubles is\n+declared as:\n+int ns2__add(double a, double b, double& result);\n+The ns2__add function uses an XML namespace prefix to distinguish it from\n+operations defined in other namespaces, thus nicely preventing name clashes in\n+this way. The convention to add an XML namespace prefix to the names of\n+operations, types, and struct and class members is universally used by the\n+gSOAP tools and automatically added by wsdl2h.\n+Next, the calc.h header file is input to the soapcpp2 tool to generate the\n+gluing code's logic to invoke the Web service from a client application:\n+soapcpp2 calc.h\n+The function prototypes in calc.h are converted by the soapcpp2 tool to stub\n+functions for remote calls:\n+ * soapStub.h annotated copy of the header file's definitions.\n+ * soapH.h XML serializers declarations\n+ * soapC.cpp XML serializers implementations\n+ * soapClient.cpp the client calling stub functions\n+The logic of the generated soapClient.cpp stub functions allow client\n+applications to seamlessly interact with existing SOAP Web services as\n+illustrated by the client code example in the next section.\n+The input and output parameters of a service operation may be primitive data\n+types or compound data types, such as containers and pointer-based linked data\n+structures. These are defined in the interface header file, which is either\n+generated by the wsdl2h tool or it may be specified by hand. The soapcpp2 tool\n+automatically generates XML serializers and XML deserializers for these data\n+types to enable the generated stub functions to serialize the contents of the\n+parameters of the service operations in XML.\n+The soapcpp2 tool also generates \"skeleton functions\" soapServer.cpp for each\n+of the service operations specified in the interface header file. The skeleton\n+functions can be readily used to implement one or more of the service\n+operations in a new XML Web service.\n+To develop C++ client applications, a useful option to use with soapcpp2 is -\n+j to generate proxy classes to invoke services, instead of global functions:\n+soapcpp2 -j calc.h\n+The function prototypes in calc.h are converted by the soapcpp2 tool to the\n+following function:\n+ * soapStub.h annotated copy of the header file's definitions.\n+ * soapH.h XML serializers declarations\n+ * soapC.cpp XML serializers implementations\n+ * soapcalcProxy.h the client proxy class\n+ * soapcalcProxy.cpp the client proxy class implementation\n+To use the proxy class, #include \"soapcalcProxy.h\" and compile and link\n+soapcalcProxy.cpp. See the following section.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+The add service operation declared in the calc.h file obtained with the wsdl2h\n+tool in the previous section, adds two doubles. The WSDL description of the\n+service provides the endpoint to invoke the service operations and the XML\n+namespace used by the operations:\n+ * Endpoint URL: http://websrv.cs.fsu.edu/~engelen/calcserver.cgi\n+ * XML namespace: urn:calc\n+Each SOAP-specific service operation also has a \"SOAP action\", which is an\n+optional string to identify the operation, which is mainly used with WS-\n+Addressing. The request and response messages for SOAP RPC-encoded services are\n+simply represented by C functions with input and output parameters. For the add\n+operation, the SOAP binding details are:\n+ * SOAP style: RPC\n+ * SOAP encoding: encoded\n+ * SOAP action: \"\"\n+This information is translated to the wsdl2h-generated interface header file\n+with the service definitions. The calc.h header file for C++ generated by\n+wsdl2h contains the following directives and declarations:\n+//gsoap ns2 schema namespace: urn:calc\n+//gsoap ns2 schema form: unqualified\n+//gsoap ns2 service name: calc\n+//gsoap ns2 service type: calcPortType\n+//gsoap ns2 service port: http://websrv.cs.fsu.edu/~engelen/calcserver.cgi\n+//gsoap ns2 service namespace: urn:calc\n+//gsoap ns2 service transport: http://schemas.xmlsoap.org/soap/http\n+//gsoap ns2 service method-protocol: add SOAP\n+//gsoap ns2 service method-style: add rpc\n+//gsoap ns2 service method-encoding: add http://schemas.xmlsoap.org/soap/\n+encoding/\n+//gsoap ns2 service method-action: add \"\"\n+int ns2__add(double a, double b, double& result);\n+The actual contents may vary depending on the release version and the options\n+used to control the output.\n+The other calculator service operations are similar and were elided for\n+clarity.\n+The //gsoap directives are interpreted by the soapcpp2 tool to generate code\n+that is compliant to the SOAP protocol. For this service the SOAP protocol with\n+the \"SOAP 1.1 RPC encoding style\" is used. This produces XML messages with the\n+familiar SOAP envelope and body in the SOAP 1.1 namespace and a SOAP-ENV:\n+encodingStyle attribute for SOAP RPC encoding (a simple XML serialization\n+format) as can be seen in the XML request message:\n+\n+\n+\n+\n+1.0\n+2.0\n+\n+\n+\n+Another style is \"document/literal\" which is also defined by SOAP 1.1/1.2.\n+To use SOAP document/literal style is indicated for each service operation as\n+follows in the interface file specification, which also switches to the SOAP\n+1.2 protocol:\n+//gsoap ns2 service method-protocol: add SOAP1.2\n+//gsoap ns2 service method-style: add document\n+//gsoap ns2 service method-encoding: add literal\n+//gsoap ns2 service method-action: add \"\"\n+int ns2__add(double a, double b, double& result);\n+This produces XML messages with the familiar SOAP envelope and body with the\n+SOAP 1.2 namespace and without the encodingStyle attribute as can be seen in\n+the XML request message:\n+\n+\n+\n+\n+1.0\n+2.0\n+\n+\n+\n+REST instead of SOAP is specified with HTTP instead of SOAP with the //gsoap\n+ service method-protocol: directive to carry our XML messages using the\n+HTTP POST method without a SOAP envelope:\n+//gsoap ns2 service method-protocol: add HTTP\n+int ns2__add(double a, double b, double& result);\n+This produces non-SOAP XML messages with HTTP POST. For example:\n+\n+\n+1.0\n+2.0\n+\n+Likewise you can specify POST, PUT, and GET HTTP methods for direct XML\n+messaging instead of SOAP. However, all XML Web services protocols such as WS-\n+Security and WS-Addressing require SOAP to include the SOAP Headers.\n+Note that the function declaration itself and the client-side calling stub and\n+server-side skeleton functions are unchanged. The internals of the generated\n+functions are changed to accommodate the protocol specified with the\n+directives.\n+For more details about the //gsoap directives, see Section Directives .\n+So as you can see, the Web service operations are declared as function\n+prototypes. When the parameters of the function are structs and classes, then\n+all of these interdependent data types are included in the wsdl2h-generated\n+header file.\n+In this simple example the parameters are primitive types. The calculator add\n+operation takes two double floats a and b, and returns the sum in result. By\n+convention, all parameters are input parameters except the last parameter which\n+is an output parameter or specified as void for one-way messages. The last\n+parameter is always a single output parameter, if not void. A struct or class\n+is used to wrap multiple output parameters, see also Section How_to_specify\n+multiple_output_parameters . This last parameter must be a pointer or\n+reference. By contrast, the input parameters support pass by value or by\n+pointer, but not pass by C++ reference due to complications when generating\n+compilable source code for the stub and skeleton functions.\n+The function prototype associated with a service operation always returns an\n+int. The return value indicates success with #SOAP_OK (zero) or failure with a\n+nonzero value. See Section Run-time_error_codes for the error codes.\n+The role of the namespace prefix (ns2__) in the service operation name\n+specified as a function prototype associates an XML namespace with the service\n+operation as a qualified name, i.e. qualified by means of a namespace prefix.\n+This is discussed in detail in Section XML_namespace_considerations .\n+Basically, the namespace prefix is added to a function name or type name with a\n+pair of underscores, as in ns2__add, where ns2 is the namespace prefix and add\n+is the service operation name. This mechanism ensures uniqueness of operations\n+and types associated with a service.\n+When using wsdl2h it is strongly recommended to set the namespace prefix to a\n+name of your choice by modifying the typemap.dat file that is used by wsdl2h.\n+This file can be copied from gsoap/typemap.dat and modified in the local\n+directory where you run wsdl2h. This avoids problems when running wsdl2h on\n+multiple WSDLs where the sequence of prefixes ns1, ns2, and so on are\n+arbitrarily assigned to the services. To choose a prefix name for all the\n+operations and types of a service, say prefix c__ for the calculator service,\n+add the following line to typemap.dat:\n+c = \"urn:calc\"\n+and rerun wsdl2h. Moreover, the typemap.dat configures wsdl2h to use specific\n+bindings and data types for services. The result is that c__add is used to\n+uniquely identify the operation rather than the more arbitrary name ns2__add.\n+A note on the use of underscores in names: a single underscore in an identifier\n+name will be translated into a dash in XML, because dashes are more frequently\n+used in XML compared to underscores, see Section C/C++_identifier_name_to_XML\n+tag_name_translation . Double underscores separate the namespace prefix from\n+the unqualified part of the qualified name.\n+Next, the soapcpp2 tool is invoked from the command line to process the calc.h\n+service definitions:\n+ soapcpp2 calc.h\n+The tool generates the client stub functions for the service operations. Stub\n+functions can be invoked by a client program to invoke the remote service\n+operations. The interface of the generated stub function is identical to the\n+function prototype in the calc.h service definition file, but with additional\n+parameters to pass the engine's context soap, an endpoint URL (or NULL for the\n+default), and a SOAP action (or NULL for the default):\n+int soap_call_c__add(struct soap *soap, char *URL, char *action, double a,\n+double b, double& result);\n+This stub function is saved in soapClient.cpp. The file soapC.cpp contains the\n+serializer and deserializer functions for the data types used by the stub. You\n+can use wsdl2h_-c_option_-c to generate pure C code. Likewise, soapcpp2 -\n+c option -c generates pure C code, if the input interface file is written in C\n+of course.\n+The soap parameter of the stub function shown above must be a valid pointer to\n+a soap context. The URL parameter when non-NULL overrides the default endpoint\n+address defined by the WSDL and the //gsoap service port: directive.\n+The action parameter when non-NULL overrides the default SOAP action defined by\n+the WSDL and the //gsoap service method-action: directive.\n+The following example C/C++ client program uses the generated stub function to\n+invoke the remote service operation:\n+#include \"soapH.h\" // include the generated declarations\n+#include \"calc.nsmap\" // include the generated namespace table\n+int main()\n+{\n+double sum;\n+struct soap *soap = soap_new(); // the context\n+if (soap_call_c__add(soap, NULL, NULL, 1.0, 2.0, &sum) == SOAP_OK)\n+std::cout << \"Sum = \" << sum << std::endl;\n+else // an error occurred\n+soap_print_fault(soap, stderr); // display the SOAP fault message on the stderr\n+stream\n+soap_destroy(soap); // delete managed class instances\n+soap_end(soap); // delete managed data and temporaries\n+soap_free(soap); // finalize and free the context\n+return 0;\n+}\n+The soap_call_c__add call returns #SOAP_OK (zero) on success and a nonzero\n+error on failure. When an error occurred you can print the fault message with\n+the soap_print_fault(struct_soap*,_FILE*) function. Use soap_sprint_fault\n+(struct_soap*,_char_*buf,_size_t_len) to save the fault message to a string\n+buffer buf[0...len-1]. Use soap_stream_fault(struct_soap*,_std::ostream&) to\n+send the fault message to a stream.\n+The following functions are used to explicitly set up a soap context and\n+finalize it:\n+ * soap_new() allocates, initializes, and returns a pointer to a new soap\n+ context.\n+ * soap_new1(soap_mode_mode) allocates, initializes and sets both in- and\n+ out-mode flags to the same mode, and returns a pointer to a new soap\n+ context.\n+ * soap_new2(soap_mode_imode,_soap_mode_omode) allocates, initializes and\n+ sets in- and out-mode flags, and returns a pointer to a new soap context.\n+ * soap_copy(struct_soap*) allocates and returns a new context by copying\n+ the given context with soap_copy_context, such that the new context\n+ returned does not share any data with the given context.\n+ * soap_init(struct_soap*) initializes a stack-allocated soap context in C,\n+ when not using soap_new, for C++ use the soap constructors instead.\n+ * soap_init1(struct_soap*,_soap_mode_mode) initializes a stack-allocated\n+ soap context, when not using soap_new1, and sets both in- and out-mode\n+ flags to the same mode, for C++ use the soap constructors instead.\n+ * soap_init2(struct_soap*,_soap_mode_imode,_soap_mode_omode) initializes a\n+ stack-allocated soap context, when not using soap_new2, and sets in- and\n+ out-mode flags, for C++ use the soap constructors instead.\n+ * soap_done(struct_soap*) finalizes a context but does not delete the\n+ specified soap context (for example when stack-allocated). The context\n+ can be re-initialized afterwards with soap_init. In C++, a stack-\n+ allocated context invokes this function in its destructor when the\n+ context is deleted.\n+ * soap_free(struct_soap*) finalizes and deletes the given context, when\n+ created with soap_new or soap_copy.\n+A soap context can be reused as many times as necessary and does not need to be\n+reinitialized when doing so. However, a new context is required for each thread\n+that runs independently to guarantee exclusive access to a soap context by each\n+thread.\n+Also the use of any client calls within an active service operation implemented\n+at the server side requires a new context, since soap_serve is still processing\n+with the current soap context that must be maintained while the service\n+operation and response has not been completed yet.\n+The soapcpp2 code generator tool generates a service proxy class for C++ client\n+applications (and service objects for server applications) with the soapcpp2 -\n+j option -j (or -i option):\n+ soapcpp2 -j calc.h\n+The proxy is defined in:\n+ * soapcalcProxy.h client proxy class\n+ * soapcalcProxy.cpp client proxy class\n+Without the -j option, C-like soapClient.cpp and soapServer.cpp source codes\n+are is generated. Use option -i as an alternative to -j to generate classes\n+with the same functionality, but that are inherited from the soap struct. With\n+the -j option, the soap engine context is a pointer member of the generated\n+proxy and service classes and can therefore be shared with other proxy or\n+service class instances. The choice of option to use is application-dependent,\n+but the choice is also important when services are chained to serve requests on\n+the same server port, see Section How_to_chain_C++_server_classes_to_accept\n+messages_on_the_same_port .\n+The generated C++ proxy class initializes the context and offers the service\n+interface as a collection of methods:\n+#include \"soapcalcProxy.h\" // get proxy\n+#include \"calc.nsmap\" // include the generated namespace table\n+int main()\n+{\n+calcProxy calc(SOAP_XML_INDENT);\n+double sum;\n+if (calc.add(1.0, 2.0, sum) == SOAP_OK)\n+std::cout << \"Sum = \" << sum << std::endl;\n+else\n+calc.soap_stream_fault(std::cerr);\n+calc.destroy();\n+return calc.soap->error; // nonzero when error\n+}\n+The proxy constructor takes context mode parameters to initialize the context,\n+e.g. #SOAP_XML_INDENT in this example.\n+The code is compiled and linked with soapcalcProxy.cpp, soapC.cpp, and gsoap/\n+stdsoap2.cpp.\n+The proxy class name is extracted from the WSDL content and may not always be\n+in a short format. You can change this directive to customize the service name:\n+//gsoap c service name: calc\n+then rerun soapcpp2 to generate code that uses the new name.\n+When the example client application is invoked, a SOAP request is performed:\n+POST /~engelen/calcserver.cgi HTTP/1.1\n+Host: websrv.cs.fsu.edu\n+User-Agent: gSOAP/2.8\n+Content-Type: text/xml; charset=utf-8\n+Content-Length: 464\n+Connection: close\n+SOAPAction: \"\"\n+\n+\n+\n+\n+1\n+2\n+\n+\n+\n+The SOAP response message is:\n+HTTP/1.1 200 OK\n+Date: Wed, 05 May 2010 16:02:21 GMT\n+Server: Apache/2.0.52 (Scientific Linux)\n+Content-Length: 463\n+Connection: close\n+Content-Type: text/xml; charset=utf-8\n+\n+\n+\n+\n+3\n+\n+\n+\n+A client can invoke a sequence of service operations, like so:\n+#include \"soapcalcProxy.h\" // get proxy\n+#include \"calc.nsmap\" // include the generated namespace table\n+int main()\n+{\n+calcProxy calc(SOAP_IO_KEEPALIVE); // keep-alive improves connection\n+performance\n+double sum = 0.0;\n+double val[] = { 5.0, 3.5, 7.1, 1.2 };\n+for (int i = 0; i < 4; i++)\n+if (calc.add(sum, val[i], sum))\n+return calc.soap->error;\n+std::cout << \"Sum = \" << sum << std::endl;\n+calc.destroy();\n+return 0;\n+}\n+SOAP_IO_KEEPALIVE\n+#define SOAP_IO_KEEPALIVE\n+soap_mode IO input and output flag value to keep the socket connection alive\n+for #SOAP_MAXKEEPALIVE m...\n+Definition: stdsoap2.h:1642\n+In the example shown above, no deserialized data is deallocated until\n+calc.destroy(). To deallocate deserialized data between the calls we change the\n+loop as follows:\n+for (int i = 0; i < 4; i++)\n+{\n+if (calc.add(sum, val[i], sum))\n+return calc.soap->error;\n+calc.destroy();\n+}\n+Deallocation is safe here, since the float values were copied and saved in sum.\n+In other scenarios we should make sure data is copied to local data structures\n+when the data should be preserved. There are tooling options for deep copy and\n+delete of entire data structures to simplify this task, see Section Generating\n+deep_copy_and_deletion_functions.\n+To delegate deletion to another context for later removal, use\n+soap_delegate_deletion(struct_soap_*soap_from,_struct_soap_*soap_to). For\n+example:\n+struct soap soap;\n+soap_init(&soap);\n+{\n+// create proxy\n+calcProxy calc;\n+... // data produced, e.g. deserialized data with client-side calls\n+soap_delegate_deletion(&calc, &soap);\n+calc.destroy();\n+}\n+... // data can still be used\n+soap_destroy(&soap); // delete managed class instances\n+soap_end(&soap); // delete managed data and temporaries\n+soap_done(&soap); // finalize the context\n+soap_done\n+void soap_done(struct soap *soap)\n+Finalize the given soap context, i.e. when the soap context is stack allocated,\n+automatically invoked...\n+soap_init\n+void soap_init(struct soap *soap)\n+Initialize a stack-allocated soap context.\n+soap_delegate_deletion\n+void soap_delegate_deletion(struct soap *soap, struct soap *soap_to)\n+Delegate the deletion of all managed objects and data from the specified soap\n+context to another soap...\n+In C we use wsdl2h_-c_option_-c to generate C. The example client calculator\n+program would be written as:\n+#include \"soapH.h\"\n+#include \"calc.nsmap\"\n+int main()\n+{\n+struct soap soap;\n+double sum = 0.0;\n+double val[] = { 5.0, 3.5, 7.1, 1.2 };\n+int i;\n+soap_init1(&soap, SOAP_IO_KEEPALIVE);\n+for (i = 0; i < 4; i++)\n+if (soap_call_c__add(&soap, NULL, NULL, sum, val[i], &sum))\n+return soap.error;\n+printf(\"Sum = %lg\\n\", sum);\n+soap_end(&soap);\n+soap_done(&soap);\n+return 0;\n+}\n+soap_init1\n+void soap_init1(struct soap *soap, soap_mode input_and_output_mode)\n+Initialize a stack-allocated soap context with input and output soap_mode\n+flags.\n+soap::error\n+int error\n+The soap context soap_status (int) error code of the last operation or #SOAP_OK\n+(zero)\n+Definition: stdsoap2.h:2920\n+The code above is compiled and linked with the soapcpp2-generated soapClient.c\n+and soapC.c files, and gsoap/stdsoap2.c (or compile with -bgsoap).\n+\ud83d\udd1d Back_to_table_of_contents\n+ XML namespace considerations\n+The declaration of the ns2__add function prototype discussed in the previous\n+section uses the namespace prefix ns2__ of the service operation XML namespace,\n+which is distinguished by a pair of underscores in the function name to\n+separate the namespace prefix from the service operation name. The purpose of a\n+namespace prefix is to associate a service operation name with a service in\n+order to prevent naming conflicts, e.g. to distinguish identical service\n+operation names used by different services.\n+Note that the XML response of the service example uses a namespace prefix that\n+may be different (e.g. ns) as long as it bound to the same namespace name urn:\n+calc through the xmlns:ns=\"urn:calc\" binding. The use of namespace prefixes and\n+namespace names is also required to enable SOAP applications to validate the\n+content of SOAP messages. The namespace name in the service response is\n+verified by the stub function by using the information supplied in a namespace\n+mapping table that is required to be part of gSOAP client and service\n+application codes. The table is accessed at run time to resolve namespace\n+bindings, both by the generated stub's data structure serializer for encoding\n+the client request and by the generated stub's data structure deserializer to\n+decode and validate the service response. The namespace mapping table should\n+not be part of the header file input to the soapcpp2 tool. Service details\n+including namespace bindings may be provided with gSOAP directives in a header\n+file, see Section Directives .\n+The namespace mapping table is:\n+struct Namespace namespaces[] =\n+{\n+// { \"prefix\", \"URI\", \"URI-pattern\" (optional) }\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\"}, // must be first\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\"}, // must be second\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\"}, // must be third\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\"}, // 2001 XML Schema\n+{ \"ns2\", \"urn:calc\"}, // given by the service description\n+{ NULL, NULL} // end of table\n+};\n+namespaces\n+struct Namespace namespaces[]\n+The global XML namespaces table with entries defined by the Namespace structure\n+and populated in an ....\n+Definition: stdsoap2.h:9261\n+Namespace\n+Structure of each row in a namespace table.\n+Definition: stdsoap2.h:9246\n+The first four namespace entries in the table consist of the standard\n+namespaces used by the SOAP protocol. In fact, the namespace mapping table is\n+explicitly declared to enable a programmer to specify the SOAP encoding style\n+and to allow the inclusion of namespace-prefix with namespace-name bindings to\n+comply to the namespace requirements of a specific SOAP service. For example,\n+the namespace prefix ns2, which is bound to urn:calc by the namespace mapping\n+table shown above, is used by the generated stub function to encode the add\n+request. This is performed automatically by the soapcpp2 tool by using the ns2\n+prefix of the ns2__add method name specified in the calc.h header file. In\n+general, if a function name of a service operation, struct name, class name,\n+enum name, or member name of a struct or class has a pair of underscores, the\n+name has a namespace prefix that must be defined in the namespace mapping\n+table.\n+The namespace mapping table will be output as part of the SOAP Envelope by the\n+stub function. For example:\n+\n+...\n+The namespace bindings will be used by a SOAP service to validate the SOAP\n+request.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+The incorporation of namespace prefixes into C++ identifier names is necessary\n+to distinguish service operations that share the same name but are provided by\n+separate Web services and/or organizations. It avoids potential name clashes,\n+while sticking to the C syntax since C has no support for namespaces. The C++\n+proxy classes generated with soapcpp2 -j option -j (or option -i) drop the\n+namespace prefix from the method names.\n+The namespace prefix convention is also be applied to non-primitive types. For\n+example, class names are prefixed to avoid name clashes when the same name is\n+used by multiple XML schemas. This ensures that the XML databinding never\n+suffers from conflicting schema content. For example:\n+class e__Address // an electronic address from schema 'e'\n+{ public:\n+char *email;\n+char *url;\n+};\n+class s__Address // a street address from schema 's'\n+{ public:\n+char *street;\n+int number;\n+char *city;\n+};\n+At this point you may ask why the gSOAP tools do no use C++ namespaces to\n+implement XML namespaces. The answer is not too complicated. XML namespaces are\n+semantically more rich than C++ namespaces. For example, XML schema\n+complexTypes may reference elements in another schema and these elements may be\n+qualified in XML. There could also be element name clashes when element names\n+are the same but referenced in different schemas. In gSOAP this is resolved by\n+naming struct and class members with the namespace prefix notation, thereby\n+ensuring that name clashes among members cannot occur.\n+An instance of e__Address is encoded by the generated serializer for this type\n+as an Address element with namespace prefix e:\n+\n+me@home\n+www.me.com\n+\n+While an instance of s__Address is encoded by the generated serializer for this\n+type as an Address element with namespace prefix s:\n+\n+Technology Drive\n+5\n+Softcity\n+\n+The namespace mapping table of the client program must have entries for e and s\n+that refer to the XML Schemas of the data types:\n+struct Namespace namespaces[] =\n+{\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" },\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\" },\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\" },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\" },\n+{ \"e\", \"http://www.me.com/schemas/electronic-address\" },\n+{ \"s\", \"http://www.me.com/schemas/street-address\" },\n+{ NULL, NULL }\n+};\n+This table is automatically generated by soapcpp2 and saved as a .nsmap file\n+that can be included in the source code.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to generate C++ client proxy classes\n+Proxy classes for C++ client applications are automatically generated by the\n+soapcpp2 tool, as was shown in Section Example .\n+A new and improved code generation capability is implemented in soapcpp2 for\n+C++ proxy classes by using soapcpp2 -j option -j (or option -i). These new\n+proxy classes have a cleaner interface and offer more capabilities compared to\n+the gSOAP 2.7 proxy and service classes.\n+In C++ you can also use wsdl2h_-q_name_option_-q_name to generate the proxy\n+class and serializers in the specified C++ namespace name. This is very useful\n+if you want to create multiple proxies for services by repeated use of wsdl2h\n+and then combine them in one code. Alternatively, you can run wsdl2h just once\n+on all service WSDLs and have soapcpp2 generate multiple proxies for you. The\n+latter approach does not use C++ namespaces and actually reduces the overall\n+amount of source code by avoiding code duplication.\n+To illustrate the generation of a proxy class, the calc.h header file example\n+of the previous section used.\n+// Content of file \"calc.h\":\n+//gsoap ns2 schema namespace: urn:calc\n+//gsoap ns2 schema form: unqualified\n+//gsoap ns2 service name: calc\n+//gsoap ns2 service type: calcPortType\n+//gsoap ns2 service port: http://websrv.cs.fsu.edu/~engelen/calcserver.cgi\n+//gsoap ns2 service namespace: urn:calc\n+//gsoap ns2 service transport: http://schemas.xmlsoap.org/soap/http\n+//gsoap ns2 service method-protocol: add SOAP\n+//gsoap ns2 service method-style: add rpc\n+//gsoap ns2 service method-encoding: add http://schemas.xmlsoap.org/soap/\n+encoding/\n+//gsoap ns2 service method-action: add \"\"\n+int ns2__add(double a, double b, double& result);\n+//gsoap ns2 service method-protocol: sub SOAP\n+//gsoap ns2 service method-style: sub rpc\n+//gsoap ns2 service method-encoding: sub http://schemas.xmlsoap.org/soap/\n+encoding/\n+//gsoap ns2 service method-action: sub \"\"\n+int ns2__sub(double a, double b, double& result);\n+//gsoap ns2 service method-protocol: mul SOAP\n+//gsoap ns2 service method-style: mul rpc\n+//gsoap ns2 service method-encoding: mul http://schemas.xmlsoap.org/soap/\n+encoding/\n+//gsoap ns2 service method-action: mul \"\"\n+int ns2__mul(double a, double b, double& result);\n+The namespace directives declare the XML schema namespace and WSDL service\n+namespace, which are the same in this example. The name, type, and port\n+directives declare service details, which are used by soapcpp2 to name the\n+proxy class, the WSDL port type, and the service location port which is the\n+endpoint URL of the service. The messaging transport mode is HTTP.\n+The groups of four directives per service operation declare the operation SOAP\n+style (RPC) and encoding (SOAP encoded), and SOAP action string, which is\n+optional and used mostly for HTTP-based routing of messages and by WS-\n+Addressing. In this example, the protocol is SOAP 1.1 RPC encoding. More recent\n+uses of SOAP focus on document/literal style messaging, which is also declared\n+with directives without affecting the rest of the interface header file. For //\n+gsoap directive details, see Section Directives .\n+Run soapcpp2 -j on this interface header file with the calculator service\n+specification to generate soapcalcProxy.cpp and soapcalcProxy.h with the proxy\n+class declaration:\n+#include \"soapH.h\"\n+class SOAP_CMAC calcProxy {\n+public:\n+// Context to manage proxy IO and data\n+struct soap *soap;\n+// flag indicating that this context is owned by this proxy when context is\n+shared\n+bool soap_own;\n+// Endpoint URL of service 'calcProxy' (change as needed)\n+const char *soap_endpoint;\n+// Variables globally declared in calc.h, if any\n+// Construct a proxy with new managing context\n+calcProxy();\n+// Copy constructor\n+calcProxy(const calcProxy& rhs);\n+// Construct proxy given a shared managing context\n+calcProxy(struct soap*);\n+// Construct proxy given a shared managing context and endpoint URL\n+calcProxy(struct soap*, const char *endpoint);\n+// Constructor taking an endpoint URL\n+calcProxy(const char *endpoint);\n+// Constructor taking input and output mode flags for the new managing context\n+calcProxy(soap_mode iomode);\n+// Constructor taking endpoint URL and input and output mode flags for the new\n+managing context\n+calcProxy(const char *endpoint, soap_mode iomode);\n+// Constructor taking input and output mode flags for the new managing context\n+calcProxy(soap_mode imode, soap_mode omode);\n+// Destructor deletes non-shared managing context only (use destroy() to delete\n+deserialized data)\n+virtual ~calcProxy();\n+// Initializer used by constructors\n+virtual void calcProxy_init(soap_mode imode, soap_mode omode);\n+// Return a copy that has a new managing context with the same engine state\n+virtual calcProxy *copy();\n+// Copy assignment\n+calcProxy& operator=(const calcProxy&);\n+// Delete all deserialized data (uses soap_destroy() and soap_end())\n+virtual void destroy();\n+// Delete all deserialized data and reset to default\n+virtual void reset();\n+// Disables and removes SOAP Header from message by setting soap->header = NULL\n+virtual void soap_noheader();\n+// Get SOAP Header structure (i.e. soap->header, which is NULL when absent)\n+virtual SOAP_ENV__Header *soap_header();\n+// Get SOAP Fault structure (i.e. soap->fault, which is NULL when absent)\n+virtual SOAP_ENV__Fault *soap_fault();\n+// Get SOAP Fault subcode QName string (NULL when absent)\n+virtual const char *soap_fault_subcode();\n+// Get SOAP Fault string/reason (NULL when absent)\n+virtual const char *soap_fault_string();\n+// Get SOAP Fault detail XML string (NULL when absent)\n+virtual const char *soap_fault_detail();\n+// Close connection (normally automatic, except for send_X ops)\n+virtual int soap_close_socket();\n+// Force close connection (can kill a thread blocked on IO)\n+virtual int soap_force_close_socket();\n+// Print fault\n+virtual void soap_print_fault(FILE*);\n+#ifndef WITH_LEAN\n+#ifndef WITH_COMPAT\n+// Print fault to stream\n+virtual void soap_stream_fault(std::ostream&);\n+#endif\n+// Write fault to buffer\n+virtual char *soap_sprint_fault(char *buf, size_t len);\n+#endif\n+// Web service operation 'add' (returns SOAP_OK or error code)\n+virtual int add(double a, double b, double *result)\n+{ return this->add(NULL, NULL, a, b, result); }\n+virtual int add(const char *soap_endpoint, const char *soap_action, double a,\n+double b, double *result);\n+// Web service operation 'sub' (returns SOAP_OK or error code)\n+virtual int sub(double a, double b, double *result)\n+{ return this->sub(NULL, NULL, a, b, result); }\n+virtual int sub(const char *soap_endpoint, const char *soap_action, double a,\n+double b, double *result);\n+// Web service operation 'mul' (returns SOAP_OK or error code)\n+virtual int mul(double a, double b, double *result)\n+{ return this->mul(NULL, NULL, a, b, result); }\n+virtual int mul(const char *soap_endpoint, const char *soap_action, double a,\n+double b, double *result);\n+};\n+soap_fault\n+void soap_fault(struct soap *soap)\n+If soap::fault is NULL then allocate SOAP_ENV__Fault header and set soap::fault\n+to point to it.\n+soap_fault_subcode\n+const char * soap_fault_subcode(struct soap *soap)\n+Returns the SOAP Fault subcode QName string or NULL when absent.\n+soap_fault_detail\n+const char * soap_fault_detail(struct soap *soap)\n+Returns the SOAP Fault detail XML string or NULL when absent.\n+soap_stream_fault\n+void soap_stream_fault(struct soap *soap, std::ostream &os)\n+Print error message on the specified output stream.\n+soap_fault_string\n+const char * soap_fault_string(struct soap *soap)\n+Returns the SOAP Fault string/reason or NULL when absent.\n+soap_sprint_fault\n+char * soap_sprint_fault(struct soap *soap, char *buf, size_t len)\n+Print error message to the specified string buffer.\n+soap_mode\n+int soap_mode\n+The soap_mode flags to initialize the soap context, flags can be combined with\n+| (bit-wise or)\n+Definition: stdsoap2.h:1532\n+soap_header\n+void soap_header(struct soap *soap)\n+If soap::header is NULL then allocate SOAP_ENV__Header header and set soap::\n+header to point to it.\n+SOAP_CMAC\n+#define SOAP_CMAC\n+User-definable macro to annotate class definitions.\n+Definition: stdsoap2.h:1431\n+SOAP_ENV__Fault\n+SOAP Fault structure.\n+Definition: stdsoap2.h:9446\n+SOAP_ENV__Header\n+SOAP Header structure.\n+Definition: stdsoap2.h:9332\n+soap::destroy\n+void destroy()\n+Delete all dynamically-allocated objects and data managed by this soap context\n+(C++ only,...\n+soap::omode\n+soap_mode omode\n+The soap context output soap_mode flags that are set at context initialization\n+and set or cleared wit...\n+Definition: stdsoap2.h:2835\n+soap::imode\n+soap_mode imode\n+The soap context input soap_mode flags that are set at context initialization\n+and set or cleared with...\n+Definition: stdsoap2.h:2830\n+soap::soap\n+soap()\n+Construct a soap context (C++ only, in C use soap_new or soap_init)\n+soap::buf\n+char buf[SOAP_BUFLEN]\n+Internal buffer with partial data received or partial data to be sent, where\n+the data occupies soap::...\n+Definition: stdsoap2.h:4195\n+soap::operator=\n+struct soap & operator=(const struct soap &)\n+Assignment constructor (C++ only, in C use soap_copy or soap_copy_context)\n+soap::endpoint\n+char endpoint[SOAP_TAGLEN]\n+The endpoint URL as received on the server side.\n+Definition: stdsoap2.h:4018\n+The above shows the raw source code with comments generated by soapcpp2. To\n+obtain an annotated markdown document with documented the proxy and service\n+classes and documented data types used by the service operations, run soapcpp2\n+-r option -r to generate a soapReadme.md report. This markdown file can be\n+converted to HTML or other document formats with tools such as Doxygen.\n+This generated proxy class can be included into a client application together\n+with the generated namespace table as shown in this example:\n+#include \"soapcalcProxy.h\"\n+#include \"calc.nsmap\"\n+int main()\n+{\n+calcProxy calc(SOAP_XML_INDENT);\n+double r;\n+if (calc.add(1.0, 2.0, r) == SOAP_OK)\n+std::cout << \"Sum of 1.0 and 2.0 is \" << r << std::endl;\n+else\n+calc.soap_stream_fault(std::cerr);\n+return 0;\n+}\n+The XML message sent by the client proxy:\n+\n+\n+\n+1.0\n+2.0\n+\n+\n+\n+The XML message returned by the service:\n+\n+\n+\n+3.0\n+\n+\n+\n+With soapcpp2 -j option -j, the constructor of the proxy class allocates and\n+initializes a soap context as a pointer member of the class. With soapcpp2 -\n+i option -i the proxy class is derived from the soap struct instead and this\n+context is initialized when the proxy class constructor is invoked.\n+To place the proxy class in a C++ namespace name, use soapcpp2 -q name option -\n+q name. See Section soapcpp2_options.\n+\ud83d\udd1d Back_to_table_of_contents\n+ XSD type serialization\n+XML Web services use XML schemas to define the data types of XML data\n+structures in the XML message payloads. The default encoding assumed by\n+soapcpp2 is SOAP 1.1 document/literal style messaging but this is easily\n+changed using options, such as -2 (SOAP 1.2), -0 (non-SOAP XML REST), and -e\n+(SOAP with RPC encoding). See Section soapcpp2_options.\n+Primitive XSD types are mapped to C/C++ primitive types by means of typedef\n+declarations in the interface header file for soapcpp2 to generate the XML data\n+binding serialization code. A typedef binds an XML schema type name to a C/C++\n+type. For example:\n+typedef char *xsd__anyURI; // encode xsd:anyURI values as a strings\n+typedef std::string xsd__NMTOKEN; // encode xsd:NMTOKEN values as strings\n+typedef float xsd__float; // encode xsd:float values as floats\n+This simple mechanism informs the soapcpp2 tool to generate serializers and\n+deserializers that explicitly encode and decode the primitive C++ types as\n+built-in primitive XSD types. At the same time, the use of typedef does not\n+force any source code rewriting of a client or Web service application because\n+the internal types used by the application are not required to be changed by\n+using this typedef mechanism.\n+The built-in XSD types are covered by typedef mappings and we could map XSD\n+xsd:base64Binary and xsd:hexBinary to strings, but that would be cumbersome\n+since the application should populate the strings properly. Instead, we can\n+defined the following structs or classes to contain binary content that the\n+generated serializers serialize in base64 and hexadecimal, respectively:\n+struct xsd__base64Binary\n+{\n+unsigned char *__ptr; // points to raw binary data\n+int __size; // length of raw binary data\n+};\n+struct xsd__hexBinary\n+{\n+unsigned char *__ptr; // points to raw binary data\n+int __size; // length of raw binary data\n+};\n+xsd__base64Binary\n+XSD base64Binary structure with attachment data.\n+Definition: stdsoap2.h:9837\n+xsd__base64Binary::__ptr\n+unsigned char * __ptr\n+pointer to binary data\n+Definition: stdsoap2.h:9838\n+xsd__base64Binary::__size\n+int __size\n+size of the binary data\n+Definition: stdsoap2.h:9839\n+xsd__hexBinary\n+XSD hexBinary structure with attachment data.\n+Definition: stdsoap2.h:9958\n+xsd__hexBinary::__size\n+int __size\n+size of the binary data\n+Definition: stdsoap2.h:9960\n+xsd__hexBinary::__ptr\n+unsigned char * __ptr\n+pointer to binary data\n+Definition: stdsoap2.h:9959\n+Also xsd:boolean in C can be mapped to a enum:\n+enum xsd__boolean { false_, true_ };\n+The trailing underscores are removed in XML payloads and are used here to avoid\n+potential name clashes with C++ false and true keywords.\n+Annotations with typedef types introduce validation constraints that are\n+verified by the XML parser:\n+typedef float ns__price \"%.2g\" ; // 2 fractional digits\n+typedef int ns__percent 0:100 ; // integer between 0 and 100\n+typedef std::string ns__letter \"[a-z]\" 1:1 ; // string of length 1 with letter\n+(using XSD regex)\n+typedef unsigned long long xsd__positiveInteger 1: ; // positive integer\n+The soapcpp2 tool generates a schema with the following types (xsd::\n+positiveInteger is a built-in XSD type and therefore omitted from the generated\n+schema):\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+For more details on mapping C/C++ data types with their value space constraints\n+to XML schema and vice versa, see C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+Reconsider the calculator example of the previous sections, now rewritten with\n+an explicit XSD type for double to illustrate the effect:\n+// Contents of file \"calc.h\":\n+typedef double xsd__double;\n+int ns2__add(xsd__double a, xsd__double b, xsd__double& result);\n+In C a pointer is used instead of a reference for the output parameter result.\n+The soapcpp2 tool generates the client stub function:\n+int soap_call_ns2__add(struct soap *soap, char *URL, char *action, double a,\n+double b, double& result);\n+This means that the client application does not need to be rewritten and can\n+still call the client stub or use the generated C++ proxy class as before.\n+Likewise, typedef can be used to declare user-defined schema types:\n+// Contents of file \"calc.h\":\n+typedef double ns2__number;\n+int ns2__add(ns2__number a, ns2__number b, ns2__number& result);\n+This lets soapcpp2 generate a WSDL and XML schema that declares the ns2:number\n+type:\n+\n+\n+\n+\n+\n+\n+\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to change the response element name\n+There is no standardized convention for the response element name in a SOAP RPC\n+encoded response message, although it is recommended that the response element\n+name is the method name ending with \"`Response`\". For example, the\n+response element of add is addResponse.\n+The response element name can be specified explicitly using a struct or class\n+declaration in the interface header file for soapcpp2. This name should be\n+qualified by a namespace prefix, just as the operation name should use a\n+namespace prefix. The struct or class name represents the SOAP response element\n+name used by the service. Consequently, the output parameter of the service\n+operation must be declared as a member of the struct or class. The use of a\n+struct or a class for the service response is fully SOAP 1.1/1.2 compliant. In\n+fact, the absence of a struct or class indicates to the soapcpp2 tool to\n+automatically generate a struct for the response which is internally used by a\n+stub.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+Reconsider the calculator service operation specification which can be\n+rewritten with an explicit declaration of a SOAP response element as follows:\n+// Contents of file \"calc.h\":\n+struct ns2__addResponse { double result; };\n+int ns2__add(double a, double b, struct ns2__addResponse& r);\n+This wraps the output parameters in a struct ns2__addResponse. Note that in C a\n+pointer is used instead of a reference for the output wrapper parameter r.\n+In this example we just made an explicit output parameter wrapper, meaning that\n+SOAP request and response messages will be the same as before without this\n+wrapper:\n+\n+\n+\n+3.0\n+\n+\n+\n+We can use any other name with a namespace prefix for the wrapper struct or\n+class to change the response element name.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to specify multiple output parameters\n+The soapcpp2 tool uses the convention that the last parameter of the function\n+prototype declaration of a service operation in an interface header file is the\n+output parameter of the service operation. All other parameters are considered\n+input parameters of the service operation.\n+To specify a service operation with multiple output parameters, a struct or\n+class is declared to wrap the service operation response parameters, see also\n+Section How_to_change_the_response_element_name . The name of the struct or\n+class should have a namespace prefix, just as the service method name. The\n+members of the struct or class are the output parameters of the service\n+operation.\n+The order of the input parameters in the function prototype and the order of\n+the output parameters (the members of the wrapper struct or class) is not\n+significant. However, the SOAP 1.1 RPC encoding specification states that input\n+and output parameters may be treated as anonymous parameter names, which\n+requires a particular ordering of these parameters, see Section How_to_specify\n+anonymous_parameter_names .\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+As an example, consider a hypothetical service operation getNames with a single\n+input parameter SSN and two output parameters first and last. This can be\n+specified as:\n+// Contents of file \"getNames.h\":\n+int ns3__getNames(char *SSN, struct ns3__getNamesResponse { char *first; char\n+*last; } &r);\n+The soapcpp2 tool takes this header file as input and generates source code for\n+the function soap_call_ns3__getNames. When invoked by a client application,\n+this stub function produces the XML request message:\n+\n+\n+\n+999 99 9999\n+\n+\n+\n+The response XML message:\n+\n+\n+\n+John\n+Doe\n+\n+\n+\n+where first and last are the output parameters wrapped in the getNamesResponse\n+struct.\n+As another example, consider a service operation copy with an input parameter\n+and an output parameter with identical parameter names (this is not prohibited\n+by the SOAP 1.1/1.2 protocols). This can be specified using a wrapper struct\n+for the output parameters, thus avoiding the name clash we would run into\n+without this wrapper:\n+// Content of file \"copy.h\":\n+int X_rox__copy_name(char *name, struct X_rox__copy_nameResponse { char *name;\n+} &r);\n+The use of a struct or class for the service operation response enables the\n+declaration of service operations that have parameters that are passed both as\n+input and output parameters.\n+The soapcpp2 tool takes the copy.h header file as input and generates the\n+soap_call_X_rox__copy_name stub function. When invoked by a client application,\n+the stub function produces the XML request message:\n+\n+\n+\n+hello\n+\n+\n+\n+The response XML message:\n+\n+\n+\n+SOAP\n+\n+\n+\n+The name will be parsed and decoded by the stub function and returned as the\n+name member of the struct X_rox__copy_nameResponse &r parameter.\n+You can use the service operation name as a wrapper for the response:\n+// Content of file \"copy.h\":\n+int X_rox__copy_name(char *name, struct X_rox__copy_name &r);\n+where the struct X_rox__copy_name is generated by soapcpp2 automatically and\n+does not need to be redeclared.\n+The response XML message in this case would be:\n+\n+\n+\n+SOAP\n+\n+\n+\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to specify output parameters with compound data types\n+If the single output parameter of a service operation is a compound data type\n+such as a struct or class it is necessary to specify the response element of\n+the service operation as a struct or class at all times. Otherwise, the output\n+parameter will be considered the response element (!), because of the response\n+element specification convention used by gSOAP, as discussed in Section How_to\n+change_the_response_element_name .\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+This is best illustrated with an example. Suppose we have a Flighttracker\n+service that provides real time flight information. It requires an airline code\n+and flight number as parameters. The service operation name is getFlightInfo\n+that has two string parameters: the airline code and flight number. The method\n+returns a getFlightResponse response element with a return output parameter\n+that is of a compound data type FlightInfo. The type FlightInfo is represented\n+by a class in the header file:\n+// Contents of file \"flight.h\":\n+typedef char *xsd__string;\n+class ns2__FlightInfo\n+{ public:\n+xsd__string airline;\n+xsd__string flightNumber;\n+xsd__string altitude;\n+xsd__string currentLocation;\n+xsd__string equipment;\n+xsd__string speed;\n+};\n+struct ns1__getFlightInfoResponse { ns2__FlightInfo return_; };\n+int ns1__getFlightInfo(xsd__string param1, xsd__string param2, struct\n+ns1__getFlightInfoResponse &r);\n+The response element ns1__getFlightInfoResponse is explicitly declared and it\n+has one member: return_ of type ns2__FlightInfo. Note that return_ has a\n+trailing underscore to avoid a name clash with the return keyword, see Section\n+C/C++_identifier_name_to_XML_tag_name_translation for details on the\n+translation of C/C++ identifiers to XML names.\n+The soapcpp2 tool generates the soap_call_ns1__getFlightInfo stub function.\n+Here is an example fragment of a client application that uses this proxy to\n+request flight information:\n+#include \"soapH.h\"\n+#include \"ns1.nsmap\"\n+int main()\n+{\n+struct soap soap;\n+soap_init1(&soap, SOAP_XML_INDENT);\n+ns2__FlightInfo flight;\n+if (soap_call_ns1__getFlightInfo(&soap, \"testvger.objectspace.com/soap/servlet/\n+rpcrouter\", \"urn:galdemo:flighttracker\", \"UAL\", \"184\", flight))\n+soap_print_fault(&soap, stderr); // nonzero return means that an error occurred\n+else\n+cout << flight.return_.equipment << \" flight \" << flight.return_.airline <<\n+flight.return_.flightNumber\n+<< \" traveling \" << flight.return_.speed << \" mph \" << \" at \" <<\n+flight.return_.altitude\n+<< \" ft, is located \" << flight.return_.currentLocation << endl;\n+soap_destroy(&soap); // delete managed class instances\n+soap_end(&soap); // delete managed data and temporaries\n+soap_done(&soap); // finalize the context\n+}\n+struct Namespace namespaces[] =\n+{\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" },\n+{ \"SOAP-ENC\",\"http://schemas.xmlsoap.org/soap/encoding/\" },\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\" },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\" },\n+{ \"ns1\", \"urn:galdemo:flighttracker\" },\n+{ \"ns2\", \"http://galdemo.flighttracker.com\" },\n+{ NULL, NULL }\n+};\n+When invoked by a client application, the stub function produces the XML\n+request:\n+POST /soap/servlet/rpcrouter HTTP/1.1\n+Host: testvger.objectspace.com\n+Content-Type: text/xml\n+Content-Length: 634\n+SOAPAction: \"urn:galdemo:flighttracker\"\n+\n+\n+\n+\n+UAL\n+184\n+\n+\n+\n+The service responds with:\n+HTTP/1.1 200 OK\n+Date: Thu, 30 Aug 2011 00:34:17 GMT\n+Server: IBM_HTTP_Server/1.3.12.3 Apache/1.3.12 (Win32)\n+Content-Length: 861\n+Content-Type: text/xml; charset=utf-8\n+\n+\n+\n+\n+\n+A320\n+UAL\n+188 mi W of Lincoln, NE\n+37000\n+497\n+184\n+\n+\n+\n+\n+The stub function returns the service response in variable flight of type\n+struct ns1__getFlightInfoResponse and this information can be displayed by the\n+client application:\n+A320 flight UAL184 traveling 497 mph at 37000 ft, is located 188 mi W of\n+Lincoln, NE\n+Note that the response includes xsi:type attributes indicating the schema types\n+of the elements in the XML message. This was common practice in earlier SOAP\n+implementations and some SOAP implementations relied on it, but it was never\n+mandated by the specifications. You can let soapcpp2 generate serializers that\n+produce the xsi:type type information in XML messages with soapcpp2 -t option -\n+t. Otherwise, the serializers will not include xsi:type attributes in the XML\n+message payloads unless a derived type value is used in the XML payload in\n+place of a base type, for example a derived class in place of a base class. In\n+this way, SOAP/XML messaging implements object inheritance cleanly and\n+efficiently because the leading xsi:type attribute value corresponding to the\n+serialized derived class in an XML message lets an XML parser and deserializer\n+instantiate the derived class to populate it immediately (something that can't\n+be claimed of JSON since JSON has no attributes and object properties are\n+unordered).\n+ Note\n+ : the flight tracker service is no longer available since 9/11/2001. It\n+ is kept in the documentation as an example to illustrate the use of\n+ structs/classes and response types.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to specify anonymous parameter names\n+The SOAP RPC encoding protocol allows parameter names to be anonymous. That is,\n+the name(s) of the output parameters of a service operation are not strictly\n+required to match a client's view of the parameters names. Also, the input\n+parameter names of a service operation are not strictly required to match a\n+service's view of the parameter names. The soapcpp2 tool can generate stub and\n+skeleton functions that support anonymous parameters. Parameter names are\n+implicitly anonymous by omitting the parameter names in the function prototype\n+of the service operation. For example:\n+// Contents of file \"calc.h\":\n+int ns2__add(double, double, double&);\n+This enumerates the parameter names as _param_1, _param_2, and _param_3, where\n+the leading underscore makes these names anonymous, meaning that the XML parser\n+and deserializer will accept any parameter name to extract their values, that\n+is, even when the name of the XML element representing the parameter differs.\n+To make parameter names explicitly anonymous, specify parameter names that\n+start with an underscore (_) in the function prototype in the header file.\n+For example:\n+// Contents of file \"calc.h\":\n+int ns2__add(double _a, double _b, double& _return);\n+In this example, the _a, _b, and _return are anonymous parameters.\n+ Warning\n+ When anonymous parameter names are used, the order of the parameters in\n+ the function prototype of a service operation is significant.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to specify a service operation with no input parameters\n+To specify a service operation that has no input parameters, just provide a\n+function prototype with one parameter which is the output parameter that is\n+either a pointer or a reference, for example:\n+int ns__getValue(double& value);\n+The soapcpp2 tool generates a struct for each service operation request\n+message, which in this case is an empty struct. To prevent C compilers from\n+throwing an error, the empty struct is patched at compile time with the\n+compile-time flag #WITH_NOEMPTYSTRUCT.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to specify a service operation with no output parameters\n+To specify a service operation that has no output parameters, just define a\n+function prototype with a response struct that is empty, for example:\n+enum ns__event { off, on, stand_by };\n+int ns__signal(enum ns__event in, struct ns__signalResponse { } *out);\n+Namespace::in\n+const char * in\n+an optional XML namespace URI string pattern (* is a wildcard string and - is a\n+wildcard character) t...\n+Definition: stdsoap2.h:9252\n+Namespace::out\n+char * out\n+Reserved for internal use by the engine only, to switch between URIs such as\n+SOAP 1....\n+Definition: stdsoap2.h:9254\n+Since the response struct is empty, no output parameters are specified. The\n+SOAP response message has an empty response element ns:signalResponse.\n+Specifying an empty response is not identical to SOAP one-way messaging, which\n+is asynchronous and does not expect an XML response message to be transmitted\n+at all, just an empty HTTP OK response to a HTTP POST request. See Section\n+Asynchronous_one-way_message_passing on one-way messaging.\n+ How to switch to REST from SOAP\n+To switch to RESTful Web APIs from SOAP Web services APIs is simple, just use a\n+directive.\n+To declare HTTP POST as the default HTTP method to use with client-side calls\n+for all service operations associated with the ns namespace prefix:\n+//gsoap ns service protocol: POST\n+To declare the HTTP POST method for a specific service operation, use:\n+//gsoap ns service protocol: POST\n+int ns__webmethod(...);\n+You can specify GET, PUT, POST, and DELETE. With GET the input parameters of\n+the service operations should be primitive types. See Section Service\n+directives.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to build Web services APIs\n+The soapcpp2 tool generates skeleton functions in C or C++ source code for each\n+of the service operations specified as function prototypes in the interface\n+header file input to soapcpp2. The skeleton functions can be readily used to\n+implement the service operations in a new Web service. The compound data types\n+used by the input and output parameters of service operations must be declared\n+in the interface header file, such as structs, classes, arrays, C++ containers,\n+and pointer-based data structures (e.g. data structure trees and arbitrary\n+operation. The soapcpp2 tool automatically generates serializers and\n+deserializers for the data types to enable the generated skeleton functions to\n+encode and decode the contents of the parameters of the service operations. The\n+soapcpp2 tool also generates a service operation request dispatcher function\n+soap_serve that serves requests by calling the appropriate skeleton.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+The following example specifies three service operations of a Web service:\n+// Contents of file \"calc.h\":\n+//gsoap ns service namespace: urn:simple-calc\n+int ns__add(double a, double b, double& result);\n+int ns__sub(double a, double b, double& result);\n+int ns__sqrt(double a, double& result);\n+The add and sub methods are intended to add and subtract two double floating\n+point numbers stored in input parameters a and b and should return the result\n+of the operation in the result output parameter. The sqrt method is intended to\n+take the square root of input parameter a and to return the result in the\n+output parameter result.\n+To generate the skeleton functions, the soapcpp2 tool is invoked from the\n+command line with:\n+ soapcpp2 calc.h\n+The soapcpp2 tool generates the skeleton functions in file soapServer.cpp for\n+the add, sub, and sqrt service operations specified in the calc.h header file.\n+The skeleton functions are respectively soap_serve_ns__add, soap_serve_ns__sub,\n+and soap_serve_ns__sqrt. The generated file soapC.cpp contains serializers and\n+deserializers for the skeleton. The soapcpp2 tool also generates a service\n+dispatcher: the soap_serve function handles client requests and dispatches the\n+service operation requests to the appropriate skeleton functions to serve the\n+requests. The skeleton in turn calls the service operation implementation\n+function. The function prototype of the service operation implementation\n+function is specified in the header file that is input to the soapcpp2 tool.\n+Here is an example CGI service application that uses the generated soap_serve\n+skeleton function to handle client requests:\n+// Contents of file \"calc.cpp\":\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+#include // for sqrt()\n+int main()\n+{\n+return soap_serve(soap_new());\n+}\n+// Implementation of the \"add\" service operation:\n+int ns__add(struct soap *soap, double a, double b, double& result)\n+{\n+result = a + b;\n+return SOAP_OK;\n+}\n+// Implementation of the \"sub\" service operation:\n+int ns__sub(struct soap *soap, double a, double b, double& result)\n+{\n+result = a - b;\n+return SOAP_OK;\n+}\n+// Implementation of the \"sqrt\" service operation:\n+int ns__sqrt(struct soap *soap, double a, double& result)\n+{\n+if (a < 0)\n+return soap_receiver_fault(soap, \"Square root of negative number\", \"I can only\n+take the square root of a non-negative number\");\n+result = sqrt(a);\n+return SOAP_OK;\n+}\n+struct Namespace namespaces[] =\n+{\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" },\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\" },\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\" },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\" },\n+{ \"ns\", \"urn:simple-calc\" }, // binds \"ns\" namespace prefix to schema URI\n+{ NULL, NULL }\n+};\n+soap_receiver_fault\n+int soap_receiver_fault(struct soap *soap, const char *faultstring, const char\n+*faultdetail)\n+Set SOAP 1.1 server fault / SOAP 1.2 receiver fault string and detail.\n+Note that the service operations have an extra input parameter which is a\n+pointer to the soap context.\n+The implementation of the service operations must return #SOAP_OK or a nonzero\n+error code. The code #SOAP_OK denotes success. A nonzero error code is returned\n+with soap_receiver_fault and soap_sender_fault. These functions also set up a\n+SOAP Fault structure with the details of the fault returned. This is done by\n+setting the soap::fault which points to SOAP_ENV__Fault structure. Its\n+SOAP_ENV__Fault::faultstring string and SOAP_ENV__Fault::detaildetails are\n+populated with the fault string (XML text) and fault detail (XML string). SOAP\n+1.2 requires the SOAP_ENV__Fault::SOAP_ENV__Reason and the SOAP_ENV__Fault::\n+SOAP_ENV__Detail strings to be assigned instead.\n+This service application can be readily installed as a CGI application, which\n+is a simple stateless way to deploy services. To deploy this service as a\n+multi-threaded stand-alone server application see Sections How_to_create_a\n+stand-alone_server and How_to_create_a_multi-threaded_stand-alone_service.\n+Besides generating the skeleton functions and serializers in source code, the\n+soapcpp2 tool also generates a WSDL file for this service, see Section How_to\n+generate_WSDL_service_descriptions for details on WSDL.\n+As per SOAP protocol (when applicable), \"SOAP actions\" are HTTP headers that\n+are specific to the SOAP protocol and provide a means for routing service\n+requests and for security reasons, for example firewall software can inspect\n+SOAP action headers to grant or deny the SOAP request. Use soapcpp2 -a option -\n+a or soapcpp2 -A option -A to let the generated skeleton functions dispatch the\n+requests based on the SOAP action HTTP header together with (or instead) the\n+name of the XML request element.\n+Note that soapcpp2 generates both clients and services based on the interface\n+header file input. Which means that there is no need to modify the interface\n+header file for client side or server side deployments. For example, the\n+generated soap_call_ns__add stub function is saved to the soapClient.cpp file\n+after invoking the soapcpp2 tool on the calc.h header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ MSVC++ builds\n+ * Win32 builds require winsock2 (MS Visual C++ ws2_32.lib) To do this in\n+ Visual C++, go to Project, Properties, select Link and add ws2_32.lib to\n+ the Object library modules entry.\n+ * Use files with extension .cpp only. This means that you may have to\n+ rename all .c files to .cpp.\n+ * Turn pre-compiled headers off.\n+ * When creating a new project, you can specify a custom build step to\n+ automatically invoke the soapcpp2 tool on a interface header file for\n+ soapcpp2. In this way you can incrementally build a new service by adding\n+ new operations and data types to the header file. For the latest\n+ instruction on how to specify a custom build step to run soapcpp2, see\n+ the gSOAP download and installation page https://www.genivia.com/\n+ downloads.html.\n+ * You may want to use the ISAPI extension or WinInet plugin available in\n+ the gsoap/mod_gsoap directory of the gSOAP package to simplify Internet\n+ access and deal with encryption, proxies, and authentication. See the\n+ gSOAP ISAPI_extension documentation and the gSOAP WinInet_plugin\n+ documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to create a stand-alone server\n+The deployment of a Web service as a CGI application is an easy means to\n+provide your service on the Internet. However, CGI is stateless and the\n+performance of CGI is not great. Instead, gSOAP services can be run as stand-\n+alone services on any port by using the built-in HTTP and TCP/IP stacks of the\n+engine. The recommended mechanism to deploy a service is through the gSOAP\n+Apache module or ISAPI extension. These servers and modules are designed for\n+server load balancing and access control. See the gSOAP Apache_module\n+documentation and the gSOAP ISAPI_extension documentation for details.\n+See also the getting started page https://www.genivia.com/dev.html and tutorial\n+page https://www.genivia.com/tutorial.html to get started with developing\n+client and stand-alone server applications using the gSOAP tools.\n+To create a stand-alone service, the main function of the service application\n+should call soap_bind to bind a port and then loop over soap_accept to accept\n+requests to serve with soap_serve. Also call soap_ssl_accept when HTTPS is\n+used, which is set up with soap_ssl_server_context.\n+For example:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+int main()\n+{\n+struct soap *soap = soap_new1(SOAP_XML_INDENT);\n+soap->send_timeout = 10; // 10 seconds max socket delay\n+soap->recv_timeout = 10; // 10 seconds max socket delay\n+soap->accept_timeout = 3600; // server stops after 1 hour of inactivity\n+soap->max_keep_alive = 100; // max keep-alive sequence\n+// soap_ssl_server_context(soap, ...); // call this function when HTTPS is used\n+SOAP_SOCKET m, s; // master and slave sockets\n+m = soap_bind(soap, NULL, 18083, 10); // small BACKLOG for iterative servers\n+if (!soap_valid_socket(m))\n+{\n+soap_print_fault(soap, stderr);\n+}\n+else\n+{\n+fprintf(stderr, \"Socket connection successful: master socket = %d\\n\", m);\n+for (int i = 1; ; i++)\n+{\n+s = soap_accept(soap);\n+if (!soap_valid_socket(s))\n+{\n+soap_print_fault(soap, stderr);\n+break;\n+}\n+// soap_ssl_accept(soap); // call when HTTPS is used\n+fprintf(stderr, \"%d: accepted connection from IP=%d.%d.%d.%d socket=%d\", i,\n+(soap->ip>>24)&0xFF, (soap->ip>>16)&0xFF, (soap->ip>>8)&0xFF, soap->ip&0xFF,\n+s);\n+if (soap_serve(soap))\n+soap_print_fault(soap, stderr);\n+else\n+fprintf(stderr, \"request served\\n\");\n+soap_destroy(soap); // delete managed class instances\n+soap_end(soap); // delete managed data and temporaries\n+}\n+}\n+soap_free(soap); // finalize and delete the context\n+}\n+soap_bind\n+SOAP_SOCKET soap_bind(struct soap *soap, const char *host, int port, int\n+backlog)\n+Bind and listen to a port.\n+soap_accept\n+SOAP_SOCKET soap_accept(struct soap *soap)\n+Accept a connection with a client.\n+SOAP_SOCKET\n+#define SOAP_SOCKET\n+Macro that defines a portable socket type, usually int, but the type may depend\n+on the platform being...\n+Definition: stdsoap2.h:1252\n+soap_valid_socket\n+#define soap_valid_socket(sock)\n+Function macro to check if a socket is valid, i.e. not equal to\n+#SOAP_INVALID_SOCKET\n+Definition: stdsoap2.h:1264\n+soap::max_keep_alive\n+int max_keep_alive\n+User-definable maximum number of keep-alive message exchanges per connection\n+(the value is #SOAP_MAXK...\n+Definition: stdsoap2.h:2901\n+soap::ip\n+unsigned int ip\n+The IPv4 address in numeric form of the client as received on the server side\n+by soap_accept (or the ...\n+Definition: stdsoap2.h:3959\n+soap::send_timeout\n+int send_timeout\n+User-definable timeout to send a packet of data, positive timeout values are\n+seconds,...\n+Definition: stdsoap2.h:3184\n+soap::accept_timeout\n+int accept_timeout\n+User-definable timeout when waiting to accept a request from a client at the\n+server-side with soap_ac...\n+Definition: stdsoap2.h:3226\n+soap::recv_timeout\n+int recv_timeout\n+User-definable timeout to receive a packet of data, positive timeout values are\n+seconds,...\n+Definition: stdsoap2.h:3170\n+The soap_serve dispatcher handles one request or multiple requests when HTTP\n+keep-alive is enabled with the #SOAP_IO_KEEPALIVE flag, which should only be\n+used with client applications or with stand-alone multi-threaded services, see\n+the next section and Section TCP_and_HTTP_keep-alive.\n+The gSOAP functions that are frequently used for server-side coding are:\n+ * soap_bind(struct soap *soap, char *host, int port, int backlog) binds\n+ soap::master socket to the specified port and host name (or NULL for the\n+ current machine), using a backlog queue size of pending requests, returns\n+ master socket. We check the return value with #soap_valid_socket. The\n+ backlog queue size should be small, say 2 to 10, for iterative (not\n+ multi-threaded) stand-alone servers to ensure fairness among connecting\n+ clients. A smaller value increases fairness and defends against denial of\n+ service, but hampers performance because connection requests may be\n+ refused.\n+ * soap_accept(struct_soap_*soap) returns #SOAP_SOCKET socket soap::socket\n+ when connected. We check the return value with #soap_valid_socket.\n+ * soap_ssl_accept(struct_soap_*soap) returns #SOAP_OK when the HTTPS\n+ handshake successfully completed.\n+The IPv4 address is stored in soap::ip. If IPv6 is enabled with #WITH_IPV6 then\n+soap::ip6 contains the IPv6 address.\n+The soap::accept_timeout context variable of the context specifies the timeout\n+value for a non-blocking soap_accept call. See Section Timeout_management_for\n+non-blocking_operations for more details on timeout management.\n+The soap_serve function parses the inbound HTTP request and dispatches the\n+request to the skeleton functions that call the service operations implemented.\n+See Section Memory_management for more details on memory management.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to create a multi-threaded stand-alone service\n+Stand-alone multi-threading a Web Service is essential when the response times\n+for handling requests by the service are long or when HTTP keep-alive is\n+enabled, see also Section TCP_and_HTTP_keep-alive .\n+In case of long response times, the latencies introduced by the unrelated\n+requests may become prohibitive for a successful deployment of a stand-alone\n+service. When HTTP keep-alive is enabled, a client and server remain connected\n+until 100 (#SOAP_MAXKEEPALIVE) request-response iterations later as specified\n+by soap::max_keep_alive or when a timeout occurred. Thereby preventing other\n+clients from connecting.\n+The recommended mechanism to deploy a service is through the gSOAP Apache\n+module or ISAPI extension. These servers and modules are designed for server\n+load balancing and access control. See the gSOAP Apache_module documentation\n+and the gSOAP ISAPI_extension documentation for details.\n+See also the getting started page https://www.genivia.com/dev.html and tutorial\n+page https://www.genivia.com/tutorial.html to get started with developing\n+client and stand-alone server applications using the gSOAP tools.\n+The following example illustrates the use of threads to improve the quality of\n+service by handling new requests in separate threads:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+#include \"plugin/threads.h\"\n+#define BACKLOG (100) // Max request backlog of pending requests\n+int main(int argc, char **argv)\n+{\n+struct soap soap;\n+soap_init(&soap);\n+if (argc < 2) // no args: assume this is a CGI application\n+{\n+soap_serve(&soap); // serve request, one thread, CGI style\n+soap_destroy(&soap); // delete managed class instances\n+soap_end(&soap); // delete managed data and temporaries\n+}\n+else\n+{\n+void *process_request(void*);\n+struct soap *tsoap;\n+THREAD_TYPE tid;\n+int port = atoi(argv[1]); // first command-line arg is port\n+SOAP_SOCKET m, s;\n+soap.send_timeout = 10; // 10 seconds max socket delay\n+soap.recv_timeout = 10; // 10 seconds max socket delay\n+soap.accept_timeout = 3600; // server stops after 1 hour of inactivity\n+soap.max_keep_alive = 100; // max keep-alive sequence\n+m = soap_bind(&soap, NULL, port, BACKLOG);\n+if (!soap_valid_socket(m))\n+exit(EXIT_FAILURE);\n+fprintf(stderr, \"Socket connection successful %d\\n\", m);\n+while (1)\n+{\n+s = soap_accept(&soap);\n+if (soap_valid_socket(s))\n+{\n+fprintf(stderr, \"Accept socket %d connection from IP %d.%d.%d.%d\\n\", s,\n+(soap.ip>>24)&0xFF, (soap.ip>>16)&0xFF, (soap.ip>>8)&0xFF, soap.ip&0xFF);\n+tsoap = soap_copy(&soap); // make a copy\n+if (!tsoap)\n+soap_force_closesock(&soap);\n+else\n+while (THREAD_CREATE(&tid, (void*(*)(void*))process_request, (void*)tsoap))\n+sleep(1); // failed, try again\n+}\n+else if (soap.errnum) // accept failed, try again after 1 second\n+{\n+soap_print_fault(&soap, stderr);\n+sleep(1);\n+}\n+else\n+{\n+fprintf(stderr, \"server timed out\\n\");\n+break;\n+}\n+}\n+}\n+soap_done(&soap); // finalize context\n+return 0;\n+}\n+void *process_request(void* tsoap)\n+{\n+struct soap *soap = (struct soap*)tsoap;\n+THREAD_DETACH(THREAD_ID);\n+soap_serve(soap);\n+soap_destroy(soap); // delete managed class instances\n+soap_end(soap); // delete managed data and temporaries\n+soap_free(soap); // finalize and delete the context\n+return NULL;\n+}\n+// ... the service operations are defined here ...\n+soap_copy\n+struct soap * soap_copy(struct soap *soap)\n+Allocate and initialize a new soap context as a copy of the given soap context.\n+soap_force_closesock\n+int soap_force_closesock(struct soap *soap)\n+Forcibly close the socket connection.\n+THREAD_TYPE\n+#define THREAD_TYPE\n+Type of a thread (thread ID)\n+Definition: stdsoap2.h:10558\n+THREAD_DETACH\n+#define THREAD_DETACH(tid)\n+Detach a thread.\n+Definition: stdsoap2.h:10634\n+THREAD_ID\n+#define THREAD_ID\n+The thread ID of self.\n+Definition: stdsoap2.h:10566\n+THREAD_CREATE\n+#define THREAD_CREATE(tidptr, funcptr, argptr)\n+Create a new thread.\n+Definition: stdsoap2.h:10605\n+soap::errnum\n+int errnum\n+The errno value of the last failed IO operation.\n+Definition: stdsoap2.h:2927\n+soap::port\n+int port\n+The client port connected to as received on the server side by soap_accept (or\n+the C++ service class ...\n+Definition: stdsoap2.h:4011\n+For this multi-threaded application the gsoap/plugin/threads.h and gsoap/\n+plugin/threads.c portable threads and mutex API is used.\n+The server spawns a thread per request. Each thread executes a soap_serve using\n+a copy of the soap context created with soap_copy (if soap_copy fails due to\n+out of memory then we can still recover as shown, recovery from errors is an\n+important aspect of gSOAP's design and API implementation). Note that the\n+server does not wait for threads to join the main thread upon program\n+termination.\n+The soap_serve dispatcher handles one request or multiple requests when HTTP\n+keep-alive is set with #SOAP_IO_KEEPALIVE. The soap::max_keep_alive value can\n+be set to the maximum keep-alive calls allowed, which is important to avoid a\n+client from holding a thread indefinitely. The send and receive timeouts are\n+set to avoid (intentionally) slow clients from holding a socket connection too\n+long. The accept timeout is used to let the server terminate automatically\n+after a period of inactivity.\n+The following example limits the number of concurrent threads to reduce the\n+machine's CPU resource utilization:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+#include \"plugin/threads.h\"\n+#define BACKLOG (100) // Max request backlog of pending requests\n+#define MAX_THR (10) // Max threads to serve requests\n+int main(int argc, char **argv)\n+{\n+struct soap soap;\n+soap_init(&soap);\n+if (argc < 2) // no args: assume this is a CGI application\n+{\n+soap_serve(&soap); // serve request, one thread, CGI style\n+soap_destroy(&soap); // delete managed class instances\n+soap_end(&soap); // delete managed data and temporaries\n+}\n+else\n+{\n+struct soap *soap_thr[MAX_THR]; // each thread needs a context\n+THREAD_TYPE tid[MAX_THR]; // array of thread IDs\n+int port = atoi(argv[1]); // first command-line arg is port\n+SOAP_SOCKET m, s;\n+int i;\n+soap.send_timeout = 10; // 10 seconds max socket delay\n+soap.recv_timeout = 10; // 10 seconds max socket delay\n+soap.accept_timeout = 3600; // server stops after 1 hour of inactivity\n+soap.max_keep_alive = 100; // max keep-alive sequence\n+m = soap_bind(&soap, NULL, port, BACKLOG);\n+if (!soap_valid_socket(m))\n+exit(EXIT_FAILURE);\n+fprintf(stderr, \"Socket connection successful %d\\n\", m);\n+for (i = 0; i < MAX_THR; i++)\n+soap_thr[i] = NULL;\n+while (1)\n+{\n+for (i = 0; i < MAX_THR; i++)\n+{\n+s = soap_accept(&soap);\n+if (soap_valid_socket(s))\n+{\n+fprintf(stderr, \"Thread %d accepts socket %d connection from IP %d.%d.%d.%d\\n\",\n+i, s, (soap.ip>>24)&0xFF, (soap.ip>>16)&0xFF, (soap.ip>>8)&0xFF, soap.ip&0xFF);\n+if (!soap_thr[i]) // first time around\n+{\n+soap_thr[i] = soap_copy(&soap);\n+if (!soap_thr[i])\n+exit(EXIT_FAILURE); // could not allocate\n+}\n+else // recycle threaded soap contexts\n+{\n+// optionally, we can cancel the current thread when stuck on IO:\n+// soap_close_connection(soap_thr[i]); // requires compiling 2.8.71 or greater\n+with -DWITH_SELF_PIPE\n+THREAD_JOIN(tid[i]);\n+fprintf(stderr, \"Thread %d completed\\n\", i);\n+soap_destroy(soap_thr[i]); // delete managed class instances of thread\n+soap_end(soap_thr[i]); // delete managed data and temporaries of thread\n+soap_copy_stream(soap_thr[i], &soap); // pass the connection on to the thread\n+}\n+while (THREAD_CREATE(&tid[i], (void*(*)(void*))soap_serve, (void*)soap_thr[i]))\n+sleep(1); // failed, try again\n+}\n+else if (soap.errnum) // accept failed, try again after 1 second\n+{\n+soap_print_fault(&soap, stderr);\n+sleep(1);\n+}\n+else\n+{\n+fprintf(stderr, \"Server timed out\\n\");\n+goto end;\n+}\n+}\n+}\n+end:\n+for (i = 0; i < MAX_THR; i++)\n+{\n+if (soap_thr[i])\n+{\n+THREAD_JOIN(tid[i]);\n+soap_destroy(soap_thr[i]);\n+soap_end(soap_thr[i]);\n+soap_free(soap_thr[i]);\n+}\n+}\n+}\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+return 0;\n+}\n+// ... the service operations are defined here ...\n+soap_copy_stream\n+void soap_copy_stream(struct soap *soap_destination, struct soap *soap_source)\n+Copy the input/output stream state of the given soap context to another\n+context.\n+THREAD_JOIN\n+#define THREAD_JOIN(tid)\n+Join a thread.\n+Definition: stdsoap2.h:10646\n+The advantage of the code shown above is that the machine cannot be overloaded\n+with requests, since the number of active services is limited. However, threads\n+are still started and terminated. This overhead can be eliminated using a queue\n+of requests (a queue of accepted socket connections):\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+#include \"plugin/threads.h\"\n+#define BACKLOG (100) // Max. request backlog of pending requests\n+#define MAX_THR (64) // Size of thread pool\n+#define MAX_QUEUE (1000) // Max. size of request queue\n+void *process_queue(void*);\n+int enqueue(SOAP_SOCKET);\n+SOAP_SOCKET dequeue();\n+static SOAP_SOCKET queue[MAX_QUEUE]; // The global request queue of sockets\n+static int head = 0, tail = 0;\n+static MUTEX_TYPE queue_lock; // mutex for queue ops critical sections\n+static COND_TYPE queue_notempty; // condition variable when queue is empty\n+static COND_TYPE queue_notfull; // condition variable when queue is full\n+int main(int argc, char **argv)\n+{\n+struct soap soap;\n+soap_init(&soap);\n+if (argc < 2) // no args: assume this is a CGI application\n+{\n+soap_serve(&soap); // serve request, one thread, CGI style\n+soap_destroy(&soap); // delete managed class instances\n+soap_end(&soap); // delete managed data and temporaries\n+}\n+else\n+{\n+struct soap *soap_thr[MAX_THR]; // each thread needs a context\n+THREAD_TYPE tid[MAX_THR];\n+int port = atoi(argv[1]); // first command-line arg is port\n+SOAP_SOCKET m, s;\n+int i;\n+m = soap_bind(&soap, NULL, port, BACKLOG);\n+if (!soap_valid_socket(m))\n+exit(EXIT_FAILURE);\n+fprintf(stderr, \"Socket connection successful %d\\n\", m);\n+MUTEX_SETUP(queue_lock);\n+COND_SETUP(queue_notempty);\n+COND_SETUP(queue_notfull);\n+for (i = 0; i < MAX_THR; i++)\n+{\n+soap_thr[i] = soap_copy(&soap);\n+fprintf(stderr, \"Starting thread %d\\n\", i);\n+while (THREAD_CREATE(&tid[i], (void*(*)(void*))process_queue, (void*)soap_thr\n+[i]))\n+sleep(1); // failed, try again\n+}\n+while (1)\n+{\n+s = soap_accept(&soap);\n+if (soap_valid_socket(s))\n+{\n+fprintf(stderr, \"Accept socket %d connection from IP %d.%d.%d.%d\\n\", s,\n+(soap.ip>>24)&0xFF, (soap.ip>>16)&0xFF, (soap.ip>>8)&0xFF, soap.ip&0xFF);\n+enqueue(s);\n+}\n+else if (soap.errnum) // accept failed, try again after 1 second\n+{\n+soap_print_fault(&soap, stderr);\n+sleep(1);\n+}\n+else\n+{\n+fprintf(stderr, \"Server timed out\\n\");\n+break;\n+}\n+}\n+for (i = 0; i < MAX_THR; i++)\n+enqueue(SOAP_INVALID_SOCKET);\n+for (i = 0; i < MAX_THR; i++)\n+{\n+fprintf(stderr, \"Waiting for thread %d to terminate... \", i);\n+THREAD_JOIN(tid[i]);\n+fprintf(stderr, \"terminated\\n\");\n+soap_free(soap_thr[i]);\n+}\n+COND_CLEANUP(queue_notfull);\n+COND_CLEANUP(queue_notempty);\n+MUTEX_CLEANUP(queue_lock);\n+}\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+return 0;\n+}\n+void *process_queue(void *tsoap)\n+{\n+struct soap *soap = (struct soap*)tsoap;\n+while (1)\n+{\n+soap->socket = dequeue();\n+if (!soap_valid_socket(soap->socket))\n+break;\n+soap_serve(soap);\n+soap_destroy(soap);\n+soap_end(soap);\n+fprintf(stderr, \"served\\n\");\n+}\n+soap_free(soap);\n+return NULL;\n+}\n+/* add job (socket with pending request) to queue */\n+void enqueue(SOAP_SOCKET s)\n+{\n+int next;\n+MUTEX_LOCK(queue_lock);\n+next = (tail + 1) % MAX_QUEUE;\n+if (next == head)\n+COND_WAIT(queue_notfull, queue_lock);\n+queue[tail] = s;\n+tail = next;\n+COND_SIGNAL(queue_notempty);\n+MUTEX_UNLOCK(queue_lock);\n+}\n+/* remove job (socket with request) from queue */\n+SOAP_SOCKET dequeue()\n+{\n+SOAP_SOCKET s;\n+MUTEX_LOCK(queue_lock);\n+if (head == tail)\n+COND_WAIT(queue_notempty, queue_lock);\n+s = queue[head];\n+head = (head + 1) % MAX_QUEUE;\n+COND_SIGNAL(queue_notfull);\n+MUTEX_UNLOCK(queue_lock);\n+return s;\n+}\n+// ... the service operations are defined here ...\n+SOAP_INVALID_SOCKET\n+#define SOAP_INVALID_SOCKET\n+Macro that defines a portable invalid socket value (usually -1, but the value\n+depends on the OS)\n+Definition: stdsoap2.h:1258\n+MUTEX_CLEANUP\n+#define MUTEX_CLEANUP(mx)\n+Mutex object finalization.\n+Definition: stdsoap2.h:10852\n+COND_WAIT\n+#define COND_WAIT(mx, cv)\n+Condition variable wait operation.\n+Definition: stdsoap2.h:10951\n+MUTEX_LOCK\n+#define MUTEX_LOCK(mx)\n+Mutex object lock.\n+Definition: stdsoap2.h:10877\n+COND_CLEANUP\n+#define COND_CLEANUP(cv)\n+Condition variable finalization.\n+Definition: stdsoap2.h:10930\n+MUTEX_UNLOCK\n+#define MUTEX_UNLOCK(mx)\n+Mutex object unlock.\n+Definition: stdsoap2.h:10902\n+COND_SETUP\n+#define COND_SETUP(cv)\n+Condition variable initialization.\n+Definition: stdsoap2.h:10920\n+COND_TYPE\n+#define COND_TYPE\n+The type of a condition variable.\n+Definition: stdsoap2.h:10910\n+MUTEX_TYPE\n+#define MUTEX_TYPE\n+Type of a mutex object.\n+Definition: stdsoap2.h:10778\n+MUTEX_SETUP\n+#define MUTEX_SETUP(mx)\n+Mutex object initialization.\n+Definition: stdsoap2.h:10827\n+COND_SIGNAL\n+#define COND_SIGNAL(cv)\n+Condition variable signal operation.\n+Definition: stdsoap2.h:10940\n+soap::socket\n+SOAP_SOCKET socket\n+The socket set by soap_accept (or the C++ service class accept method) or\n+soap_connect or soap_connec...\n+Definition: stdsoap2.h:3028\n+For this multi-threaded application the gsoap/plugin/threads.h and gsoap/\n+plugin/threads.c portable threads and mutex API is used.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to pass application state info to service operations\n+The void* soap::user variable can be used to pass application state information\n+to service operations and to plugins. This variable can be set before the\n+soap_serve call. The service method can access this variable to use the\n+application-dependent data. The following example shows how a non-static\n+database handle is initialized and passed to the service methods:\n+int main()\n+{\n+struct soap soap;\n+database_handle_type database_handle;\n+soap_init(&soap);\n+soap.user = (void*)database_handle;\n+... //\n+if (soap_serve(&soap))\n+... // error\n+... //\n+}\n+int ns__webmethod(struct soap *soap, ...)\n+{\n+fetch((database_handle_type*)soap->user); // use database handle\n+... //\n+return SOAP_OK;\n+}\n+soap::user\n+void * user\n+User-definable variable that may point to user-specified data of any type to\n+pass the data through to...\n+Definition: stdsoap2.h:2959\n+Another way to maintain and pass state information with the context is done\n+with plugins, see Section Plugins,_modules,_and_extensions .\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to generate C++ server classes\n+Server object classes for C++ server applications are automatically generated\n+by the soapcpp2 tool using soapcpp2 -j option -j or soapcpp2 -i option -i.\n+Without these options the soapcpp2 tool generates C-based stub and skeleton\n+functions.\n+We illustrate the use of server classes with the following example interface\n+header file:\n+// Content of file \"calc.h\":\n+//gsoap ns service name: Calculator\n+//gsoap ns service protocol: SOAP1.2\n+//gsoap ns service style: document\n+//gsoap ns service encoding: literal\n+//gsoap ns service location: http://www.cs.fsu.edu/~engelen/calc.cgi\n+//gsoap ns schema namespace: urn:calc\n+int ns__add(double a, double b, double& result);\n+int ns__sub(double a, double b, double& result);\n+int ns__mul(double a, double b, double& result);\n+int ns__div(double a, double b, double& result);\n+The directives provide the service name which is used to name the service\n+class, the protocol (SOAP 1.2) and style (document/literal), service location\n+(endpoint URL), and the schema namespace URI.\n+We run soapcpp2 -i calc.h with option -i to generate soapCalculatorService.h\n+which declares the C++ sever class that has the following structure:\n+#include \"soapH.h\"\n+class CalculatorService : public soap\n+{\n+public:\n+Calculator() { soap_init(this); };\n+... // more constructors, elided here for clarity\n+~Calculator() { soap_done(this); };\n+SOAP_SOCKET bind(const char *host, int port, int backlog) { return soap_bind\n+(this, host, port, backlog); }\n+SOAP_SOCKET accept() { return soap_accept(this); }\n+int serve() { return soap_serve(this); };\n+void destroy() { soap_destroy(this); soap_end(this); }\n+... // more methods, elided here for clarity\n+// user-defined service operations:\n+int add(double a, double b, double& result);\n+int sub(double a, double b, double& result);\n+int mul(double a, double b, double& result);\n+int div(double a, double b, double& result);\n+};\n+This generated server class serve method calls the add, sub, mul, and div\n+methods upon receiving an XML request message. These methods should be\n+implemented, for example as follows in a CGI-based service:\n+#include \"soapCalculatorService.h\"\n+#include \"Calculator.nsmap\"\n+int main()\n+{\n+CalculatorService calc;\n+calc.serve();\n+calc.destroy();\n+}\n+int calc::add(double a, double b, double& result)\n+{\n+result = a + b;\n+return SOAP_OK;\n+}\n+int calc::sub(double a, double b, double& result)\n+{\n+result = a - b;\n+return SOAP_OK;\n+}\n+int calc::mul(double a, double b, double& result)\n+{\n+result = a * b;\n+return SOAP_OK;\n+}\n+int calc::div(double a, double b, double& result)\n+{\n+if (b == 0.0)\n+return soap_sender_fault(this, \"Division by zero\", NULL);\n+result = a / b;\n+return SOAP_OK;\n+}\n+soap_sender_fault\n+int soap_sender_fault(struct soap *soap, const char *faultstring, const char\n+*faultdetail)\n+Set SOAP 1.1 client fault / SOAP 1.2 sender fault string and detail.\n+If we run soapcpp2 -j calc.h with option -j to generate soapCalculatorService.h\n+then we get the same class as with option -i but the soap context is not a base\n+class but is a member of the service class:\n+#include \"soapH.h\"\n+class CalculatorService\n+{\n+public:\n+struct soap *soap;\n+Calculator() { soap = soap_new(); };\n+... // more constructors, elided here for clarity\n+~Calculator() { soap_free(soap); };\n+SOAP_SOCKET bind(const char *host, int port, int backlog) { return soap_bind\n+(soap, host, port, backlog); }\n+SOAP_SOCKET accept() { return soap_accept(soap); }\n+int serve() { return soap_serve(soap); };\n+void destroy() { soap_destroy(soap); soap_end(soap); }\n+... // more methods, elided here for clarity\n+// user-defined service operations:\n+int add(double a, double b, double& result);\n+int sub(double a, double b, double& result);\n+int mul(double a, double b, double& result);\n+int div(double a, double b, double& result);\n+};\n+soap::host\n+char host[SOAP_TAGLEN]\n+The host IP address of the client, as received on the server side.\n+Definition: stdsoap2.h:4025\n+The only difference we make to implement the service application is to use the\n+soap member of the class instead of this when referring to the context, which\n+in our example changes only one line of code in the div method:\n+if (b == 0.0)\n+return soap_sender_fault(soap, \"Division by zero\", NULL);\n+}\n+In fact, the service classes have soap_sender_fault and soap_receiver_fault\n+methods that can be used instead.\n+You can declare a C++ namespace name with soapcpp2 -q name to create a server\n+class in the name namespace, see Section How_to_build_a_client_or_server_in_a\n+C++_code_namespace . For more options, see also Sections soapcpp2_options and\n+How_to_create_client/server_libraries.\n+The example above serves CGI requests. The generated service classes also have\n+bind and accept methods, which can be used to implement stand-alone services,\n+see also Section How_to_create_a_stand-alone_server .\n+A better alternative is to use soapcpp2 -j option -j or option -i. With option\n+-j the C++ proxy and service classes have a soap context pointer. This context\n+pointer can be set and shared among many proxy and service classes. With option\n+-i the C++ proxy and server classes are derived from the soap context, which\n+simplifies the proxy invocation and service operation implementations.\n+Compilation of the above header file with soapcpp2 -i creates new files\n+soapCalculatorService.h and soapCalculatorService.cpp (rather than the C-style\n+soapServer.cpp).\n+This generated server object class can be included into a server application\n+together with the generated namespace table as shown in this example:\n+#include \"soapCalculatorService.h\" // get server object\n+#include \"Calculator.nsmap\" // include the generated namespace table\n+int main()\n+{\n+soapCalculatorService c;\n+return c.serve(); // calls soap_serve to serve as CGI application (using stdin/\n+out)\n+}\n+// The 'add' service method (soapcpp2 w/ option -i)\n+int soapCalculatorService::add(double a, double b, double &result)\n+{\n+result = a + b;\n+return SOAP_OK;\n+}\n+... // sub(), mul(), and div() implementations\n+Note that the service operation does not need a prefix (ns__) and there is no\n+soap context passed to the service operation since the service object itself is\n+the context (it is derived from the soap context struct).\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to chain C++ server classes to accept messages on the same port\n+When combining multiple services into one application, you can run wsdl2h on\n+multiple WSDLs to generate the single all-inclusive service definitions\n+interface header file for soapcpp2. This header file is then processed with\n+soapcpp2 to generate skeleton functions in C or server classes in C++ when\n+using soapcpp2 -j option -j (or option -i).\n+This approach works well for C and C++ too, but the problem in C++ is that we\n+end up with multiple service classes, each for a collection of service\n+operations that the class is supposed to implement. But what if we need to\n+provide one endpoint port for all services and operations? In this case\n+invoking the server object's serve method is not sufficient, since only one\n+service can accept requests while we want multiple services to listen to the\n+same port.\n+For example, say we have three service classes soapABCService, soapUVWService,\n+and soapXYZService. We run soapcpp2 -i -S -q name three times (on the same\n+interface file when applicable):\n+soapcpp2 -i -S -qAbc file.h\n+soapcpp2 -i -S -qUvw file.h\n+soapcpp2 -i -S -qXyz file.h\n+To generate the common envH.h file for SOAP Header and SOAP Fault definitions\n+is done on a env.h file that is empty or has the SOAP Header and SOAP Fault\n+detail structures SOAP_ENV__Header and SOAP_ENV__Detail specified:\n+soapcpp2 -CSL -penv env.h\n+The approach is to chain the service dispatchers, as shown below:\n+#include \"AbcABCService.h\"\n+#include \"UvwUVWService.h\"\n+#include \"XyzXYZService.h\"\n+#include \"envH.h\" // include this file last, if this file is needed\n+int main()\n+{\n+Abc::soapABCService abc; // generated with soapcpp2 -i -S -qAbc\n+Uvw::soapUVWService uvw; // generated with soapcpp2 -i -S -qUvw\n+Xyz::soapXYZService xyz; // generated with soapcpp2 -i -S -qXyz\n+if (!soap_valid_socket(abc.bind(NULL, 8080, 100)))\n+exit(EXIT_FAILURE);\n+while (1)\n+{\n+if (!soap_valid_socket(abc.accept()))\n+exit(EXIT_FAILURE);\n+// abc.ssl_accept(); // when HTTPS is used\n+... //\n+if (soap_begin_serve(&abc)) // available in 2.8.2 and later\n+{\n+abc.soap_stream_fault(std::cerr);\n+}\n+else if (abc.dispatch() == SOAP_NO_METHOD)\n+{\n+soap_copy_stream(&uvw, &abc);\n+soap_free_stream(&abc); // abc no longer uses this stream\n+if (uvw.dispatch() == SOAP_NO_METHOD)\n+{\n+soap_copy_stream(&xyz, &uvw);\n+soap_free_stream(&uvw); // uvw no longer uses this stream\n+if (xyz.dispatch())\n+{\n+soap_send_fault(&xyz); // send fault to client\n+xyz.soap_stream_fault(std::cerr);\n+}\n+xyz.destroy();\n+}\n+else\n+{\n+soap_send_fault(&uvw); // send fault to client\n+uvw.soap_stream_fault(std::cerr);\n+}\n+uvw.destroy();\n+}\n+else\n+{\n+abc.soap_stream_fault(std::cerr);\n+}\n+abc.destroy();\n+}\n+}\n+soap_free_stream\n+void soap_free_stream(struct soap *soap)\n+Free the input/output stream state of the given soap context.\n+SOAP_NO_METHOD\n+#define SOAP_NO_METHOD\n+A soap_status error code: the service request dispatcher did not find a\n+matching service operation fo...\n+Definition: stdsoap2.h:2505\n+soap_begin_serve\n+int soap_begin_serve(struct soap *soap)\n+Initiates serving a pending client request.\n+soap_send_fault\n+int soap_send_fault(struct soap *soap)\n+Return an HTTP error with a SOAP Fault message from a service.\n+The dispatch method parses the SOAP/XML request and invokes the service\n+operations, unless there is no matching operation and #SOAP_NO_METHOD is\n+returned. The soap_copy_stream ensures that the service object uses the\n+currently open socket. The copied streams are freed with soap_free_stream. Do\n+not enable keep-alive support, as the socket may stay open indefinitely\n+afterwards as a consequence. Also, the dispatch method does not send a fault to\n+the client, which has to be explicitly done with the soap_send_fault operation\n+when an error occurs.\n+In this way, multiple services can be chained to accept messages on the same\n+port. This approach also works with SSL for HTTPS services.\n+However, this approach is not recommended for certain plugins, because plugins\n+must be registered with all service objects and some plugins require state\n+information to be used across the service objects, which will add significantly\n+to the complexity.\n+Therefore, it is best to have all services share the same context. This means\n+that soapcpp2 -j with option -j should be used instead of option -i. As a\n+result, we can make each service class instance to share the same soap context\n+and the same plugins.\n+soapcpp2 -j -S -qAbc file.h\n+soapcpp2 -j -S -qUvw file.h\n+soapcpp2 -j -S -qXyz file.h\n+Chaining the services is also simpler to implement since we use one soap\n+context:\n+#include \"AbcABCService.h\"\n+#include \"UvwUVWService.h\"\n+#include \"XyzXYZService.h\"\n+#include \"envH.h\" // include this file last, if it is needed\n+int main()\n+{\n+struct soap *soap = soap_new();\n+Abc::soapABCService abc(soap); // generated with soapcpp2 -j -S -qAbc\n+Uvw::soapUVWService uvw(soap); // generated with soapcpp2 -j -S -qUvw\n+Xyz::soapXYZService xyz(soap); // generated with soapcpp2 -j -S -qXyz\n+if (!soap_valid_socket(soap_bind(soap, NULL, 8080, BACKLOG)))\n+exit(EXIT_FAILURE);\n+while (1)\n+{\n+if (!soap_valid_socket(soap_accept(soap)))\n+exit(EXIT_FAILURE);\n+if (soap_begin_serve(soap))\n+{\n+soap_stream_fault(soap, std::cerr);\n+}\n+else if (abc.dispatch() == SOAP_NO_METHOD)\n+{\n+if (uvw.dispatch() == SOAP_NO_METHOD)\n+{\n+if (xyz.dispatch() == SOAP_NO_METHOD)\n+soap_send_fault(soap); // send fault to client\n+}\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+}\n+soap_free(soap); // safe to delete when abc, uvw, xyz are also deleted\n+}\n+However, the while loop iterates for each new connection that is established\n+with soap_accept and does not allow for HTTP keep-alive connections to persist.\n+For our final improvement we want to support HTTP keep-alive connections that\n+require looping over the service dispatches until the connection closes on\n+either end, after which we resume the outer loop. The resulting code is very\n+close to the soapcpp2-generated soap_serve code and the serve service class\n+methods, with the addition of the chain of service dispatches in the loop body:\n+#include \"AbcABCService.h\"\n+#include \"UvwUVWService.h\"\n+#include \"XyzXYZService.h\"\n+#include \"envH.h\" // include this file last, if it is needed\n+int main()\n+{\n+struct soap *soap = soap_new();\n+Abc::soapABCService abc(soap); // generated with soapcpp2 -j -S -qAbc\n+Uvw::soapUVWService uvw(soap); // generated with soapcpp2 -j -S -qUvw\n+Xyz::soapXYZService xyz(soap); // generated with soapcpp2 -j -S -qXyz\n+if (!soap_valid_socket(soap_bind(soap, NULL, 8080, BACKLOG)))\n+exit(EXIT_FAILURE);\n+while (1)\n+{\n+if (!soap_valid_socket(soap_accept(soap)))\n+exit(EXIT_FAILURE);\n+soap->keep_alive = soap->max_keep_alive + 1; // max keep-alive iterations\n+do\n+{\n+if ((soap->keep_alive > 0) && (soap->max_keep_alive > 0))\n+soap->keep_alive--;\n+if (soap_begin_serve(soap))\n+{\n+if (soap->error >= SOAP_STOP) // if a plugin has served the request\n+continue; // then continue with the next request\n+break; // an error occurred\n+}\n+if (abc.dispatch() == SOAP_NO_METHOD)\n+{\n+if (uvw.dispatch() == SOAP_NO_METHOD)\n+{\n+if (xyz.dispatch() == SOAP_NO_METHOD)\n+soap_send_fault(soap); // send fault to client\n+}\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+} while (soap->keep_alive);\n+soap_destroy(soap);\n+soap_end(soap);\n+}\n+soap_free(soap); // safe to delete when abc, uvw, xyz are also deleted\n+}\n+SOAP_STOP\n+#define SOAP_STOP\n+An internal soap_status error code to signal that an HTTP response must not be\n+produced.\n+Definition: stdsoap2.h:2702\n+soap::keep_alive\n+int keep_alive\n+HTTP keep-alive flag (try to enable when -1, disabled when 0) and counter\n+(enabled when >0)\n+Definition: stdsoap2.h:2906\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to generate WSDL service descriptions\n+The soapcpp2 tool generates WSDL (Web Service Description Language) service\n+descriptions and XML schema files (XSDs) when processing an interface header\n+file that wasn't generated with wsdl2h. The soapcpp2 tool produces one WSDL\n+file for a set of service operations in the header file. If the header file has\n+no service operations (i.e. no function prototypes) then no WSDL will be\n+generated. The names of the function prototypes of the service operations must\n+use the same namespace prefix and the namespace prefix is used to name the WSDL\n+file. The WSDL file and services can be named with a //gsoap service\n+name: directive to specify a service name for each namespace prefix.\n+If multiple namespace prefixes are used to define service operations, then\n+multiple WSDL files will be created and each file describes the set of service\n+operations belonging to that namespace prefix.\n+The soapcpp2 tool also generates XML schema files (XSD files) for all\n+serializable C/C++ types declared in the interface header file input to\n+soapcpp2. These XSD files do not have to be published as the WSDL file already\n+contains the appropriate XML Schema definitions.\n+To customize the WSDL output, use //gsoap directives to declare the service\n+name, the endpoint port, and namespace etc:\n+//gsoap ns service name: example\n+//gsoap ns service type: examplePortType\n+//gsoap ns service port: http://www.example.com/example\n+//gsoap ns service namespace: urn:example\n+These are some examples and defaults will be used when directives are not\n+specified. Recommended is to specify at least the service name and namespace\n+URI. More details and settings for the service can be declared as well. See\n+Section Directives for more details.\n+In addition to the generation of the WSDL files, a file with a namespace\n+mapping table is generated by the gSOAP soapcpp2 tool. An example mapping table\n+is shown below:\n+struct Namespace namespaces[] =\n+{\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" },\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\" },\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\", \"http://www.w3.org/*/\n+XMLSchema-instance\" },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\", \"http://www.w3.org/*/XMLSchema\" },\n+{ \"ns\", \"urn:example\" }, // binds \"ns\" namespace prefix to schema URI\n+{ NULL, NULL }\n+};\n+This file should be included in the client or service application, see Section\n+XML_namespaces_and_the_namespace_mapping_table for details on namespace mapping\n+tables.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+For example, suppose the following service operations are defined in the calc.h\n+header file:\n+// Content of file \"calc.h\":\n+//gsoap ns service name: calc\n+int ns__add(double a, double b, double& result);\n+int ns__sub(double a, double b, double& result);\n+int ns__sqrt(double a, double& result);\n+One WSDL file calc.wsdl will be generated that describes the three service\n+operations:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+Service definition of function ns__add\n+\n+\n+\n+\n+Service definition of function ns__sub\n+\n+\n+\n+\n+Service definition of function ns__sqrt\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+gSOAP 2.8.70 generated service definition\n+\n+\n+\n+\n+\n+The above uses the default settings for the service name, port, and namespace\n+which can be set in the header file with //gsoap directives, see Section\n+Directives .\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to make client-side calls within a service operation\n+Invoking a server-side client call requires the use of a new soap context in\n+the service operation itself, which is best illustrated with an example. The\n+following example combines the functionality of two Web services into one new\n+SOAP Web service. The service provides a currency-converted stock quote. To\n+serve a request, the service in turn requests the stock quote and the currency-\n+exchange rate from two services. The currency-converted quote is then\n+calculated and returned.\n+In addition to being a client of two Web services, this service application can\n+also be used as a client of itself to test the implementation. As a client\n+invoked from the command-line, it will return a currency-converted stock quote\n+by connecting to a copy of itself installed as a CGI application on the Web to\n+retrieve the quote after which it will print the quote on the terminal.\n+The header file input to the soapcpp2 tool is given below. The example is for\n+illustrative purposes only because the XMethods stock quote and currency rate\n+services are no longer operational:\n+// Contents of file \"quotex.h\":\n+// the first service: stock quotes\n+//gsoap ns1 service namespace: urn:xmethods-delayed-quotes\n+//gsoap ns1 service style: rpc\n+//gsoap ns1 service encoding: encoded\n+int ns1__getQuote(char *symbol, float& result);\n+// the second service: currency exchange\n+//gsoap ns2 service namespace: urn:xmethods-CurrencyExchange\n+//gsoap ns2 service style: rpc\n+//gsoap ns2 service encoding: encoded\n+int ns2__getRate(char *country1, char *country2, float& result);\n+// our new service operation: returns currency-converted stock quote\n+//gsoap ns3 service name: quotex\n+//gsoap ns3 service style: rpc\n+//gsoap ns3 service encoding: encoded\n+//gsoap ns3 schema namespace: urn:quotex\n+int ns3__getQuote(char *symbol, char *country, float& result);\n+We run:\n+soapcpp2 quotex.h\n+This generates soapStub.h, soapH.h, soapC.cpp (serializers), soapClient.cpp\n+(client stub functions), soapServer.cpp (server skeleton functions).\n+The quotex.cpp CGI service application is (for source code to create a stand-\n+alone service, see Section How_to_create_a_stand-alone_server):\n+// Contents of file \"quotex.cpp\":\n+#include \"soapH.h\"\n+#include \"ns1.nsmap\"\n+int main()\n+{\n+struct soap soap;\n+soap_init(&soap);\n+soap_serve(&soap);\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+int ns3__getQuote(struct soap *soap, char *symbol, char *country, float&\n+result)\n+{\n+struct soap tsoap;\n+float q, r;\n+soap_init(&tsoap);\n+if (soap_call_ns1__getQuote(tsoap, \"http://services.xmethods.net/soap\", \"\",\n+symbol, &q)\n+|| soap_call_ns2__getRate(tsoap, \"http://services.xmethods.net/soap\", NULL,\n+\"us\", country, &r)\n+{\n+soap_delegate_deletion(&tsoap, &soap); // move tsoap-deserialized data to the\n+soap context\n+if (tsoap->fault)\n+{\n+soap->fault = tsoap->fault; // if one of the calls returned a SOAP Fault, we\n+use it\n+soap_done(&tsoap);\n+return SOAP_FAULT;\n+}\n+soap_done(&tsoap);\n+return soap_receiver_fault(soap, \"Cannot access services\", NULL);\n+}\n+result = q * r;\n+soap_delegate_deletion(&tsoap, &soap); // move tsoap-deserialized data to the\n+soap context\n+soap_done(&tsoap);\n+return SOAP_OK;\n+}\n+/* Since this app is a combined client-server, it is put together with\n+* one header file that describes all service operations. However, as a\n+consequence we\n+* have to implement the methods that are not ours. Since these implementations\n+are\n+* never called (this code is client-side), we can make them dummies as below.\n+*/\n+int ns1__getQuote(struct soap *soap, char *symbol, float &result)\n+{\n+// dummy: will never be called\n+return SOAP_NO_METHOD;\n+}\n+int ns2__getRate(struct soap *soap, char *country1, char *country2, float\n+&result)\n+{\n+// dummy: will never be called\n+return SOAP_NO_METHOD;\n+}\n+struct Namespace namespaces[] =\n+{\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" },\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\" },\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\", \"http://www.w3.org/*/\n+XMLSchema-instance\" },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\", \"http://www.w3.org/*/XMLSchema\" },\n+{ \"ns1\", \"urn:xmethods-delayed-quotes\" },\n+{ \"ns2\", \"urn:xmethods-CurrencyExchange\" },\n+{ \"ns3\", \"urn:quotex\" },\n+{ NULL, NULL }\n+};\n+SOAP_FAULT\n+#define SOAP_FAULT\n+A soap_status error code: the fault code to be returned by a service operation\n+when calling soap_send...\n+Definition: stdsoap2.h:2380\n+soap::fault\n+struct SOAP_ENV__Fault * fault\n+The soap::fault points to a SOAP_ENV__Fault structure with the SOAP Fault that\n+was received or that c...\n+Definition: stdsoap2.h:2957\n+When combining clients and service functionalities, it is recommended to use a\n+single interface header file input to the soapcpp2 tool, since this header file\n+declares both client and server functionalities. As a consequence, however,\n+stub and skeleton functions are generated for all service operations, while the\n+client part will only use the stub functions and the service part will use the\n+skeleton functions. Thus, dummy implementations of the unused service\n+operations are implemented as shown in the example above, which are in fact\n+never used.\n+Three WSDL files are generated by soapcpp2: ns1.wsdl, ns2.wsdl, and ns3.wsdl.\n+Only the ns3.wsdl file is required to be published as it contains the\n+description of the combined service, while the others are generated as a side-\n+effect.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to switch to REST from SOAP\n+To switch to RESTful Web APIs from SOAP Web services APIs is simple, just use a\n+directive.\n+To declare HTTP POST as the default HTTP method to use with client-side calls\n+for all service operations associated with the ns namespace prefix:\n+//gsoap ns service protocol: POST\n+To declare the HTTP POST method for a specific service operation, use:\n+//gsoap ns service protocol: POST\n+int ns__webmethod(...);\n+You can specify GET, PUT, POST, and DELETE. With GET the input parameters of\n+the service operations should be primitive types. See Section Service\n+directives.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Asynchronous one-way message passing\n+SOAP messaging is typically synchronous: the client sends a HTTP POST and\n+blocks until the server responds to the request. The gSOAP tools also support\n+asynchronous one-way messaging over HTTP.\n+One-way SOAP service operations are declared as function prototypes with the\n+output parameter specified as a void type to indicate the absence of a return\n+value, for example:\n+int ns__event(int eventNo, void);\n+The soapcpp2 tool generates the following functions in soapClient.cpp:\n+int soap_send_ns__event(struct soap *soap, const char URL, const char action,\n+int event);\n+int soap_recv_ns__event(struct soap *soap, struct ns__event *dummy);\n+The soap_send_ns__event function transmits the message to the destination URL\n+by opening a socket and sending the SOAP encoded message. The socket will\n+remain open after the send. To complete the HTTP POST operation we need to call\n+soap_recv_empty_response to accept the server's HTTP OK or Accept response\n+message that should have an empty message body:\n+if (soap_send_ns__event(soap, eventNo) || soap_recv_empty_response(soap)\n+soap_print_fault(soap, stderr);\n+soap_recv_empty_response\n+int soap_recv_empty_response(struct soap *soap)\n+Receive an HTTP response message from the server that is assumed to be empty.\n+The generated soap_recv_ns__event function can be used to parse a SOAP message,\n+e.g. on the server side. But it is not used on the client side. The ns__event\n+structure is declared as:\n+struct ns__event\n+{\n+int eventNo;\n+}\n+The gSOAP generated soapServer.cpp code includes a skeleton function called by\n+soap_serve to process the one-way request message:\n+int soap_serve_ns__event(struct soap *soap);\n+This skeleton function calls the user-defined ns__event(struct soap *soap, int\n+eventNo) function (note the absence of the void parameter!). However, when this\n+function returns, the skeleton function does not respond with a SOAP response\n+message since no response data is specified. Instead, the user-defined\n+ns__event function should call soap_send_empty_response to return an empty\n+response message. For example:\n+int ns__event(struct soap *soap, int eventNo)\n+{\n+... // handle event\n+return soap_send_empty_response(soap, 202); // HTTP 202 Accepted\n+}\n+soap_send_empty_response\n+int soap_send_empty_response(struct soap *soap, int status)\n+Return an HTTP response message with an empty HTTP body from a service back to\n+the client or peer.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to use XML serializers to save and load application data\n+The gSOAP XML databindings for C and C++ allow a seamless integration of XML in\n+C and C++ applications. Data can be serialized in XML and vice versa. WSDL and\n+XML schema files can be converted to C or C++ definitions. C and C++\n+definitions can be translated to WSDL and schemas to support legacy ANSI C\n+applications for example.\n+This section explains the basics of mapping XML schema types to C/C++ types\n+using the wsdl2h tool. A more in-depth presentation of C/C++ XML data bindings\n+in gSOAP is documented in C_and_C++_XML_data_bindings.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Converting WSDL, WADL, and XML schema to C/C++ with wsdl2h\n+The wsdl2h tool takes WSDL, WADL, and XSD files or URLs to WSDL, WADL, and XSD\n+and generates an interface header file with the command:\n+ wsdl2h [options] WSDL WADL and XSD files or URLs...\n+The WSDL 1.1 and 2.0 standards are supported and WADL. If you have any trouble\n+with wsdl2h being able to process WSDLs and XSD files or URLs, then please\n+contact Genivia technical support for assistance.\n+The gSOAP tools support the entire XML schema 1.1 standard, except XPath\n+expressions and assertions. This covers all of the following schema components\n+with their optional attributes shown:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+The supported schema facets are:\n+ maps to enum\n+ maps to primitive type or a typedef\n+ maps to a struct or class\n+ maps to enum* (bitmask)\n+ maps to extended struct or class with a base class\n+ maps to typedef, struct or class\n+ validates string lengths\n+ validates string lengths\n+ validates string lengths\n+ validates integer and float types\n+ validates integer and float types\n+ validates integer and float types\n+ validates integer and float types\n+ float with formatted output\n+ float with formatted output\n+ float with formatted output\n+ float with formatted output\n+ regex pattern, not automatically validated, see note below\n+ maps to string, content not validated\n+Also supported are:\n+\n+\n+\n+\n+\n+A subset of the default type mappings is shown below:\n+xsd:string maps to string (char* or std::string)\n+xsd:boolean maps to bool (C++) or enum xsd__boolean (C)\n+xsd:float maps to float\n+xsd:double maps to double\n+xsd:decimal maps to string, or use #import \"custom/float128.h\"\n+xsd:duration maps to string, or use #import \"custom/duration.h\"\n+xsd:dateTime maps to time_t, or use #import \"custom/struct_tm.h\"\n+xsd:time maps to string (white space collapse applied)\n+xsd:date maps to string (white space collapse applied)\n+xsd:gYearMonth maps to string (white space collapse applied)\n+xsd:gYear maps to string (white space collapse applied)\n+xsd:gMonth maps to string (white space collapse applied)\n+xsd:hexBinary maps to struct xsd__hexBinary\n+xsd:base64Binary maps to struct xsd__base64Binary\n+xsd:anyURI maps to string (white space collapse applied)\n+xsd:anyType maps to an XML string or DOM with wsdl2h -d\n+xsd:QName maps to _QName (QName normalization applied)\n+xsd:NOTATION maps to string (white space collapse applied)\n+Automatic validation of xsd:pattern-restricted content is possible with a hook\n+to a regex pattern matching engine, see the soap::fsvalidate and soap::\n+fwvalidate callback documentation in Section Function_callbacks_for_customized\n+I/O_and_HTTP_handling .\n+User-defined mappings can be added to typemap.dat, which is used by wsdl2h to\n+map schema types to C/C++ types. For example, the map xsd:duration to a custom\n+serializer, add this line to typemap.dat:\n+xsd__duration = #import \"custom/duration.h\" | xsd__duration\n+Then run wsdl2h with the typemap.dat file in the current directory or use\n+wsdl2h_-t_mapfile.dat_option_-t_mapfile.dat to use mapfile.dat instead. This\n+requires compiling gsoap/custom/duration.c with your build.\n+Another example is xsd:dateTime which is mapped to time_t. To expand the range\n+and precision of xsd:dateTime we can map xsd:dateTime to struct tm:\n+xsd__dateTime = #import \"custom/struct_tm.h\" | xsd__dateTime\n+or to struct timeval:\n+xsd__dateTime = #import \"custom/struct_timeval.h\" | xsd__dateTime\n+This requires compiling gsoap/custom/struct_tm.c or gsoap/custom/\n+struct_timeval.c, respectively.\n+Non-primitive XSD types are supported, with the default mapping shown below:\n+xsd:normalizedString maps to string\n+xsd:token maps to string\n+xsd:language maps to string\n+xsd:IDREFS maps to string\n+xsd:ENTITIES maps to string\n+xsd:NMTOKEN maps to string\n+xsd:NMTOKENS maps to string\n+xsd:Name maps to string\n+xsd:NCName maps to string\n+xsd:ID maps to string\n+xsd:IDREF maps to string\n+xsd:ENTITY maps to string\n+xsd:integer maps to string\n+xsd:nonPositiveInteger maps to string\n+xsd:negativeInteger maps to string\n+xsd:long maps to LONG64\n+xsd:int maps to int\n+xsd:short maps to short\n+xsd:byte maps to byte\n+xsd:nonNegativeInteger maps to string\n+xsd:unsignedLong maps to ULONG64\n+xsd:unsignedInt maps to unsigned int\n+xsd:unsignedShort maps to unsigned short\n+xsd:unsignedByte maps to unsigned byte\n+xsd:positiveInteger maps to string\n+xsd:yearMonthDuration maps to string\n+xsd:dayTimeDuration maps to string\n+xsd:dateTimeStamp maps to string\n+String targets are defined in the typemap.dat file used by wsdl2h to map XSD\n+types. This allows the use of char* and std::string. It is possible to map any\n+string types to wchar_t and std::wstring by adding the following line to\n+typemap.dat:\n+xsd__string = | wchar_t* | wchar_t*\n+and\n+xsd__string = | std::wstring\n+By default strings are either char* (for C) or std::string (for C++) which\n+contain ASCII or UTF-8 content enabled with the runtime flag #SOAP_C_UTFSTRING.\n+Note that the XSD types for unlimited numeric values such as xsd:integer and\n+xsd:decimal are mapped to strings, to preserve the value in case it is too\n+large to store in a 64-bit integer or float. The mapping can be redefined as\n+follows in typemap.dat:\n+xsd__decimal = | double\n+xsd__integer = | LONG64\n+xsd__nonNegativeInteger = typedef xsd__integer xsd__nonNegativeInteger 0 : ;\n+| xsd__nonNegativeInteger\n+xsd__nonPositiveInteger = typedef xsd__integer xsd__nonPositiveInteger : 0 ;\n+| xsd__nonPositiveInteger\n+xsd__positiveInteger = typedef xsd__integer xsd__positiveInteger 1 : ;\n+| xsd__positiveInteger\n+xsd__negativeInteger = typedef xsd__integer xsd__negativeInteger : -1;\n+| xsd__negativeInteger\n+We can also use a quadmath.h 128 bit float to store xsd:decimal:\n+xsd__decimal = #import \"custom/float128.h\" | xsd__decimal\n+where xsd__decimal is a __float128 quadmath.h type.\n+There are several initialization flags to control XML serialization at run-\n+time:\n+ * XML validation is more strictly enforced with #SOAP_XML_STRICT.\n+ * XML namespaces are enforced when parsing XML, unless disabled with\n+ #SOAP_XML_IGNORENS.\n+ * XML exclusive canonicalization is enabled with #SOAP_XML_CANONICAL.\n+ * XML default xmlns=\"...\" namespace bindings are enforced with\n+ #SOAP_XML_DEFAULTNS.\n+ * XML is indented for enhanced readability with #SOAP_XML_INDENT.\n+ * XML xsi:nil for NULL struct and class members are serialized with\n+ #SOAP_XML_NIL.\n+ * UTF-8 is stored in char* and std::string with #SOAP_C_UTFSTRING.\n+Strict validation catches all structural XML validation violations. For\n+primitive type values it depends on the C/C++ target type that XSD types are\n+mapped to, to catch primitive value content pattern violations. Primitive value\n+content validation is performed on non-string types such as numerical and time\n+values. String values are not automatically validated, unless a xsd:pattern is\n+given and the soap::fsvalidate and soap::fwvalidate callbacks are implemented\n+by the user. Alternatively, deserialized string content can be checked at the\n+application level.\n+To obtain C or C++ type definitions for XML schema components, run wsdl2h on\n+the schemas to generate a data binding interface header file. This header file\n+defines the C/C++ type representations of the XML schema components. The header\n+file is then processed by the soapcpp2 tool to generate the serializers for\n+these types. See Section Introduction_to_XML_data_bindings for an overview to\n+use wsdl2h and soapcpp2 to map schemas to C/C++ types to obtain XML data\n+bindings.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Mapping C/C++ to XML schema with soapcpp2\n+To generate serialization code, execute:\n+ soapcpp2 [options] file.h\n+The following C/C++ types are supported in the data binding interface header\n+file:\n+bool\n+enum, enum * (enum * is a \"product enumeration\" representing a bitmask)\n+(signed or unsigned) char, int8_t, short, int16_t, int, int32_t, long, long\n+long, int64_t, LONG64\n+size_t (transient, not serializable)\n+float, double, long double (#import \"custom/long_double.h\")\n+std::string, std::wstring, char[], char*, wchar_t*\n+_XML (a char* type to hold literal XML string content)\n+_QName (a char* type with normalized QName content of the form prefix:name)\n+struct, class (with single inheritance)\n+std::vector, std::list, std::deque, std::set\n+union (requires preceding discriminant member)\n+typedef\n+time_t\n+template <> class (containers require begin(), end(), size(), and insert()\n+methods)\n+void* (requires a preceding __type member to indicate the object pointed to)\n+struct xsd__hexBinary (special pre-defined type to hold binary content)\n+struct xsd__base64Binary (special pre-defined type to hold binary content)\n+struct tm (#import \"custom/struct_tm.h\")\n+struct timeval (#import \"custom/struct_timeval.h\")\n+pointers to any of the above (any pointer-linked structures are serializable,\n+including cyclic graphs)\n+std::shared_ptr, std::unique_ptr, std::auto_ptr\n+fixed-size arrays of all of the above\n+_XML\n+char * _XML\n+A built-in string type containing literal XML content in UTF-8 format.\n+Definition: stdsoap2.h:9501\n+_QName\n+char * _QName\n+A built-in string type containing normalized QName contents.\n+Definition: stdsoap2.h:9504\n+LONG64\n+#define LONG64\n+User-definable macro that represents a portable signed 64 bit integer type.\n+Definition: stdsoap2.h:1276\n+Additional features and C/C++ syntax requirements:\n+ * A header file should not include any code statements, only data type\n+ declarations.\n+ * Nested structs, classes, and unions are un-nested.\n+ * Use #import \"file.h\" instead of #include to import other header files.\n+ The #include and #define directives are fine to use, but these are moved\n+ into the generated code and then used by the C/C++ compiler.\n+ * C++ namespaces are supported, but must cover the entire header file\n+ content.\n+ * Optional DOM support can be used to store mixed content or literal XML\n+ content can be stored in _XML strings. Otherwise, mixed content may be\n+ lost. Use soapcpp2 -d option -d for DOM support. See the XML_DOM_API\n+ documentation for details.\n+ * Types are denoted transient using the extern qualifier, which prevents\n+ serialization of types or struct and class members:\n+ extern class classname; // this class is not serializable\n+ struct structname\n+ {\n+ extern char *name; // this member is not serializable\n+ int num;\n+ };\n+ * Only public members of a class can be serialized:\n+ class name\n+ { private:\n+ char *secret; // private and protected members are not serializable\n+ };\n+ and members are public by default in the interface header file for\n+ soapcpp2.\n+ * Types may be declared volatile which means that they are declared\n+ elsewhere in the project's source code base and should not be redefined\n+ in the soapcpp2-generated code nor changed by the soapcpp2 tool, for\n+ example this makes struct tm of time.h serializable with a selection of\n+ its members specified, where volatile prevents soapcpp2 from declaring\n+ this struct again:\n+ volatile struct tm\n+ {\n+ int tm_sec;\n+ int tm_min;\n+ int tm_hour;\n+ int tm_mday;\n+ int tm_mon;\n+ int tm_year;\n+ };\n+ * Classes and structs may be declared mutable means that they can be\n+ augmented with additional members using redefinitions of the struct or\n+ class:\n+ mutable class classname\n+ { public:\n+ int n; // classname has a member 'n'\n+ };\n+ mutable class name\n+ { public:\n+ float x; // classname also has a member 'x'\n+ };\n+ The SOAP_ENV__Header struct is mutable as well as the SOAP_ENV__Fault,\n+ SOAP_ENV__Detail, SOAP_ENV__Reason, and SOAP_ENV__Code structs. The\n+ reason is that these structures are augmented with additional members by\n+ plugins such as WS-Addressing gsoap/plugin/wsaapi.h to support these\n+ SOAP-based protocols.\n+ * Members of a struct or class are serialized as XML attributes when\n+ qualified with '@', for example:\n+ struct record\n+ {\n+ @ char *name; // XML attribute name\n+ int num; // XML element num\n+ };\n+ * Strings with 8-bit content hold ASCII by default or hold UTF-8 when\n+ enabled with runtime flag #SOAP_C_UTFSTRING. When enabled, all std::\n+ string and char* strings contain UTF-8. In this way the deserializers\n+ populate strings with UTF-8 content and serializers will output strings\n+ as holding UTF-8 content.\n+The soapcpp2 tool generates serializers and deserializers for all wsdl2h-\n+generated or user-defined data structures that are specified in the header file\n+input to the soapcpp2 tool. The serializers and deserializers can be found in\n+the soapcpp2-generated soapC.cpp file. These serializers and deserializers can\n+be used separately by an application without the need to build a Web services\n+client or service application. This is useful for applications that need to\n+save or export their data in XML or need to import or load data stored in XML\n+format.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Serializing C/C++ data to XML\n+The soapcpp2 tool generates the following readers and writers for each\n+serializable data type defined in the data bindings interface file input to\n+soapcpp2:\n+ * int soap_read_T(struct soap*, T *data) parse XML and deserialize into C/\n+ C++ data of type T, returns #SOAP_OK on success.\n+ * int soap_write_T(struct soap* T *data) serialize C/C++ data of type T\n+ into XML, returns #SOAP_OK on success.\n+Where T is the name of the data type, such as the struct or class name. For\n+other types, see the table further below for the naming conventions used by\n+soapcpp2 to generate these functions.\n+The following soap context variables control the destination and source for XML\n+serialization and deserialization:\n+ * SOAP_SOCKET soap::socket socket file descriptor for socket connection\n+ input and output (or #SOAP_INVALID_SOCKET when not set).\n+ * ostream *soap::os C++ only: output stream used for send operations when\n+ non-NULL.\n+ * const char **soap::os C only: points to a string pointer to be set with\n+ the string content produced, the saved string is allocated and managed by\n+ the soap context.\n+ * istream *soap::is C++ only: input stream used for receive operations when\n+ non-NULL.\n+ * const char *soap::is C only: string with input to parse, this pointer\n+ advances over the string until a \\0 is found.\n+ * int soap::sendfd when soap::socket = #SOAP_INVALID_SOCKET, this fd is\n+ used for send operations, default fd is 1 (stdout).\n+ * int soap::recvfd when soap::socket = #SOAP_INVALID_SOCKET, this fd is\n+ used for receive operations, default fd is 0 (stdin).\n+Additional functions are generated by soapcpp2 for each serializable data type\n+T to dynamically allocate data of type T on the context-managed heap and to\n+initialize data of type T:\n+ * T * soap_new_T(struct soap*) allocates and initializes data of type T in\n+ context-managed heap memory, managed data is deleted with soap_destroy\n+ (deletes C++ objects) and soap_end (deletes all other data), and you can\n+ also use soap_malloc to allocate uninitialized context-managed memory.\n+ * void soap_default_T(struct soap*, T*) initializes data of type T, but C++\n+ classes are augmented with a soap_default(struct soap*) method that\n+ should be called instead to (re)initialize the class instance. If the\n+ class has a soap context pointer member then this member will be set to\n+ the first argument passed to this function.\n+The following extra functions are generated by soapcpp2 for deep copying and\n+deletion of entire data structures when using soapcpp2 -Ecd options -Ec (deep\n+copy) and -Ed (deep deletion):\n+ * T * soap_dup_T(struct soap*, T *dst, const T *src) deep copy src into\n+ dst, replicating all deep cycles and shared pointers when a managing soap\n+ context is provided. When dst is NULL, allocates space for dst and\n+ returns a pointer to the allocated copy. Deep copy results in a tree when\n+ the soap context is NULL, but the presence of deep cycles will lead to\n+ non-termination. Use flag SOAP_XML_TREE with managing context to copy\n+ into a tree without cycles and pointers to shared objects. Returns dst or\n+ the allocated copy when dst is NULL.\n+ * void soap_del_T(const T*) deletes all heap-allocated members of this\n+ object by deep deletion ONLY IF this object and all of its (deep) members\n+ are not managed by a soap context AND the deep structure is a tree (no\n+ cycles and co-referenced objects by way of multiple (non-smart) pointers\n+ pointing to the same data). Can be safely used after soap_dup(NULL) to\n+ delete the deep copy. Does not delete the object itself.\n+The following initializing and finalizing functions should be used before and\n+after calling lower-level IO functions such as soap_send, soap_send_raw,\n+soap_get0, soap_get1, and soap_http_get_body (this is not needed when calling\n+the soap_read_T and soap_write_T functions):\n+ * int soap_begin_send(struct_soap*) start a sending phase.\n+ * int soap_end_send(struct_soap*) flush the send buffer.\n+ * int soap_begin_recv(struct_soap*) start a receiving phase, if an HTTP\n+ header is present, parse it first.\n+ * int soap_end_recv(struct_soap*) finalize receiving, read attachments if\n+ any, perform SOAP id/href consistency check on deserialized data.\n+These operations do not setup or open or close files or connections. The\n+application should open and close connections or files and set the soap::\n+socket, soap::os or soap::sendfd, soap::is or soap::recvfd streams or\n+descriptors. When soap::socket is #SOAP_INVALID_SOCKET and none of the streams\n+and descriptors are set, then the standard input and output will be used.\n+The following options are available to control serialization:\n+soap_set_mode(soap, SOAP_XML_TREE); // use this for XML without id-ref (no\n+cycles!)\n+soap_set_mode(soap, SOAP_XML_GRAPH); // or use this for XML with id-ref\n+(including cycles)\n+soap_set_namespaces(soap, struct Namespace *nsmap); // set a XML namespace\n+table with xmlns bindings\n+soap_set_namespaces\n+int soap_set_namespaces(struct soap *soap, const struct Namespace *namespaces)\n+Activates an XML namespace table to generate and resolve xmlns namespace\n+prefixes in XML messages.\n+See also Section Run-time_flags to control the I/O buffering and content\n+encoding such as compression.\n+To accurately and safely serialize data structures with cycles and co-\n+referenced objects to an XML stream, two generated functions are called by\n+soap_write_T to serialize data of type T: soap_serialize_T to perform a deep\n+analysis of pointers to detect co-referenced data and cycles, and soap_put_T to\n+output the data in XML with id-href (or id-ref) attributes for co-referenced\n+data and cycles. Multi-references with id-href (and id-ref) are part of the\n+SOAP protocol to serialize data accurately, i.e. retaining the structural\n+integrity of the data sent and received.\n+Flag #SOAP_XML_TREE turns id-href (id-ref) attributes off (makes\n+soap_serialize_T a no-op and ignores them on the receiving end). Flag\n+#SOAP_XML_GRAPH should be used with non-SOAP XML output to accurately and\n+safely serialize data structure graphs with co-referenced objects and cycles.\n+The soap_serialize_T and soap_put_T calls are performed by the generated\n+soap_write_T functions, which also call soap_begin_send and soap_end_send.\n+The following table lists the type naming conventions used by soapcpp2 to\n+generate functions:\n+type name\n+char* string\n+wchar_t* wstring\n+std::string std__string\n+std::wstring std__wstring\n+char byte\n+bool bool\n+double double\n+int int\n+float float\n+long long\n+long long LONG64\n+short short\n+time_t time\n+unsigned char unsignedByte\n+unsigned int unsignedInt\n+unsigned long unsignedLong\n+unsigned long long ULONG64\n+unsigned short unsignedShort\n+T[N] ArrayNOfType where Type is the type name of T\n+T* PointerToType where Type is the type name of T\n+std::vector TemplateOfType where Type is the type name of T\n+struct Name Name\n+class Name Name\n+enum Name Name\n+Consider for example the following interface header file for soapcpp2 declares\n+a struct ns__Person:\n+struct ns__Person\n+{\n+char *name;\n+};\n+To parse and deserialize a person variable p from XML:\n+struct soap *soap = soap_new();\n+struct ns__Person *p = soap_new_ns__Person(soap, -1); // -1 is one (non-array)\n+soap->recvfd = 0; // parse from stdout\n+// soap->is = &std::in; // parse from stdin stream (C++ only)\n+// soap->is = cs; // parse from a char *cs string (C only)\n+if (soap_read_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+... // use value p\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+soap::recvfd\n+int recvfd\n+The file descriptor to read data from when no socket communications are set\n+(soap::socket == #SOAP_IN...\n+Definition: stdsoap2.h:3046\n+To parse and deserialize XML from a file:\n+soap->recvfd = open(file, O_RDONLY);\n+if (soap->recvfd >= 0)\n+if (soap_read_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+close(soap->recvfd);\n+soap->recvfd = 0;\n+To parse and deserialize XML from a C++ file stream:\n+std::fstream fs;\n+fs.open(file, std::ios::in);\n+if (fs)\n+{\n+soap->is = &fs;\n+if (soap_read_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+fd.close();\n+soap->is = NULL;\n+}\n+soap::is\n+SOAP_SOURCE * is\n+The source to read data from when non-NULL, which in C++ is a std::istream\n+object and in C is a 0-ter...\n+Definition: stdsoap2.h:3095\n+Or to parse and deserialize XML from a string stream in C++:\n+std::stringstream ss;\n+... // populate stream ss\n+soap->is = &ss;\n+if (soap_read_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+soap->is = NULL;\n+To parse and deserialize XML from a string cs in C:\n+const char *cs = \"...\"; // populate string cs\n+soap->is = &cs;\n+if (soap_read_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+soap->is = NULL;\n+To serialize a person variable p in XML:\n+struct soap *soap = soap_new1(SOAP_XML_INDENT);\n+struct ns__Person *p = soap_new_ns__Person(soap, -1); // -1 is one (non-array)\n+p->name = \"Joe\";\n+soap->sendfd = 1; // send to stdout\n+// soap->os = &std::cout; // send to stdout stream (C++ only)\n+// soap->os = &cs; // send to a char *cs string (C only)\n+if (soap_write_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+soap::sendfd\n+int sendfd\n+The file descriptor to write data to when no socket communications are set\n+(soap::socket == #SOAP_INV...\n+Definition: stdsoap2.h:3065\n+This produces:\n+\n+Joe\n+\n+To send the output to a file:\n+soap->sendfd = open(file, O_RDWR|O_CREAT, S_IWUSR|S_IRUSR);\n+if (soap->sendfd >= 0)\n+if (soap_write_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+close(soap->sendfd);\n+soap->sendfd = 1;\n+To send the output to a C++ file stream:\n+std::fstream fs;\n+fs.open(file, std::ios::out);\n+if (fs)\n+{\n+soap->os = &fs;\n+if (soap_write_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+fd.close();\n+soap->os = NULL;\n+}\n+soap::os\n+SOAP_SINK * os\n+The sink to write data to when non-NULL, which in C++ is a std::ostream object\n+and in C is a pointer ...\n+Definition: stdsoap2.h:3130\n+Or send the output to a C++ string stream to save XML in a string:\n+std::stringstream ss;\n+soap->os = &ss;\n+if (soap_write_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+std::strings s = ss.str();\n+soap->os = NULL;\n+To save the output to a string cs in C:\n+char *cs;\n+soap->os = &cs;\n+if (soap_write_ns__Person(soap, p))\n+soap_print_fault(soap, stderr);\n+soap->os = NULL;\n+The string cs is populated with XML when successful. This string is managed by\n+the context and deleted with soap_end.\n+As we explained, the soap_write_T functions call soap_serialize_T, which must\n+be called when the data structure graph to serialize contains co-referenced\n+data and cycles. It must be called to preserve the logical coherence of\n+pointer-based data structures, where pointers may refer to co-referenced\n+objects. By calling soap_serialize_T, data structures shared through pointers\n+are serialized only once and referenced in XML using id-refs attributes. The\n+actual id-refs used depend on the SOAP encoding. To turn off SOAP encoding,\n+remove or avoid using the SOAP-ENV and SOAP-ENC namespace bindings in the\n+namespace table. In addition, the #SOAP_XML_TREE and #SOAP_XML_GRAPH flags can\n+be used to control the output by restricting serialization to XML trees or by\n+enabling multi-ref graph serialization with id-ref attributes.\n+To save the data as an XML tree (with one root) without any id-ref attributes,\n+use the #SOAP_XML_TREE flag. The data structure must not contain pointer-based\n+cycles. This flag also instructs the XML parser and deserializer to ignore id-\n+ref attributes.\n+To preserve the exact structure of the data object graph and create XML with\n+one root, use the #SOAP_XML_GRAPH output-mode flag (see Section Run-time_flags\n+). Using the #SOAP_XML_GRAPH flag assures the preservation of the logical\n+structure of the data.\n+Using #SOAP_XML_TREE means that no id-refs are output or parsed. With this flag\n+the output will serialize nodes as a tree in XML, which means that nodes may be\n+duplicated when shared by multiple pointers and cycles are broken to prevent\n+infinite serialization. To preserve the graph structure of the nodes in the\n+data structure, use #SOAP_XML_GRAPH or use SOAP 1.1 or 1.2 multi-reference\n+serialization (this is the default mode with SOAP serialization).\n+Consider for example the following struct:\n+struct Tricky\n+{\n+int *p;\n+int n;\n+int *q;\n+};\n+The following fragment initializes the pointer members p and q to point to the\n+value of member n:\n+struct soap *soap = soap_new();\n+struct Tricky X;\n+X.n = 123;\n+X.p = &X.n;\n+X.q = &X.n;\n+soap_write_Tricky(soap, &X);\n+soap_destroy(soap);\n+soap_end(soap);\n+What is special about this data structure is that members p and q both point to\n+member n. When using SOAP 1.1 with gSOAP, the serializers strategically place\n+id elements (also called SOAP 1.1 independent elements) after the root element\n+to identify shared values, where the href attributes of elements p and q point\n+to:\n+\n+

    \n+1\n+\n+\n+123\n+The above is not valid as plain XML, because there is no single root element,\n+but it is valid XML when placed in a SOAP Body element as intended with SOAP\n+1.1 messaging.\n+When SOAP 1.2 is used with gSOAP, the output is more accurate, because now both\n+elements p and q point to element n:\n+\n+

    \n+123\n+\n+\n+Without using SOAP encoding but using plain XML instead with the\n+#SOAP_XML_GRAPH flag set, the output is also accurate with both elements p and\n+q pointing to element n:\n+\n+

    \n+123\n+\n+\n+In the last two cases, the generated deserializer for this data type will be\n+able to accurately reconstruct the instance with members p and q pointing to\n+member n.\n+Finally, serialization with #SOAP_XML_TREE produces XML trees, which may\n+benefit interoperability but sacrifices the true meaning of serialization,\n+giving three copies of the shared value 1:\n+\n+

    123

    \n+123\n+123\n+
    \n+With the soapcpp2-generated serializers you can define a C++ operator that\n+serializes a specified class instance or type as follows, assuming the\n+ns__Person class is declared in an interface header file for soapcpp2:\n+class ns__Person\n+{ public:\n+ns__Person();\n+~ns__Person();\n+void set_name(const char *);\n+const char *get_name();\n+const char *name;\n+struct soap *soap;\n+};\n+Run soapcpp2 -0 on this file to generate the serializers with non-SOAP XML\n+namespaces, which we then use in our main program as follows:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+ns__Person::ns__Person()\n+{\n+name = NULL;\n+soap = soap_new1(SOAP_XML_INDENT | SOAP_XML_TREE); // or SOAP_XML_GRAPH\n+}\n+ns__Person::~ns__Person()\n+{\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+}\n+void ns__Person::set_name(const char *name)\n+{\n+this->name = soap_strdup(this->soap, name);\n+}\n+const char *ns__Person::get_name()\n+{\n+return this->name;\n+}\n+std::ostream& operator<<(std::ostream& o, ns__Person& p)\n+{\n+p.soap->os = &o;\n+soap_write_ns__Person(p.soap, &p);\n+p.soap->os = NULL;\n+return o;\n+}\n+std::istream& operator>>(std::istream& i, ns__Person& p)\n+{\n+p.soap->is = &i;\n+soap_read_ns__Person(p.soap, &p);\n+p.soap->is = NULL;\n+return i;\n+}\n+int main()\n+{\n+ns__Person p;\n+p.set_name(\"Joe\");\n+// serialize person p in XML to stdout:\n+std::cout << p << std::endl;\n+// then parse and deserialize XML from stdin into person p:\n+std::cin >> p;\n+// destructor cleans up person p and its deserialized data\n+}\n+soap_strdup\n+char * soap_strdup(struct soap *soap, const char *string)\n+Copy a string to managed memory.\n+In this example we construct an instance of ns__Person by setting its soap\n+context struct pointer data member to a new valid context that is deleted by\n+the destructor of this instance.\n+ Warning\n+ Deserialized class instances with a soap context struct pointer member\n+ will have their soap contexts set automatically by the deserializer's\n+ context, because soap_default_T (or soap_default class method) is called\n+ that sets the soap context struct pointer of the instance. For example,\n+ soap_read_ns__Person sets the deserialized ns__Person::soap member to the\n+ first argument soap of soap_read_ns__Person, which happens to be\n+ ns__Person::soap anyway in the example shown above. See Section Intra-\n+ class_memory_management .\n+The output of this program is:\n+\n+\n+Joe\n+\n+The xsi and xsd namespaces are used when attributes such as xsi:nil and xsi:\n+type are serialized, where xsi:type may refer to a XSD type such as xsd:string.\n+The xsi:nil attribute is output when an element is nillable but its\n+corresponding pointer member is NULL and xsi:type is output for structs and\n+classes with polymorphic members that are declared with int __type member and a\n+void* pointer to serialize the value pointed to. Attribute xsi:type is also\n+output to serialize derived instances in place of base class instances.\n+Therefore, removing these namespaces from the XML namespace table (ns.nsmap)\n+may cause XML parsing and validation issues.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+As an example, consider the following data type declarations:\n+// Contents of file \"person.h\":\n+enum ns__Gender { male, female };\n+class ns__Address\n+{ public:\n+const char *street;\n+uint32_t number;\n+const char *city;\n+};\n+class ns__Person\n+{ public:\n+const char *name;\n+enum ns__Gender gender;\n+ns__Address address;\n+ns__Person *mother;\n+ns__Person *father;\n+};\n+The following program uses these data types to write to standard output a data\n+structure that contains the data of a person named \"John\" living at Downing st.\n+10 in Londen. He has a mother \"Mary\" and a father \"Stuart\". After\n+initialization, the class instance for \"John\" is serialized and encoded in XML\n+to the standard output stream using gzip compression (requires the Zlib\n+library, compile sources with the compile-time flag #WITH_GZIP):\n+// Contents of file \"person.cpp\":\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+int main()\n+{\n+struct soap *soap = soap_new1(SOAP_XML_GRAPH);\n+ns__Person mother, father, john;\n+mother.soap_default(soap);\n+father.soap_default(soap);\n+john.soap_default(soap);\n+mother.name = \"Mary\";\n+mother.gender = female;\n+mother.address.street = \"Downing st.\";\n+mother.address.number = 10;\n+mother.address.city = \"London\";\n+mother.mother = NULL;\n+mother.father = NULL;\n+father.name = \"Stuart\";\n+father.gender = male;\n+father.address.street = \"Main st.\";\n+father.address.number = 5;\n+father.address.city = \"London\";\n+father.mother = NULL;\n+father.father = NULL;\n+john.name = \"John\";\n+john.gender = male;\n+john.address = mother.address;\n+john.mother = &mother;\n+john.father = &father;\n+soap_write_ns__Person(soap, &john);\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+}\n+The person.h interface header file is input to soapcpp2 and the generated code\n+compiled together with person.cpp:\n+ soapcpp2 -0 person.h\n+ c++ -o person person.cpp soapC.cpp stdsoap2.cpp\n+We run the application:\n+ ./person\n+The output is:\n+\n+John\n+male\n+
    \n+Dowling st.\n+10\n+London\n+
    \n+\n+Mary\n+female\n+
    \n+\n+5\n+\n+
    \n+
    \n+\n+Stuart\n+male\n+
    \n+Main st.\n+13\n+\n+
    \n+
    \n+\n+Because the C++ compiler stores the constant strings \"Dowling st.\" and \"London\"\n+just once, references are included in the output with flag #SOAP_XML_GRAPH that\n+preserves the original structure of the data structure serialized.\n+The following program decodes this content from standard input and reconstructs\n+the original data structure on the heap:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+int main()\n+{\n+struct soap *soap = soap_new();\n+ns__Person john;\n+if (soap_read_ns__Person(soap, &john))\n+{\n+soap_print_fault(soap, stderr);\n+}\n+else\n+{\n+ns__Person *mother = john->mother;\n+ns__Person *father = john->father;\n+... // use the data\n+}\n+soap_destroy(soap); // deletes john, mother and father\n+soap_end(soap); // deletes other managed data and temporaries\n+soap_free(soap); // finalize and delete the context\n+}\n+\ud83d\udd1d Back_to_table_of_contents\n+ Default values for omitted XML elements and attributes\n+The soapcpp2 tool generates soap_default_T functions for serializable types T\n+specified in an interface header file for soapcpp2 The default values of\n+primitive C/C++ types can be easily specified by defining any one or all of the\n+following macros before including the gsoap/stdsoap2.h file or by using\n+#SOAPDEFS_H or #WITH_SOAPDEFS_H:\n+#define SOAP_DEFAULT_bool\n+#define SOAP_DEFAULT_byte\n+#define SOAP_DEFAULT_double\n+#define SOAP_DEFAULT_float\n+#define SOAP_DEFAULT_int\n+#define SOAP_DEFAULT_long\n+#define SOAP_DEFAULT_LONG64\n+#define SOAP_DEFAULT_short\n+#define SOAP_DEFAULT_string\n+#define SOAP_DEFAULT_time\n+#define SOAP_DEFAULT_unsignedByte\n+#define SOAP_DEFAULT_unsignedInt\n+#define SOAP_DEFAULT_unsignedLong\n+#define SOAP_DEFAULT_unsignedLONG64\n+#define SOAP_DEFAULT_unsignedShort\n+#define SOAP_DEFAULT_wstring\n+The absence of a data value in a receiving SOAP message will result in the\n+assignment of a default value to a primitive type upon deserialization.\n+Default values can also be assigned to individual struct and class members of\n+primitive type or pointers to primitive types. For example:\n+struct MyRecord\n+{\n+char *name = \"Unknown\"; // optional\n+int value = 9999;\n+enum Status { active, passive } status = passive;\n+}\n+Default values are assigned to the members of a struct or class when parsing\n+and deserializing XML into data when XML elements or attributes with the\n+respective values are absent. Assigning default values to members makes these\n+members optional elements and attributes in the corresponding XML schema.\n+Because service operation requests and responses are essentially structs\n+(internally they are structs), default values can also be assigned to service\n+operation parameters. These default parameter values do not specify optional\n+parameters as we normally see with C/C++ function calls. Rather, the default\n+parameter values are used in case an inbound request or response message lacks\n+the XML elements that comprise these parameters. For example, a Web service can\n+use default values to fill-in absent parameters in a SOAP request as follows:\n+int ns__login(char *uid = \"anonymous\", char *pwd = \"guest\", bool granted =\n+true);\n+When the request message lacks uid or pwd elements then the default values are\n+assigned instead.\n+In addition, the default values will show up in the SOAP or XML request and\n+response message examples generated by the soapcpp2 tool.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The wsdl2h tool\n+The wsdl2h tool is an advanced XML data binding tool to convert WSDLs and XML\n+schemas (XSD files) to C or C++. The tool takes WSDL and XSD files or URLs to\n+WSDLs and XSDs, then converts these to a C or C++ interface header file that\n+specifies the properties of the WSDLs and XSDs in a familiar C/C++ syntax. This\n+header file is not intended to be included in your code directly. It should be\n+converted by soapcpp2 to generate the logic for the data bindings. It can\n+however be safely converted by a documentation tool such as Doxygen to analyze\n+and represent the service operations and data in a convenient layout. To this\n+end, the generated interface header file is self-explanatory.\n+The wsdl2h tool can also be used without WSDLs to convert XML schemas (XSDs) to\n+C/C++ to implement XML data bindings in C and C++. The wsdl2h tool generates\n+the XML data binding interface header file with the C/C++ data type equivalents\n+to the XML schema types and components.\n+The soapcpp2 tool then generates the XML data binding implementation source\n+code from the data binding interface header file, meaning the serialization\n+source code to serialize C/C++ data in XML and the client-side stub functions\n+to invoke remote service operations and the server-side skeleton functions to\n+implement XML Web services.\n+Therefore, the creation of C and C++ applications from one of more WSDLs or\n+XSDs is a two-step process.\n+First, to convert a WSDL to C++ we use:\n+ wsdl2h file.wsdl\n+This generates an interface header file file.h. When using a URL to the WSDL we\n+use wsdl2h_-o_file.h_option_-o_file.h to save the file:\n+ wsdl2h -ofile.h http://www.example.com/file.wsdl\n+Web service operations in the generated file.h header file are converted to\n+function prototypes. Schema types are converted to the equivalent C/C++ types,\n+using file typemap.dat to map XML schema types to C/C++ types.\n+The generated header file also contains instructions for the user and has\n+documentation copies from the WSDL as well as various directives related to the\n+Web service properties defined in the WSDL.\n+Multiple WSDL specifications can be processed at once and saved to one\n+interface header file with wsdl2h_-o_file.h_option_-o_file.h:\n+ wsdl2h -o file.h file1.wsdl file2.wsdl file3.wsdl\n+To generate C source code, use wsdl2h_-c_option_-c:\n+ wsdl2h -c file.wsdl\n+The wsdl2h tool does not require WSDLs, it also works for XSDs:\n+ wsdl2h -o file.h file1.xsd file2.xsd file3.xsd\n+In this case no service operations are found and therefore the interface header\n+file generated does not contain function prototypes representing service\n+operations.\n+When upgrading gSOAP to a newer version it is often not necessary to perform\n+this first step again, since newer versions are backward compatible to previous\n+interface header files generated by wsdl2h.\n+Next, the wsdl2h-generated interface header file file.h is input to the\n+soapcpp2 tool to generate the XML data binding implementation logic in C or\n+C++:\n+ soapcpp2 file.h\n+You can use soapcpp2 without wsdl2h, by specifying an input interface header\n+file that is not generated by wsdl2h but written by hand for example, see The\n+soapcpp2_tool.\n+There are many cases when wsdl2h generates code with #import directives, such\n+as #import \"stlvector.h\", that requires the soapcpp2 tool to import definitions\n+from the gsoap/import directory, which can be specified as follows:\n+ soapcpp2 -I some_path_to/gsoap/import file.h\n+When WSDLs are converted to C++ source code, you may want to use wsdl2h_-\n+j_option_-j (or wsdl2h_-j_option_-i) to generate proxy and service classes:\n+ soapcpp2 -j file.h\n+This command generates a couple of C++ source files, more details will follow\n+in Section The_soapcpp2_tool.\n+Consider for example the following commands to implement a C++ client\n+application:\n+ wsdl2h -o calc.h http://www.genivia.com/calc.wsdl\n+ soapcpp2 -C -j -I path_to/gsoap/import calc.h\n+The first command generates calc.h from the WSDL at the specified URL. The\n+header file is then processed by the soapcpp2 tool to generate the proxy class\n+declared in soapcalcProxy.h class and defined in soapcalcProxy.cpp. It also\n+generates a file calc.nsmap with a XML namespace table which should be included\n+in our source code. The tool also generates soapStub, soapH.h, and soapC.cpp.\n+The latter is also compiled with our application together with gsoap/\n+stdsoap2.cpp.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h options\n+The wsdl2h tool generates one XML data binding interface header file, a file\n+that includes all of the information gathered from the WSDLs and XSDs input to\n+the wsdl tool as command-line arguments. The default output file name of wsdl2h\n+is the first WSDL/schema input file name but with extension .h that replaces\n+.wsdl (or replaces .xsd in case of XSD files specified). When an input file is\n+absent or a WSDL file is loaded from a Web URL, the header output will be\n+produced on the standard output unless wsdl2h_-o_file.h_option_-o_file.h is\n+used to save the output to file.h (or any other file name specified).\n+The wsdl2h command-line options are:\n+option result\n+-a generate indexed struct names for local elements with\n+ anonymous types\n+-b generate bi-directional operations to serve one-way\n+ response messages (duplex)\n+-c generate C source code\n+-c++ generate C++ source code (default)\n+-c++11 generate C++11 source code\n+-D make attribute members with default/fixed values\n+ optional with pointers\n+-d generate DOM code for xsd:any and xsd:anyType elements\n+-e don't qualify enum names\n+-F add transient members to structs to simulate struct-\n+ type derivation in C\n+-f generate flat C++ class hierarchy by removing\n+ inheritance\n+-g generate global top-level element and attribute\n+ declarations\n+-h display help info and exit\n+-I path use path to locate WSDL and XSD files\n+-i don't import (advanced option)\n+-j don't generate SOAP_ENV__Header and SOAP_ENV__Detail\n+ definitions\n+-k don't generate SOAP_ENV__Header mustUnderstand\n+ qualifiers\n+-L generate less documentation by removing generic @note\n+ comments\n+-l display license information\n+-M suppress error \"must understand element with wsdl:\n+ required='true'\"\n+-m use xsd.h module to import primitive types\n+-N name use name for service prefixes to produce a service for\n+ each binding\n+-n name use name as the base namespace prefix name instead of\n+ ns\n+-O1 optimize by omitting duplicate choice/sequence members\n+-O2 optimize -O1 and omit unused schema types (unreachable\n+ from roots)\n+-O3 optimize -O2 and omit unused schema root attributes\n+-O4 optimize -O3 and omit unused schema root elements (use\n+ only with WSDLs)\n+-Ow2 optimize -O2 while retaining all derived types of used\n+ base types\n+-Ow3 optimize -O3 while retaining all derived types of used\n+ base types\n+-Ow4 optimize -O4 while retaining all derived types of used\n+ base types\n+-o file output to file\n+-P don't create polymorphic types inherited from\n+ xsd__anyType\n+ create polymorphic types inherited from base\n+-p xsd__anyType (automatic when the WSDL or XSD contains\n+ polymorphic definitions)\n+-Q make xsd__anySimpleType equal to xsd__anyType to use\n+ as the base type\n+-q name use name for the C++ namespace of all declarations\n+-R generate REST operations for REST bindings in the WSDL\n+-r host[:port[:uid:pwd]] connect via proxy host, port, and proxy credentials\n+ uid and pwd\n+-r :uid:pwd connect with authentication credentials uid and pwd\n+ use name instead of soap for the soap context included\n+-S name in C++ classes as a member variable or use -S \"\" to\n+ remove it\n+-s don't generate STL code (no std::string and no std::\n+ vector)\n+-t file use type map file instead of the default file\n+ typemap.dat\n+-U map Unicode XML names to UTF-8-encoded Unicode C/C++\n+ identifiers\n+-u don't generate unions\n+-V display the current version and exit\n+-v verbose output\n+-W suppress warnings\n+-w always wrap response parameters in a response struct\n+-X don't qualify part names to disambiguate doc/lit\n+ wrapped patterns\n+-x don't generate _XML any and _XML anyAttribute\n+ extensibility elements\n+-y generate typedef synonyms for structs and enums\n+-z1 compatibility with 2.7.6e: generate pointer-based\n+ arrays\n+-z2 compatibility with 2.7.15: (un)qualify element/\n+ attribute referenced members\n+-z3 compatibility with 2.7.16 to 2.8.7: (un)qualify\n+ element/attribute referenced members\n+-z4 compatibility up to 2.8.11: don't generate union\n+ structs in std::vector\n+-z5 compatibility up to 2.8.15: don't include minor\n+ improvements\n+-z6 compatibility up to 2.8.17: don't include minor\n+ improvements\n+-z7 compatibility up to 2.8.59: don't generate std::vector\n+ of class of union\n+-z8 compatibility up to 2.8.74: don't generate qualifiers\n+ for doc/lit wrapped patterns\n+ compatibility up to 2.8.93: always qualify element/\n+-z9 attribute referenced members, even when defined in the\n+ same namespace with default forms unqualified\n+-z10 compatibility up to 2.8.96: generate qualifiers even\n+ when defined without namespace\n+-_ don't generate _USCORE (replace with Unicode _x005f)\n+The following subsections explain the options in detail. The source code\n+examples generated by wsdl2h are slightly simplified by removing comments and\n+some other details without changing their meaning to improve readability.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -a\n+This option generates indexed identifier names for structs, classes, unions,\n+and enums declared for local elements with local (i.e. anonymous) types. When\n+local elements and attributes have local types that are mapped to a struct,\n+class, union, or enum, the generated type name is normally the outer struct/\n+class name concatenated with the element/attribute name.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+By default without this option, this schema is translated by wsdl2h to the\n+following interface header file declaration:\n+class ns__TypeWithNestedType // complexType\n+{ public:\n+class ns__TypeWithNestedType_element // local complexType\n+{ public:\n+std::string nested_element; // nested required element\n+} element; // required element\n+};\n+By contrast, with wsdl2h -a option -a we obtain an indexed local class\n+_ns__struct_1 in the generated interface header file for soapcpp2:\n+class ns__TypeWithNestedType // complexType\n+{ public:\n+class _ns__struct_1 // local complexType\n+{ public:\n+std::string nested_element; // nested required element\n+} element; // required element\n+};\n+The next local struct or class is named _ns__struct_2 and so on. The same\n+indexing applies to local unions and enums.\n+ Note\n+ The soapcpp2 tool always un-nests nested struct, class, union and enum\n+ declarations, which means that the above eventially results in the\n+ following source code generated by soapcpp2:\n+class _ns__struct_1\n+{ public:\n+std::string nested_element;\n+};\n+class ns__TypeWithNestedType\n+{ public:\n+_ns__struct_1 element;\n+};\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -b\n+This option generates bi-directional operations (duplex operations) intended\n+for asynchrounous server operations. The bi-directional operations for server\n+response messages are generated in addition to the request-response operations.\n+For example, the wsdl2h tool generates the following declaration of a service\n+operation ns__add for a hypothetical calculator Web service:\n+int ns__add(\n+double a,\n+double b,\n+double& result\n+);\n+By contrast, with this option -b we obtain an additional one-way operation\n+ns__addResponse to send and receive one-way response messages:\n+int ns__addResponse(\n+double result,\n+void\n+);\n+int ns__add(\n+double a,\n+double b,\n+double& result\n+);\n+Where void as a result parameter means that the operation uses \"one-way\"\n+messaging, in this case to send and receive response messages one-way\n+asynchronously:\n+ * int soap_send_ns__addResponse(struct soap *soap, const char *endpoint,\n+ const char *action, double& result)\n+ * int soap_recv_ns__addResponse(struct soap *soap, double& result)\n+At the sender side use soap_send_ns__addResponse to send the message one-way,\n+followed by soap_recv_empty_response to receive the HTTP acknowledgment. At the\n+receiver side use soap_recv_ns__addResponse. To develop a server, simply\n+implement soap_ns__addResponse to handle the service operation and in this\n+function call soap_send_empty_response to send the HTTP acknowledgment. The\n+same applies to C++ proxy classes generated by soapcpp2.\n+ Note\n+ Version 2.8.75 of gSOAP and greater generate send and receive functions\n+ for each client-side call function. This means that a client application\n+ can simply call soap_send_ns__add to send the request and then call\n+ soap_recv_ns__add to receive the response after polling the server\n+ connection with soap_ready to check if the server is ready (soap_ready\n+ returns #SOAP_OK) to send the response message as a reply message to be\n+ received by the client. Therefore, this option -b is not required to\n+ implement asynchronous request-response messaging but rather adds one-way\n+ asynchronous response messaging as well.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -c -c++ -c++11\n+This option sets the source code output to C, C++, or C++11, respectively.\n+For C++ and C++11 you can also use wsdl2h_-s_option_-s to replace std::vector\n+by arrays and replaces std::string by char*. Use a typemap.dat_file to specify\n+further details for the source code output generated by wsdl2h.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -D\n+This option makes attribute members of a struct or class with default or fixed\n+values optional with pointers. Elements with default and fixed values are not\n+affected by this option.\n+Without this option, optional attributes with default or fixed values are\n+always output in XML, because the struct/class attribute member is not a\n+pointer. This does not negatively affect the meaning of the XML produced,\n+because omitted attributes are replaced by their default or fixed value.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+By default without this option, this schema is translated by wsdl2h to the\n+following interface header file declaration:\n+class ns__data\n+{ public:\n+std::string* foo 0 = \"abc\"; // optional element with default value \"abc\"\n+@ int bar 0 = 123; // optional with default value 123\n+};\n+The deserializer populates the attribute value with the default or fixed value\n+when the attribute is omitted from XML. The element is populated when the\n+element is empty, i.e. or , but not when it is omitted, as\n+per the W3C XML Schema standards.\n+This option forces the optional attributes to be pointer-based members, meaning\n+that their output can be turned on or off by setting the pointer to a value or\n+to NULL:\n+class ns__data\n+{ public:\n+std::string* foo 0 = \"abc\"; // optional element with default value \"abc\"\n+@ int* bar 0 = 123; // optional with default value 123\n+};\n+ Warning\n+ In this case the deserializer will not populate the attribute value with\n+ the default or fixed value when the attribute is omitted from XML, which\n+ differs from the W3C XML schema standards.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -d\n+This option replaces literal XML strings _XML (a char* string with XML content)\n+with DOM nodes that are used to store the content of xsd:any, xsd:anyAttribute\n+xsd:anyType, and mixed content values. The DOM_API offers more features to\n+manipulate XML content compared to the literal _XML string type.\n+The DOM node type xsd__anyType of the gSOAP DOM_API is imported in the wsdl2h-\n+generated interface header file with #import \"dom.h\" where dom.h is located in\n+the gsoap/import directory. This requires compiling gsoap/dom.c in C and gsoap/\n+dom.cpp in C++.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+By default without this option, this schema is translated by wsdl2h to the\n+following interface header file declarations:\n+class xsd__anyType\n+{ public:\n+_XML __item; // XML string content\n+};\n+class ns__data : public xsd__anyType\n+{ public:\n+xsd__anyType* foo;\n+_XML __any; // Store any element content in XML string\n+@ _XML __anyAttribute; // A placeholder that has no effect\n+};\n+The xsd__anyType type has _XML simpleContent stored in __item. Names starting\n+with double underscores have no representation in XML as elements or attribute\n+names, meaning that only their values matter. Therefore, _XML __any holds the\n+element and its content in a string.\n+With wsdl2h -d option -d we obtain:\n+#import \"dom.h\" // imports xsd__anyType as a DOM node\n+class ns__data : public xsd__anyType\n+{ public:\n+xsd__anyType* foo; // Store element in DOM soap_dom_element\n+xsd__anyType __any; // Store any element content in DOM soap_dom_element\n+@ xsd__anyAttribute __anyAttribute; // Store anyAttribute content in DOM\n+soap_dom_attribute linked node structure\n+};\n+See DOM_API for details on how to use the xsd__anyType and xsd__anyAttribute.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -e\n+This option removes the prefix qualifier from enumeration names.\n+Without this option all enumeration names are prefixed by their enum name to\n+ensure that enumeration names do not clash with other constants and enumeration\n+names.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+By default without this option, this schema is translated by wsdl2h to the\n+following interface header file declarations:\n+enum ns__engine { ns__engine__ON, ns__engine__OFF };\n+enum ns__light { ns__light__ON, ns__light__OFF, ns__light__BROKEN };\n+By contrast, with wsdl2h -e option -e we obtain:\n+enum ns__engine { ON, OFF };\n+enum ns__light { ON_, OFF_, BROKEN };\n+Where enumeration names are suffixed with underscores to make them unique.\n+Note that C++11 scoped enumerations can be used with wsdl2h_-c++11_option_-\n+c++11, which makes option -e useless.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -F\n+This option produces interface header files with struct/class declarations that\n+simulate inheritance using transient pointer members to derived types. This\n+option is particularly useful for C source code generation when derived types\n+are required by the application. Derived type values are indicated by xsi:type\n+attributes in XML with the derived type name.\n+This option can also be used for C++ to replace class inheritance by simulated\n+inheritance using transient pointer members in base classes that point to the\n+value of a derived type, meaning that the base class instance is replaced by\n+the derived class instance. This option also removes pointers from array and\n+container item types. These pointers are normally added to ensure containers\n+can contain derived type values, but pointers are no longer needed by the\n+simulated approach that add pointer members to the base classes.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+By default without this option, this schema is translated by wsdl2h -c option -\n+c to the following interface header file declaration in C that lacks\n+inheritance:\n+struct ns__base\n+{\n+int value;\n+};\n+struct ns__derived1\n+{\n+int value; // base type value of ns__base\n+char *name; // extension\n+};\n+struct ns__derived2\n+{\n+int value; // base type value of ns__base\n+float x; // extension\n+};\n+struct ns__derived3\n+{\n+int value; // derived1 type value of ns__base\n+char *name; // derived1 type\n+float x; // extension\n+};\n+By contrast, with wsdl2h -c -F option -F we obtain an interface header file\n+with simulated inheritance using transient pointer members of base types\n+pointing to derived types:\n+struct ns__base\n+{\n+[ struct ns__derived1 *ns__derived1; ] // points to derived type\n+[ struct ns__derived2 *ns__derived2; ] // points to derived type\n+int value;\n+};\n+struct ns__derived1\n+{\n+int value; // base type value of ns__base\n+char *name; // extension\n+[ struct ns__derived3 *ns__derived3; ] // points to derived type\n+};\n+struct ns__derived2\n+{\n+int value; // base type value of ns__base\n+float x; // extension\n+};\n+struct ns__derived3\n+{\n+int value; // derived1 type value of ns__base\n+char *name; // derived1 type\n+float x; // extension\n+};\n+Each transient pointer member name that is used to point to a derived type must\n+match the type name as shown, but trailing underscores are allowed in the\n+member name and type name, to prevent name clashes.\n+This latter form supports xsi:type attributes in XML with the derived type name\n+to replace base type values by derived type values at runtime by setting one of\n+the transient pointer members to non-NULL. For example, assume ns:data has a\n+base type ns__base (i.e. declared as struct ns__base data) then the following\n+is legal and serializable:\n+\n+123\n+\n+This is serialized XML for data.value with data.ns__derived1 and\n+data.ns__derived2 both set to NULL.\n+\n+123\n+abc\n+\n+This is serialized XML for data.ns__derived1->value and data.ns__derived1->name\n+where data.ns__derived1 is non-NULL, for example allocated and set with\n+data.ns__derived1 = soap_new_ns__derived1(soap).\n+\n+123\n+3.14\n+\n+This is serialized XML for data.ns__derived2->value and data.ns__derived2->x\n+where data.ns__derived1 is NULL and data.ns__derived2 is non-NULL, for example\n+allocated and set with data.ns__derived2 = soap_new_ns__derived2(soap).\n+\n+123\n+abc\n+3.14\n+\n+This is serialized XML for data.ns__derived1->ns__derived3->value,\n+data.ns__derived1->ns__derived3->name, and data.ns__derived1->ns__derived3->x\n+where data.ns__derived1 and data.ns__derived1->ns__derived3 are non-NULL.\n+Note that C++ class inheritance achieves the same results for base and derived\n+types, but without the use of transient pointer members. However, this requires\n+container values to be pointers to support type derivation (class members are\n+already pointers), as generated by wsdl2h for C++.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -f\n+This option removes C++ class inheritance to produce a flat C++ class hierarchy\n+similar to structs in C as generated by wsdl2h.\n+As a side effect, derived type values can no longer be serialized in place of\n+base type values, see also wsdl2h_-F_option_-F.\n+Basically this option removes support for xsi:type in XML that indicates a\n+derived type that is restricted or extended from its base type.\n+This option also removes pointers from array and container item types, because\n+there are no derived types that could extend the item value types. These\n+pointers are normally added to ensure containers can contain derived type\n+values in addition to the base type values.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+By default without this option, this schema is translated to the following\n+interface header file declaration in C++ with base and derived classes:\n+class ns__base\n+{ public:\n+int value;\n+};\n+class ns__derived1 : public ns__base\n+{ public:\n+char *name; // extension\n+};\n+class ns__derived2 : public ns__base\n+{ public:\n+float x; // extension\n+};\n+class ns__derived3 : public ns__derived1\n+{ public:\n+float x; // extension\n+};\n+By contrast, with wsdl2h -f option -f we obtain an interface header file\n+without inheritance but with classes that are extended with the base class\n+members:\n+class ns__base\n+{ public:\n+int value;\n+};\n+class ns__derived1\n+{ public:\n+int value; // base type value of ns__base\n+char *name; // extension\n+};\n+class ns__derived2\n+{ public:\n+int value; // base type value of ns__base\n+float x; // extension\n+};\n+class ns__derived3\n+{ public:\n+int value; // derived1 type value of ns__base\n+char *name; // derived1 type\n+float x; // extension\n+};\n+This former form supports xsi:type attributes in XML with the derived type name\n+to replace base type values by derived type values at runtime. But this latter\n+form does not support xsi:type attributes in XML and only the base class can be\n+serialized, for example ns__base data:\n+\n+123\n+\n+This is serialized XML for data.value.\n+\n+123\n+abc\n+\n+This example can be deserialized when #SOAP_XML_STRICT is not enabled, but only\n+the value is retained in data.value. However, when #SOAP_XML_STRICT is enabled,\n+deserialization fails due to the additional element name that is rejected.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -g\n+This option adds global top-level element and attribute declarations to the\n+interface header file generated by wsdl2h.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+By default without this option, this schema is translated to the following C++\n+interface header file (the C interface header file is similar) that declares\n+the ns__record type for tns:record but does not declare attribute tns:type and\n+element tns:data:\n+typedef std::string xsd__QName;\n+class ns__record\n+{ public:\n+std::string name;\n+int value;\n+};\n+By contrast, with wsdl2h -g option -g we obtain an interface header file with\n+the attribute and element declarations:\n+typedef std::string xsd__QName;\n+class ns__record\n+{ public:\n+std::string name;\n+int value;\n+};\n+typedef ns__record _ns__data;\n+typedef xsd__QName _ns__type;\n+This defines _ns__type and _ns__data, where the latter can be used as a root\n+element to serialize its content with the soapcpp2-generated readers and\n+writers:\n+struct soap *soap = soap_new();\n+_ns__data data;\n+if (soap_read__ns__data(soap, &data))\n+... // error\n+if (soap_write__ns__data(soap, &data))\n+... // error\n+which parses and re-writes the XML fragment:\n+\n+abc\n+123\n+\n+Note that top-level element and attribute type names start with an underscore\n+to distinguish them from types. This convention is also used by soapcpp2 to\n+generate schemas that define top-level attributes and elements.\n+Note that a schema may define a global top-level element with a local type, for\n+example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+This schema is translated to the following C++ interface header file (the C\n+interface header file is simular) that declares the _ns__record type and\n+element for the tns:record top-level element:\n+class _ns__record\n+{ public:\n+std::string name;\n+int value;\n+};\n+In this case option -g has no effect, because tns:record has a local type that\n+may be used elsewhere in the schema.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -h\n+This option displays help info and then exits.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -I\n+This option specifies a directory path to search for WSDL and XSD files.\n+For example:\n+wsdl2h -I path file.wsdl\n+This searches path for .wsdl and .xsd files that are imported by file.wsdl and\n+by other imported files.\n+When a WSDL or XSD file imports another file then:\n+ * a file name referenced by http:// or by https:// is retrieved from the\n+ specified URL.\n+ * a file name referenced by file:// is retrieved from the path specified\n+ relative to the directory in which wsdl2h is run and the -I option can be\n+ used to change that location to import from.\n+ * a file name without a path (i.e. has no /) or a file name with path\n+ stating with ../ are considered files located at relative path locations\n+ with respect to the current WSDL and XSD that is importing this file\n+ * otherwise, imported files are considered relative to the directory in\n+ which wsdl2h is run and the -I option can be used to change that location\n+ to import from.\n+WSDL and XSD files that import other WSDL and XSD files typically use relative\n+paths, at least that is recommended by best practices. If absolute paths are\n+used then wsdl2h may fail to find the imported WSDLs and XSDs. This option\n+resolves relative paths but does not help to resolve absolute paths. In the\n+worst case one must edit the WSDLs and XSDs to refer to proper file locations.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -i\n+This option skips over schema import and as a result none of the imported\n+schemas and their components are imported.\n+There are two reasons to use this option:\n+ * when imported components are already declared in interface header files\n+ that are imported into the main interface header file with #import, and\n+ * when imported schemas are explicitly provided with the wsdl2h command as\n+ command line arguments, which means that the specified schemas will be\n+ used instead of the imported schemas. This may help to resolve issues\n+ when imported files are not found by wsdl2h. The schema targetNamespace\n+ namespace names are relevant when schemas reference imported schemas by\n+ their namespace, not the schema file name.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -j\n+This option skips the generation of SOAP_ENV__Header and SOAP_ENV__Detail\n+structure definitions, assuming that these are manually replaced in the\n+generated interface header file for soapcpp2.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -k\n+This option skips the generation of mustUnderstand qualifiers for\n+SOAP_ENV__Header members. This removes the mustUnderstand=\"true\" XML attributes\n+from SOAP Headers in SOAP messages. As per SOAP standard, SOAP Headers with\n+mustUnderstand=\"true\" must not be ignored by receivers.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -L\n+This option generates less documentation by removing generic @note comments\n+from the interface header file output, thereby reducing the size of the output\n+without removing critical information.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -l\n+This option displays license information.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -M\n+This option suppresses the wsdl2h error message\n+\"must understand element with wsdl:required='true'\"\n+This error indicates that a (special) WSDL construct was used that is marked\n+wsdl:required=\"true\", meaning that must not be ignored by the WSDL processor\n+(unless the developer knows what he or she is doing).\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -m\n+This option tells wsdl2h to use xsd.h to define the primitive XSD types instead\n+of generating them in the interface header file for soapcpp2. This option\n+offers an alternative to the use of typemap.dat to redefine primitive XSD types\n+by defining them all together instead of on a type-by-type basis. The interface\n+header file output by wsdl2h includes #import \"xsd.h\".\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -N\n+This option specifies a name to be used as a service namespace prefix for each\n+WSDL binding.\n+By default without this option, the wsdl2h tool warns when it reads one or more\n+WSDLs that define multiple bindings:\n+Warning: 3 service bindings found, but collected as one service (use option -\n+Nname to produce a separate service for each binding)\n+This means that all 3 services will be collected under one name. When proxy and\n+service classes are generated with soapcpp2 -i option -i or with soapcpp2 -\n+j option -j then the service operations are collected into one proxy and\n+service class. Essentially only one namespace is used. This may lead to clashes\n+when multiple bindings define the same Web service operations (name clashes are\n+resolved by wsdl2h by adding trailing underscores).\n+By contrast, with wsdl2h -N name option -N name we obtain an interface header\n+file that uses the specified name as a prefix to define the service bindings\n+and service operations.\n+For example:\n+wsdl2h -N foo file.wsdl\n+If file.wsdl has multiple bindings, then the Web service operations associated\n+with each binding are identified by their prefix foo1, foo2, foo3, and so on.\n+As a result, we obtain more than one proxy and service class generated by\n+soapcpp2, one for each binding.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -n\n+This option changes the default ns namespace prefix to the specified prefix\n+name.\n+By default without this option, the XML namespace prefix is ns which results in\n+the generation of prefixes ns1, ns2, ns3, and so on.\n+For example:\n+wsdl2h -n foo file.wsdl\n+This generates namespace prefixes foo1, foo2, foo3, and so on.\n+ Warning\n+ It is strongly recommended to define namespace prefixes in the\n+ typemap.dat_file to prevent future runs of wsdl2h to produce namespace\n+ prefixes that are not in the same original order. For example when the\n+ order of WSDLs and XSDs changes or if new WSDLs and XSDs are added.\n+ Therefore, do not use this option unless the single WSDL processed by\n+ wsdl2h is relatively simple and does not import WSDLs and XSDs.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -O\n+This option optimizes the generated interface header file:\n+ * -O1 removes duplicate choice/sequence members;\n+ * -O2 optimize with -O1 and remove unused schema types (types that are\n+ unreachable from top-level schema element and attribute roots);\n+ * -O3 optimize with -O2 and remove unused schema top-level root attributes;\n+ * -O4 optimize with -O3 and remove unused schema top-level root elements,\n+ only retain the root elements used by WSDLs. Use this option only when\n+ converting WSDLs (and their associated XSD schemas) to source code, not\n+ when solely converting XSD schemas to source code.\n+Option -O4 is the most aggressive. When used only for one or more XSDs as input\n+to wsdl2h, the output will be empty because removing the root elements (and\n+attributes) results in removing all types from the schema. However, this option\n+is safe to use with WSDLs to aggressively remove all unused schema components\n+that are unreachable from the Web service operation parameter elements and\n+types. Option -O3 is safe to use with one or more XSDs as input to wsdl2h\n+instead of WSDLs, for example when developing an XML application that\n+serializes data as XML root elements (wsdl2h -g option_-g is recommended in\n+this case).\n+Optimization by schema slicing removes unused types, which are types that are\n+unreachable from top-level schema element and attribute roots. A type is marked\n+as used when:\n+ * it is explicitly used by one or more top-level elements and attributes;\n+ * it is used as a type by a child element or attribute of a complexType\n+ that is marked as used;\n+ * it is used as the base type of an extension or restriction of a\n+ simpleType or complexType that is marked as used.\n+Marking proceeds recursively until no more types can be marked. All remaining\n+unused types are removed. Top-level elements and attributes are selectively\n+marked unused and removed depending on the level of optimization applied, with\n+-O3 removing unused top-level attributes and -O4 removing unused top-level\n+elements except for all elements used in the specified WSDLs.\n+Aggressive optimization with options -O2, -O3, and -O4 removes derived type\n+extensions of a base type when the derived types are not marked as used.\n+However, in certain messaging scenarios this may have the undesired effect that\n+this limits the choice of derived types that can be used to replace a base type\n+in XML messages, because a derived type may have been removed when it is not\n+marked as used elsewhere in the WSDLs and XSD schemas. A derived type that\n+replaces a base type in an XML message is indicated by a xsi:type attribute\n+with the QName value of the derived type. The wsdl2h tool generates a C++ class\n+hierarchy to support type derivation, so assigning a derived type value instead\n+of a base type value to a pointer member is automatically serialized in XML\n+with the specified derived value (which is indicated by xsi:type attribute in\n+the XML message). For C applications, we should use wsdl2h -c -F option_-c and\n+option_-F to simulate inheritance in C. In both cases it is recommended to use\n+the following options to retain all derived type extensions of a base type that\n+is marked as used:\n+ * -Ow2 optimize with -O2 to remove unused schema types, but retain types\n+ that are derived types of base types that are marked as used. .\n+ * -Ow3 optimize with -O3 to remove unused schema top-level root attributes,\n+ but retain types that are derived types of base types that are marked as\n+ used..\n+ * -Ow4 optimize with -O4 to remove unused schema top-level root elements,\n+ but retain types that are derived types of base types that are marked as\n+ used.\n+This permits a base type value (typically a struct or class member that is a\n+pointer to a base type) to be assigned a derived type in C++, which is\n+serialized in XML with a xsi:type attribute to indicate the type of the derived\n+value. Likewise, XML data with derived type values are deserialized to C/C++\n+data automatically. Inheritance is simulated in C, see option_-F.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -o\n+This option specifies a file name for the wsdl2h interface header file output.\n+By default without this option, the wsdl2h tool writes the interface header\n+file to the file named after the first file name input at the command line, but\n+using .h as the file name extension.\n+When the input to the wsdl2h tool consists of URLs, the wsdl2h tool writes its\n+output to standard output (usually the screen). Use this option to specify a\n+file instead.\n+For example:\n+wsdl2h calc.wsdl\n+This saves calc.h because the first file specified on the command line is\n+calc.wsdl.\n+Option -o should be used when a URL is specified on the command line:\n+wsdl2h -o calc.h http://www.genivia.com/calc.wsdl\n+This saves the interface header file calc.h.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -P\n+This option disables the generation of types inherited from the xsd__anyType\n+base type.\n+This option has effect only when wsdl2h_-p_option_-p is used or when the wsdl2h\n+tool detects that xsd:anyType is used (thereby implicitly and automatically\n+enabling option -p), which means that xsd__anyType should be a base type for\n+all possible types defined in the schemas.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -p\n+This option makes all types inherit xsd__anyType to support full polymorphism.\n+This option is automatically enabled when the wsld2h tool detects that xsd:\n+anyType is used, which means that xsd__anyType should be a base type for all\n+possible types defined in the schemas. To disable, use wsdl2h_-P_option_-P.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+This schema is translated to the following C++ interface header file that\n+declares the xsd__anyType type with _XML simpleContent (meaning that __item\n+contains element content as per gSOAP convention) and the ns__data class:\n+class xsd__anyType\n+{ public:\n+_XML __item;\n+};\n+class xsd__string_ : public xsd__anyType\n+{ public:\n+std::string __item;\n+};\n+class ns__data : public xsd__anyType\n+{ public:\n+std::string value;\n+std::vector item;\n+};\n+The xsd__anyType pointer values of the items of the vector can be assigned\n+derived class instances to serialize any type of value declared in the\n+interface header file, including the xsd__string_ wrapper class with\n+simpleContent and the ns__data class with complexContent.\n+This schema is translated to the following C interface header file with wsdl2h\n+-c -F option_-c and option_-F to simulate inheritance in C:\n+struct xsd__string_\n+{\n+char* __item;\n+};\n+struct xsd__anyType_\n+{\n+_XML __item;\n+[ struct xsd__string_ *xsd__string; ]\n+[ struct ns__data *ns__data; ]\n+};\n+struct ns__data\n+{\n+char* value;\n+$ int __sizeitem;\n+struct xsd__anyType_* item;\n+};\n+The xsd__anyType_ values of items of the dynamic array (item points to an array\n+of size __sizeitem which is a special member to indicate dynamic arrays) can be\n+assigned base xsd__anyType_ and derived types, see wsdlh2_-F_option_-F.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -Q\n+This option makes xsd__anySimpleType equal to xsd__anyType to use as the base\n+type for derivation. This option is more effective when used with wsdl2h_-\n+p_option_-p for C++ applications and wsdl2h_-F_option_-F for C applications.\n+This option can also be used with wsdl2h_-d_option_-d to make\n+xsd__anySimpleType equal to a DOM node.\n+Without option -Q, the xsd__anySimpleType type is just a C/C++ string generated\n+by wsdl2h:\n+typedef char* xsd__anySimpleType; // in case of C\n+typedef std::string xsd__anySimpleType; // in case of C++\n+The reason for this choice is that some WSDLs and XSD schemas use xsd:\n+anySimpleType to declare XML attributes of any type (because XML attributes\n+must be simple types xsd:anyType is invalid to use for attributes). The values\n+of XML attributes of type xsd:anySimpleType can be any character data\n+essentially. There is no mechanism to indicate the actual type of the attribute\n+value used, unlike elements that are annotated with xsi:type attribute with the\n+derived type as its QName value. Therefore, by considering xsd__anySimpleType\n+just strings we can provide any value for XML attributes of type xsd:\n+anySimpleType.\n+However, there are other uses of xsd__anySimpleType in XSD schemas, where\n+essentially xsd__anySimpleType serves the same purpose as xsd__anyType to\n+provide a base type for derived types, but restricts the derived types to\n+simple types.\n+Unfortunately, these two cases clash: we want to use C/C++ strings for XML\n+attributes of type xsd:anySimpleType and also use xsd:anySimpleType as a base\n+class for derived types.\n+Option -Q enables the latter case by making xsd__anySimpleType equal to\n+xsd__anyType so that elements of type xsd:anySimpleType can be serialized with\n+a derived type, using inheritance in C++ and by using simulated inheritance in\n+C using wsdl2h_-F_option_-F.\n+For example, option -Q changes this generated code for C++ applications:\n+class xsd__anyType\n+{ public:\n+_XML __item;\n+struct soap *soap;\n+};\n+typedef std::string xsd__anySimpleType;\n+class ns__record : public xsd__anyType\n+{ public:\n+xsd__anySimpleType value; // non-polymorphic xsd:anySimpleType value\n+}\n+into:\n+class xsd__anyType\n+{ public:\n+_XML __item;\n+struct soap *soap;\n+};\n+class ns__record : public xsd__anyType\n+{ public:\n+xsd__anyType *value; // polymorphic xsd:anySimpleType value\n+}\n+where all other classes generated by wsdl2h option_-p are derived from\n+xsd__anyType, meaning that value can be assigned any one of these classes as\n+long as the class is a simple type wrapper (wsdl2h generates comments to\n+indicate that the polymorhpic value should be a xsd:anySimpleType).\n+Similar code is generated by wsdl2h option_-F for C applications.\n+On the other hand this option invalidates XML attributes of type xsd:\n+anySimpleType. The soapcpp2 tool warns about this invalid attribute type as a\n+result.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -q\n+This option specifies a C++ namespace name. The interface header file\n+declarations are placed in the given C++ namespace.\n+For example:\n+wsdl2h -q api file.wsdl\n+The generated interface header file for soapcpp2 places all declarations in the\n+api C++ namespace:\n+namespace api {\n+...\n+}\n+ Warning\n+ It is more difficult to use SOAP Headers and SOAP Faults when C++\n+ namespaces are used. When wsdl2h finds SOAP Headers and SOAP Fault\n+ Details it collects these into SOAP_ENV__Header and SOAP_ENV__Detail\n+ structures, which become part of the given C++ namespace. However, to use\n+ the SOAP_ENV__Header and SOAP_ENV__Detail structures these should be\n+ declared at the global scope. This option places these structures with\n+ the types used by their members in the given C++ namespace, making them\n+ unavailable to the global scope.\n+See How_to_build_a_client_or_server_in_a_C++_code_namespace for details on\n+using C++ namespaces to build client and server applications, which requires a\n+env.h file with SOAP Header and Fault definitions to be compiled with:\n+ soapcpp2 -penv env.h\n+The generated envC.cpp file holds the SOAP Header and Fault serializers and you\n+can link this file with your client and server applications.\n+This option has no effect for C source code output.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -R\n+This option enables the generation of REST service operations in the interface\n+header file saved by wsdl2h for soapcpp2.\n+By default without this option, REST service operations defined in one or more\n+WSDLs are ignored.\n+With this option, both REST and SOAP service operations are declared in the\n+interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -r\n+This option specifies a proxy host name and port number with proxy credentials\n+to connect to web sites through a proxy server.\n+This option can also be used to specify credentials to access a web site that\n+requires authentication (HTTP basic or digest authentication).\n+For example:\n+wsdl2h -r proxy.example.org:80:proxyuserid:proxypasswd -r userid:passwd\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -S\n+This option renames the soap members of the generated C++ classes in the\n+interface header file for soapcpp2.\n+By default without this option, wsdl2h adds struct soap *soap members to\n+classes and structs. This member points to the soap context that manages the\n+instance, when the instance was allocated by the gSOAP engine.\n+To remove the struct soap *soap members use this option with an empty name:\n+wsdl2h -S '' file.wsdl\n+To rename the struct soap *soap members, specify a name for the member, for\n+example ctx:\n+wsdl2h -S ctx file.wsdl\n+This option has no effect for C source code output.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -s\n+This option replaces STL std::vector and std::string by C-like equivalents and\n+is intended for systems with limited support for C++ libraries.\n+The std::vector struct/class member is replaced by a dynamic array, declared\n+with a __size member followed by a pointer member to the array items.\n+The std::string is replaced by char*.\n+This option has no effect for C source code output.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -t\n+This option specifies an alternate file or path for typemap.dat. See\n+typemap.dat_file.\n+For example:\n+wsdl2h -t $GSOAP/gsoap/typemap.dat file.wsdl\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -U\n+This option allows UTF-8-encoded Unicode C/C++ identifier names in the\n+generated interface header file for soapcpp2. This assumes that the C/C++\n+compiler that is used to compile a gSOAP client or server application supports\n+Unicode identifier names.\n+By default without this option, Unicode XML names in WSDLs and XSDs are\n+preserved using the gSOAP convention for UCS-2 characters in identifier names\n+with _xHHHH where HHHH is a hexadecimal Unicode character code point.\n+With this option, Unicode XML names in WSDLs and XSDs are preserved \"as is\" in\n+C/C++ identifier names.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -u\n+This option replaces unions with structs/classes in the generated interface\n+header file for soapcpp2. Union members are used to represent xsd:choice of\n+elements. A choice of elements can also be represented by pointer members of a\n+struct/class such that only one member is non-NULL. However, when using a\n+struct/class instead of a union, the deserialization validator will not reject\n+additional elements when present.\n+For example:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+By default without this option, wsdl2h generates a tagged union for the xsd:\n+choice, where the tag is a special member int __union_data that is set to\n+SOAP_UNION__ns__union_data_string when the string union member is valid or\n+SOAP_UNION__ns__union_data_number when the number union member is valid:\n+class ns__data\n+{ public:\n+std::string value;\n+$ int __union_data;\n+union _ns__union_data\n+{\n+std::string* string;\n+float number;\n+} union_data;\n+};\n+With this option, wsdl2h removes the union and replaces it with pointer members\n+to produce a simpler structure:\n+class ns__data\n+{ public:\n+std::string value;\n+// BEGIN CHOICE \n+std::string* string; // Choice of element (one of multiple choices)\n+float* number; // Choice of element (one of multiple choices)\n+// END OF CHOICE\n+};\n+ Warning\n+ This option removes the uniqueness check on choices from the\n+ deserialization validator. When serializing data, only one of the choice\n+ pointer members should be non-NULL.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -V\n+This option displays the current wsdl2h tool version and then exits.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -v\n+This option enables verbose output to assist in debugging the wsdl2h tool.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -W\n+This option suppresses all warnings produced by wsdl2h. Errors are not\n+suppressed.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -w\n+This option wraps response parameters in a response struct.\n+The last parameter of a service operation declared as a function in the\n+interface header file is the response parameter. When multiple response\n+parameters are returned by the service operation or if the response parameter\n+is a complexType (a struct or class), then the parameters should be wrapped in\n+a special \"response struct\". However, if a single response parameter is a\n+primitive type value then this parameter does not need to be wrapped in a\n+response struct.\n+This option consistently wraps response parameters in a response struct, even\n+when a single response parameter is a primitive type value.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -X\n+Document/literal wrapped patterns may cause ambiguities with respect to message\n+namespace qualification. A part name associated with a type is implicitly\n+qualified by the targetNamespace of the WSDL but may also be associated with\n+the namespace of the type. By default, the wsdl2h tool uses the namespace of\n+the type when the type is not a primitive XSD type, otherwise the WSDL\n+targetNamespace is used.\n+As an example of a document/literal wrapped pattern message, consider:\n+\n+\n+\n+...\n+\n+...\n+\n+\n+\n+\n+...\n+\n+\n+\n+\n+...\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+...\n+Note that message name=\"Message\" has two parts with both a type, which makes\n+these part namespaces amiguous. The generated interface header file declares a\n+wrapper for the Name request message and the Info response message:\n+int __ns1__Operation(\n+std::string Name,\n+ns1__Record ns2__Info\n+);\n+Here, Name belongs to the ns1 namespace, i.e. by the __ns1__Operation, whereas\n+Info belongs to the ns2 namespace. The __ns1__Operation is just a wrapper for\n+the operation and is not visible in XML. Only Name and Info are serialized in\n+XML as the request and response message, respectively.\n+With option -X the ns2 qualifier is removed:\n+int __ns1__Operation(\n+std::string Name,\n+ns1__Record Info\n+);\n+Now both Name and Info belong to the ns1 namespace, i.e. by the\n+__ns1__Operation.\n+However, best practices for document/literal messaging recommend to avoid this\n+wrapped pattern construct in favor of using elements defined in schemas:\n+\n+\n+\n+\n+\n+...\n+...\n+\n+...\n+\n+\n+\n+\n+...\n+\n+\n+\n+\n+...\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+...\n+The elements Name and Record are the actual message names, qualified by the\n+schema's targetNamespace:\n+int __ns1__Operation(\n+std::string ns2__Name,\n+ns1__Record ns2__Info\n+);\n+See also wsdl2h option_-z7.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -x\n+This option removes _XML type members of structs and classes that are generated\n+for xsd:any and xsd:anyAttribute components.\n+There are two options to represent xsd:any and xsd:anyAttribute components: the\n+literal _XML string type with XML content (a char* string) or a DOM node. DOM\n+nodes are generated for xsd:any and xsd:anyAttribute components with wsdl2h_-\n+d_option_-d, which also defines xsd:anyType as the DOM node xsd__anyType in C\n+and C++.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -y\n+This option adds typedef synonyms for structs and enums to the interface header\n+file, which is useful for C source code. A typedef synonym for a struct is\n+declared by typedef struct name name; and for an enum is declared by typedef\n+enum name name;.\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -z\n+These options are for backward compatiility with older gSOAP releases:\n+ * -z1 compatibility with 2.7.6e: generate pointer-based arrays\n+ * -z2 compatibility with 2.7.15: (un)qualify element/attribute referenced\n+ members\n+ * -z3 compatibility with 2.7.16 to 2.8.7: (un)qualify element/attribute\n+ referenced members\n+ * -z4 compatibility up to 2.8.11: don't generate union structs in std::\n+ vector\n+ * -z5 compatibility up to 2.8.15: don't include minor improvements\n+ * -z6 compatibility up to 2.8.17: don't include minor improvements\n+ * -z7 compatibility up to 2.8.59: don't generate std::vector of class of\n+ union\n+ * -z8 compatibility up to 2.8.74: don't generate qualifiers for doc/lit\n+ wrapped patterns\n+ * -z9 compatibility up to 2.8.93: always qualify element/attribute\n+ referenced members, even when defined in the same namespace with default\n+ forms unqualified\n+ * -z10 compatibility up to 2.8.96: generate qualifiers even when defined\n+ without namespace\n+\ud83d\udd1d Back_to_table_of_contents\n+ wsdl2h -_\n+This option replaces _USCORE by the Unicode _x005f character code point in\n+identifier names in C and C++ in the generated interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Customizing XML data bindings with the typemap.dat file\n+The typemap.dat file for the wsdl2h tool can be used to customize or optimize\n+the type bindings by mapping schema types to C/C++ types. This file contains\n+custom XML schema to C/C++ type bindings and XML namespace bindings for\n+namespace prefixes to be generated by the wsdl2h tool. You can edit this file\n+to enable features such as custom serializers for schema types, C++11 smart\n+pointers to replace regular pointers, bind XML namespace prefixes to XML\n+namespace URIs, and specify bindings for schema types.\n+Here is a simple example of a typemap.dat file:\n+# This file contains custom definitions of the XML Schema types and\n+# C/C++ types for your project, and XML namespace prefix definitions.\n+# The wsdl2h WSDL importer consults this file to determine bindings.\n+[\n+// This comment will be included in the generated .h file\n+// You can include any additional declarations, includes, imports, etc.\n+// within [ ] sections. The brackets must appear at the start of a line\n+]\n+# XML namespace prefix definitions can be provided to override the\n+# default choice of ns1, ns2, ... prefixes. For example:\n+i = \"http://www.soapinterop.org/\"\n+s = \"http://www.soapinterop.org/xsd\"\n+The i and s prefixes are declared such that the header file output by wsdl2h\n+uses these prefixes instead of the default ns1, ns2, etc. It is strongly\n+recommended to name the prefixes in this way, because future runs of wsdl2h may\n+result in a different assignment of the default ns1, ns2, ... prefixes.\n+Therefore, it is recommended that application code should not rely on the\n+default prefixes.\n+Type bindings can be provided to bind XML schema types to C/C++ types for your\n+project. These type bindings have four parts:\n+prefix__type = declaration | use | ptr-use\n+where prefix__type is the C/C++ type name of the schema type (using gSOAP's\n+type naming conventions), the declaration part declares the C/C++ type in the\n+generated header file which may be empty to omit, the optional use part\n+specifies how the type is used by other types such as by member declarations\n+and as function parameters, and the optional ptr-use part specifies how the\n+type is used as a pointer type by other types and as function parameters.\n+# Example XML Schema and C/C++ type bindings:\n+xsd__int = | int\n+xsd__string = | char* | char*\n+xsd__boolean = enum xsd__boolean { false_, true_ }; | enum xsd__boolean\n+xsd__base64Binary = class xsd__base64Binary { unsigned char *__ptr; int __size;\n+}; | xsd__base64Binary | xsd__base64Binary\n+# You can extend structs and classes with member data and functions.\n+# For example, adding a constructor to ns__myClass:\n+ns__myClass = $ ns__myClass();\n+# The general form is\n+# class_name = $ member;\n+XML Schema types are associated with an optional C/C++ type declaration, a use\n+reference, and a pointer-use reference. The pointer-use reference of the\n+xsd__byte type for example, is int* because char* is reserved for strings.\n+For example, you can replace the std::string that used by default for C++ with\n+a wide string:\n+xsd__string = | std::wstring\n+Or replace the char* strings that are used by default for C with wchar_t*:\n+xsd__string = | wchar_t* | wchar_t*\n+When a type binding requires only the usage to be changed, the declaration part\n+can be an ellipsis ..., as in:\n+prefix__type = ... | use | ptr-use\n+The ... ellipsis ensures that the wsdl2h-generated type definition is\n+preserved, while the use and ptr-use parts are amended as specified.\n+This method is useful to serialize types dynamically, when XML elements carry\n+the xsi:type attribute indicating the type of element content. The following\n+illustrates an \"any\" type mapping for the ns:sometype XSD type in a schema.\n+This type will be replaced with a \"any\" type wrapper that supports dynamic\n+serialization of element types indicated by the xsi:type attribute:\n+[\n+struct __any\n+{\n+ int __type; // set to a SOAP_TYPE_T value\n+ void *__item; // points to data of type T as serialized per SOAP_TYPE_T\n+}\n+]\n+xsd__anyType = ... | struct __any | struct __any\n+where __type and __item are used to serialize any data type in the wrapper. The\n+__item member points to the value (de)serialized, with the type of this value\n+indicated by __type which is a SOAP_TYPE_T value for type named T.\n+To match an element with content to (de)serialize, rename the __item member to\n+the XML element name, as usual.\n+Additional members can be specified to extend a generated struct or class.\n+Class and struct extensions are of the form:\n+prefix__type = $ member-declaration\n+For example, to add getter and setter methods to class myns__record (see also\n+Section Get_and_set_methods):\n+myns__record = $ int get(struct soap *soap) const;\n+myns__record = $ int set(struct soap *soap);\n+Another way to use typemap.dat is to remap one C/C++ type to another type:\n+prefix__type1 == prefix__type2\n+This replaces prefix__type1 by prefix__type2 in the wsdl2h output. For example:\n+SOAP_ENC__boolean == xsd__boolean\n+where SOAP_ENC__boolean is replaced by xsd__boolean, which in turn may be\n+mapped to a C enum xsd__boolean type or C++ bool type.\n+The $CONTAINER variable defines the container type to use in the wsdl2h-\n+generated declarations for C++, which is std::vector by default. For example,\n+to use std::list as the container in the wsdl2h-generated declarations we add\n+the following line to typemap.dat:\n+$CONTAINER = std::list\n+Also a Qt container can be used instead of the default std::vector, for example\n+QVector:\n+[\n+#include \n+]\n+$CONTAINER = QVector\n+To remove containers, use wsdl2h -s. This also removes std::string, but you can\n+re-introduce std::string with\n+xsd__string = | std::string\n+The typemap.dat $POINTER variable defines the smart pointer to use in the\n+wsdl2h-generated declarations for C++, which replaces the use of * pointers.\n+For example:\n+$POINTER = std::shared_ptr\n+Not all pointers in the generated output are replaced by smart pointers by\n+wsdl2h, such as pointers as union members and pointers as struct/class members\n+that point to arrays of values.\n+The variable $SIZE defines the type of array sizes, which is int by default.\n+For example, to change array size types to size_t:\n+$SIZE = size_t\n+Permissible types are int and size_t. This variable does not affect the size of\n+dynamic arrays, xsd__hexBinary and xsd__base64Binary types, which is always\n+int.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The soapcpp2 tool\n+The soapcpp2 tool is invoked from the command line and optionally takes the\n+name of a header file as an argument or, when the file name is absent, parses\n+the standard input:\n+ soapcpp2 file.h\n+where file.h is an interface header file generated by wsdl2h or developed\n+manually to specify the service operations as function prototypes and C/C++\n+data types to serialize in XML.\n+The soapcpp2 tool produces the XML data binding implementation source code,\n+client-side stub functions, and server-side skeleton functions.\n+The type of files generated by soapcpp2 are:\n+ * soapStub.h a modified and annotated header file produced from the input\n+ interface header file, this file is compilable by C/C++ compilers while\n+ the input interface header file is not.\n+ * soapH.h the main header file to be included by the application source\n+ code, this file also includes soapStub.h.\n+ * soapC.cpp (or .c for C) the serializers for the C/C++ types specified in\n+ the interface header file.\n+ * soapClient.cpp (or .c for C) the client-side stub functions to invoke\n+ remote service operations.\n+ * soapServer.cpp (or .c for C) the server-side skeleton functions to\n+ dispatch service requests to user-define service functions.\n+ * soapClientLib.cpp (or .c for C) the client-side stub functions combined\n+ with local static serializers to be integrated as one big \"library\".\n+ * soapServerLib.cpp (or .c for C) the service-side skeleton functions\n+ combined with local static serializers to be integrated as one big\n+ \"library\"\n+ * soapXYZProxy.h the C++ proxy class declaration generated with soapcpp2 -\n+ i or soapcpp2 -j\n+ * soapXYZProxy.cpp the C++ proxy class implementation generated with\n+ soapcpp2 -i or soapcpp2 -j\n+ * soapXYZService.h the C++ service class declaration generated with\n+ soapcpp2 -i or soapcpp2 -j\n+ * soapXYZService.cpp the C++ service class implementation generated with\n+ soapcpp2 -i or soapcpp2 -j\n+ * *.xsd files are generated containing XML schemas for each namespace\n+ prefix ns used in the interface header file input to the soapcpp2 tool,\n+ see also Section How_to_generate_WSDL_service_descriptions . Not\n+ applicable when the interface header file was generated with wsdl2h.\n+ * *.wsdl files are generated containing WSDL descriptions for each\n+ namespace prefix ns used by service operations in the interface header\n+ file input to the soapcpp2 tool, see also Section How_to_generate_WSDL\n+ service_descriptions . Not applicable when the interface header file was\n+ generated with wsdl2h.\n+ * *.xml files with SOAP or XML request and response messages are generated.\n+ * *.nsmap the XML namespace mapping table, generated for the first\n+ namespace prefix ns found in the interface header file input to the\n+ soapcpp2 tool.\n+If client and service applications are to be developed for the same Web\n+services API then the same interface header file can be used to generate the\n+source code for both the client and the service. There is no need to generate a\n+WSDL with soapcpp2 and then use that WSDL to generate a new interface header\n+file with wsdl2h. The new header file generated by this approach will not be\n+identical to the original header file.\n+The soapClientLib.cpp and soapServerLib.cpp can be used to build client and\n+server libraries. The serialization functions are declared static to avoid link\n+symbol conflicts. For this approach to compile, we also should create a\n+separate interface header file env.h with SOAP Header and Fault structures with\n+serializers that are non-static, i.e. globally declared and implemented, as\n+described in Section How_to_create_client/server_libraries .\n+The following files are part of the gSOAP source code package and are required\n+to build gSOAP applications:\n+ * gsoap/stdsoap2.h the header file to include in your source code, but\n+ already included when including soapH.h.\n+ * gsoap/stdsoap2.c the C source code of the entire gSOAP engine.\n+ * gsoap/stdsoap2.cpp (or .c for C) the source code of the entire gSOAP\n+ engine.\n+ * gsoap/dom.cpp (or .c for C) the source code of the DOM parser, which is\n+ optional and only required when using DOM such as with WS-Security.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 options\n+The soapcpp2 tool supports the following command-line options:\n+option result\n+-0 no SOAP, generate REST source code\n+-1 generate SOAP 1.1 source code\n+-2 generate SOAP 1.2 source code\n+-A require HTTP SOAPAction headers to invoke server-side operations\n+-a use HTTP SOAPAction headers with WS-Addressing to invoke server-side\n+ operations\n+-b serialize byte arrays char[N] as string\n+-C generate client-side source code only\n+-c generate C source code\n+-c++ generate C++ source code (default)\n+-c++11 generate C++ source code optimized for C++11 (compile with -std=c++11)\n+-d path use path to save files\n+-Ec generate extra functions for deep copying\n+-Ed generate extra functions for deep deletion\n+-Et generate extra functions for data traversals with callback functions\n+-e generate SOAP RPC encoding style bindings (also use -1 or -2)\n+-f N multiple soapC files, with N serializer definitions per file (N>=10)\n+-g generate XML sample messages in template format for testmsgr\n+-h display help info and exit\n+-I path use path(s) for #import (paths separated with :)\n+-i generate C++ service proxies and objects inherited from soap struct\n+-j generate C++ service proxies and objects that share a soap struct\n+-L don't generate soapClientLib and soapServerLib\n+-l generate linkable modules (experimental)\n+-m generate source code for the Matlab(tm) MEX compiler (deprecated)\n+-n use service name to rename service functions and namespace table\n+-p name save files with new prefix name instead of soap\n+-Q name use name as the C++ namespace, including custom serializers\n+-q name use name as the C++ namespace, excluding custom serializers\n+-r generate soapReadme.md report\n+-S generate server-side source code only\n+-s generate stub and skeleton functions with strict XML validation checks\n+-T generate server auto-test source code\n+-t generate source code for fully xsi:type typed SOAP/XML messages\n+-u uncomment WSDL/schema output by suppressing XML comments\n+-V display the current version and exit\n+-v verbose output\n+-w don't generate WSDL and schema files\n+-x don't generate sample XML message files\n+-y include C/C++ type access information in sample XML messages\n+-z1 compatibility: generate old-style C++ service proxies and objects\n+-z2 compatibility with 2.7.x: omit XML output for NULL pointers\n+-z3 compatibility up to 2.8.30: _param_N indexing and nillable pointers\n+For example\n+ soapcpp2 -L -c -d projects -p my -x file.h\n+This saves the following source code files:\n+ * projects/myH.h serialization functions, this file should be included in\n+ projects.\n+ * projects/myC.c serialization functions\n+ * projects/myClient.c client call stub functions\n+ * projects/myServer.c server request dispatcher\n+ * projects/myStub.h annotated copy of the source interface header file\n+ * projects/ns.nsmap namespace table, this file should be included or used\n+ in projects.\n+ * projects/ns.wsdl WSDL with Web service definitions\n+ * projects/ns.xsd XML schema\n+Windows users can use the usual / for compile-time flags as well as -, for\n+example:\n+soapcpp2 -L -c /d projects /p my /x file.h\n+Options -A, -a, -c, -c++, -c++11, -e, -i, -j, -n, -s, -t, -w, and -x can also\n+be specified in the interface header file for soapcpp2 using the //gsoapopt\n+directive, for example:\n+// Generate pure C and do not produce WSDL output:\n+//gsoapopt cw\n+int ns__webmethod(char *in, char **out);\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -0\n+This option generates XML REST source code by disabling SOAP bindings,\n+essentially disabling the SOAP protocol and replacing it by direct XML REST\n+messaging.\n+This option uses soap_set_version at the client side in the generated source\n+code to enable XML REST messaging, disabling SOAP.\n+In addition, the soapcpp2 tool nullifies the SOAP namespaces from the the\n+generated namespace table file to force a server application that uses this\n+table to use XML REST only:\n+struct Namespace namespaces[] = {\n+{ \"SOAP-ENV\", NULL, NULL, NULL },\n+{ \"SOAP-ENC\", NULL, NULL, NULL },\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\", \"http://www.w3.org/*/\n+XMLSchema-instance\", NULL },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\", \"http://www.w3.org/*/XMLSchema\",\n+NULL },\n+...\n+{ NULL, NULL, NULL, NULL}\n+};\n+ Note\n+ Web services applications developed with gSOAP support both REST and SOAP\n+ messaging automatically when the namespace table is left intact (i.e.\n+ generated without option -0) with the SOAP namespaces present in the\n+ table. XML REST request messages are served and REST messages returned.\n+ Likewise, SOAP 1.1 request messages are served and SOAP 1.1 messages\n+ returned, SOAP 1.2 request messages are served and SOAP 1.2 messages\n+ returned.\n+For example, the following example calculator service SOAP and XML REST request\n+messages are served by a gSOAP service developed with SOAP 1.1 as the default\n+protocol:\n+\n+\n+\n+2\n+3\n+\n+\n+\n+\n+2\n+3\n+\n+The server returns the following XML SOAP 1.1 and XML REST responses:\n+\n+\n+\n+5\n+\n+\n+\n+\n+0\n+\n+By default all XML namespaces are included with the root element, which\n+improves messaging performance at the sending and receiving sides, because a\n+stack of xmlns binding scopes does not need to be maintained. Use\n+#SOAP_XML_CANONICAL to emit xmlns binding pairs when the XML namespace prefix\n+is used. This is slower but may or may not reduce the message size.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -1\n+This option forces SOAP 1.1 bindings globally in the generated source code,\n+thereby overriding the SOAP protocol version used in the interface header file\n+input.\n+This option uses soap_set_version at the client to enable SOAP 1.1 request and\n+response messages, disallowing SOAP 1.2.\n+In addition, the soapcpp2 tool saves the SOAP 1.1 namespaces in the second\n+column of the generated namespace table file and the SOAP 1.2 in the third\n+column to allow the server to accept SOAP 1.1 and SOAP 1.2 requests:\n+struct Namespace namespaces[] = {\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\", \"http://www.w3.org/\n+*/soap-envelope\", NULL },\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\", \"http://www.w3.org/\n+*/soap-encoding\", NULL },\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\", \"http://www.w3.org/*/\n+XMLSchema-instance\", NULL },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\", \"http://www.w3.org/*/XMLSchema\",\n+NULL },\n+...\n+{ NULL, NULL, NULL, NULL}\n+};\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -2\n+This option forces SOAP 1.2 bindings globally in the generated source code,\n+thereby overriding the SOAP protocol version used in the interface header file\n+input.\n+This option uses soap_set_version at the client to enable SOAP 1.2 request and\n+response messages, disallowing SOAP 1.1.\n+In addition, the soapcpp2 tool saves the SOAP 1.2 namespaces in the second\n+column of the generated namespace table file and the SOAP 1.1 in the third\n+column to allow the server to accept SOAP 1.1 and SOAP 1.2 requests:\n+struct Namespace namespaces[] = {\n+{ \"SOAP-ENV\", \"http://www.w3.org/2003/05/soap-envelope\", \"http://\n+schemas.xmlsoap.org/soap/envelope/\", NULL },\n+{ \"SOAP-ENC\", \"http://www.w3.org/2003/05/soap-encoding\", \"http://schemas\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\", \"http://www.w3.org/*/\n+XMLSchema-instance\", NULL },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\", \"http://www.w3.org/*/XMLSchema\",\n+NULL },\n+...\n+{ NULL, NULL, NULL, NULL}\n+};\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -A\n+This option generates server-side source code that requires HTTP SOAPAction\n+headers to be present. The server invokes server-side operations based on the\n+SOAPAction header value in request messages, instead of the SOAP/XML request\n+message name which is ignored. This option is used with WS-Addressing, WS-\n+ReliableMessaging, and WS-Discovery servers to relay messages based on HTTP\n+SOAPAction headers and/or the SOAP Header wsa:Action when present (the latter\n+requires the [WS-Addressing plugin](wsaplugin)).\n+Alternatively, use soapcpp2_-a_option_-a to let the server invoke server-side\n+operations based on the SOAPAction header value in request messages when\n+present, otherwise when not present this lets the server invoke server-side\n+operations based on the SOAP/XML request message name as usual.\n+This option can also be specified by the //gsoapopt A directive in the\n+interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -a\n+This option generates server-side source code that uses HTTP SOAPAction headers\n+when present to invoke server-side operations based on the SOAPAction header\n+value in request messages, otherwise when not present lets the server invoke\n+server-side operations based on the SOAP/XML request message name as usual.\n+This option is used with WS-Addressing, WS-ReliableMessaging, and WS-Discovery\n+servers to relay messages based on HTTP SOAPAction headers and/or the SOAP\n+Header wsa:Action when present (the latter requires the [WS-Addressing plugin]\n+(wsaplugin)).\n+Alternatively, use soapcpp2_-A_option_-A to require HTTP SOAPAction headers to\n+be present in SOAP request messages to invoke server-side operations.\n+This option can also be specified by the //gsoapopt a directive in the\n+interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -b\n+This option serializes byte arrays specified as char[N] as strings. Without\n+this option char[N] is serialized as an array of bytes. Fixed-size arrays\n+specified in the interface header file input are generally serialized as arrays\n+in XML using item elements.\n+For example:\n+struct ns__record\n+{\n+char bytes[3];\n+int ints[2];\n+};\n+By default without this option the ns__record struct is serialized as:\n+\n+\n+65\n+66\n+0\n+\n+\n+1\n+2\n+\n+\n+With this option, the ns__record struct is serialized as:\n+\n+AB\n+\n+1\n+2\n+\n+\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -C\n+This option restricts soapcpp2 to generate client-side source code only. When\n+this option is combined with soapcpp2_-CS_option_-S, no client and server\n+source code is generated.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -c -c++ -c++11\n+Option -c generates C source code, -c++ generates C++ source code, and -c++11\n+generates C++11 source code.\n+ Note\n+ The //gsoapopt directive in the interface header file takes priority over\n+ this option, when c, c++, or c++11 is declared with this directive in the\n+ interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -d\n+This option specifies a path to save the generated files. For example:\n+soapcpp2 -d source file.h\n+This saves files to the source/ directory located within the current directory,\n+which should exist and should be writable.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -Ec -Ed -Et\n+These options generate extra functions for deep copying of serializable C/C++\n+data, deep deletion of serializable C/C++ data, and deep data traversals with\n+user-defined callback functions over serializable C/C++ data.\n+For a serializable type T declared in the interface header file for soapcpp2,\n+option -Ec generates:\n+ * virtual T * T::soap_dup(struct soap*) const where T is a class, returns a\n+ duplicate of this object by deep copying, replicating all deep cycles and\n+ shared pointers when a managing soap context is provided as argument.\n+ Deep copy is a tree when argument is NULL, but the presence of deep\n+ cycles will lead to non-termination. Use flag SOAP_XML_TREE with the\n+ managing context to copy into a tree without cycles and pointers to\n+ shared objects.\n+ * T * soap_dup_T(struct soap*, T *dst, const T *src) where T is not a\n+ class, deep copy src into dst, replicating all deep cycles and shared\n+ pointers when a managing soap context is provided as argument. When dst\n+ is NULL, allocates space for dst and returns a pointer to the allocated\n+ copy. Deep copy results in a tree when the soap context is NULL, but the\n+ presence of deep cycles will lead to non-termination. Use flag\n+ SOAP_XML_TREE with managing context to copy into a tree without cycles\n+ and pointers to shared objects. Returns dst or allocated copy when dst is\n+ NULL.\n+For a serializable type T declared in the interface header file for soapcpp2,\n+option -Ed generates:\n+ * virtual void T::soap_del() const where T is a class, deletes all heap-\n+ allocated members of this object by deep deletion ONLY IF this object and\n+ all of its (deep) members are not managed by a soap context AND the deep\n+ structure is a tree (no cycles and co-referenced objects by way of\n+ multiple (non-smart) pointers pointing to the same data). Can be safely\n+ used after T::soap_dup(NULL) to delete the deep copy. Does not delete the\n+ object itself.\n+ * void soap_del_T(const T*) where T is not a class, deletes all heap-\n+ allocated members of this object by deep deletion ONLY IF this object and\n+ all of its (deep) members are not managed by a soap context AND the deep\n+ structure is a tree (no cycles and co-referenced objects by way of\n+ multiple (non-smart) pointers pointing to the same data). Can be safely\n+ used after soap_dup_T(NULL, NULL, const T*) to delete the deep copy\n+ returned. Does not delete the object itself.\n+For a serializable type T declared in the interface header file for soapcpp2,\n+option -Et generates:\n+ * virtual void T::soap_traverse(struct soap *soap, const char *tag,\n+ soap_walker p, soap_walker q) where T is a class, uses function callbacks\n+ p and q to traverse this object by deep ordered tree traversals over its\n+ members when non-NULL. Function p is a pre-order function that is called\n+ before objects and data are visited recursively and function q is a post-\n+ order function that is called after objects and data are visited\n+ recursively. Either p or q may be NULL. The tag string is passed to p and\n+ q and should not be NULL. Cyclic graphs are treated as trees by pruning\n+ pointer back-edges, though this method does not always prevent a data\n+ node from being visited twice.\n+ * void soap_traverse_T(struct soap *soap, T *data, const char *tag,\n+ soap_walker p, soap_walker q) where T is not a class, uses function\n+ callbacks p and q to traverse this data by deep ordered tree traversals\n+ over its members when present and non-NULL. Function p is a pre-order\n+ function that is called before objects and data are visited recursively\n+ and function q is a post-order function that is called after objects and\n+ data are visited recursively. Either p or q may be NULL. The tag string\n+ is passed to p and q and should not be NULL. Cyclic graphs are treated as\n+ trees by pruning pointer back-edges. though this method does not always\n+ prevent a data node from being visited twice.\n+The pre-order p and post-order q callback functions should be declared as a\n+soap_walker function, which has the following function signature:\n+void soap_walker(struct soap *soap, void *data, int soap_type, const char *tag,\n+const char *type)\n+where data points to the data node visited which is of type soap_type (a\n+SOAP_TYPE_T constant), tag is the non-NULL element or attribute tag name\n+(qualified or unqualified), and type is the non-NULL C/C++ type of the data.\n+The void* soap::user member can be used to pass user-defined data to the\n+callbacks.\n+For example:\n+// file: record.h\n+//gsoap ns schema namespace: urn:example\n+struct ns__record\n+{\n+@ char *name;\n+int value;\n+struct ns__record *subrecord;\n+};\n+soapcpp2 -Ecdt record.h\n+The main program:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+int main()\n+{\n+struct soap *soap = soap_new();\n+ns__record record; // a serializable type\n+ns__record rec_dup;\n+int indent = 0;\n+soap->recvfd = open(file, O_RDONLY);\n+if (soap->recvfd < 0)\n+... // error\n+if (soap_read_ns__record(soap, &record)) // deserialize from file into managed\n+memory\n+... // error\n+close(soap->recvfd);\n+if (soap_write_ns__record(soap, &record)) // serialize to standard output\n+... // error\n+soap->user = (void*)&indent;\n+soap_traverse_ns__record(soap, record, \"record\", pre, post);\n+soap_dup_ns__record(NULL, &rec_dup, &record); // deep copy the record to\n+unmanaged memory\n+soap_destroy(soap); // delete managed objects\n+soap_end(soap); // delete managed data and temporaries\n+soap_free(soap); // free the context\n+soap_del_ns__record(&rec_dup) // deep delete unmanaged record\n+}\n+void pre(struct soap *soap, void *a, int n, const char *s, const char *t)\n+{\n+printf(\"\\n%*s%s %s = {\", (*(int*)soap->user)++, \"\", t, s);\n+if (n == SOAP_TYPE_int)\n+printf(\" %d\", *(int*)a);\n+else if (n == SOAP_TYPE_string)\n+printf(\" %s\", *(char**)a ? *(char**)a : \"(n/a)\");\n+}\n+void post(struct soap *soap, void *a, int n, const char *s, const char *t)\n+{\n+printf(\" }\");\n+(*(int*)soap->user)--;\n+}\n+The soap_read_ns__record deserializes the following XML:\n+\n+123\n+\n+456\n+\n+\n+Then soap_traverse_ns__record call displays the contenst of record using the\n+pre and post walker functions:\n+struct ns__record record = {\n+ char * name = { foo }\n+ int value = { 123 }\n+ struct ns__record subrecord = {\n+ char * name = { bar }\n+ int value = { 456 } } }\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -e\n+This option forces SOAP RPC encoding bindings globally in the generated source\n+code, when the SOAP messaging style is not declared in the interface header\n+file with directives.\n+SOAP document/literal style messaging it the default messaging style. The\n+messaging style can be specified with the //gsoap service style: and /\n+/gsoap service encoding: directives. See also SOAP_RPC_encoded_versus\n+document/literal_style.\n+This option can also be specified by the //gsoapopt e directive in the\n+interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -f\n+This option splits the serialization source code saved to soapC.c and soapC.cpp\n+files into multiple soapC_NNN files as specified by the numeric parameter. This\n+option alleviates compilation issues with very large source code files.\n+For example:\n+soapcpp2 -f40 file.h\n+This generates multiple soapC_NNN.cpp files each with 40 serializers, with NNN\n+counting from 001 onward.\n+The value of this option must be larger or equal to 10.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -g\n+This option generates XML sample messages in template format for the gSOAP Test\n+Messenger testmsgr tool to test SOAP and REST XML clients and servers.\n+By default without this option, soapcpp2 generates sample XML messages with the\n+proper XML structure but without useful data. The Test Messenger tool generates\n+random messages directed by the template parameters included by soapcpp2 -\n+g option -g.\n+This option only has effect when soapcpp2_-x_option_-x is not used, which skips\n+the generation of sample messages.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -h\n+This option displays help info and then exits.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -I\n+This option specifies one or more directory paths to search for imported\n+interface header files. Multiple paths are separated by a colon.\n+For example:\n+soapcpp2 -I path1:path2 file.h\n+This searches path1 and then path2 for files that are imported with #import in\n+file.h.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -i\n+This option generates C++ client-side proxy classes and server-side service\n+classes, where the classes inherit the soap context struct with the engine\n+state to handle communications and manage memory independently of other class\n+instances.\n+By contrast, soapcpp2_-j_option_-j allows a soap context to be used and reused\n+for multiple proxy and server instances.\n+This option can also be specified by the //gsoapopt i directive in the\n+interface header file.\n+This option has no effect for C source code output.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -j\n+This option generates C++ client-side proxy classes and server-side service\n+classes, where the classes have a pointer member soap to a soap context struct\n+that handles communications and manages memory.\n+By contrast to soapcpp2_-i_option_-i, this option allows a soap context to be\n+used and reused for multiple proxy and server instances.\n+This option can also be specified by the //gsoapopt j directive in the\n+interface header file.\n+This option has no effect for C source code output.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -L\n+This option skips the generation of the soapClientLib and soapServerLib files.\n+These files are generally not needed to build client and server applications.\n+These files are useful to compile multiple \"libraries\" of client and server\n+applications, such that all serialization source code is declared static and\n+kept hidden from the global scope, which makes the serialization functions\n+inaccessible to the global scope to prevent global name clashes.\n+Alternatively, use soapcpp2 -q name option -q name to develop C++ applications\n+with C++ namespaces to prevent global name clashes.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -l\n+This option is experimental and should only be used to generate source code for\n+modules. This option is auto-enabled when a #module directive is found in an\n+interface header file for soapcpp2, see how_to_build_modules_and_libraries_with\n+the_#module_directive.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -m\n+This option to generate source code for the Matlab(tm) MEX compiler is\n+deprecated.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -n\n+This option renames the generated service functions soap_serve to name_serve\n+and the generated namespace table namespaces to name_namespaces to the name\n+specified with the soapcpp2_-n_-p_name_option_-p_name.\n+This option is useful to prevent name clashes when soapcpp2 is invoked multiple\n+times to generate source code for different parts of an application. See also\n+how_to_create_client/server_libraries.\n+This option can also be specified by the //gsoapopt n directive in the\n+interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -p\n+This option saves source code files with the specified file name prefix name\n+with soapcpp2 -p name instead of soap as the file name prefix.\n+This option is useful to prevent name clashes when soapcpp2 is invoked multiple\n+times to generate source code for different parts of an application. See also\n+how_to_create_client/server_libraries.\n+For example:\n+soapcpp2 -p foo file.h\n+This saves fooStub.h, fooH.h, fooC.cpp, and so on.\n+When the main application is build from the renamed name-prefixed source code\n+files, plugins and custom serializers that are compiled and linked with the\n+application should include nameH.h instead of soapH.h. This can be done with\n+the -D SOAP_H_FILE=nameH.h option to the C/C++ compiler to rename this file to\n+include instead of soapH.h.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -Q\n+This option specifies a C++ namespace name for the generated source code,\n+including for the custom serializers when used. See also soapcpp2_-q_name\n+option_-q_name for details on specifying C++ namespaces.\n+The source code files are saved with name as prefix instead of soap. This means\n+that all plugins and custom serializers that are compiled and linked with the\n+application should include nameH.h instead of soapH.h. This can be done with\n+the -D SOAP_H_FILE=nameH.h option to the C/C++ compiler to rename this file to\n+include instead of soapH.h.\n+This option has no effect for C source code output.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -q\n+This option specifies a C++ namespace name for the generated source code,\n+excluding the custom serializers when used. See also soapcpp2_-Q_name_option_-\n+Q_name.\n+This option is the same as specifying a C++ namespace in the interface header\n+file that encapsulates all declarations:\n+namespace name {\n+... // all of the interface header file content goes here\n+}\n+This interface header file format is generated with wsdl2h_-q_name_option_-\n+q_name.\n+The source code files are saved with name as prefix instead of soap. This means\n+that all plugins and custom serializers that are compiled and linked with the\n+application should include nameH.h instead of soapH.h. This can be done with\n+the -D SOAP_H_FILE=nameH.h option to the C/C++ compiler to rename this file to\n+include instead of soapH.h.\n+See How_to_build_a_client_or_server_in_a_C++_code_namespace for details on\n+using C++ namespaces to build client and server applications, which requires a\n+env.h file with SOAP Header and Fault definitions to be compiled with:\n+ soapcpp2 -penv env.h\n+The generated envC.cpp file holds the SOAP Header and Fault serializers and you\n+can link this file with your client and server applications.\n+This option has no effect for C source code output.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -r\n+This option generates a soapReadme.md markdown report. This report includes\n+details pertaining the serializable data types and Web client and service\n+operations, covering XML type details, serialization functions, and SOAP/REST\n+API programming details.\n+The markdown report is readable as it is, but can be converted to HTML for\n+improved readability with Doxygen or with pandoc, or can be browsed in Firefox\n+with https://www.genivia.com/files/readmeviewer.html.zip.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -S\n+This option restricts soapcpp2 to generate server-side source code only. When\n+this option is combined with soapcpp2_-CS_option_-C, no client and server\n+source code is generated.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -s\n+This option generates client-side stub functions and proxy classes, server-side\n+skeleton functions and service classes with strict XML validation checks\n+enabled. This option effectively hard-codes the #SOAP_XML_STRICT run time mode\n+flag.\n+This option can also be specified by the //gsoapopt s directive in the\n+interface header file.\n+ Warning\n+ This option is not recommended for SOAP RPC encoding style messaging, but\n+ XML REST and SOAP/XML document/literal style messages can be validated.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -T\n+This option generates server auto-test source code. The generated source code\n+implements a test server soapTester.c (for C) or soapTester.cpp (for C++) that\n+can be deployed to echo client requests, for example for testing purposes.\n+For example:\n+soapcpp2 -T file.h\n+c++ -o tester soapTester.cpp soapServer.cpp soapC.cpp stdsoap2.cpp\n+./tester 8192 8080\n+This runs the tester server on port 8080 with soap context initialization mode\n+flag 8192 = 0x2000 = #SOAP_XML_INDENT.\n+See generating_an_auto_test_server_for_client_testing for more details. More\n+advanced servers for testing are available with the gSOAP Test Messenger\n+testmsgr tool to test SOAP and REST XML clients and servers.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -t\n+This option generates source code to fully annotate SOAP/XML messages with xsi:\n+type attribute values. This option is useful for SOAP RPC encoded messaging\n+with SOAP applications that require xsi:type attributes for all XML elements in\n+SOAP messages.\n+This option can also be specified by the //gsoapopt t directive in the\n+interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -u\n+This option uncomments WSDL and XSD files generated by soapcpp2 by supressing\n+the inclusion of comments to annotate WSDL and XSD files.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -V\n+This option displays the current soapcpp2 tool version and then exits.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -v\n+This option enables verbose output to assist in debugging the soapcpp2 tool.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -w\n+This option skips the generation of WSDL and XSD files.\n+This option can also be specified by the //gsoapopt w directive in the\n+interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -x\n+This option skips the generation of sample XML message files.\n+This option can also be specified by the //gsoapopt x directive in the\n+interface header file.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -y\n+This option adds C/C++ type information to the sample XML message files\n+generated by soapcpp2.\n+\ud83d\udd1d Back_to_table_of_contents\n+ soapcpp2 -z\n+These options are for backward compatiility with older gSOAP releases:\n+ * -z1 compatibility: generate old-style C++ service proxies and objects\n+ * -z2 compatibility with 2.7.x: omit XML output for NULL pointers\n+ * -z3 compatibility up to 2.8.30: _param_N indexing; nillable pointers\n+\ud83d\udd1d Back_to_table_of_contents\n+ The #import directive\n+The #import directive is used to include interface header files into other\n+interface header files for soapcpp2. By contrast, the #include directive (and\n+#define directive for that matter) is moved by the soapcpp2 tool into the\n+generated source code file soapStub, see Section The_#include_and_#define\n+directives .\n+The #import directive is used for two purposes: we use it to include the\n+contents of one interface header file into another interface header file and to\n+import a module, see Section How_to_build_modules_and_libraries_with_the\n+#module_directive .\n+An example of the #import directive:\n+#import \"mydefs.h\"\n+int ns__webmethod(ns__record *in, struct ns__webmethodResponse { ns__record\n+out; } *out);\n+where \"mydefs.h\" is an interface header file that defines ns__record:\n+struct ns__record\n+{\n+const char *name;\n+const char *address;\n+};\n+typedef struct ns__record ns__record;\n+\ud83d\udd1d Back_to_table_of_contents\n+ The #include and #define directives\n+The #include and #define directives are copied by the soapcpp2 tool into the\n+generated source code. These directives are added to the top of the generated\n+soapStub.h before any other header file is included. Therefore, #include and\n+#define directives can be used to influence the generated source code files.\n+The following example interface header file for soapcpp2 refers to std::\n+ostream:\n+#include \n+#define SOME_VALUE 123\n+// std::ostream can't be serialized, but need to be declared to make it\n+visible:\n+extern class std::ostream;\n+class ns__myClass\n+{\n+public:\n+virtual void print(std::ostream &s) const; // we need std::ostream here\n+... //\n+};\n+This example also uses an #include and a #define directive that will be added\n+to the top of soapStub.h before gsoap/stdsoap2.h is included.\n+ Warning\n+ Using #define to override WITH_MACRO and SOAP_MACRO compile-time flags is\n+ not recommended because the gsoap/stdsoap2.cpp (gsoap/stdsoap2.c for C)\n+ is used to build the -lgsoap++ (and -lgsoap for C) library, which is not\n+ affected by these macros whereas the soap context is, as used by the\n+ application, leading to predictable crashes. Use #SOAPDEFS_H or\n+ #WITH_SOAPDEFS_H to define macros that are visible to all source code\n+ compiled.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Service operation specification format\n+A service operation is specified as a function prototype in an interface header\n+file for soapcpp2. For the function prototypes specified, the soapcpp2 tool\n+generates client stub functions to invoke remote services and generates server\n+skeleton functions to implement services.\n+The service operation specified by a function prototype should return int,\n+which is either #SOAP_OK for success and a soap_status error code for failure,\n+see Section Run-time_error_codes .\n+The general format of a service operation specification is:\n+int prefix__method_name(inparam1, inparam2, ..., inparamn, outparam);\n+where\n+ * prefix__ is the XML namespace prefix of the method\n+ * method_name is the service operation name\n+ * inparam1, ..., inparamn are the input parameters to the service\n+ operation, which are either values or pointer types, but not references\n+ * outparam is the single output parameter of the service operation, which\n+ must be a pointer or a reference type.\n+A single output parameter is specified and multiple output parameters should be\n+wrapped in a struct or class, see Section Service_operation_parameter_passing .\n+The fully qualified name of the function namespace_prefix__method_name must be\n+unique and cannot match the name of a struct, class, or enum declared in the\n+same header file.\n+The method request is send as an XML message using the qualified function name\n+with the input parameters in XML:\n+\n+...\n+...\n+...\n+...\n+\n+where the inparam1, ..., inparamn elements are the XML element representations\n+of the inparam parameter name declarations.\n+The XML response by the Web service is of the form:\n+\n+...\n+\n+where the outparam element is the XML element representation of the outparam\n+parameter name declaration, see Section C/C++_identifier_name_to_XML_tag_name\n+translation . By convention, the response element name is the method name\n+ending in Response. See Section Service_operation_parameter_passing on how to\n+change the declaration if the service response element name is different.\n+With SOAP messaging the request and response XML messages are placed in the\n+SOAP-ENV:Envelope and SOAP-ENV:Body elements. SOAP 1.1 document/literal\n+messaging is the default messaging mode in gSOAP, which are modified to SOAP or\n+REST with //gsoap service method-protocol: directives, see Section\n+Directives.\n+The soapcpp2 tool generates a client stub function for the service operation.\n+This stub is of the form:\n+int soap_call_prefix__method_name(struct soap *soap, char *endpoint, char\n+*action, inparam1, inparam2, ..., outparam);\n+This stub is called by a client application to perform the service operation\n+call.\n+The soapcpp2 tool generates a skeleton functions for the service operation. The\n+skeleton function called by soap_serve is:\n+int soap_serve_prefix__method_name(struct soap *soap);\n+which after deserializing the XML request message calls the prefix__method_name\n+service operation defined by the service application and serializes the XML\n+response message when the service operation returns #SOAP_OK.\n+Alternatively, soapcpp2 -j option -j or option -i generates a C++ client proxy\n+class and a service class. These classes have methods corresponding to the\n+service operations, which on the client side can be invoked to invoke remote\n+service operations and on the server side are implemented by the service\n+application to execute the service operations.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Service operation parameter passing\n+The input parameters of a service operation must be passed by value or by\n+pointer. Input parameters cannot be passed by reference. Passing a pointer to\n+the data is preferred when the size of the data of the parameter is non trivial\n+such as values of primitive type.\n+The output parameter must be passed by pointer or by reference.\n+The input and output parameter types must be serializable, which means that\n+there are some limitations on the types of data that can be passed, see Section\n+Limitations .\n+If the output parameter is a pointer or reference to a struct or class type, it\n+is considered a service operation response element instead of a simple output\n+parameter value. That is, the name of the struct or class is the name of the\n+response element and the struct or class members are the output parameters of\n+the service operation, see also Section How_to_change_the_response_element_name\n+. Therefore, if the output parameter has to be a struct or class, a response\n+struct or class must be declared to wrap that struct or class type parameter.\n+Likewise, if a service operation returns multiple output parameters then a\n+response struct or class should be used to wrap the output parameters. By SOAP\n+conventions, the response element is the service operation name ending with\n+\"`Response`\".\n+The general form of a response struct or class wrapper is:\n+struct prefix__method_nameResponse\n+{\n+outparam1;\n+outparam2;\n+... //\n+outparamn;\n+};\n+where\n+ * prefix__ is the optional namespace prefix of the response element.\n+ * response_element_name it the name of the response element.\n+ * outparam1, ..., outparamn are the output parameters of the service\n+ operation.\n+The general form of a service operation specification with a response element\n+declaration is:\n+int prefix__method_name(inparam1, inparam2, ..., inparamn, struct\n+prefix__method_nameResponse { outparam1; outparam2; ...; outparamn; }\n+*anyname);\n+The choice of name for anyname has no effect on the SOAP encoding and decoding\n+and is only used as a place holder for the response. In C++ this parameter can\n+be passed by reference instead of by pointer.\n+The request message is:\n+\n+...\n+...\n+...\n+...\n+\n+where the inparam1, ..., inparamn elements are the XML element representations\n+of the inparam parameters.\n+The response message is of the form:\n+\n+...\n+...\n+...\n+...\n+\n+where the outparam1, ..., outparamn elements are the XML element\n+representations of the outparam parameters.\n+The input and output parameters can be made anonymous, which allows the\n+deserialization of requests/responses with different parameter names as is\n+endorsed by the SOAP 1.1 specification, see Section How_to_specify_anonymous\n+parameter_names .\n+\ud83d\udd1d Back_to_table_of_contents\n+ C/C++ identifier name to XML tag name translation\n+One of the nice aspects of gSOAP is its powerful C/C++ XML data binding and the\n+flexibility to specify names for XML, such as service operation names, class\n+names, type identifiers, and struct or class members. The first aspect is the\n+use of namespace prefixes with C/C++ names to qualify the names with XML\n+namespaces, which is specified with a prefix__ or as we will see later can be\n+specified with a colon prefix: in the C/C++ name. A C/C++ identifier name of\n+the form\n+prefix__element_name\n+is be encoded in XML as\n+prefix:element-name\n+The underscore pair (__) separates the namespace prefix from the element name.\n+Each namespace prefix has a namespace URI specified by a //gsoap \n+schema namespace: directive that is saved to the soapcpp2-generated\n+namespace mapping table, see Sections XML_namespaces_and_the_namespace_mapping\n+table and XML_namespace_considerations . The namespace URI is a unique\n+identification that can be associated with the service operations and data\n+types. The namespace URI disambiguates potentially identical service operation\n+names and data type names used by disparate organizations.\n+XML element names are XSD NCNames (non-colon names) that may contain letters,\n+digits, underscores, hyphens, dots, and other special characters except\n+reserved characters and colon. To add non-element names of service operations,\n+structs, classes, typedefs, and members can be A single underscore _ in a C/C++\n+prefix or identifier name is replaced by a hyphen - in the XML encoding. For\n+example, the identifier name SOAP_ENC__ur_type is represented in XML as SOAP-\n+ENC:ur-type. A _DOT is replaced by a dot . in XML, and _USCORE is replaced by\n+an underscore _ in XML. For example:\n+class n_s__biz_DOTcom\n+{\n+char * n_s__biz_USCOREname;\n+};\n+is serialized in XML as:\n+\n+Bizybiz\n+\n+Other special characters are added to C/C++ names as _xHHHH where HHHH is the\n+hexadecimal code of a Unicode character code point.\n+Trailing underscores in an identifier name are stripped from the XML encoding.\n+This is useful when an identifier name clashes with a C++ keyword. For example,\n+return may be used as an XML element. This return element can be specified as\n+return_, for example as a struct or class member or function parameter.\n+By default the soapcpp2 tool generates data binding source code in which all\n+local XML elements are and attributes are unqualified:\n+//gsoap x schema namespace: urn:x\n+struct x__record\n+{\n+@ char * type; // maps to unqualified type attribute\n+char * name; // maps to unqualified name element\n+};\n+where the name element and the type attribute are unqualified in the XML\n+content (for example to facilitate SOAP RPC encoding).\n+To force qualification of elements and attributes, use the \"form\" directive:\n+//gsoap x schema namespace: urn:x\n+//gsoap x schema form: qualified\n+struct x__record\n+{\n+@ char * type; // maps to qualified x:type attribute\n+char * name; // maps to qualified x:name element\n+};\n+You can also use \"elementForm\" and \"attributeForm\" directives to (un)qualify\n+local element and attributes, respectively.\n+Because the soapcpp2-generated serializers follow the qualified/unqualified\n+forms of the schemas, there is normally no need to explicitly qualify struct/\n+class members because automatic encoding rules will be used.\n+If explicit qualification is needed, this can be done using the prefix\n+convention:\n+//gsoap x schema namespace: urn:x\n+//gsoap y schema namespace: urn:y\n+struct x__record\n+{\n+@ char * xsi__type; // maps to qualified xsi:type attribute\n+char * y__name; // maps to qualified y:name element\n+};\n+which ensures that there cannot be any name clashes between members of the same\n+name defined in different schemas (consider for example name and y__name), but\n+this can clutter the representation when clashes do not occur.\n+An alternative to the prefix convention is the use of \"colon notation\" in the\n+interface header file for soapcpp2. This extra addition to the the C/C++ syntax\n+allows you to bind type names and struct and class members to qualified and\n+unqualified XML tag names explicitly, thus bypassing the default mechanism that\n+automatically qualifies or unqualifies element and attribute tag names based on\n+the schema element or attribute forms.\n+The colon notation for type names, struct and class names, and members\n+overrides the prefix qualification rules explicitly:\n+//gsoap x schema namespace: urn:x\n+//gsoap y schema namespace: urn:y\n+struct x:record\n+{\n+@ char * xsi:type; // maps to qualified xsi:type attribute\n+char * y:name; // maps to qualified y:name element\n+};\n+where x and y are namespace prefixes that are declared with a directive. The\n+xsi:type member is an XML attribute in the xsi namespace. The soapcpp2 tool\n+generates data binding implementation source code with the following cleaned-up\n+struct without the annotations:\n+// This code is generated in soapStub.h:\n+struct record\n+{\n+char * type; /* optional attribute of type xsd:string */\n+char * name; /* optional element of type xsd:string */\n+};\n+The soapcpp2 tool also generates XML schemas with element and attribute\n+references. That is, y:name is referenced from the y schema by the x:record\n+complexType defined in the x schema.\n+The colon notation also allows you to override the element and attribute forms\n+to unqualified for qualified schemas:\n+//gsoap x schema namespace: urn:x\n+//gsoap x schema form: qualified\n+struct x:record\n+{\n+@ char * :type; // maps to unqualified type attribute\n+char * :name; // maps to unqualified name element\n+};\n+where the colon notation ensures that both type and name are unqualified in the\n+XML content, which overrides the default qualified forms of the x schema.\n+Note that the use of colon notation to bind namespace prefixes to type names\n+(typedef, enum, struct, and class names) translates to code without the\n+prefixes. This means that name clashes can occur between types with identical\n+unqualified names:\n+enum x:color { RED, WHITE, BLUE };\n+enum y:color { YELLOW, ORANGE }; // illegal enum name: name clash with x:color\n+while prefixing with double underscores never lead to clashes:\n+enum x__color { RED, WHITE, BLUE };\n+enum y__color { YELLOW, ORANGE }; // no name clash\n+Also note that colon notation has a very different role than the C++ scope\n+operator ::. The scope operator cannot be used in places where we need colon\n+notation, such as struct and class member members.\n+The default mechanism that associates XML tag names with the names of struct\n+and class member members can be overridden by \"re-tagging\" names with the\n+annotation of a tag placed next to the member member name. This is particularly\n+useful to support legacy code for which the fixed naming of member members\n+cannot be easily changed. For example:\n+//gsoap x schema namespace: urn:x\n+//gsoap x schema form: qualified\n+struct x:record\n+{\n+@ char * t `:type`; // maps to unqualified type attribute\n+char * s `name`; // maps to qualified x:name element\n+};\n+This maps the t member to the type XML attribute tag and s member to the x:name\n+XML element tag. Tags will be namespace qualified as per schema element and\n+attribute forms, unless preceded by a colon.\n+As of gSOAP 2.8.23 and greater, Unicode characters in C/C++ identifiers are\n+accepted by soapcpp2 when the source file is encoded in UTF-8. C/C++ Unicode\n+names are mapped to Unicode XML tags. For C/C++ source code portability\n+reasons, the wsdl2h tool still converts Unicode XML tag names to ASCII C/C++\n+identifiers using the _xHHHH naming convention for HHHH character code points.\n+Use wsdl2h_-U_option_-U to map Unicode letters in XML tag names to UTF-8-\n+encoded Unicode letters in C/C++ identifiers.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Generating a SOAP/XML client application with soapcpp2\n+After invoking the soapcpp2 tool on an interface header file description of a\n+service to generate soapStub, soapH.h, and soapC.cpp for the XML serializers,\n+and soapClient.cpp for the client stub functions, the client application is\n+compiled in C++ as follows:\n+ c++ -o myclient myclient.cpp stdsoap2.cpp soapC.cpp soapClient.cpp\n+For C we use soapcpp2 -c option -c to generate C source code that is compiled\n+with:\n+ cc -o myclient myclient.c stdsoap2.c soapC.c soapClient.c\n+Depending on your system configuration, such as with Unix, linking with -\n+lsocket, -lxnet, and -lnsl may be required.\n+The myclient.cpp file should include soapH.h and must include or define a\n+global namespace mapping table, unless #WITH_NONAMESPACES is used.\n+For examples of SOAP and REST client applications, see gsoap/samples in the\n+gSOAP source code package. The online getting-started guide covers example\n+client and server applications in C and C++, visit https://www.genivia.com/\n+dev.html to read more. Various examples ranging from simple calculator service\n+APIs to very large protocols spanning dozens of WSDLs can be found at https://\n+www.genivia.com/examples.html\n+To test client applications using an auto-generated echo test server, use\n+soapcpp2 -T option -T, see the next section. You can also test a client\n+application with the gSOAP Test_Messenger.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Generating a SOAP/XML Web service application with soapcpp2\n+After invoking the soapcpp2 tool on an interface header file description of a\n+service to generate soapStub, soapH.h, and soapC.cpp for the XML serializers,\n+and soapServer.cpp for the server skeleton functions, the service application\n+is compiled in C++ as follows:\n+ c++ -o myserver myserver.cpp stdsoap2.cpp soapC.cpp soapServer.cpp\n+For C we use soapcpp2 -c option -c to generate C source code that is compiled\n+with:\n+ cc -o myserver myserver.c stdsoap2.c soapC.c soapServer.c\n+Depending on your system configuration, such as with Unix, linking with -\n+lsocket, -lxnet, and -lnsl may be required.\n+The myserver.cpp file should include soapH.h and should include or define a\n+global namespace mapping table, unless #WITH_NONAMESPACES is used.\n+A gSOAP service can be installed as:\n+ * A simple stateless CGI application where the application just calls\n+ soap_serve to serve requests on standard input and output.\n+ * A FastCGI application, see Section FastCGI.\n+ * A stand-alone server, see Section How_to_create_a_stand-alone_server.\n+ * A stand-alone multi-threaded server, see Section How_to_create_a_multi-\n+ threaded_stand-alone_service.\n+ * An Apache module, see the gSOAP Apache_module documentation.\n+ * An ISAPI extension running in IIS, see the gSOAP ISAPI_extension\n+ documentation.\n+To test a service, see the gSOAP Test_Messenger.\n+Furthermore, an echo test server application soapTester.cpp is generated with\n+soapcpp2 -T option -T, which is a stand-alone iterative test server that echos\n+SOAP/XML requests and runs on the specified port. Compile this with:\n+ c++ -o testserver soapTester.cpp stdsoap2.cpp soapC.cpp soapServer.cpp\n+Then run on a port, say 8080:\n+ ./testServer 12288 8080\n+The 12288 value is a combination of the #SOAP_XML_INDENT (0x2000) and\n+#SOAP_XML_STRICT (0x1000) integer flag values (8192 + 4096 = 12288).\n+For examples of SOAP and REST Web service applications, see gsoap/samples in\n+the gSOAP source code package. The online getting-started guide covers example\n+client and server applications in C and C++, visit https://www.genivia.com/\n+dev.html to read more. Various examples ranging from simple calculator service\n+APIs to very large protocols spanning dozens of WSDLs can be found at https://\n+www.genivia.com/examples.html\n+\ud83d\udd1d Back_to_table_of_contents\n+ Generating an auto test server for client testing\n+The soapcpp2 -T option -T generates an echo test server application source code\n+soapTester.cpp, which is to be compiled and linked with the code generated for\n+a server implementation soapServer.cpp (or with the generated service class\n+file) and soapC.cpp. The feature also supports C source code, use the soapcpp2\n+-c -T options -c and -T to generate a C test server.\n+The echo test server can be used to test a client application, by the client\n+sending messages to the echo test server that echos responses back to the\n+client. These responses are structurally valid but may lack sufficient details\n+to consider the response messages useful.\n+The generated source code is compiled with:\n+c++ -o tester soapTester.cpp soapServer.cpp soapC.cpp stdsoap2.cpp\n+To run the tester auto-test service on a port to test a client against, use two\n+command-line arguments: the first argument is a combined integer of OR-ed\n+values of the context flags such as 12288 which is a combination of\n+#SOAP_XML_INDENT (0x1000 = 4096) and #SOAP_XML_STRICT (0x1000 = 8196) and the\n+second argument is the port number:\n+ ./tester 12288 8080\n+This starts an iterative stand-alone server on port 8080. Messages can be sent\n+to http://localhost:8080 to test a client application against the echo test\n+server. The data in the response messages are copied from the request messages\n+when possible, or XML default values, or empty otherwise.\n+More advanced servers for testing are available with the gSOAP Test Messenger\n+testmsgr tool to test SOAP and REST XML clients and servers.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Generating deep copy and deletion functions\n+The soapcpp2_-Ec_option_-Ec generates deep copy code for each serializable type\n+T declared in an interface header file for soapcpp2. The soapcpp2_-Ed_option_-\n+Ed generates deep deletion code.\n+For a serializable type T declared in the interface header file for soapcpp2,\n+option -Ec generates:\n+ * virtual T * T::soap_dup(struct soap*) const where T is a class, returns a\n+ duplicate of this object by deep copying, replicating all deep cycles and\n+ shared pointers when a managing soap context is provided as argument.\n+ Deep copy is a tree when argument is NULL, but the presence of deep\n+ cycles will lead to non-termination. Use flag SOAP_XML_TREE with the\n+ managing context to copy into a tree without cycles and pointers to\n+ shared objects.\n+ * T * soap_dup_T(struct soap*, T *dst, const T *src) where T is not a\n+ class, deep copy src into dst, replicating all deep cycles and shared\n+ pointers when a managing soap context is provided as argument. When dst\n+ is NULL, allocates space for dst and returns a pointer to the allocated\n+ copy. Deep copy results in a tree when the soap context is NULL, but the\n+ presence of deep cycles will lead to non-termination. Use flag\n+ SOAP_XML_TREE with managing context to copy into a tree without cycles\n+ and pointers to shared objects. Returns dst or allocated copy when dst is\n+ NULL.\n+For a serializable type T declared in the interface header file for soapcpp2,\n+option -Ed generates:\n+ * virtual void T::soap_del() const where T is a class, deletes all heap-\n+ allocated members of this object by deep deletion ONLY IF this object and\n+ all of its (deep) members are not managed by a soap context AND the deep\n+ structure is a tree (no cycles and co-referenced objects by way of\n+ multiple (non-smart) pointers pointing to the same data). Can be safely\n+ used after T::soap_dup(NULL) to delete the deep copy. Does not delete the\n+ object itself.\n+ * void soap_del_T(const T*) where T is not a class, deletes all heap-\n+ allocated members of this object by deep deletion ONLY IF this object and\n+ all of its (deep) members are not managed by a soap context AND the deep\n+ structure is a tree (no cycles and co-referenced objects by way of\n+ multiple (non-smart) pointers pointing to the same data). Can be safely\n+ used after soap_dup_T(NULL, NULL, const T*) to delete the deep copy\n+ returned. Does not delete the object itself.\n+For example:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+int main()\n+{\n+struct soap *soap = soap_new();\n+ns__record record; // a serializable type\n+ns__record rec_dup;\n+soap->recvfd = open(file, O_RDONLY);\n+if (soap->recvfd < 0)\n+... // error\n+if (soap_read_ns__record(soap, &record)) // deserialize from file into managed\n+memory\n+... // error\n+close(soap->recvfd);\n+soap_dup_ns__record(NULL, &rec_dup, &record); // deep copy the record to\n+unmanaged memory\n+soap_destroy(soap); // delete managed objects\n+soap_end(soap); // delete managed data and temporaries\n+soap_free(soap); // free the context\n+soap_del_ns__record(&rec_dup) // deep delete unmanaged record\n+}\n+\ud83d\udd1d Back_to_table_of_contents\n+ Serialization and deserialization rules\n+This section describes the serialization and deserialization of C and C++ data\n+types in XML, and therefore by implication in SOAP 1.1 and 1.2. First, the\n+difference between SOAP RPC encoding and document/literal style is explained\n+and how to switch between SOAP 1.1 and 1.2 or support both in applications.\n+Then the general XML representations of C/C++ data in XML and XML schema is\n+explained.\n+To obtain more information about the code generated by soapcpp2 for the data\n+types specified in an interface header file for soapcpp2, use soapcpp2 -\n+r option -r to generate a soapReadme.md report with all the details.\n+For additional details on serialization of data types in XML, see the C_and_C++\n+XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP RPC encoding versus document/literal style messaging\n+The serialization and deserialization rules is almost identical for these two\n+different styles, except for the following:\n+ * With SOAP RPC encoding, generic complexTypes with maxOccurs=\"unbounded\"\n+ are not allowed and SOAP-encoded arrays must be used instead.\n+ * XML attributes and unions (XML schema choice) are not allowed with SOAP\n+ RPC encoding.\n+ * In XML messages conforming to SOAP RPC encoding we often see xsi:type\n+ attributed messages although the xsi:type attribute is not required and\n+ the gSOAP engine does not produce xsi:type attributes unless required,\n+ e.g. to identify derived classes from base classes serialized. Use\n+ soapcpp2 -t option -t to force xsi:type attributes in the XML output.\n+ * In XML messages conforming to SOAP RPC encoding, multi-reference\n+ accessors using id-href/ref attributes are common to encode co-referenced\n+ data. By contrast, multi-referenced data is not accurately represented in\n+ document/literal style, which means that data structure graphs cannot be\n+ accurately serialized. Document/literal is strictly \"tree shaped\".\n+The soapcpp2 tool uses SOAP 1.1 document/literal style by default. Use the //\n+gsoap directives to control the SOAP protocol version and messaging style, see\n+Section Directives, or use soapcpp2 options -2 (SOAP 1.2), -e (encoding style),\n+and -t (add xsi:type attributes).\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP 1.1 versus SOAP 1.2 and dynamic switching\n+SOAP 1.1 is the default protocol. SOAP 1.2 support is automatically turned on\n+when the appropriate SOAP 1.2 namespace is used in the WSDL input to wsdl2h,\n+which then generates #import \"soap12.h\" in the interface header file:\n+#import \"soap12.h\"\n+This interface header file when input to soapcpp2 results in a XML namespace\n+mapping table with SOAP 1.2 namespaces:\n+struct Namespace namespaces[] =\n+{\n+{ \"SOAP-ENV\", \"http://www.w3.org/2003/05/soap-envelope\" },\n+{ \"SOAP-ENC\", \"http://www.w3.org/2003/05/soap-encoding\" },\n+... //\n+{ NULL, NULL }\n+}\n+The soapcpp2-generated default SOAP 1.1 namespace table allow for dynamic\n+switching between SOAP 1.1 to SOAP 1.2 by providing the SOAP 1.2 namespace as a\n+pattern in the third column of a namespace table:\n+struct Namespace namespaces[] =\n+{\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\", \"http://www.w3.org/\n+*/soap-encoding\" },\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\", \"http://www.w3.org/\n+*/soap-envelope\" },\n+... //\n+{ NULL, NULL }\n+}\n+where the * in the third column of the namespace URI pattern is a wildcard for\n+any sequence of character. This is used to match inbound xmlns XML namespace\n+bindings that are then associated with the prefix in the table. For example,\n+when the inbound XML contains a xmlsn:soap=\"http://www.w3.org/2003/05/soap-\n+envelope\" binding then the soap prefix used in the inbound XML is actually\n+equivalent to SOAP-ENV used in gSOAP as determined by the matching pattern in\n+the third column of the XML namespace table shown above.\n+In this way, gSOAP Web services can respond to both SOAP 1.1 or SOAP 1.2\n+requests. Moreover, the gSOAP engine will automatically return a SOAP 1.2\n+message response to a SOAP 1.2 message request when the XML namespace table\n+shown above is used. This works by using the specified pattern in the third\n+column, when it matches the namespace URI of the inbound XML request message of\n+course. However, the use of SOAP 1.1 or 1.2 is overridden for one or more\n+service operations with the //gsoap service method-protocol:\n+directive.\n+A gSOAP client that sends a request message will always send it using the SOAP\n+protocol specified by the namespace in the second column, unless this is\n+overridden with a //gsoap service method-protocol: directive.\n+To make the XML namespace table available to the developer, the soapcpp2 tool\n+generates a .nsmap file with the SOAP-ENV and SOAP-ENC namespaces and patterns\n+as shown in the example above.\n+To use SOAP 1.2 by default and accept SOAP 1.1 messages to be received, use the\n+soapcpp2 -2 option -2 to generate SOAP 1.2 .nsmap and .wsdl files.\n+Alternatively, add the following line to your interface header file (generated\n+by wsdl2h) for soapcpp2:\n+#import \"soap12.h\"\n+The soap12.h file is located in gsoap/import.\n+ Warning\n+ SOAP 1.2 does not support SOAP \"partially transmitted arrays\". So the\n+ __offset member of a dynamic array is meaningless in SOAP 1.2.\n+ SOAP 1.2 uses SOAP_ENV__Code, SOAP_ENV__Reason, and SOAP_ENV__Detail\n+ members of a SOAP_ENV__Fault fault struct, while SOAP 1.1 uses faultcode,\n+ faultstring, and detail members.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Primitive type serialization\n+The default encoding rules for primitive C and C++ data types in XML are given\n+in the table below:\n+C/C++ type XSD type\n+bool xsd:boolean\n+char and int8_t xsd:byte\n+short and int16_t xsd:short\n+int, long, and int32_t xsd:int\n+LONG64, long long and int64_t xsd:long\n+unsigned char and uint8_t xsd:unsignedByte\n+unsigned short and uint16_t xsd:unsignedShort\n+unsigned int, unsigned long and uint32_t xsd:unsignedInt\n+ULONG64, long long, and uint64_t xsd:unsignedLong\n+float xsd:float\n+double xsd:double\n+long double xsd:decimal with #import \"custom/\n+ long_double.h\"\n+time_t xsd:dateTime\n+struct tm xsd:dateTime with #import \"custom/\n+ struct_tm.h\"\n+struct timeval xsd:dateTime with #import \"custom/\n+ struct_timeval.h\"\n+char*, const char*, and std::string xsd:string\n+wchar_t*, const wchar_t*, and std::wstring xsd:string\n+Enumerations and bit masks are also supported, see Section Enumeration\n+serialization .\n+Custom serializers for long double, struct tm, and struct timeval and many\n+other specialized C and C++ types are available, see the C_and_C++_XML_Data\n+Bindings documentation for details.\n+The previous table shows how C/C++ primitive types are mapped to XSD types. To\n+define and use the full range of XSD types is done with typedefs to define\n+namespace-qualified types in C/C++ corresponding to the XSD types (or to any\n+schema type for that matter).\n+XSD types such as xsd:positiveInteger, xsd:anyURI, and xsd:date for which no\n+built-in data structures in C and C++ exist can always be represented by\n+strings and some can be represented by integers or floats. Validation\n+constraints can be added to validate the XSD type values as explained further\n+below.\n+A typedef in an interface header file for soapcpp2 declares a schema type name.\n+The soapcpp2 tool interprets typedef declarations the same way as a regular C\n+compiler interprets them. However, the soapcpp2 tool also uses the type name\n+when generating WSDLs and XSD files and in xsi:type attributes when present.\n+For example, the declaration:\n+typedef uint64_t xsd__positiveInteger;\n+creates a named type xsd__positiveInteger represented by ulong64_t and\n+serialized as XSD type xsd:positiveInteger.\n+The built-in primitive and derived numerical XSD types are listed below\n+together with their recommended typedef declarations. Note that the SOAP\n+encoding schemas for primitive types are derived from the built-in XML Schema\n+types, so SOAP_ENC__ can be used as a namespace prefix instead of xsd__.\n+However, the use of SOAP_ENC XML types is obsolete and redundant because XSD\n+primitive types can be used instead.\n+Other XSD types not mentioned in this section, such as gYearMonth, gYear,\n+gMonthDay, gDay, xsd:gMonth, QName, NOTATION, etc., can be encoded similarly\n+using a typedef declaration with a string type.\n+For additional in-depth details, see the C_and_C++_XML_Data_Bindings\n+documentation.\n+ xsd:anyURI\n+Represents a Uniform Resource Identifier Reference (URI). Each URI scheme\n+imposes specialized syntax rules for URIs in that scheme, including\n+restrictions on the syntax of allowed fragment identifiers. It is recommended\n+to use strings to store xsd:anyURI XML Schema types. The recommended type\n+declaration is:\n+typedef char *xsd__anyURI;\n+or\n+typedef std::string xsd__anyURI;\n+ xsd:base64Binary\n+Represents Base64-encoded arbitrary binary data. For using the xsd:base64Binary\n+XSD type, the use of the base64Binary representation of a dynamic array is\n+strongly recommended, see Section base64Binary_serialization . However, the\n+type can also be declared as a string and the encoding will be string-based:\n+typedef char *xsd__base64Binary;\n+or\n+typedef std::string xsd__base64Binary;\n+However, it is the responsibility of the application to make sure the string\n+content is according to the Base64 Content-Transfer-Encoding defined in Section\n+6.8 of RFC 2045. Better is to use the base64 serializer that serializes binary\n+data as xsd:base64Binary:\n+struct xsd__base64Binary\n+{\n+unsigned char *__ptr; // point to data to serialize\n+int __size; // length of the data to serialize\n+};\n+ xsd:boolean\n+For declaring an xsd:boolean XSD type, the use of a bool is recommended in C++.\n+For C, see Section Boolean_enumeration_serialization_for_C . The corresponding\n+type declaration is:\n+typedef bool xsd__boolean;\n+ xsd:byte\n+Represents a byte (-128...127). The corresponding type declaration is:\n+typedef char xsd__byte;\n+ xsd:dateTime\n+Represents a date and time. The lexical representation is according to the ISO\n+8601 extended format CCYY-MM-DDThh:mm:ss where \"CC\" represents the century,\n+\"YY\" the year, \"MM\" the month and \"DD\" the day, preceded by an optional leading\n+\"-\" sign to indicate a negative number. If the sign is omitted, \"+\" is assumed.\n+The letter \"T\" is the date/time separator and \"hh\", \"mm\", \"ss\" represent hour,\n+minute and second respectively. It is recommended to use the time_t type to\n+store xsd:dateTime XSD types and the type declaration is:\n+typedef time_t xsd__dateTime;\n+However, note that calendar times before the year 1902 or after the year 2037\n+cannot be represented. Upon receiving a date outside this range, the time_t\n+value will be set to -1. Also strings can be used to store xsd:dateTime types:\n+typedef char *xsd__dateTime;\n+Best is to use a custom serializer struct tm, struct timeval, or std::chrono::\n+system_clock::time_point defined by gsoap/custom/struct_tm.h, gsoap/custom/\n+struct_timeval.h, and gsoap/custom/chrono_timepoint.h to represent xsd:dateTime\n+accurately.\n+ xsd:date\n+Represents a date. The lexical representation for date is the reduced (right\n+truncated) lexical representation for dateTime: CCYY-MM-DD. It is recommended\n+to use strings (char*) to store xsd:date XSD types. The type declaration is:\n+typedef char *xsd__date;\n+Best is to use a custom serializer struct tm defined by gsoap/custom/\n+struct_tm_date.h to represent xsd:date accurately.\n+ xsd:decimal\n+Represents arbitrary precision decimal numbers. It is recommended to use the\n+{double} type to store xsd:decimal XSD types and the type declaration is:\n+typedef double xsd__decimal;\n+Better is to use a custom serializer gsoap/custom/long_double.h to represent\n+xsd:decimal or a string to avoid losing accuracy of very large numbers.\n+ xsd:double\n+Corresponds to the IEEE double-precision 64-bit floating point type. The type\n+declaration is:\n+typedef double xsd__double;\n+ xsd:duration\n+Represents a duration of time. The lexical representation for duration is the\n+ISO 8601 extended format PnYn MnDTnH nMnS, where nY represents the number of\n+years, nM the number of months, nD the number of days, T is the date/time\n+separator, nH the number of hours, nM the number of minutes and nS the number\n+of seconds. The number of seconds can include decimal digits to arbitrary\n+precision. It is recommended to use strings (char*) to store xsd:duration XSD\n+types. The type declaration is:\n+typedef char *xsd__duration;\n+Better is to use a custom serializer gsoap/custom/duration.h or gsoap/custom/\n+chrono_duration.h to represent xsd:duration or a string to avoid losing\n+accuracy of very large numbers.\n+ xsd:float\n+Corresponds to the IEEE single-precision 32-bit floating point type. The type\n+declaration is:\n+typedef float xsd__float;\n+ xsd:hexBinary\n+Represents arbitrary hex-encoded binary data. It has a lexical representation\n+where each binary octet is encoded as a character tuple, consisting of two\n+hexadecimal digits ([0-9a-fA-F]) representing the octet code. For example,\n+\"0FB7\" is a hex encoding for the 16-bit integer 4023 (binary representation is\n+111110110111. For using the xsd:hexBinary XSD type, the use of the hexBinary\n+representation of a dynamic array is strongly recommended, see Section\n+hexBinary_serialization . However, the type can also be declared as a string\n+and the encoding will be string-based:\n+typedef char *xsd__hexBinary;\n+or\n+typedef std::string xsd__hexBinary;\n+However, it is the responsibility of the application to make sure the string\n+content is hex formatted. Better is to use the hex serializer that serializes\n+binary data as xsd:hexBinary:\n+struct xsd__hexBinary\n+{\n+unsigned char *__ptr; // point to data to serialize\n+int __size; // length of the data to serialize\n+};\n+ xsd:int\n+Corresponds to a 32-bit integer in the range -2147483648 to 2147483647.\n+typedef int xsd__int;\n+ xsd:integer\n+Corresponds to an unbounded integer. C/C++ does not support unbounded integers\n+as a standard feature. The recommended type declaration is:\n+typedef int64_t xsd__integer;\n+Another possibility is to use strings to represent unbounded integers and do\n+the translation in the application itself.\n+ xsd:long\n+Corresponds to a 64-bit integer in the range -9223372036854775808 to\n+9223372036854775807. The type declaration is:\n+typedef int64_t xsd__long;\n+ xsd:negativeInteger\n+Corresponds to a negative unbounded integer. C/C++ does not support unbounded\n+integers as a standard feature. The recommended type declaration is:\n+typedef int64_t xsd__negativeInteger : -1 ;\n+Another possibility is to use strings to represent unbounded integers and do\n+the translation in the application itself.\n+ xsd:nonNegativeInteger\n+Corresponds to a non-negative unbounded integer. Since C++ does not support\n+unbounded integers as a standard feature, the recommended type declaration is:\n+typedef uint64_t xsd__nonNegativeInteger 0 : ;\n+Another possibility is to use strings to represent unbounded integers and do\n+the translation in the application itself.\n+ xsd:nonPositiveInteger\n+Corresponds to a non-positive unbounded integer. Since C++ does not support\n+unbounded integers as a standard feature, the recommended type declaration is:\n+typedef int64_t xsd__nonPositiveInteger : 0 ;\n+Another possibility is to use strings to represent unbounded integers and do\n+the translation in code.\n+ xsd:normalizedString\n+Represents normalized character strings. Normalized character strings do not\n+contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters. It\n+is recommended to use strings to store xsd:normalizedString XSD types. The type\n+declaration is:\n+typedef char *xsd__normalizedString;\n+or\n+typedef std::string xsd__normalizedString;\n+ xsd:positiveInteger\n+Corresponds to a positive unbounded integer. C/C++ does not support unbounded\n+integers as a standard feature. The recommended type declaration is:\n+typedef uint64_t xsd__positiveInteger 1 : ;\n+Another possibility is to use strings to represent unbounded integers and do\n+the translation in the application itself.\n+ xsd:short\n+Corresponds to a 16-bit integer in the range -32768 to 32767. The type\n+declaration is:\n+typedef short xsd__short;\n+ xsd:string\n+Represents character strings. The type declaration is:\n+typedef char *xsd__string;\n+or\n+typedef std::string xsd__string;\n+The type declaration for wide character strings is:\n+typedef wchar_t *xsd__string;\n+or\n+typedef std::wstring xsd__string;\n+Both types of regular and wide strings can be used at the same time, by using a\n+typedef name with a trailing underscore as follows:\n+typedef wchar_t *xsd__string_;\n+or\n+typedef std::wstring xsd__string_;\n+ xsd:time\n+Represents a time. The lexical representation for time is the left truncated\n+lexical representation for dateTime: hh:mm:ss.sss with optional following time\n+zone indicator. It is recommended to use strings (char*) to store xsd:time XSD\n+types. The type declaration is:\n+typedef char *xsd__time;\n+or\n+typedef std::string xsd__time;\n+Better is to use a custom serializer gsoap/custom/long_time.h to represent xsd:\n+time or a string to avoid losing accuracy.\n+ xsd:token\n+Represents tokenized strings. Tokens are strings that do not contain the line\n+feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces\n+(#x20) and that have no internal sequences of two or more spaces. It is\n+recommended to use strings to store xsd:token XSD types. The type declaration\n+is:\n+typedef char *xsd__token;\n+ xsd:unsignedByte\n+Corresponds to an 8-bit unsigned integer in the range 0 to 255. The type\n+declaration is:\n+typedef uint8_t xsd__unsignedByte;\n+ xsd:unsignedInt\n+Corresponds to a 32-bit unsigned integer in the range 0 to 4294967295. The type\n+declaration is:\n+typedef uint32_t xsd__unsignedInt;\n+ xsd:unsignedLong\n+Corresponds to a 64-bit unsigned integer in the range 0 to\n+18446744073709551615. The type declaration is:\n+typedef uint64_t xsd__unsignedLong;\n+ xsd:unsignedShort\n+Corresponds to a 16-bit unsigned integer in the range 0 to 65535. The type\n+declaration is:\n+typedef uint16_t xsd__unsignedShort;\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to use multiple C/C++ types for a single primitive XSD type\n+As explained in Section C/C++_identifier_name_to_XML_tag_name_translation,\n+trailing underscores in a type name are not relevant in XML and in the XML\n+schemas generated by soapcpp2. Therefore, we can map multiple C/C++ types to\n+XSD types (or any XML schema type). For example, the following declaration in\n+the interface header file for soapcpp2 permits us to use regular strings and\n+wide strings while mapping these both to the XSD xsd:string type:\n+typedef char *xsd__string;\n+typedef wchar_t *xsd__string_;\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to use C++ wrapper classes to specify polymorphic primitive types\n+XSD schema types form a hierarchy of types, with xsd:anyType at the root. A\n+container or array of xsd:anyType may actually contain any mix of types, i.e.\n+this container or array is polymorphic.\n+On the one hand, the typedef construct provides a convenient way to associate\n+existing C/C++ types with XML schema types and makes it easy to incorporate\n+these types in a (legacy) C/C++ application without having to replace\n+application types in the source code. On the other hand the typedef\n+declarations cannot be used to support polymorphic types.\n+To create a derivable primitive type T, a wrapper class is declared as follows:\n+class prefix__type_name : public xsd__super_type_name\n+{ public:\n+T __item;\n+... // other members, see note below\n+};\n+where T is a primitive C/C++ type. The __item member must be the first member\n+of the wrapper class and all other members are not serialized.\n+For example, the a large portion of the XML type hierarchy can be implemented\n+in C++ as follows:\n+class xsd__anyType { };\n+class xsd__anySimpleType : public xsd__anyType { };\n+typedef char *xsd__string;\n+class xsd__string_ : public xsd__anySimpleType { public: xsd__string __item; };\n+typedef xsd__string xsd__anyURI;\n+class xsd__anyURI_ : public xsd__anySimpleType { public: xsd__anyURI __item; };\n+typedef bool xsd__boolean;\n+class xsd__boolean_ : public xsd__anySimpleType { public: xsd__boolean __item;\n+};\n+typedef xsd__string xsd__date;\n+class xsd__date_ : public xsd__anySimpleType { public: xsd__date __item; };\n+typedef time_t xsd__dateTime;\n+class xsd__dateTime_ : public xsd__anySimpleType { public: xsd__dateTime\n+__item; };\n+typedef double xsd__double;\n+class xsd__double_ : public xsd__anySimpleType { public: xsd__double __item; };\n+typedef xsd__string xsd__duration;\n+class xsd__duration_ : public xsd__anySimpleType { public: xsd__duration\n+__item; };\n+typedef float xsd__float;\n+class xsd__float_ : public xsd__anySimpleType { public: xsd__float __item; };\n+typedef xsd__string xsd__time;\n+class xsd__time_ : public xsd__anySimpleType { public: xsd__time __item; };\n+typedef xsd__string xsd__decimal;\n+class xsd__decimal_ : public xsd__anySimpleType { public: xsd__decimal __item;\n+};\n+typedef xsd__string xsd__integer;\n+class xsd__integer_ : public xsd__decimal_ { public: xsd__integer __item; };\n+typedef LONG64 xsd__long;\n+class xsd__long_ : public xsd__integer_ { public: xsd__long __item; };\n+typedef long xsd__int;\n+class xsd__int_ : public xsd__long_ { public: xsd__int __item; };\n+typedef short xsd__short;\n+class xsd__short_ : public xsd__int_ { public: xsd__short __item; };\n+typedef char xsd__byte;\n+class xsd__byte_ : public xsd__short_ { public: xsd__byte __item; };\n+typedef xsd__string xsd__nonPositiveInteger;\n+class xsd__nonPositiveInteger_ : public xsd__integer_ { public:\n+xsd__nonPositiveInteger __item; };\n+typedef xsd__string xsd__negativeInteger;\n+class xsd__negativeInteger_ : public xsd__nonPositiveInteger_ { public:\n+xsd__negativeInteger __item; };\n+typedef xsd__string xsd__nonNegativeInteger;\n+class xsd__nonNegativeInteger_ : public xsd__integer_ { public:\n+xsd__nonNegativeInteger __item; };\n+typedef xsd__string xsd__positiveInteger;\n+class xsd__positiveInteger_ : public xsd__nonNegativeInteger_ { public:\n+xsd__positiveInteger __item; };\n+typedef ULONG64 xsd__unsignedLong;\n+class xsd__unsignedLong_ : public xsd__nonNegativeInteger_ { public:\n+xsd__unsignedLong __item; };\n+typedef unsigned long xsd__unsignedInt;\n+class xsd__unsignedInt_ : public xsd__unsignedLong_ { public: xsd__unsignedInt\n+__item; };\n+typedef unsigned short xsd__unsignedShort;\n+class xsd__unsignedShort_ : public xsd__unsignedInt_ { public:\n+xsd__unsignedShort __item; };\n+typedef unsigned char xsd__unsignedByte;\n+class xsd__unsignedByte_ : public xsd__unsignedShort_ { public:\n+xsd__unsignedByte __item; };\n+typedef xsd__string xsd__normalizedString;\n+class xsd__normalizedString_ : public xsd__string_ { public:\n+xsd__normalizedString __item; };\n+typedef xsd__string xsd__token;\n+class xsd__token_ : public xsd__normalizedString_ { public: xsd__token __item;\n+};\n+Note the use of the trailing underscores for the class names to distinguish the\n+typedef type names from the class names. The char* type of xsd__string can be\n+replaced with std::string or a wide string type. We can also add the xsd:\n+base64Binary and xsd:hexBinary types that serialize raw binary data in the\n+hierarchy as follows:\n+class xsd__base64Binary : public xsd__anySimpleType { public: unsigned char\n+*__ptr; int __size; };\n+class xsd__hexBinary : public xsd__anySimpleType { public: unsigned char\n+*__ptr; int __size; };\n+See Sections base64Binary_serialization and hexBinary_serialization .\n+Methods can be added to these classes, such as constructors and getter/setter\n+methods, see Section Get_and_set_methods .\n+Wrapper structs are supported as well, similar to wrapper classes. But they\n+cannot be used to implement polymorphism. Rather, the wrapper structs are used\n+to represent a xsd:sequence of elements or to add attributes to primitive types\n+as explained in Section How_to_declare_XML_attributes .\n+For additional details, see the C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Multi-reference strings\n+If more than one char pointer points to the same string, the string is encoded\n+as a multi-reference value, unless #SOAP_XML_TREE is used or the #WITH_NOIDREF\n+compile-time flag.\n+Consider for example:\n+class ns__record\n+{ public:\n+const char *s;\n+const char *t;\n+};\n+A record instance is populated as follows and then serialized:\n+struct soap *soap = soap_new1(SOAP_XML_GRAPH);\n+ns__record record;\n+record.s = \"hello\";\n+record.t = s;\n+soap_write_ns__record(soap, &record);\n+The s and t variables are assigned the same string. When serialized, t refers\n+to the content of s:\n+\n+hello\n+\n+\n+However, strings declared with different typedef names will never be considered\n+multi-reference even when they point to the same string. For example:\n+typedef char *xsd__string;\n+typedef char *ns__string;\n+class ns__record\n+{ public:\n+const xsd__string s;\n+const ns__string t;\n+};\n+This avoids type conflicts when a receiver considers these types incompatible.\n+To enable multi-references in XML use #SOAP_XML_GRAPH. To disable multi-\n+references in SOAP 1.1 and 1.2 RPC encoded messages, use #SOAP_XML_TREE.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Smart string mixed-content deserialization\n+The implementation of string deserialization permits mixed content. When XML\n+contains mixed text and tags when a string is expected, the text with tags are\n+collected into the deserialized string.\n+For example, suppose the getInfo service operation returns some detailed\n+information. The service operation is declared as:\n+// Contents of file \"getInfo.h\":\n+getInfo(char *detail);\n+The proxy of the service is used by a client to request a piece of information\n+and the service responds with:\n+HTTP/1.1 200 OK\n+Content-Type: text/xml\n+Content-Length: nnn\n+\n+\n+\n+Mona Lisa by Leonardo da Vinci\n+\n+\n+\n+\n+The detail string will contain \"Mona Lisa by Leonardo da Vinci\".\n+Note that serialization of this string will not produce mixed content but\n+rather the XML output:\n+Mona Lisa by <i>Leonardo da Vinci</i>\n+To serialize XML stored in strings, use the _XML type (a char*) in the\n+interface header file for soapcpp2. For example:\n+// Contents of file \"getInfo.h\":\n+getInfo(_XML detail);\n+In C++ you can use a std::string instead, as follows:\n+// Contents of file \"getInfo.h\":\n+typedef std::string XML;\n+getInfo(XML detail);\n+The _XML and typedef XML are literal XML strings, see also Section Serializing\n+mixed_content_with_literal_XML_strings.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Changing the precision of float and double types\n+The format used to output double precision floating point values in XML is by\n+default set to \"`%.17lG`\", which means that at most 17 digits of precision are\n+output. The format used by the gSOAP engine to output single precision floating\n+point values is by default \"`%.9G`\".\n+The format of a double can be set by assigning a format string to soap::\n+double_format. For example:\n+struct soap soap;\n+soap_init(&soap); // sets double_format = \"%.18G\"\n+soap.double_format = \"%e\"; // redefine\n+soap::double_format\n+const char * double_format\n+User-definable double floating point format string (%.17lG by default, the\n+printed format should not ...\n+Definition: stdsoap2.h:4152\n+which causes all doubles to be output in XML and JSON in scientific notation.\n+Likewise, the encoding format of a float type can be set by assigning a format\n+string to the soap::float_format string variable. For example:\n+struct soap soap;\n+soap_init(&soap); // sets float_format = \"%.9G\"\n+soap.float_format = \"%.4f\"; // redefine\n+soap::float_format\n+const char * float_format\n+User-definable floating point format string (%.9G by default, the printed\n+format should not exceed 10...\n+Definition: stdsoap2.h:4138\n+which causes all floats to be output in XML and JSON with four digits\n+precision.\n+A new feature to specify format patterns was introduced in gSOAP 2.8.18. A\n+format string can be used as a pattern for a typedef float or double in the\n+interface header file for soapcpp2 to specify the representation in XML. For\n+example:\n+typedef float time__ratio \"%5.2f\";\n+This will output the float in XML with 5 digits total and 2 digits after the\n+decimal point.\n+The soapcpp2 tool also generates an XML schema with xsd:totalDigits and xsd:\n+fractionDigits for this type:\n+\n+\n+\n+\n+\n+\n+The wsdl2h tool converts WSDLs and XSDs with xsd:totalDigits and xsd:\n+fractionDigits to typedefs with format patterns.\n+\ud83d\udd1d Back_to_table_of_contents\n+ INF, -INF, and NaN values of float and double types\n+IEEE INF, -INF, and NaN values of floats are output in XML as INF, -INF, and\n+NaN, respectively, as supported by the XML schema standards.\n+For portability, the following macros can be used containing the float and\n+double values INF, -INF, and NaN:\n+float x = FLT_PINFTY;\n+float x = FLT_NINFTY;\n+float x = FLT_NAN;\n+double x = DBL_PINFTY;\n+double x = DBL_NINFT;\n+double x = DBL_NAN;\n+FLT_NINFTY\n+#define FLT_NINFTY\n+User-definable macro that represents a portable single floating point negative\n+infinite value (define...\n+Definition: stdsoap2.h:1297\n+FLT_NAN\n+#define FLT_NAN\n+User-definable macro that represents a portable single floating point NaN value\n+(defined by default t...\n+Definition: stdsoap2.h:1291\n+DBL_NAN\n+#define DBL_NAN\n+User-definable macro that represents a portable double floating point NaN value\n+(defined by default t...\n+Definition: stdsoap2.h:1300\n+DBL_PINFTY\n+#define DBL_PINFTY\n+User-definable macro that represents a portable double floating point positive\n+infinite value (define...\n+Definition: stdsoap2.h:1303\n+FLT_PINFTY\n+#define FLT_PINFTY\n+User-definable macro that represents a portable single floating point positive\n+infinite value (define...\n+Definition: stdsoap2.h:1294\n+To check for INF, -INF, and NaN use:\n+soap_isinf(x) && x > 0 // x is INF\n+soap_isinf(x) && x < 0 // x is -INF\n+soap_isnan(x) // x is NaN\n+soap_isnan\n+#define soap_isnan(x)\n+Macro that returns true if the floating point value is NaN.\n+Definition: stdsoap2.h:1309\n+soap_isinf\n+#define soap_isinf(x)\n+Macro that returns true if the floating point value is infinity.\n+Definition: stdsoap2.h:1312\n+\ud83d\udd1d Back_to_table_of_contents\n+ Enumeration serialization\n+Enumerations are generally useful for the declaration of named integer-valued\n+constants.\n+For additional details, see the C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Serialization of symbolic enumeration constants\n+The soapcpp2 tool encodes the constants of enumeration-typed variables in\n+symbolic form using the names of the constants when possible to comply to\n+SOAP's enumeration encoding style. Consider for example the following\n+enumeration of weekdays:\n+enum weekday { Mon, Tue, Wed, Thu, Fri, Sat, Sun };\n+The enumeration-constant Mon, for example, is encoded as\n+Mon\n+An XML namespace prefix can be specified as part of the enumeration-type\n+identifier's name, with the usual namespace prefix conventions for identifiers.\n+For example:\n+enum ns__weekday { Mon, Tue, Wed, Thu, Fri, Sat, Sun };\n+The ns__weekday type with enumeration-constant Sat, for example, is output in\n+XML as:\n+Sat\n+The corresponding XML schema type for this enumeration type is:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+C++11 scoped enumerations are supported by soapcpp2 with option -c++11:\n+enum class ns__weekday : int { Mon, Tue, Wed, Thu, Fri, Sat, Sun };\n+Enumeration constants can be initialized, for example:\n+enum ns__relation { LESS = -1, EQUAL = 0, GREATER = 1 };\n+The symbolic names LESS, EQUAL, and GREATER will appear in the XML output.\n+If the value of an enumeration-typed variable has no corresponding named\n+constant, the value is encoded as a signed integer literal. For example, the\n+following declaration of a workday enumeration type lacks named constants for\n+Saturday and Sunday:\n+enum ns__workday { Mon, Tue, Wed, Thu, Fri };\n+If the constant 5 (Saturday) or 6 (Sunday) is assigned to a variable of the\n+workday enumeration type, the variable will be encoded with the integer\n+literals 5 and 6, respectively. For example:\n+5\n+Since this is legal in C/C++ and in SOAP RPC encoding, but not XML validators,\n+we cam transmit integer literals as well as enumeration constants with an\n+enumeration type.\n+When enumeration constants are numeric, we can use the following simple trick:\n+enum ns__nums { _1 = 1, _2 = 2, _3 = 3 };\n+The corresponding XML schema type for this enumeration type is:\n+\n+\n+\n+\n+\n+\n+\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to reuse symbolic enumeration constants\n+A well-known deficiency of C and C++ enumeration types before C++11 scoped\n+enumerations is the lack of a mechanism to reuse symbolic names by multiple\n+enumerations. This issue is largely resolved with scoped enumerations in C++11,\n+which the soapcpp2 tool supports.\n+In plain C and C++ we can use trailing underscores to avoid name clashes, for\n+example:\n+Consider for example:\n+enum ns__workday { Mon, Tue, Wed, Thu, Fri };\n+enum ns__weekday { Mon_, Tue_, Wed_, Thu_, Fri_, Sat_, Sun_ };\n+which will result in the encoding of the constants of enum ns__weekday without\n+the underscore, for example as Mon.\n+However, the soapcpp2 tool is a bit smarter than your average C/C++ compiler\n+and also permits the following declarations that reuse enumeration constants,\n+because the enumeration constants have the same enumerating integer values:\n+enum ns__workday { Mon, Tue, Wed, Thu, Fri };\n+enum ns__weekday { Mon, Tue, Wed, Thu, Fri, Sat, Sun };\n+The soapcpp2 tool generates soapStub.h with amended enumeration definitions\n+that the C/C++ compiler can handle, so you can still use the shared enumeration\n+constants in your application code.\n+To avoid name clashes with enumeration constants, you can use the following\n+convention with double underscores to add the enum name to the enum constants:\n+enum prefix__name { prefix__name__enumconst1, prefix__name__enumconst2, ... };\n+where the type name of the enumeration prefix__name is a prefixed name, such\n+as:\n+enum ns__workday {\n+ns__workday__Mon,\n+ns__workday__Tue,\n+ns__workday__Wed,\n+ns__workday__Thu,\n+ns__workday__Fri\n+};\n+enum ns__weekday {\n+ns__workday__Mon,\n+ns__workday__Tue,\n+ns__workday__Wed,\n+ns__workday__Thu,\n+ns__workday__Fri,\n+ns__workday__Sat,\n+ns__workday__Sun\n+};\n+This ensures that the XML schema enumeration values are still simply Mon, Tue,\n+Wed, Thu, Fri, Sat, and Sun.\n+ Warning\n+ The following declaration:\n+ enum ns__workday { Mon, Tue, Wed, Thu, Fri };\n+ enum ns__weekday { Sat = 5, Sun = 6};\n+ will not properly encode the weekday enumeration when you assume that\n+ workdays are part of weekdays, because it lacks the named constants for\n+ workday in its enumeration list. All enumerations must be self-contained\n+ and cannot use enum constants of other enumerations.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Boolean enumeration serialization for C\n+The C++ bool type that is serialized as xsd:boolean XSD type cannot be used in\n+C. Instead, an enumeration type should be used to serialize true and false\n+values as xsd:boolean XSD type values. The xsd:boolean XSD type is defined as\n+an enumeration in C as:\n+enum xsd__boolean { false_, true_ };\n+The value false_, for example, is output in XML as:\n+false\n+Peculiar of the SOAP encoding boolean type is that it only defines the values 0\n+and 1, while the XSD xsd:boolean type defines false and true as valid values.\n+While SOAP encoding types are rarely used since almost all SOAP/XML Web\n+services rely on XSD types for primitive values, we can still define the\n+following:\n+typedef int SOAP_ENC__boolean;\n+\ud83d\udd1d Back_to_table_of_contents\n+ Bitmask enumeration serialization\n+A bitmask is an enumeration of power-of-two flags. The soapcpp2 tool makes it\n+easy to define bitmasks using an annotated enum with a *:\n+enum * name { enum-constant, enum-constant, ... };\n+This declares a regular enum but enumerates the enumeration constants as a\n+series of powers of 2 starting with 1. This means that the enumeration\n+constants can be bitwise or-ed with the | operator to form a bitvector\n+(bitmask) which is serialized in XML as a list of symbolic values. For example:\n+enum * ns__machineStatus { ON, BELT, VALVE, HATCH};\n+int ns__setMachineStatus(enum ns__machineStatus status, enum ns__machineStatus\n+*result);\n+Note that the use of the enum name as a parameter does not require the\n+asterisk, only the definition does. The soapcpp2 tool generates a proper C/C++\n+enumeration in soapStub.h that is included by soapH.h by your application:\n+enum ns__machineStatus { ON=1, BELT=2, VALVE=4, HATCH=8 };\n+The corresponding XML schema type for this enumeration type is:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+The values of enum ns__machineStatus can be or-ed, for example ON|VALVE is\n+output in XML as:\n+ON VALVE\n+C++11 scoped enumerations for bitmasks are supported by soapcpp2, for example:\n+enum * class ns__machineStatus { ON, BELT, VALVE, HATCH};\n+int ns__setMachineStatus(ns__machineStatus status, ns__machineStatus *result);\n+\ud83d\udd1d Back_to_table_of_contents\n+ Struct and class serialization\n+This section gives a brief overview of struct and class serialization.\n+Structs do not support inheritance when declared in an interface header file\n+for soapcpp2. This makes serialization of structs is more efficient compared to\n+classes. Serialization functions for structs are global functions. By contrast,\n+soapcpp2 augments classes with serialization methods and soap_type() method\n+that returns the type of the class instance, which is necessary to distinguish\n+base class instances from derived class instances for (smart) pointers to base\n+class instances.\n+For additional details not covered here, see the C_and_C++_XML_Data_Bindings\n+documentation.\n+A class and struct instance is serialized as an XML element with attributes and\n+sub-elements, which is represented in XML schema as a complexType. The class\n+name is the XML schema type name and the member variables of the class are the\n+type's accessors.\n+Consider the general declaration of an inherited class:\n+class prefix__class_name1 : public prefix__class_name2\n+{ public:\n+field1;\n+field2;\n+... // more fields\n+method1;\n+method2;\n+... // more methods\n+};\n+then\n+ * prefix__ is the optional namespace prefix associated with the class.\n+ * class_name1 is the name of the complexType for this class.\n+ * class_name2 is an optional base class.\n+ * field is a member variable that is serialized when public and non-const.\n+ * method is a method declaration. Abstract methods are not allowed for\n+ serializable classes.\n+A class name is required to be unique and cannot have the same name as a\n+struct, enum, or a service operation name specified in the interface header\n+file for soapcpp2.\n+Only single inheritance is supported by the soapcpp2 tool. Multiple inheritance\n+is not supported because of the limitations of the XML schema extensibility.\n+If a constructor is present, there must also be a constructor declaration with\n+an empty parameter list. If no constructors are present, then soapcpp2\n+generates constructors to initialize the members with the generated\n+soap_default method of this class.\n+To obtain more information about the code generated by soapcpp2 for a struct or\n+class, use soapcpp2 -r option -r to generate a soapReadme.md report with all\n+the details.\n+Classes and structs may be declared volatile if you don't want soapcpp2 to\n+generate the class definition, see Section Serialization_\"as_is\"_of_volatile\n+data_types for more details.\n+Class templates are supported with only one template argument, see Section STL\n+containers .\n+Member variables of a class can be serialized as XML attributes using the @\n+type qualifier, if the member is a primitive type or pointer to a primitive\n+type. See Section How_to_declare_XML_attributes for more details.\n+See Section C/C++_identifier_name_to_XML_tag_name_translation for more details\n+on the struct/class member serialization and the resulting element and\n+attribute qualified forms.\n+Arrays may be embedded within a class and a struct using a pointer member and\n+size information, see Section Non-SOAP_dynamic_arrays .\n+Void pointers may be used in a class or a struct, but you have to add a type\n+field so the engine can determine the type of object pointed to, see Section\n+Void_pointer_serialization .\n+A class instance is output in XML as:\n+\n+...\n+...\n+...\n+...\n+...\n+...\n+\n+where the field accessors have element-name representations of the class\n+members and the basefield accessors have element-name representations of the\n+base class members.\n+If a derived class instance is used in place of a base class instance, then the\n+serialized XML form carries a xsi:type attribute with the derived class type to\n+distinguish it from the base class type:\n+\n+...\n+...\n+...\n+...\n+...\n+...\n+\n+The deserialization of a class instance allows any ordering of the accessors in\n+the XML message. However, if a base class member name is identical to a derived\n+class member name, because the member is overloaded, the base class member name\n+must precede the derived class member name in the XML message.\n+For additional details, see the C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+The following example declares a base class ns__Object and a derived class\n+ns__Shape:\n+// Contents of file \"shape.h\":\n+class ns__Object\n+{ public:\n+@ char *name;\n+};\n+class ns__Shape : public ns__Object\n+{ public:\n+@ int sides;\n+@ enum ns__Color { Red, Green, Blue } color;\n+std::string description;\n+ns__Shape();\n+ns__Shape(int sides, enum ns__Color color, std::string& description);\n+~ns__Shape();\n+};\n+The implementation of the class ns__Shape methods cannot be part of the\n+interface header file for soapcpp2 and are defined in a separate shape.cpp C++\n+source code file.\n+An instance of class ns__Shape with name Triangle, 3 sides, and color Green is\n+output in XML as:\n+\n+This is a green triangle\n+\n+\ud83d\udd1d Back_to_table_of_contents\n+ Class methods\n+A class declaration in the interface header file for soapcpp2 may include\n+method declarations. The method implementations must not be part of the header\n+file but should be defined in another C++ source file, because soapcpp2 parses\n+C/C++ type declarations but does not parse C/C++ code statements and\n+constructor initializer lists.\n+If constructors are not defined, then soapcpp2 generates constructors for the\n+class to initialize the class with default values for member variables or the\n+initialization values for member variables given in the class declaration.\n+If destructors are not defined, then soapcpp2 generates destructors for the\n+class.\n+To obtain more information about the code generated by soapcpp2 for a class,\n+use soapcpp2 -r option -r to generate a soapReadme.md report with all the\n+details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Get and set methods\n+Setter and getter methods are invoked at run time upon serialization and\n+deserialization of class instances, respectively. The use of setter and getter\n+methods adds more flexibility to the serialization and deserialization process.\n+A setter method is called by the serializer. You can use setter methods to\n+update a class instance just before it is serialized. For example, you can use\n+setter methods to update a class instance right before serialization. Setters\n+are methods for \"set to serialize\" operations.\n+Getter methods are immediately invoked after deserialization of a class\n+instance. You can use them to adjust the contents of class instances right\n+after the instance was populated by the deserializer\n+Getter and setter methods have the following class method signature:\n+int get(struct soap *soap);\n+int set(struct soap *soap);\n+These methods may be declared virtual and may be declared const.\n+The active soap context will be passed to the get and set methods. The methods\n+should return #SOAP_OK when successful. A setter method should prepare the\n+contents of the class instance for serialization. A getter method should\n+process the instance after deserialization.\n+Here is an example of a base64 binary class:\n+class xsd__base64Binary\n+{ public:\n+unsigned char *__ptr;\n+int __size;\n+int get(struct soap *soap);\n+int set(struct soap *soap);\n+};\n+Suppose that the type and options members of the attachment should be set when\n+the class is about to be serialized. This can be accomplished with the set\n+method from the information provided by the __ptr to the data and the soap\n+context passed to the set method (you can pass data via the void* soap::user\n+member).\n+The get method is invoked after the base64 data has been processed. You can use\n+it for post-processing purposes.\n+Here is another example. It defines a primitive update type. The class is a\n+wrapper for the time_t type, see Section How_to_use_C++_wrapper_classes_to\n+specify_polymorphic_primitive_types . Therefore, elements of this type contain\n+xsd:dateType data.\n+class update\n+{ public:\n+time_t __item;\n+int set(struct soap *soap);\n+};\n+The setter method assigns the current time just before the instance is\n+serialized:\n+int update::set(struct soap *soap)\n+{\n+this->__item = time(NULL);\n+return SOAP_OK;\n+}\n+This means that serialization in XML results in the inclusion of an up-to-date\n+time stamp.\n+A get method is invoked immediately after the instance is populated by the\n+deserializer. The method is not invoked when the element is an xsi:nil element\n+or has a SOAP href or ref attribute referencing a value located elsewhere in\n+the XML message or document.\n+ Note\n+ The soap_out method of a class calls the setter method However, the\n+ soap_out method is declared const while the setter should be allowed to\n+ modify the contents of the class instance. Therefore, the soapcpp2-\n+ generated code recasts the instance and the const is removed when\n+ invoking the setter.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Updating and checking instances with get and set methods\n+Getter methods enable streaming XML operations. A getter method is invoked when\n+the object is deserialized and the rest of the XML message has not been parsed\n+yet. For example, you can add a getter method to the SOAP Header class to\n+implement header processing logic that is activated as soon as the SOAP Header\n+is received. An example is shown below:\n+class h__Authentication\n+{ public:\n+char *id;\n+int get(struct soap *soap);\n+};\n+class SOAP_ENV__Header\n+{ public:\n+h__Authentication *h__authentication;\n+};\n+The Authentication SOAP Header member is instantiated and decoded. After\n+decoding, the getter method is invoked, which can be used to check the id\n+before the rest of the SOAP message is parsed.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Polymorphism, derived types, and dynamic binding in C++\n+Polymorphism through C++ inheritance is supported by the gSOAP tools, which\n+means that derived XML schema types are (de)serialized when an xsi:type\n+attribute is present.\n+Because C does not support inheritance, a different approach is use for C code,\n+see Section Polymorphism,_derived_types,_and_dynamic_binding_in_C for details.\n+Base and derived C++ classes can be used anywhere, including service operation\n+parameters and in struct and class members, provided that parameters and\n+members are pointers to classes to allow dynamic binding at run time. Base and\n+derived classes can also be used with containers such as std::vector and smart\n+pointers such as std::shared_ptr.\n+The following example interface header file for soapcpp2 declares ns__Base and\n+ns__Derived classes and a service operation that takes a pointer to a ns__Base\n+class instance and returns a ns__Base class instance:\n+// Contents of file \"derived.h\"\n+class ns__Base\n+{ public:\n+char *name;\n+ns__Base();\n+virtual void print();\n+};\n+class ns__Derived : public ns__Base\n+{ public:\n+int num;\n+ns__Derived();\n+virtual void print();\n+};\n+int ns__webmethod(ns__Base *in, struct ns__webmethodResponse { ns__Base *out; }\n+& result);\n+The service operation input parameter may point to a ns__Derived class instance\n+that will be serialized as ns__Derived class instance instead of a ns__Base\n+class instance. Likewise, the service operation output parameter that is placed\n+in a wrapper struct (because structs and classes are always considered wrappers\n+to define the response message with output parameters) may point to a\n+ns__Derived class instance.\n+The ns__Base and ns__Derived class method implementations are:\n+// Method implementations of the ns__Base and ns__Derived classes:\n+#include \"soapH.h\"\n+ns__Base::ns__Base()\n+{\n+std::cout << \"created a Base class instance\" << std::endl;\n+}\n+ns__Derived::ns__Derived()\n+{\n+std::cout << \"created a Derived class instance\" << std::endl;\n+}\n+ns__Base::print()\n+{\n+std::cout << \"print(): Base class instance \" << name << std::endl;\n+}\n+ns__Derived::print()\n+{\n+std::cout << \"print(): Derived class instance \" << name << \" \" << num << std::\n+endl;\n+}\n+Below is an example client application that creates a ns__Derived class\n+instance that is passed as the input parameter of the ns__webmethod service\n+operation:\n+// CLIENT\n+#include \"soapH.h\"\n+int main()\n+{\n+struct soap soap;\n+soap_init(&soap);\n+ns__Derived obj;\n+struct ns__webmethodResponse r;\n+soap_default_ns__Derived(&soap, &obj);\n+obj.name = \"X\";\n+obj.num = 3;\n+if (soap_call_ns__webmethod(&soap, endpoint, NULL, &obj, r) == SOAP_OK)\n+if (r.out)\n+r.out->print();\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+The following example server application copies a class instance (ns__Base or\n+ns__Derived) from the input to the output parameter:\n+// SERVER\n+#include \"soapH.h\"\n+int main()\n+{\n+struct soap soap;\n+soap_init(&soap);\n+soap_serve(&soap);\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+int ns__webmethod(struct soap *soap, ns__Base *in, struct ns__webmethodResponse\n+&result)\n+{\n+if (in)\n+in->print();\n+result.out = in;\n+return SOAP_OK;\n+}\n+The following messages are produced by the client and server applications:\n+CLIENT: created a Derived class instance\n+SERVER: print(): Derived class instance X 3\n+CLIENT: created a Derived class instance\n+CLIENT: print(): Derived class instance X 3\n+This shows that the Derived class instance kept its identity as it passed\n+through the server.\n+Another way to serialize polymorphic values in XML that are indicated with xsi:\n+type attributes is with void* members that point to a serializable value. See\n+Section Void_pointer_serialization for details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Polymorphism, derived types, and dynamic binding in C\n+Because C does not support object-oriented inheritance, derived types are\n+obviously not declared as base structs or classes as in C++. Instead, we add\n+the derived type structs to the base structs as members that point to the\n+derived type value when the base type is dynamically overridden by one of the\n+derived types. In this way we can (de)serialize a base type struct as usual or\n+one of the derived structs when the base type is overridden. To serialize a\n+derived type struct in place of the base struct, we set its corresponding\n+member point to the derived struct value, which is serialized with the xsi:type\n+attribute to indicate a derived type is used in XML. Deserialization of a\n+derived type struct is done automatically when the xsi:type attribute is\n+present.\n+This approach with additional members pointing to derived types was introduced\n+with gSOAP 2.8.75. This approach has the benefit of type safety compared to\n+attempts to replicate C++ inheritance by trying to overlay derived types with\n+base types in memory, which would be fragile.\n+This method is fully automated for the wsdl2h tool to generate an interface\n+header file for soapcpp2 with the type derivations in C. To use this method to\n+generate code from WSDLs and XSDs, use wsdl2h_-F_option_-F. This also works in\n+C++, but C++ inheritance works fine without this method.\n+Using this method with soapcpp2 alone using a manually-specified interface\n+header file produces the specified type inheritance in the soapcpp2-generated\n+WSDL and XML schema files as complexType extensions.\n+The soapcpp2 tool warns if a derived type has multiple base types. At most one\n+base type for a derived type may be specified.\n+To illustrate this method, consider the following interface header file example\n+for soapcpp2 based on Polymorphism,_derived_types,_and_dynamic_binding_in_C++.\n+This example declares ns__Base and ns__Derived structs and a service operation\n+that takes a pointer to a ns__Base value and returns a ns__Base value:\n+// Contents of file \"derived.h\"\n+struct ns__Base\n+{\n+char *name;\n+[ struct ns__Derived *ns__Derived; ] // points to derived type when non-NULL\n+};\n+struct ns__Derived\n+{\n+char *name;\n+int num;\n+};\n+int ns__webmethod(struct ns__Base *in, struct ns__webmethodResponse { struct\n+ns__Base *out; } *result);\n+The ns__Base struct includes the special member ns__Derived that points to a\n+ns__Derived value. This special member must be:\n+ * a transient member (i.e. non-serializable) by placing the declaration\n+ within [ and ], and\n+ * the member name must match the type name (to be more precise, at least\n+ the initial part of the member name must match the type name as in the\n+ example ns__Derived_ works too).\n+To serialize the ns__Base value make sure to set the ns__Derived member to\n+NULL. The soapcpp2-generated soap_default_ns__Base() function default\n+initializes a given ns__Base value for you. To serialize the ns__Derived value\n+make sure to set the ns__Derived member to point to the address of a\n+ns__Derived value. This is easy by calling soap_new_ns__Derived() that\n+allocates and default initializes a ns__Derived value, whose address is\n+returned by this function.\n+When multiple derived types are declared for a base type, all immediately\n+derived struct types are added as transient pointer members to the base type.\n+Indirectly derived types do not need to be added to the base type as members,\n+but it is perfectly fine to do so.\n+To properly declare derived types, make sure to include all base type members\n+in the derived type. In our example the ns__Derived struct contains the\n+ns__Base struct members (except for the ns__Derived member) and adds additional\n+members as extensions.\n+Below is an example client application based on the example in Section\n+Polymorphism,_derived_types,_and_dynamic_binding_in_C++ that creates a\n+ns__Derived value that is passed as the input parameter of the ns__webmethod\n+service operation:\n+// CLIENT\n+#include \"soapH.h\"\n+int main()\n+{\n+struct soap soap;\n+soap_init(&soap);\n+struct ns__Base obj;\n+struct ns__Derived der;\n+struct ns__webmethodResponse r;\n+soap_default_ns__Base(&soap, &obj);\n+soap_default_ns__Derived(&soap, &der);\n+obj.ns__Derived = &der;\n+der.name = \"X\";\n+der.num = 3;\n+if (soap_call_ns__webmethod(&soap, endpoint, NULL, &obj, &r) == SOAP_OK)\n+{\n+if (r->out && r.out->ns__Derived)\n+printf(\"print(): Derived class instance %s %d\\n\",\n+r.out->ns__Derived->name,\n+r.out->ns__Derived->num);\n+else if (r->out)\n+printf(\"print(): Base class instance %s\\n\",\n+r.out->name);\n+}\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+The following example server application copies a class instance (ns__Base or\n+ns__Derived class) from the input to the output parameter:\n+// SERVER\n+#include \"soapH.h\"\n+int main()\n+{\n+struct soap soap;\n+soap_init(&soap);\n+soap_serve(&soap);\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+int ns__webmethod(struct soap *soap, struct ns__Base *in, struct\n+ns__webmethodResponse *result)\n+{\n+if (in && in->ns__Derived)\n+printf(\"print(): Derived class instance %s %d\\n\",\n+in->ns__Derived->name,\n+in->ns__Derived->num);\n+else if (in)\n+printf(\"print(): ns__Base class instance %s\\n\",\n+in->name);\n+result.out = in;\n+return SOAP_OK;\n+}\n+The following messages are produced by the client and server applications:\n+SERVER: print(): Derived class instance X 3\n+CLIENT: print(): Derived class instance X 3\n+This shows that the Derived class instance kept its identity as it passed\n+through the server.\n+Another way to serialize polymorphic values in XML that are indicated with xsi:\n+type attributes is with void* members that point to a serializable value. See\n+Void_pointer_serialization for details.\n+Deeper levels of simulated inheritance are possible, for example:\n+// Contents of file \"derived.h\"\n+struct ns__Base\n+{\n+char *name;\n+[ struct ns__Derived *ns__Derived; ] // points to derived type when non-NULL\n+};\n+struct ns__Derived\n+{\n+char *name;\n+int num;\n+[ struct ns__Derived2 *ns__Derived2; ] // points to derived type when non-NULL\n+};\n+struct ns__Derived2\n+{\n+char *name;\n+int num;\n+char *value;\n+};\n+int ns__webmethod(struct ns__Base *in, struct ns__webmethodResponse { struct\n+ns__Base *out; } *result);\n+This requires two pointer traversals from the base type ns__Base via\n+ns__Derived to reach ns__Derived2:\n+int ns__webmethod(struct soap *soap, struct ns__Base *in, struct\n+ns__webmethodResponse *result)\n+{\n+if (in && in->ns__Derived && in->ns__Derived->ns__Derived2)\n+printf(\"print(): Derived2 class instance %s %d %s\\n\",\n+in->ns__Derived->ns__Derived2->name,\n+in->ns__Derived->ns__Derived2->num,\n+in->ns__Derived->ns__Derived2->value);\n+else if (in && in->ns__Derived)\n+printf(\"print(): Derived class instance %s %d\\n\",\n+in->ns__Derived->name,\n+in->ns__Derived->num);\n+else if (in)\n+printf(\"print(): ns__Base class instance %s\\n\",\n+in->name);\n+result.out = in;\n+return SOAP_OK;\n+}\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to declare XML attributes\n+The gSOAP tools support the full XML schema standards, so XML attributes are\n+nothing special. However, with respect to SOAP standards it is important to\n+note that SOAP RPC/literal and SOAP document/literal styles support XML\n+attributes in SOAP messages, but SOAP RPC with \"Section 5\" encoding does not\n+support XML attributes other than some built-in attributes.\n+The idea behind SOAP RPC Section 5 encoding was to keep SOAP as simple as\n+possible as a limited subset of XML, while offering advantages for cross-\n+language interoperability of data types, including data structure graph\n+serialization with multi-referenced data.\n+Attributes are primitive XSD types, such as strings, enumerations, boolean, and\n+numeric types. To declare an XML attribute in a struct or class, the qualifier\n+@ is used with the type of the attribute. The type must be primitive type or a\n+pointer to a primitive type, including enumerations and xsd__base64Binary and\n+xsd__hexBinary structures. For example:\n+typedef char *xsd__string;\n+typedef bool *xsd__boolean;\n+enum ns__state { _0, _1, _2 };\n+struct ns__myStruct\n+{\n+@ std::string *type;\n+@ bool flag = false;\n+@ enum ns__state state = _2;\n+struct ns__myStruct *next;\n+};\n+The @ qualifier declares an XML attribute for the type, flag, and state\n+members.\n+Default values can be associated with any member that has a primitive type in a\n+struct or class, as is illustrated in this example. The default values are used\n+when the receiving message does not contain the corresponding values.\n+Pointers make the members optional. So type is an optional attribute.\n+Because a service operation request and response message is essentially a\n+struct, XML attributes can also be associated with method requests and\n+responses. For example:\n+int ns__webmethod(@ char *ns__name, ...);\n+Attributes can also be attached to the dynamic arrays, binary types, and\n+wrapper classes and structs of primitive types. Wrapper classes are described\n+in Section How_to_use_C++_wrapper_classes_to_specify_polymorphic_primitive\n+types . For example:\n+class xsd__string\n+{ public:\n+char * __item;\n+@ bool flag;\n+};\n+and\n+class xsd__base64Binary\n+{ public:\n+unsigned char *__ptr;\n+int __size;\n+@ bool flag;\n+};\n+The attribute declarations must be placed after the special __item, __ptr, and\n+__size members.\n+For additional details, see the C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to use QName attributes and elements\n+An element or attribute with type QName (Qualified Name) contains a namespace\n+prefix and a local name. We can explicitly declare a QName as a string type\n+with typedef char *xsd__QName and the serializer recognizes the QName type as a\n+special type that requires QName normalization. A built-in QName type _QName is\n+recognized by soapcpp2, which is a char* type with QName content.\n+QName normalization by the deserializer is applied to convert the prefix in the\n+inbound XML message to the corresponding prefix defined in the XML namespace\n+table, which means that the QName string is always received in normalized form.\n+For example:\n+//gsoap ns schema namespace: urn:example\n+typedef char *xsd__QName;\n+struct ns__myStruct\n+{\n+xsd__QName elt = \"ns:xyz\"; // QName element with default value \"ns:xyz\"\n+@ xsd__QName att = \"ns:abc\"; // QName attribute with default value \"ns:abc\"\n+};\n+When the elt and att members are serialized, their string contents are just\n+output. When the members are deserialized however, the deserializer converts\n+the prefix in the parsed QName to the prefix defined in the namespace table\n+that corresponds to the same namespace URI. For example, suppose that the\n+inbound XML message contains x:def. The prefix\n+x matches the namespace URI urn:example of prefix ns as declared by the //gsoap\n+ns schema namespace: urn:example directive, which populates the namespace table\n+ns.nsmap generated by soapcpp2. Therefore, the x:def QName value is converted\n+to ns:def and saved in the elt member of ns__myStruct.\n+If the namespace URI used in the inbound XML message is not in the namespace\n+table, for example when x:def is parsed, then x:def\n+is converted to \"URI\":def where \"URI\" is the namespace URI bound to x, which is\n+\"urn:x\" in this case. This value \"urn:x\":defis saved in the elt member of\n+ns__myStruct.\n+For additional details, see the C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Union serialization\n+A union is only serialized if the union is used within a struct or class\n+declaration that includes an int __union member that acts as a selector (also\n+called discriminant) for the union members. The selector stores run-time usage\n+information about the union member that is activated.\n+A union within a struct or class with a selector member represents xsd:choice\n+XML schema component. For example:\n+struct ns__PO\n+{\n+... // members of ns__PO\n+};\n+struct ns__Invoice\n+{\n+... // members of ns__Invoice\n+};\n+union ns__PO_or_Invoice\n+{\n+struct ns__PO po;\n+struct ns__Invoice invoice;\n+};\n+struct ns__composite\n+{\n+char *name;\n+int __union;\n+union ns__PO_or_Invoice value;\n+};\n+The union ns__PO_or_Invoice appears as a xsd:choice in the generated XML\n+schema:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+The union name should be qualified, as shown in the example, to ensure correct\n+serialization when the XML schemas is declared with\n+elementFormDefault=\"qualified\", with //gsoap ns schema elementForm: qualified.\n+The int __union member selector's values are generated by the soapcpp2 tool.\n+Each union member name has a selector value defined by:\n+SOAP_UNION_unionname_fieldname\n+These selector values enumerate the union members. The special value 0 (or any\n+negative value) can be assigned to omit the serialization of the union\n+altogether, but only if explicitly allowed by validation rules, which requires\n+minOccurs=\"0\" for the xsd:choice:\n+struct ns__composite\n+{\n+char *name;\n+int __union 0; // declares \n+union ns__PO_or_Invoice value;\n+};\n+This way we can treat the union as an optional data item by setting __union =\n+0.\n+Since 2.7.16 it is also possible to use a '$' as a special marker to annotate a\n+selector member that must be of type int and the member name can be chosen\n+arbitrarily:\n+struct ns__composite\n+{\n+char *name;\n+$ int select 0; // declares \n+union ns__PO_or_Invoice value;\n+};\n+The following example shows how the struct ns__composite instance is\n+initialized for serialization using the above declaration:\n+struct ns__composite data;\n+data.name = \"...\";\n+data.select = SOAP_UNION_ns__PO_or_Invoice_po; // select ns__PO_or_Invoice::po\n+union member\n+data.value.po.number = ...; // populate the PO\n+While the gSOAP serializers are designed to be robust, failing to set the\n+selector to a valid union member can lead to a crash of the serializer, because\n+it will attempt to serialize an invalid union member.\n+The deserializer of a union type sets the selector value to the currently\n+active union member that was deserialized. The selector will be set to a non-\n+positive value (0 or -1) when no union member was deserialized, if permitted by\n+the validator, where -1 indicates that a member was required by validation\n+rules, if the validator was non-strict. Strict validation enabled with\n+#SOAP_XML_STRICT results in a validation fault in this case.\n+When more than one union is used in a struct or class, the __union selectors\n+should use $ to identify them and named to avoid name clashes, for example:\n+struct ns__composite\n+{\n+char *name;\n+$ int sel_value; // = SOAP_UNION_ns__PO_or_Invoice_[po|invoice]\n+union ns__PO_or_Invoice value;\n+$ int sel_data; // = SOAP_UNION_ns__Email_or_Fax_[email|fax]\n+union ns__Email_or_Fax data;\n+};\n+For additional details, see the C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Pointer type serialization\n+Basically, the serialization of a pointer amounts to the serialization of the\n+data pointed to. However, if more than one pointer points to a node in a data\n+structure to serialize, the node is either duplicated in the serialized output\n+meaning the data is serialized as a tree, or the node is output only once in\n+the serialized output meaning that the data is serialized as a graph. The\n+latter is referred to as multi-reference encoding in SOAP 1.1/1.2 RPC encoding\n+style. This style ensures that data structures maintain their structural\n+integrity when transmitted, as intended by the true meaning of serialization.\n+The #SOAP_XML_GRAPH runtime flag can be used with plain non-SOAP XML to achieve\n+the same.\n+To achieve this, the gSOAP serializers for SOAP RPC encoding and the\n+#SOAP_XML_GRAPH flag check for multi-referenced data in the data structure to\n+serialize, i.e. the data nodes that are co-referenced by other nodes, by adding\n+id-ref/href attributes to the XML output that refer to the co-referenced data.\n+The soapcpp2 tool generates serializers that perform this check automatically\n+on C/C++ pointers and smart pointers, such as std::shared_ptr. Furthermore, the\n+soapcpp2 tool generates serializers that prevent infinite serialization when a\n+cyclic data structure is serialized as a tree, by breaking the cycles, when\n+using the SOAP document/literal style or when #SOAP_XML_TREE is enabled with\n+the SOAP RPC encoding style.\n+For additional details on the use of C/C++ pointers and smart pointers, see the\n+C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Multi-referenced data serialization\n+A node in the data structure that is pointed to by more than one pointer is\n+serialized as multi-reference data when the SOAP RPC encoding style is used or\n+when #SOAP_XML_GRAPH is enabled. This means that co-referenced data is\n+identified in XML with a unique id attribute. References in XML are made with\n+href (SOAP 1.1 RPC encoding), SOAP-ENC:ref (SOAP 1.2 RPC encoding), or ref\n+(#SOAP_XML_GRAPH) attributes to refer to the co-referenced data. See Section\n+Run-time_flags on options to control the serialization of multi-reference data.\n+To turn multi-ref off, use #SOAP_XML_TREE to process plain tree-based XML. To\n+completely eliminate multi-ref serialization use the #WITH_NOIDREF compile-time\n+flag with all source code (including gsoap/stdsoap2.c and gsoap/stdsoap2.cpp)\n+to permanently disable id-href processing.\n+Consider for example the following a linked list data structure:\n+typedef char *xsd__string;\n+struct ns__list\n+{\n+xsd__string value;\n+struct ns__list *next;\n+};\n+Suppose a cyclic linked list is created. The first node contains the value\n+\"abc\" and points to a node with value \"def\" which in turn points to the first\n+node. This is encoded as:\n+\n+\n+\n+In case multi-referenced data is received that \"does not fit in a pointer-based\n+structure\", the data is copied. For example, the following two structs are\n+similar, except that the first uses pointer-based members while the other uses\n+non-pointer-based members:\n+typedef long xsd__int;\n+struct ns__record\n+{\n+xsd__int *a;\n+xsd__int *b;\n+} P;\n+struct ns__record\n+{\n+xsd__int a;\n+xsd__int b;\n+} R;\n+int main()\n+{\n+P.a = &n;\n+P.b = &n;\n+... //\n+}\n+Since both a and b members of P point to the same integer, the serialization of\n+P produces a multi-reference in SOAP 1.1 RPC encoding:\n+\n+\n+\n+\n+123\n+The deserialization of the content in the R data structure that does not use\n+pointers to integers results in a copy of each multi-reference integer. Note\n+that the two structs resemble the same XML data type because the trailing\n+underscore will be ignored in XML encoding and decoding.\n+\ud83d\udd1d Back_to_table_of_contents\n+ NULL pointers and nil elements\n+A NULL pointer is not serialized, unless the pointer member of a struct or\n+class is declared in the interface header file as nillable with nullptr or in\n+the unlikely case the pointer itself is pointed to by another pointer (but see\n+Section Run-time_flags to control the serialization of NULLs), for example:\n+struct X\n+{\n+int *p;\n+int **q;\n+int *r nullptr 1;\n+}\n+The types section of a WSDL description contains information on the\n+\"nillability\" of data, which is declared as nullptr members where the 1\n+indicates that the member is required (minOccurs and maxOccurs are 1 set with\n+1:1 or simply 1).\n+Suppose pointer q points to pointer p and suppose p and r are NULL. In that\n+case the X struct is serialized with #SOAP_XML_GRAPH as:\n+\n+

    \n+\n+\n+The deserializer reconstructs the struct X from this form of XML, thereby\n+preserving the integrity of the data structure serialized.\n+When the deserializer encounters an XML element that has a xsi:nil=\"true\"\n+attribute but the corresponding C/C++ data is not a pointer or reference, the\n+deserializer will terminate with a #SOAP_NULL fault when the #SOAP_XML_STRICT\n+flag is set.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Void pointer serialization\n+Void pointers (void*) cannot be serialized in XML because the type of data\n+referred to is untyped. To enable the serialization of void pointers that are\n+members of structs and classes, you can insert a int __type member right before\n+the void pointer member. The int __type member contains run time information on\n+the type of the data pointed to by void* member in a struct/class to enable the\n+serialization of this data. The int __type member is set to a SOAP_TYPE_T\n+value, where T is the name of a type. The soapcpp2 tool generates the\n+SOAP_TYPE_T definitions in soapH.h and uses them internally to uniquely\n+identify the type of each object. The type naming conventions outlined in\n+Section Serializing_C/C++_data_to_XML are used to determine the type name for\n+T. Values serialized in XML with this approach always carry the xsi:type\n+attribute in XML to indicate the type of content serialized.\n+Here is an example to illustrate the serialization of a void* member in a\n+struct/class:\n+struct ns__record\n+{\n+int __type; // the SOAP_TYPE_T pointed to by val\n+void *val; // serialize any type in element \n+};\n+The __type integer can be set to 0 at run time to omit the serialization of the\n+void pointer member.\n+The following example illustrates the initialization of myStruct with a void\n+pointer to an int:\n+struct ns__record S;\n+int n = 123;\n+S.val = (void*)&n;\n+S.__type = SOAP_TYPE_int;\n+The serialized output of S contains the integer in its val element:\n+\n+123\n+\n+The deserializer for ns__record will automatically set the __type field and\n+void pointer when deserializing the data, provided that the XML element val\n+carries the xsi:type attribute from which it can determine the type.\n+ Note\n+ when serializing strings via a void* member, the void* pointer must\n+ directly point to the string value rather than indirectly as with all\n+ other types. For example:\n+struct ns__record S;\n+S.val = (void*)\"Hello\";\n+S.__type = SOAP_TYPE_string;\n+This is the case for all string-based types, including types defined with\n+typedef char*.\n+You may use an arbitrary suffix with the __type members to handle multiple void\n+pointers in structs/classes. For example:\n+struct ns__record\n+{\n+int __typeOfp; // the SOAP_TYPE_T pointed to by p\n+void *p; // element

    \n+int __typeOfq; // the SOAP_TYPE_T pointed to by q\n+void *q; // element \n+};\n+Because service method parameters are stored within structs, you can use __type\n+and void* parameters to pass polymorphic arguments without having to define a\n+C++ class hierarchy (Section Polymorphism,_derived_types,_and_dynamic_binding\n+in_C++ ), provided that xsi:type attributes are present in the XML elements.\n+For example:\n+typedef char *xsd__string;\n+typedef int xsd__int;\n+typedef float xsd__float;\n+enum ns__status { on, off };\n+struct ns__widget\n+{\n+char *name;\n+int part;\n+};\n+int ns__webmethod(int __type, void *data, struct ns__webmethodResponse { int\n+__type; void *return_; } *out);\n+This method has a polymorphic input parameter data and a polymorphic output\n+parameter return_. The __type parameters can be one of SOAP_TYPE_xsd__string,\n+SOAP_TYPE_xsd__int, SOAP_TYPE_xsd__float, SOAP_TYPE_ns__status, or\n+SOAP_TYPE_ns__widget. The WSDL and XSD files produced by the soapcpp2 tool\n+declare the void* polymorphic members as xsd:anyType elements.\n+To declare a wrapper struct/class for void* pointers allows us to reuse this\n+mechanism when we use __self as a member name that refers to the current XML\n+element tag name:\n+struct __any\n+{\n+int __type; // the SOAP_TYPE_T pointed to by __self\n+void *__self; // serialize any type of content of the current element\n+};\n+struct ns__record\n+{\n+__any val;\n+};\n+The following example illustrates the initialization of __ns__record with a\n+void pointer to an int:\n+struct ns__record S;\n+int n = 123;\n+S.val.__item = (void*)&n;\n+S.val.__type = SOAP_TYPE_int;\n+The serialized output of S contains the integer:\n+\n+123\n+\n+\ud83d\udd1d Back_to_table_of_contents\n+ Fixed-size array serialization\n+Fixed size arrays are serialized as repetitions of item elements with the array\n+values in XML. Multi-dimensional fixed size arrays are serialized as nested\n+item elements, where the outer elements are arrays.\n+The serialization of fixed-size arrays supports the SOAP RPC encoding multi-\n+dimensional array format as well as partially transmitted and sparse array\n+formats standardized in SOAP 1.1 and 1.2.\n+For example:\n+// Contents of file \"fixed.h\":\n+struct Example\n+{\n+float a[3];\n+};\n+This specifies a fixed-size array part of the struct Example. The serialized\n+output of array a is:\n+\n+1.0\n+2.0\n+3.0\n+\n+Any deserialized items of an array that do not fit in the fixed size array,\n+i.e. are out of bounds, are ignored by the deserializer when the #SOAP_C_NOIOB\n+flag is set, otherwise #SOAP_IOB errors will be generated by the deserializer.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Dynamic array serialization\n+Dynamic arrays are much more flexible than fixed-size arrays. Dynamic arrays\n+declared in the interface header file for soapcpp2 are a special struct or\n+class or are part of a struct or class with a member pointing to an array of\n+elements and a member that stores the size of the array. Dynamic array\n+allocations are easy using the soapcpp-generated soap_new_T functions for type\n+T. This function is used to allocate an array of values which can then be\n+assigned to the pointer member of the struct/class that stores the array\n+pointer with its size.\n+To facilitate SOAP RPC encoding, SOAP-encoded arrays require special treatment.\n+SOAP-encoded arrays are single- or multi-dimensional arrays with bounds that\n+appear in XML. These arrays may also have offsets that differ from zero. The\n+intent of SOAP-encoded arrays is to replicate multi-dimensional arrays commonly\n+found in programming languages.\n+However, XML also provides a simple way to represent a sequence of values with\n+a sequence of XML elements. This differs from SOAP-encoded arrays in that SOAP-\n+encoded arrays are elements with nested item elements with values, though SOAP\n+deserializers may ignore the name of these elements when parsing XML as stated\n+in the SOAP specifications.\n+Both SOAP-encoded arrays and sequences of XML elements are supported in gSOAP,\n+using dynamic arrays and containers. The basics will be described next. For\n+additional details, see the C_and_C++_XML_Data_Bindings documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP-encoded array bounds\n+SOAP-encoded arrays use the SOAP-ENC:Array attribute in XML to identify the\n+array and the SOAP-ENC:arrayType attribute to identify the array dimensionality\n+and its size.\n+As a security measure to avoid denial of service attacks based on sending a\n+huge array size value using the SOAP-ENC:arrayType attribute, requiring the\n+allocation of large chunks of memory, the total number of array elements set by\n+the SOAP-ENC:arrayType attribute cannot exceed #SOAP_MAXARRAYSIZE, which is set\n+to 100000 by default. This limit is not a hard limit on the number of array\n+elements, but rather to avoid pre-allocating large arrays as stated. The hard\n+limit on the number of array elements received is soap::maxoccurs which is set\n+to #SOAP_MAXOCCURS by default. By contrast, the #SOAP_MAXARRAYSIZE limit only\n+negatively affects multi-dimensional arrays because the dimensionality of the\n+receiving array may be lost when the number of elements exceeds 100000. One-\n+dimensional arrays are not affected and populated after this limit by simply\n+deserializing the array elements received.\n+\ud83d\udd1d Back_to_table_of_contents\n+ One-dimensional dynamic SOAP-encoded arrays\n+A special form of struct or class is used to define one-dimensional dynamic\n+SOAP-encoded arrays in an interface header file for soapcpp2. Each array has a\n+pointer variable and a member that records the number of elements the pointer\n+points to in memory.\n+The general form of the struct or class declaration that contains a one-\n+dimensional dynamic SOAP-encoded array is:\n+struct array_name\n+{\n+Type *__ptr; // pointer to array of elements in memory\n+int __size; // number of elements pointed to\n+int __offset; // optional SOAP 1.1 array offset\n+... // anything that follows here will be ignored\n+};\n+where the array_name must be a non-qualified name and Type is the type for the\n+elements of the array. The __ptr member points to the array values and __size\n+is the array size. The __offset member specifies an optional array offset, when\n+nonzero, see Section One-dimensional_dynamic_SOAP-encoded_arrays_with_non-zero\n+offsets.\n+If the array_name is qualified with a namespace prefix then the array is not a\n+SOAP-encoded array but rather represents a sequence of XML elements, see\n+Section Non-SOAP_dynamic_arrays.\n+The soapcpp2-generated deserializer of a one-dimensional dynamic array can\n+deserialize partially transmitted and/or SOAP-encoded sparse arrays, and even\n+multi-dimensional arrays which will be collapsed into a one-dimensional array\n+with row-major ordering.\n+ Warning\n+ SOAP 1.2 does not support partially transmitted arrays and the __offset\n+ member of a dynamic array is ignored.\n+\ud83d\udd1d Back_to_table_of_contents\n+ One-dimensional dynamic SOAP-encoded arrays with non-zero offsets\n+The declaration of a dynamic array as described in Section One-dimensional\n+dynamic_SOAP-encoded_arrays may include an int __offset member. When set to an\n+integer value, the serializer of the dynamic array will use this member as the\n+start index of the array and the SOAP-encoded array offset attribute SOAP-ENC:\n+offset will appear in the XML message. Note that array offsets is a SOAP 1.1\n+specific feature which is not supported in SOAP 1.2.\n+For example, the following header file declares a numeric Vector class, which\n+is a dynamic array of floating point values with an index that starts at 1:\n+// Contents of file \"vector.h\":\n+class Vector\n+{ public:\n+float *__ptr;\n+int __size;\n+int __offset;\n+Vector();\n+Vector(struct soap *, int n);\n+float& operator[](int i);\n+struct soap *soap;\n+};\n+The implementations of the Vector methods are:\n+Vector::Vector()\n+{\n+this->soap_default(NULL);\n+}\n+Vector::Vector(struct soap *soap, int n)\n+{\n+this->soap = soap;\n+__ptr = soap_new_float(soap, n);\n+__size = n;\n+__offset = 1;\n+}\n+float& Vector::operator[](int i)\n+{\n+return __ptr[i - __offset];\n+}\n+An example program fragment that serializes a vector of 3 elements:\n+struct soap *soap = soap_new();\n+Vector v(soap, 3);\n+v[1] = 1.0;\n+v[2] = 2.0;\n+v[3] = 3.0;\n+soap_write_Vector(soap, &v);\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+The output is a partially transmitted array:\n+\n+1\n+2\n+3\n+\n+Note that xsd:float[4] is the type and shape of the encoded array, which starts\n+at offset 1 and therefore the element at 0 is omitted.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Nested one-dimensional dynamic SOAP-encoded arrays\n+One-dimensional SOAP-encoded dynamic arrays may be nested. For example, using\n+class Vector declared in the previous section, class Matrix is declared:\n+// Contents of file \"matrix.h\":\n+class Matrix\n+{ public:\n+Vector *__ptr;\n+int __size;\n+int __offset;\n+Matrix();\n+Matrix(struct soap *soap, int n, int m);\n+Vector& operator[](int i);\n+struct soap *soap;\n+};\n+The Matrix type is essentially an array of pointers to arrays which make up the\n+rows of a matrix. The serialization of the two-dimensional dynamic array in is\n+nested form in XML.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Multi-dimensional dynamic SOAP-encoded arrays\n+A special form of struct or class is used to define multi-dimensional dynamic\n+SOAP-encoded arrays. Each array has a pointer variable and a member that\n+records the number of elements per dimension. A K-dimensional array is declared\n+as:\n+struct array_name\n+{\n+Type *__ptr; // pointer to array of elements in memory\n+int __size[K]; // number of elements per dimension\n+int __offset[K]; // optional SOAP 1.1 array offset\n+... // anything that follows here will be ignored\n+};\n+where the array_name must be a non-qualified name and Type is the type for the\n+elements of the array. The __ptr member points to the array values. The __size\n+array specifies the number of array elements per dimension. The __offset array\n+specifies an optional offset per dimension.\n+For example, the following declaration specifies a matrix class:\n+class Matrix\n+{ public:\n+float *__ptr;\n+int __size[2];\n+int __offset[2];\n+};\n+By contrast to the matrix class of Section Nested_one-dimensional_dynamic_SOAP-\n+encoded_arrays that defines a matrix as an array of pointers to matrix rows,\n+this class has one pointer to a matrix stored in row-major order. The size of\n+the matrix is determined by the __size member: __size[0] holds the number of\n+rows and __size[1] holds the number of columns of the matrix. Likewise,\n+__offset[0] is the row offset and __offset[1] is the columns offset.\n+ Warning\n+ SOAP 1.2 does not support partially transmitted arrays and the __offset\n+ member of a dynamic array is ignored.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Non-SOAP dynamic arrays\n+An array is serialized as a sequence of XML elements. By contrast, a SOAP-\n+encoded array is serialized as an element with a sequence of sub-elements,\n+whose tag names are irrelevant to the SOAP processor, see One-dimensional\n+dynamic_SOAP-encoded_arrays.\n+An array is declared in an interface header file for soapcpp2 as a struct or\n+class with a name that is qualified with a namespace prefix. There are two\n+forms. The first form is similar to the SOAP-encoded array declaration that\n+wraps the __ptr and __size members:\n+struct prefix__array_name\n+{\n+Type *__ptr; // pointer to array of elements in memory\n+int __size; // number of elements pointed to\n+... // anything that follows here will be ignored\n+};\n+The second form is more generic, because the array can be declared anywhere in\n+the struct or class and multiple arrays can be used as members, each with a\n+__size member (__sizeName is also allowed) that precedes a pointer member:\n+struct prefix__array_name\n+{\n+... // other members that are serialized\n+int __size_of_array1; // number of elements pointed to\n+Type1 *array1; // pointer to array of elements in memory\n+... // other members that are serialized\n+int __size_of_array1; // number of elements pointed to\n+Type2 *array2; // pointer to array of elements in memory\n+... // other members that are serialized\n+};\n+The __size member should be an int type and cannot be a size_t type or other\n+integer type.\n+For example, we define a Map structure that contains a sequence of key-val\n+pairs:\n+struct ns__Map\n+{\n+int __size; // number of pairs\n+struct ns__Pair\n+{\n+char *key;\n+char *val;\n+} *pair; // array of pairs\n+};\n+Since 2.7.16 it is also possible to use a '$' as a special marker to annotate a\n+size member instead of requiring these members to start with __size:\n+struct ns__Map\n+{\n+$ int size; // number of pairs\n+struct ns__Pair\n+{\n+char *key;\n+char *val;\n+} *pair; // array of pairs\n+};\n+The array will be serialized in XML as a sequence of pairs:\n+\n+\n+Joe\n+555 77 1234\n+\n+\n+Susan\n+555 12 6725\n+\n+\n+Pete\n+555 99 4321\n+\n+\n+Deserialization is less efficient compared to a SOAP-encoded array, because the\n+size of the sequence is not part of the SOAP encoding. Buffering is used by the\n+deserializer to collect the elements in memory. When the end of the list is\n+reached, the buffered elements are copied to a newly allocated managed space on\n+the heap for the dynamic array.\n+Multiple arrays can be part of a struct or class. For example:\n+struct ns__Contact\n+{\n+char *firstName;\n+char *lastName;\n+$ int nPhones; // number of Phones\n+ULONG64 *phoneNumber; // array of phone numbers\n+$ int nEmails; // number of emails\n+char **emailAddress; // array of email addresses\n+};\n+The XML serialization of an example ns__Contact is:\n+\n+Joe\n+Smith\n+5551112222\n+5551234567\n+5552348901\n+Joe.Smith@mail.com\n+Joe@Smith.com\n+\n+For C++, a better alternative to arrays are containers, which are described\n+next.\n+\ud83d\udd1d Back_to_table_of_contents\n+ STL containers\n+The STL containers std::deque, std::list, std::set, and std::vector are\n+serializable in XML by the soapcpp2-generated serializers.\n+In order to use containers in an interface header file for soapcpp2, import\n+stldeque.h, stllist.h, stlset.h, or stlvector.h to enable std::deque, std::\n+list, std::set, and std::vector, respectively. For example:\n+#import \"stlvector.h\"\n+class ns__myClass\n+{ public:\n+std::vector number 1:10; // 1 to 10 numbers\n+std::vector *name 2; // more than 2 names\n+};\n+The use of pointer members such as for name shown above is possible, but not\n+required. Also minOccurs : maxOccurs and minOccurs length constraints can be\n+specified as shown in the example above. The XML schema that corresponds to the\n+ns__myClass type is:\n+\n+\n+\n+\n+\n+\n+You can also implement your own containers. The containers must be class\n+templates and should define a forward iterator type, and provide the following\n+methods:\n+ * void clear() empty the container;\n+ * iterator begin() return iterator to beginning;\n+ * const_iterator begin() const return const iterator to beginning;\n+ * iterator end() return iterator to end;\n+ * const_iterator end() const return const iterator to end;\n+ * size_t size() return size;\n+ * iterator insert(iterator pos, const_reference val) insert element.\n+The iterator should be a forward iterator with a dereference operator to access\n+the container's elements, it must be comparable (equal/unequal), and be pre-\n+incrementable (++it). The const iterator is used by its soapcpp2-generated\n+serializer to send a sequence of XML element values. The insert method is used\n+to populate a container with Container::iterator i = container.insert\n+(container.end(), val).\n+Here is in example container template class:\n+// simple_vector.h\n+template \n+class simple_vector\n+{ public:\n+typedef T value_type;\n+typedef value_type * pointer;\n+typedef const value_type * const_pointer;\n+typedef value_type & reference;\n+typedef const value_type & const_reference;\n+typedef pointer iterator;\n+typedef const_pointer const_iterator;\n+protected:\n+iterator head;\n+iterator tail;\n+size_t capacity;\n+public:\n+simple_vector() { head = tail = NULL; }\n+simple_vector(const simple_vector& v)\n+{ operator=(v); }\n+~simple_vector() { if (head) delete[] head; }\n+void clear() { tail = head; }\n+/* the member functions below are required for serialization of templates */\n+iterator begin() { return head; }\n+const_iterator begin() const { return head; }\n+iterator end() { return tail; }\n+const_iterator end() const { return tail; }\n+size_t size() const { return tail - head; }\n+iterator insert(iterator pos, const_reference val)\n+{\n+if (!head)\n+head = tail = new value_type[capacity = 1];\n+else if (tail >= head + capacity)\n+{\n+iterator i = head;\n+iterator j = new value_type[capacity *= 2];\n+iterator k = j;\n+while (i < tail)\n+*k++ = *i++;\n+if (pos)\n+pos = j + (pos - head);\n+tail = j + (tail - head);\n+delete[] head;\n+head = j;\n+}\n+if (pos && pos >= head && pos < tail)\n+{\n+iterator i = tail;\n+iterator j = i - 1;\n+while (j != pos)\n+*i-- = *j--;\n+*pos = val;\n+}\n+else\n+{\n+pos = tail;\n+*tail++ = val;\n+}\n+return pos;\n+}\n+simple_vector& operator=(const simple_vector& v)\n+{\n+head = tail = NULL;\n+capacity = v.capacity;\n+if (v.head)\n+{\n+head = tail = new value_type[capacity];\n+iterator i = v.head;\n+while (i != v.tail)\n+*tail++ = *i++;\n+}\n+return *this;\n+}\n+};\n+To enable the container, we add the following two lines to the interface header\n+file for soapcpp2:\n+#include \"simpleVector.h\"\n+template class simpleVector;\n+The container class itself should not be defined in the interface header file,\n+only the template declaration suffices for soapcpp2 to generate serializers.\n+Recall that the #include directives are not executed by soapcpp2 but simply\n+passed on to the generated source code. This include specifies in the generated\n+source code where the container is actually defined.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Polymorphic dynamic arrays and lists\n+Polymorphic arrays, that is, arrays of values of any type, can be serialized in\n+XML when declared as an array of pointers to a base class. For example:\n+class ns__Object\n+{ public:\n+... // members of ns__Object\n+};\n+class ns__Data : public ns__Object\n+{ public:\n+... // members of ns__Data\n+};\n+class ArrayOfObject\n+{ public:\n+ns__Object **__ptr; // pointer to array of pointers to base or derived objects\n+int __size; // size of the array\n+};\n+class ns__Objects\n+{ public:\n+std::vector objects; // vector of base or derived objects\n+};\n+The pointers in the array can point to the ns__Object base instances or\n+ns__Data derived instances, which will be serialized accordingly in XML.\n+Derived instances are indicated by xsi:type attribute in XML with the qualified\n+name of the class, to distinguish derived instances from the base instances.\n+Without this attribute the deserializer will not instantiate the derived\n+instance but a base instance since there is no identifying information to\n+distinguish the XML forms except for the xsi:type attribute.\n+Since we cannot use dynamic binding to support polymorphism in C, another\n+mechanism we can use is void pointers . Here is an example of a polymorphic\n+SOAP-encoded array ArrayOfObject and a non-SOAP dynamic array ns__Objects that\n+hold values of any serializable type:\n+struct __wrapper\n+{\n+int __type; // identify the type below by SOAP_TYPE_T\n+void *__item; // pointer to data of type T\n+};\n+struct ArrayOfObject\n+{\n+struct __wrapper *__ptr; // pointer to array\n+int __size; // size of the array\n+};\n+struct ns__Objects\n+{\n+int __size; // size of the array\n+struct __wrapper *objects; // pointer to array\n+};\n+This example uses an \"invisible\" type __wrapper and member __array, which start\n+with a double underscore. These names are never visible in serialized XML. The\n+__type member of __wrapper is a SOAP_TYPE_T value that identifies the type T\n+that __item points to, see Section Void_pointer_serialization.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to change the tag names of array item elements\n+The default XML element tag name for array elements is item, which can be\n+changed. The __ptr member in a struct or class of a dynamic array may have an\n+optional suffix part that specifies the name of the element tag in XML. That\n+is, the suffix is part of the __ptr member name:\n+Type *__ptrarray_elt_name\n+Consider for example:\n+struct ArrayOfstring\n+{\n+char* *__ptrstring;\n+int __size;\n+};\n+The array is serialized as:\n+\n+Hello\n+World\n+\n+SOAP 1.1/1.2 does not mandate a specific tag name for SOAP-encoded array\n+elements and the soapcpp2-generated serializers will ignore the name used to\n+itemize SOAP-encoded array values.\n+\ud83d\udd1d Back_to_table_of_contents\n+ base64Binary serialization\n+The base64Binary XSD type is introduced in an interface header file for\n+soapcpp2 using a struct or class that contains an array of unsigned char\n+values:\n+struct xsd__base64Binary\n+{\n+unsigned char *__ptr;\n+int __size;\n+};\n+The advantage of this struct or class is the ability to serializer raw binary\n+data from memory, since the soapcpp2-generated serializer converts the binary\n+data to/from base64 in XML.\n+To introduce a new XML schema type derived from base64Binary use the same\n+struct or class structure, but with another name. For example:\n+struct ns__binary\n+{\n+unsigned char *__ptr;\n+int __size;\n+};\n+The resulting XML schema type is:\n+\n+\n+\n+\n+\ud83d\udd1d Back_to_table_of_contents\n+ hexBinary serialization\n+The base64Binary XSD type is introduced in an interface header file for\n+soapcpp2 using a struct or class that contains an array of unsigned char\n+values:\n+struct xsd__hexBinary\n+{\n+unsigned char *__ptr;\n+int __size;\n+};\n+The advantage of this struct or class is the ability to serializer raw binary\n+data from memory, since the soapcpp2-generated serializer converts the binary\n+data to/from hexadecimal in XML.\n+If a binary type such as xsd__base64Binary is already defined, then we can\n+simply use a typedef to introduce the hex variant:\n+class xsd__base64Binary\n+{ public:\n+unsigned char *__ptr;\n+int __size;\n+};\n+typedef xsd__base64Binary xsd__hexBinary; // serializes into hex content\n+This lets soapcpp2 generate xsd:base64Binary and xsd:hexBinary serializers.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP RPC encoded versus document/literal style\n+SOAP has several styles:\n+ * SOAP RPC encoding uses XML that is restricted to SOAP structures to\n+ ensure programming-language interoperability. Not allowed are values\n+ serialized as XML attributes, arrays should be serialized as SOAP-encoded\n+ arrays instead of XML element repetitions (i.e. xsd:sequence\n+ maxOccurs=\"unbounded\" is not allowed), and xsd:choice components are not\n+ allowed. Multi-referenced elements are used to serialize data structure\n+ graphs. Because additional SOAP-encoding specific attributes are present\n+ that are not defined in the XML schema (of the WSDL), strict XML schema\n+ validators may reject SOAP-encoded content. The SOAP Body contains at\n+ most one service operation request element or at most one service\n+ operation response element and the encoding style is indicated with the\n+ SOAP-ENV:encodingStyle=\"...\" attribute in the SOAP Body or one or more of\n+ its sub-elements. This style is specified for the entire service declared\n+ under namespace prefix ns with:\n+ //gsoap ns service style: rpc\n+ //gsoap ns service encoding: encoded\n+ * SOAP document/literal uses XML constrained to the XML schema that defines\n+ the XML content. The serialization of tree-based data structures is\n+ accurate in XML. The serialization of digraph-shaped data structures\n+ results in the duplication of data nodes that are co-references. Cyclic\n+ data structures cannot be accurately serialized, but you can use\n+ #SOAP_XML_GRAPH to force the use of id-ref to accurately serialize\n+ digraphs and cyclic data structures. The SOAP Body may contain any number\n+ of XML elements, as if the SOAP Body is the root of an XML document. No\n+ SOAP-ENV:encodingStyle=\"...\" attribute should appear in literal content.\n+ This style is specified for the entire service declared under namespace\n+ prefix ns with:\n+ //gsoap ns service style: document\n+ //gsoap ns service encoding: literal\n+ * SOAP RPC literal also uses XML constrained to the XML schema that defines\n+ the XML content. The difference with document/literal is that the SOAP\n+ Body contains at most one service operation request element or at most\n+ one service operation response element. No SOAP-ENV:encodingStyle=\"...\"\n+ attribute should appear in literal content. This style is specified for\n+ the entire service declared under namespace prefix ns with:\n+ //gsoap ns service style: rpc\n+ //gsoap ns service encoding: literal\n+Besides //gsoap ns service style and //gsoap ns service encoding there are also\n+the service operation specific versions //gsoap ns service method-style, //\n+gsoap ns service method-response-style, //gsoap ns service method-encoding, and\n+//gsoap ns service method-response-encoding that explicitly specify SOAP RPC\n+encoded, document/literal, or RPC literal style messages for the indicated\n+service operation methods.\n+To enable SOAP RPC encoding for a particular service operation, use:\n+//gsoap ns service method-style: webmethod rpc\n+//gsoap ns service method-encoding: webmethod encoded\n+int ns__webmethod(...)\n+To enable SOAP RPC encoding for a particular service operation response, use:\n+//gsoap ns service method-response-style: webmethod rpc\n+//gsoap ns service method-response-encoding: webmethod encoded\n+int ns__webmethod(...)\n+Likewise, you can specify document/literal and RPC literal messages. The\n+default style is document/literal, unless soapcpp2 -e option -e is used to set\n+SOAP RPC encoding by default.\n+For the style directives you can specify rpc or document. For the encoding\n+directives you can specify literal, encoded, or even a custom URI that\n+indicates some custom or proprietary encoding format in XML which will not\n+interoperate with SOAP processors that are not compatible with the specified\n+encoding format. See also Section Directives.\n+See also C_and_C++_XML_data_bindings documentation for differences in XML\n+serialization when using the SOAP RPC encoded and document/literal messaging\n+styles.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Serializing mixed content with literal XML strings\n+XML is stored in \"literal\" XML strings which are the built-in _XML type that is\n+a regular char* string or you can declare a wide character string in an\n+interface header file for soapcpp2 as follows:\n+typedef wchar_t *XML;\n+To declare a C++ std::string literal XML type:\n+typedef std::string XML;\n+Or use a wide character string:\n+typedef std::wstring XML;\n+To use both at the same time:\n+typedef std::string XML;\n+typedef std::wstring XML_;\n+The differences between the use of regular 8-bit strings versus wide character\n+strings for XML documents are:\n+ * XML literal strings must hold UTF-8 XML content.\n+ * Wide character XML literal strings are converted to and from UTF-8.\n+\ud83d\udd1d Back_to_table_of_contents\n+ XML validation\n+Some XML validation constraints are not automatically verified unless\n+explicitly set using the #SOAP_XML_STRICT flag. SOAP RPC encoding is an XML\n+format that does not afford strict XML validation, because of the addition of\n+SOAP-specific attributes and other small deviations that will be detected by an\n+aggressive XML validator, leading the messaging failures. By toning XML\n+validation down, it helps to improve SOAP RPC encoding interoperability.\n+Strict validation constraints are enabled with the #SOAP_XML_STRICT mode flag\n+set, e.g. with soap_set_imode(soap, SOAP_XML_STRICT) or soap_new\n+(SOAP_XML_STRICT), see Section Run-time_flags for the complete list of flags.\n+The next sections describe the type of constraints validated when\n+#SOAP_XML_STRICT is enabled and validation constraints are specified in the\n+interface header file.\n+Use compiler flag #WITH_REPLACE_ILLEGAL_UTF8 to force strict UTF-8 text\n+conversions, which replaces invalid UTF-8 with U+FFFD.\n+See also C_and_C++_XML_data_bindings documentation for more details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Default values\n+Default values can be defined for optional elements and attributes, which means\n+that the default value will be used when the element or attribute value is not\n+present in the parsed XML. See also Section Default_values_for_omitted_XML\n+elements_and_attributes and examples in subsequent subsections below.\n+Default values must be primitive types, integer, float, string, etc. or\n+pointers to primitive types. Default values can be specified for struct and\n+class members, as shown in the example below:\n+struct ns__MyRecord\n+{\n+int n = 5; // optional element with default value 5\n+char *name = \"none\"; // optional element with default value \"none\"\n+@ enum ns__color { RED, WHITE, BLUE } color = RED; // optional attribute with\n+default value RED\n+};\n+Upon deserialization of absent data, these members will be set accordingly.\n+When classes are instantiated with soap_new_ClassName the instance will be\n+initialized with default values.\n+See also C_and_C++_XML_data_bindings documentation for more details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Occurrence constraints\n+Occurrence constraints specify the minimum and/or maximum frequency or\n+optionality of of attributes and elements.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Elements with minOccurs and maxOccurs restrictions\n+To force the validation of minOccurs and maxOccurs constraints the\n+#SOAP_XML_STRICT input mode flag must be set. The minOccurs and maxOccurs\n+constraints are specified for members of a struct and members of a class in a\n+header file using the following syntax:\n+Type membername nullptr minOccurs : maxOccurs = value;\n+The nullptr is optional and indicates that the member is nillable (gSOAP\n+version 2.8.24 or greater), which means that when NULL an empty element with\n+xsi:nil=\"true\" is added in the serialized XML.\n+The minOccurs and maxOccurs are optional values that must be integer literals.\n+When maxOccurs is not specified then the colon can be omitted. When minOccurs\n+is not specified it is assumed to be one (1) for non-pointer members that are\n+elements and zero (0) for members that are pointers or are attributes (i.e.\n+have a @ qualifier).\n+A default initialization value may be provided and is optional.\n+A fixed initialization value can be specified with == (gSOAP version 2.8.48 or\n+greater).\n+For example\n+struct ns__MyRecord\n+{\n+int n 0 = 5; // element with default value 5, minOccurs=0, maxOccurs=1\n+int m; // element with minOccurs=1\n+int *k nullptr 1; // element with minOccurs=1 and nillable=true\n+int v == 2; // element with minOccurs=1 and fixed value 2\n+int __size 0:10; // sequence with minOccurs=0, maxOccurs=10\n+int *item;\n+std::vector nums 2; // sequence with minOccurs=2,\n+maxOccurs=unbounded\n+};\n+struct arrayOfint\n+{\n+int *__ptr 1:100; // minOccurs=1, maxOccurs=100\n+int size;\n+};\n+See also C_and_C++_XML_data_bindings documentation for more details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Required and prohibited attributes\n+Similar to the minOccurs and maxOccurs annotations defined in the previous\n+section, attributes in a struct or class can be annotated with occurrence\n+constraints to make them optional (0), required (1), or prohibited (0:0).\n+Default values can be assigned to optional attributes.\n+For example\n+struct ns__MyRecord\n+{\n+@ int m 1; // required attribute (occurs at least once)\n+@ int n = 5; // optional attribute with default value 5\n+@ int o 0; // optional attribute (may or may not occur)\n+@ int p 0:0; // prohibited attribute\n+};\n+Remember to set the #SOAP_XML_STRICT input mode flag to enable the validation\n+of attribute occurrence constraints.\n+See also C_and_C++_XML_data_bindings documentation for more details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Value constraints\n+Value constraints restrict the length of strings and the range of values of\n+numeric types.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Data length restrictions\n+A schema simpleType is defined with a typedef by taking a base primitive to\n+defined a derived simpleType. For example:\n+typedef int time__seconds;\n+This defines the following schema type in time.xsd:\n+\n+\n+\n+A complexType with simpleContent is defined with a wrapper struct/class:\n+struct time__date\n+{\n+char *__item; // some custom format date (restriction of string)\n+@ enum time__zone { EST, GMT, ... } zone;\n+}\n+This defines the following schema type in time.xsd:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+...\n+\n+\n+Data value length constraints of simpleTypes and complexTypes with\n+simpleContent are defined as follows:\n+typedef char *ns__string256 0:256; // simpleType restriction of string with max\n+length 256 characters\n+typedef char *ns__string10 10:10; // simpleType restriction of string with\n+length of 10 characters\n+typedef std::string *ns__string8 8; // simpleType restriction of string with at\n+least 8 characters\n+struct ns__data // simpleContent wrapper\n+{\n+char *__item :256; // simpleContent with at most 256 characters\n+@ char *name 1; // required name attribute\n+};\n+struct time__date // simpleContent wrapper\n+{\n+char *__item :100;\n+@ enum time__zone { EST, GMT, ... } zone = GMT;\n+}\n+Set the #SOAP_XML_STRICT mode flag to enable the validation of value length\n+constraints.\n+See also C_and_C++_XML_data_bindings documentation for more details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Value range restrictions\n+Similar to data length constraints for string-based data, integer and floating\n+point value range constraints on numeric simpleTypes and complexTypes with\n+simpleContent are declared with low : high, where low and high are optional.\n+As of gSOAP 2.8.26, floating point value ranges and integer ranges can be\n+exclusive by adding < on either side of the : range operator:\n+range validation check\n+1 1 <= x\n+1 : 1 <= x\n+: 10 x <= 10\n+1 : 10 1 <= x <= 10\n+1 < : < 10 1 < x < 10\n+1 < 10 1 < x < 10\n+1 : < 10 1 <= x < 10\n+: < 10 x < 10\n+< 10 x < 10\n+1 < : 1 < x\n+1 < 1 < x\n+1 < : 10 1 < x <= 10\n+For example:\n+typedef int ns__int10 0:10; // simpleType restriction of int 0..10\n+typedef LONG64 ns__long -1000000:1000000; // simpleType restriction of long64 -\n+1000000..1000000\n+typedef float ns__float -1.0 <:< 10.5; // simpleType restriction of float in (-\n+1,10.5)\n+struct ns__data // simpleContent wrapper\n+{\n+int __item 0:10; // simpleContent range 0..10\n+@ char *name 1; // required name attribute\n+};\n+Set the #SOAP_XML_STRICT mode flag to enable the validation of value range\n+constraints.\n+See also C_and_C++_XML_data_bindings documentation for more details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Pattern restrictions\n+Patterns can be defined for simpleType content. However, pattern validation is\n+not enforced unless the soap::fsvalidate and soap::fwvalidate callbacks are set\n+to a regex matcher.\n+To associate a pattern with a simpleType, you can define a simpleType with a\n+typedef and a pattern string:\n+typedef int time__second \"[1-5]?[0-9]|60\";\n+This defines the following schema type in time.xsd:\n+\n+\n+\n+\n+\n+The pattern string must contain a valid regular expression.\n+A special case for C format string patterns is introduced in gSOAP 2.8.18. When\n+xsd:totalDigits and xsd:fractionDigits are given in a XSD file, then a C format\n+string is produced to output floating point values with the proper precision\n+and scale. For example:\n+\n+\n+\n+\n+\n+\n+produces:\n+typedef float time__ratio \"%5.2f\";\n+The format string is used to format the output the floating point value in XML.\n+See also C_and_C++_XML_data_bindings documentation for more details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Element and attribute qualified/unqualified forms\n+Struct, class, and union members represent elements and attributes that are\n+automatically qualified or unqualified depending on the schema element and\n+attribute default forms specified. The engine always validates the prefixes of\n+elements and attributes. When a namespace mismatch occurs, the element or\n+attribute is not consumed which can lead to a validation error (unless the\n+complexType is extensible or when #SOAP_XML_STRICT is turned off).\n+Consider for example:\n+//gsoap ns schema elementForm: qualified\n+//gsoap ns schema attributeForm: unqualified\n+struct ns__record\n+{\n+@ char * type;\n+char * name;\n+};\n+Here, the ns__record struct is serialized with qualified element name and\n+unqualified attribute type:\n+\n+...\n+\n+The \"colon notation\" for struct/class/union member names is used to override\n+element and attribute qualified or unqualified forms. To override the form for\n+individual members that represent elements and attributes, use a namespace\n+prefix and colon with the member name:\n+//gsoap ns schema elementForm: qualified\n+//gsoap ns schema attributeForm: unqualified\n+struct ns__record\n+{\n+@ char * ns:type;\n+char * :name;\n+};\n+where name is unqualified and type is qualified:\n+\n+...\n+\n+The colon notation is a syntactic notation used only in the interface header\n+file syntax, it is not translated to the C/C++ output.\n+The colon notation does not avoid name clashes between members. For example:\n+struct x__record\n+{\n+@ char * name;\n+char * x:name;\n+};\n+results in a redefinition error, since both members have the same name. To\n+avoid name clashes, use a underscore suffix:\n+struct x__record\n+{\n+@ char * name;\n+char * x:name_;\n+};\n+Not that the namespace prefix convention can be used instead:\n+struct x__record\n+{\n+@ char * name;\n+char * x__name;\n+};\n+which avoids the name clash. However, the resulting schema is different since\n+the last example generates a global name element definition that is referenced\n+by the local element.\n+More specifically, the difference between the namespace prefix convention with\n+double underscores and colon notation is that the namespace prefix convention\n+generates schema element/attribute references to elements/attributes at the top\n+level, while the colon notation only affects the local element/attribute\n+namespace qualification by form overriding. This is best illustrated by an\n+example:\n+struct x__record\n+{\n+char * :name;\n+char * x:phone;\n+char * x__fax;\n+char * y__zip;\n+};\n+which generates the following x.xsdschema:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+and the y.xsd schema defines contains:\n+\n+See also C_and_C++_XML_data_bindings documentation for more details.\n+\ud83d\udd1d Back_to_table_of_contents\n+ XML namespaces and the namespace mapping table\n+A namespace mapping table should be included in the source code of client and\n+service applications. The mapping table is used by the serializers and\n+deserializers of the stub and skeleton functions to produce valid XML messages\n+and to parse and validate XML messages. A typical mapping table is shown below:\n+struct Namespace namespaces[] =\n+{\n+// { \"prefix\", \"URI\", \"URI-pattern\" (optional) }\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" }, // must be first\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\" }, // must be second\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\" }, // must be third\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\" }, // must be fourth\n+{ \"ns\", \"urn:my-service-URI\" }, // binds \"ns\" namespace prefix to schema URI\n+{ NULL, NULL } // end of table\n+};\n+Each namespace prefix used by a identifier name in the header file\n+specification, see Section C/C++_identifier_name_to_XML_tag_name_translation,\n+must have a binding to a namespace URI in the mapping table. The end of the\n+namespace mapping table must be indicated by the NULL pair. The namespace URI\n+matching is case insensitive. A namespace prefix is distinguished by the\n+occurrence of a pair of underscores (__) in an identifier or by using colon\n+notation, see Section C/C++_identifier_name_to_XML_tag_name_translation.\n+An optional third column in the namespace mapping table may be specified that\n+contains a namespace URI pattern. The patterns provide an alternative namespace\n+for the validation of parsed XML messages. In this pattern, dashes (-) are\n+single-character wildcards and asterisks (*) are multi-character wildcards. For\n+example, to accept alternative versions of XML schemas with different authoring\n+dates, four dashes can be used in place of the specific dates in the namespace\n+mapping table pattern:\n+struct Namespace namespaces[] =\n+{\n+// { \"prefix\", \"URI\", \"URI-pattern\" (optional) }\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" }, // must be first\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\" }, // must be second\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\", \"http://www.w3.org/----/\n+XMLSchema-instance\" },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\", \"http://www.w3.org/----/XMLSchema\"\n+},\n+... //\n+{ NULL, NULL } // end of table\n+};\n+Or alternatively, asterisks can be used as wildcards for multiple characters:\n+struct Namespace namespaces[] =\n+{\n+// { \"prefix\", \"URI\", \"URI-pattern\" (optional) }\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" }, // must be first\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\" }, // must be second\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\", \"http://www.w3.org/*/\n+XMLSchema-instance\" },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\", \"http://www.w3.org/*/XMLSchema\" },\n+... //\n+{ NULL, NULL} // end of table\n+};\n+A namespace mapping table is automatically generated with prefixes and URIs in\n+the table that are declared with //gsoap schema namespace: directives\n+in the interface header file, see Section Directives. If directives are not\n+provided in the header file then default URIs of the form http://tempuri.org/\n+prefix.xsd for each namespace prefix. The soapcpp2 tool also generates a WSDL\n+and one or more XSD files, one for each XML namespace.\n+When parsing XML and deserializing data, namespace URIs in the XML messages are\n+matched against the second and third column of the namespace mapping table,\n+searching from the top to the bottom of the table. The actual prefix used in\n+the XML message is irrelevant as the URI associated with the prefix is relevant\n+to define the XML namespace to which a qualified element or attribute belongs.\n+When a match is found, the namespace prefix in the first column of the table is\n+considered semantically identical to the namespace prefix used by the qualified\n+XML element and attribute parsed, even when the prefix names differ. This\n+normalization of prefixes is invisible to the user of gSOAP and makes coding\n+with XML easier. For example, when XSD QNames are parsed into strings using the\n+built-in soapcpp2 _QName type or a QName declared with typedef std::string\n+xsd__QName, then this QName string will always contain qualified names with\n+normalized prefixes, i.e. prefixes defined in the namespace mapping table,\n+unless the table has no entry, see Section How_to_use_QName_attributes_and\n+elements.\n+For example, let's say we have the following structs:\n+struct a__elt { ... };\n+struct b__elt { ... };\n+struct k__elt { ... };\n+The namespace mapping table generated by soapcpp2 has the following entries:\n+struct Namespace namespaces[] =\n+{\n+// { \"prefix\", \"URI\", \"URI-pattern\" (optional) }\n+... // the four SOAP and XSD namespace bindings\n+{ \"a\", \"http://tempuri.org/a.xsd\" },\n+{ \"b\", \"http://tempuri.org/b.xsd\" },\n+{ \"c\", \"http://tempuri.org/c.xsd\" },\n+... //\n+{ NULL, NULL }\n+};\n+Then, the following XML elements will match these structs:\n+...\n+...\n+...\n+Instead of one big namespace table that contains all XML namespace prefixes\n+with their URIs, there are cases when it is desirable to use multiple namespace\n+tables, one for each service. This avoids leaking namespace prefixes in XML\n+messages that have nothing to do with the service invoked. In principle there\n+is no harm to leak these namespace prefixes, but the messages are less compact\n+and not as clean. To use multiple namespace tables at the client side is done\n+as follows:\n+struct Namespace namespacesTable1[] = { ... };\n+struct Namespace namespacesTable2[] = { ... };\n+struct Namespace namespacesTable3[] = { ... };\n+struct Namespace *namespaces;\n+... //\n+struct soap *soap = soap_new();\n+soap_set_namespaces(soap, namespaceTable1); // use the first namespace table\n+if (soap_call_remote_method(soap, endpoint, Action, ...))\n+... // error\n+Likewise, on the server side call soap_set_namespaces before calling\n+soap_serve. Changing the namespaces table in service operations has no effect.\n+The XML messages produced by the gSOAP engine include all xmlsn namespace\n+bindings in the root element, which is generally more efficient for larger XML\n+documents in which otherwise the xmlsn namespace bindings will be sprinkled\n+throughout. By contrast, canonical XML requires xmlsn namespace bindings only\n+to be included when utilized. Therefore, the #SOAP_XML_CANONICAL context flag\n+produces C14N exclusive XML messages and documents, which eliminates unused\n+xmlsn namespace bindings from XML. Unfortunately, the current C14N standard is\n+buggy with respect to XSD QName content, because prefixes used in QName content\n+are not considered utilized. The gSOAP engine considers QName content prefixes\n+utilized and therefore produces corrected canonicalized XML output that\n+prevents the loss of namespace information for QNames.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP Header processing\n+A built-in SOAP Header data structure SOAP_ENV__Header is generated by the\n+soapcpp2 tool for exchanging SOAP headers in SOAP messages. This structure is\n+empty unless headers are added by plugins and headers specified by WSDL\n+specifications (i.e. wsdl2h adds SOAP Headers).\n+You can create your own SOAP Header struct simply by declaring it in an\n+interface header file for soapcpp2 and by adding members that must be qualified\n+with namespace prefixes to conform to the SOAP Header processing requirements\n+that SOAP Header elements must be namespace qualified.\n+For example, assume that transaction data should be piggy-backed with SOAP\n+messages in SOAP Header:\n+struct t__transaction\n+{\n+int number;\n+const char *dscription;\n+};\n+struct SOAP_ENV__Header\n+{\n+mustUnderstand struct t__transaction *t__transaction;\n+};\n+//gsoap ns service method-input-header-part: webmethod t__transaction\n+int ns__webmethod(...);\n+The mustUnderstand qualifier specifies that the element must be processed by\n+the SOAP processor and cannot be ignored if the processor has no logic in place\n+for this SOAP header, which is done by adding a SOAP-ENV:mustUnderstand=\"true\"\n+attribute to the t:transaction element. The soapcpp2-generated serializers obey\n+this safety principle.\n+This declares a service operation that sends messages with an input SOAP header\n+t__transaction, as can be seen in the generated WSDL binding:\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+Likewise, you can specify that both input and output messages have the same\n+header with //gsoap ns service method-header-part: or the output message has a\n+header with //gsoap ns service method-output-header-part:. Multiple headers can\n+be specified this way.\n+To set up a SOAP Header at the client side that contains the t__transaction\n+member:\n+struct soap *soap = soap_new();\n+... //\n+soap.header = NULL; // erase any SOAP Header we have so far\n+soap_header(soap); // allocate and initialize a new SOAP Header\n+soap->header->t__transaction = soap_new_t__transaction(soap, -1);\n+soap->header->t__transaction->number = num;\n+soap->header->t__transaction->description = \"Transactional data\";\n+if (soap_call_webmethod(soap, endpoint, NULL, ...))\n+... // error\n+soap::header\n+struct SOAP_ENV__Header * header\n+The soap::header points to a SOAP_ENV__Header structure with the SOAP Header\n+that was received or tha...\n+Definition: stdsoap2.h:2955\n+The SOAP Web service request includes the SOAP Header with the transaction\n+data:\n+\n+\n+\n+12345\n+Transactional data\n+\n+\n+\n+\n+...\n+\n+\n+\n+At the receiving side, a SOAP Header can be inspected by checking for a non-\n+NULL soap::header.\n+ Warning\n+ When SOAP Headers are used, you must make sure to set soap::header to\n+ NULL when no SOAP Header should be sent, otherwise any SOAP Headers\n+ currently present in the SOAP_ENV__Header struct pointed to by soap::\n+ header will be included in the message.\n+At the client side, the soap::actor string variable can be set to set the SOAP\n+SOAP-ENV:actor attribute. The SOAP-ENV:mustUnderstand=\"true\" attribute then\n+indicates the requirement that the recipient corresponding to the SOAP-ENV:\n+actor attribute value is responsible to process the SOAP Header element. The\n+details of which can be found in the SOAP 1.1/1.2 specifications that the gSOAP\n+tools conform to.\n+The SOAP Header structure SOAP_ENV__Header is declared mutable, which means\n+that re-declarations of the structures are permitted and additional members are\n+collected into one final structure by the soapcpp2 tool.\n+For another example, consider:\n+struct SOAP_ENV__Header\n+{\n+char *h__transaction;\n+struct UserAuth *h__authentication;\n+};\n+Suppose method ns__login uses both header parts (at most), then this is\n+declared as:\n+//gsoap ns service method-header-part: login h__transaction\n+//gsoap ns service method-header-part: login h__authentication\n+int ns__login(...);\n+Suppose method ns__search uses only the first header part, then this is\n+declared as:\n+//gsoap ns service method-header-part: search h__transaction\n+int ns__search(...);\n+Note that the method name and header part names must be namespace qualified.\n+The headers must be present in all operations that declared the header parts.\n+To specify the header parts for the method input (method request message), use:\n+//gsoap namespace-prefix service method-input-header-part: method-name header-\n+part\n+Similarly, to specify the header parts for the method output (method response\n+message), use:\n+//gsoap namespace-prefix service method-output-header-part: method-name header-\n+part\n+The declarations only affect the WSDL. For example:\n+struct SOAP_ENV__Header\n+{\n+char *h__transaction;\n+struct UserAuth *h__authentication;\n+};\n+//gsoap ns service method-input-header-part: login h__authentication\n+//gsoap ns service method-input-header-part: login h__transaction\n+//gsoap ns service method-output-header-part: login h__transaction\n+int ns__login(...);\n+The headers must be present in all operations that declared the header parts.\n+See also API documentation Module Header_structure_and_functions.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP Fault processing\n+A built-in SOAP Fault data structure SOAP_ENV__Fault is generated by the\n+soapcpp2 tool for exchanging exception messages. This structure has the general\n+form:\n+struct SOAP_ENV__Fault\n+{\n+_QName faultcode; // _QName is built-in\n+char *faultstring;\n+char *faultactor;\n+struct SOAP_ENV__Detail *detail;\n+struct SOAP_ENV__Code *SOAP_ENV__Code; // must be a SOAP_ENV__Code struct\n+defined below\n+char *SOAP_ENV__Reason;\n+char *SOAP_ENV__Node;\n+char *SOAP_ENV__Role;\n+struct SOAP_ENV__Detail *SOAP_ENV__Detail; // SOAP 1.2 detail member\n+};\n+struct SOAP_ENV__Code\n+{\n+_QName SOAP_ENV__Value;\n+struct SOAP_ENV__Code *SOAP_ENV__Subcode;\n+};\n+struct SOAP_ENV__Detail\n+{\n+int __type; // The SOAP_TYPE_ of the object serialized as Fault detail\n+void *fault; // pointer to the fault object, or NULL\n+_XML __any; // any other detail element content (stored in XML format)\n+};\n+SOAP_ENV__Code\n+SOAP Fault Code structure.\n+Definition: stdsoap2.h:9471\n+SOAP_ENV__Code::SOAP_ENV__Subcode\n+struct SOAP_ENV__Code * SOAP_ENV__Subcode\n+Optional element SOAP-ENV:Subcode of XSD type SOAP-ENV:Code\n+Definition: stdsoap2.h:9475\n+SOAP_ENV__Code::SOAP_ENV__Value\n+_QName SOAP_ENV__Value\n+Optional element SOAP-ENV:Value of XSD type xsd:QName\n+Definition: stdsoap2.h:9473\n+SOAP_ENV__Detail\n+SOAP Fault Detail structure.\n+Definition: stdsoap2.h:9482\n+SOAP_ENV__Detail::fault\n+void * fault\n+Any data of some type T serialized as fault element when its SOAP_TYPE_T is\n+assigned to __type\n+Definition: stdsoap2.h:9486\n+SOAP_ENV__Detail::__any\n+_XML __any\n+Any XML content.\n+Definition: stdsoap2.h:9488\n+SOAP_ENV__Detail::__type\n+int __type\n+Any data of some type T serialized as fault element when its SOAP_TYPE_T is\n+assigned to __type\n+Definition: stdsoap2.h:9484\n+SOAP_ENV__Fault::SOAP_ENV__Node\n+char * SOAP_ENV__Node\n+Optional element SOAP-ENV:Node of XSD type xsd:string\n+Definition: stdsoap2.h:9460\n+SOAP_ENV__Fault::SOAP_ENV__Detail\n+struct SOAP_ENV__Detail * SOAP_ENV__Detail\n+Optional element SOAP-ENV:Detail of XSD type SOAP-ENV:Detail\n+Definition: stdsoap2.h:9464\n+SOAP_ENV__Fault::SOAP_ENV__Role\n+char * SOAP_ENV__Role\n+Optional element SOAP-ENV:Role of XSD type xsd:string\n+Definition: stdsoap2.h:9462\n+SOAP_ENV__Fault::SOAP_ENV__Reason\n+struct SOAP_ENV__Reason * SOAP_ENV__Reason\n+Optional element SOAP-ENV:Reason of XSD type SOAP-ENV:Reason\n+Definition: stdsoap2.h:9458\n+SOAP_ENV__Fault::faultstring\n+char * faultstring\n+Optional element faultstring of XSD type xsd:string\n+Definition: stdsoap2.h:9450\n+SOAP_ENV__Fault::SOAP_ENV__Code\n+struct SOAP_ENV__Code * SOAP_ENV__Code\n+Optional element SOAP-ENV:Code of XSD type SOAP-ENV:Code\n+Definition: stdsoap2.h:9456\n+SOAP_ENV__Fault::faultcode\n+_QName faultcode\n+Optional element faultcode of XSD type xsd:QName\n+Definition: stdsoap2.h:9448\n+SOAP_ENV__Fault::faultactor\n+char * faultactor\n+Optional element faultactor of XSD type xsd:string\n+Definition: stdsoap2.h:9452\n+SOAP_ENV__Fault::detail\n+struct SOAP_ENV__Detail * detail\n+Optional element detail of XSD type SOAP-ENV:Detail\n+Definition: stdsoap2.h:9454\n+The first four members in SOAP_ENV__Fault are SOAP 1.1 specific. The last five\n+members are SOAP 1.2 specific. You can redefine these structures in the\n+interface header file for soapcpp2. For example, you can use a class for the\n+SOAP_ENV__Fault and add methods for convenience.\n+The SOAP_ENV__Detail structure can be changed to the needs of Web service\n+application to communicate specific fault data structures, but this is\n+generally not necessary because the application-specific SOAP Fault details can\n+be serialized via the __type and fault members in the SOAP_ENV__Detail member,\n+see Section Void_pointer_serialization on the serialization of data referred to\n+by __type and fault.\n+When a user-define service operation function returns an error with\n+soap_sender_fault or soap_receiver_fault, then the SOAP Fault structure is\n+populated and soap::fault points to this SOAP Fault. The SOAP Fault is sent to\n+the client. The client populates a SOAP Fault structure that contains the SOAP\n+Fault message with details.\n+Server-side faults are raised with soap_sender_fault or soap_receiver_fault.\n+The soap_sender_fault call should be used to inform that the sender is at fault\n+and the sender (client) should not re-send the request. The soap_receiver_fault\n+call should be used to indicate a temporary server-side problem, so a sender\n+(client) can re-send the request later. For example:\n+int ns1__myMethod(struct soap *soap, ...)\n+{\n+... //\n+return soap_receiver_fault(soap, \"Resource temporarily unavailable\", NULL); /\n+/ return fault to sender\n+}\n+In the example, the SOAP Fault details were empty (NULL). You may pass an XML\n+fragment, which will be literally included in the SOAP Fault message. For WS-\n+I Basic Profile compliance, you must pass an XML string with one or more\n+namespace qualified elements, such as:\n+return soap_receiver_fault(soap, \"Resource temporarily unavailable\",\n+\"123abc\");\n+When a service operation needs to populate SOAP Fault details with a\n+application-specific data, it does so by assigning the soap::fault member of\n+the current reference to the context with appropriate data associated with the\n+exception and by returning the error #SOAP_FAULT. For example:\n+soap_receiver_fault(soap, \"Error message\", NULL);\n+if (soap->version == 2) // SOAP 1.2 is used\n+{\n+soap->fault->SOAP_ENV__Detail = soap_new_SOAP_ENV__Detail(soap, -1);\n+soap->fault->SOAP_ENV__Detail->__type = SOAP_TYPE_ns1__myStackDataType; /\n+/ stack type\n+soap->fault->SOAP_ENV__Detail->fault = sp; // point to stack\n+soap->fault->SOAP_ENV__Detail->__any = NULL; // no other XML data\n+}\n+else\n+{\n+soap->fault->detail = soap_new_SOAP_ENV__Detail(soap, -1);\n+soap->fault->detail->__type = SOAP_TYPE_ns1__myStackDataType; // stack type\n+soap->fault->detail->fault = sp; // point to stack\n+soap->fault->detail->__any = NULL; // no other XML data\n+}\n+return SOAP_FAULT; // return from service operation call with the fault\n+soap::version\n+short version\n+SOAP version (0 = no SOAP, 1 = SOAP 1.1, 2 = SOAP 1.2)\n+Definition: stdsoap2.h:2851\n+Here, soap_receiver_fault allocates a fault struct then we set the SOAP Fault\n+details as shown.\n+Note that SOAP 1.2 supports nested fault sub-codes. These can be set as\n+follows:\n+struct SOAP_ENV__Code *subcode1 = soap_new_SOAP_ENV__Code(soap);\n+struct SOAP_ENV__Code *subcode2 = soap_new_SOAP_ENV__Code(soap);\n+soap_sender_fault(soap, \"The requested profile token ProfileToken does not\n+exist.\", NULL);\n+subcode1->SOAP_ENV__Value = (char*)\"ter:InvalidArgs\"; // a QName value\n+subcode1->SOAP_ENV__Subcode = subcode2;\n+subcode2->SOAP_ENV__Value = (char*)\"ter:NoProfile\"; // a QName value\n+subcode2->SOAP_ENV__Subcode = NULL;\n+soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = subcode1;\n+return SOAP_FAULT;\n+This produces:\n+\n+\n+SOAP-ENV:Sender\n+\n+ter:InvalidArgs\n+\n+ter:NoProfile \n+\n+\n+\n+\n+The requested profile token ProfileToken does not\n+exist.\n+\n+\n+Service operations implementation in a Web service application can return\n+various SOAP Faults customized in this way.\n+SOAP Fault structures are declared mutable, which means that re-declarations of\n+the structures are permitted and additional members are collected into one\n+final structure by the soapcpp2 tool.\n+For an example that used the SOAP Fault detail structure:\n+struct SOAP_ENV__Detail\n+{\n+const char *f__invalid;\n+const char *f__unavailable;\n+int __type;\n+void *fault;\n+_XML __any;\n+};\n+//gsoap ns service method-fault: login f__invalid\n+//gsoap ns service method-fault: login f__unavailable\n+int ns__login(...);\n+See also API documentation Module Fault_structure_and_functions.\n+\ud83d\udd1d Back_to_table_of_contents\n+ MIME attachments\n+The gSOAP toolkit supports MIME attachments as per SOAP with Attachments (SwA)\n+specification http://www.w3.org/TR/SOAP-attachments.\n+MTOM attachments that are essentially MIME attachments that conform to the MTOM\n+specification http://www.w3.org/TR/soap12-mtom are also supported which are the\n+preferred way to include MIME attachments with SOAP messages, see Section MTOM\n+attachments.\n+In the following discussion, MIME attachment data is assumed to be resident in\n+memory for sending operations and MIME attachments received will be stored in\n+memory managed by the context. MTOM and DIME attachments on the other hand can\n+be streamed and therefore MTOM/DIME attachment data does not need to be stored\n+in memory, see Sections DIME_attachments and MTOM_attachments .\n+Transmitting multipart/related MIME attachments with a SOAP/XML message is\n+accomplished with two functions, soap_set_mime and soap_set_mime_attachment.\n+The first function is for initialization purposes and the latter function is\n+used to specify meta data and content data for each attachment.\n+See also API documentation Module MIME_attachment_functions.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Sending a collection of MIME attachments (SwA)\n+The following functions are used to set up a collection of multipart/related\n+MIME attachments for transmission with a SOAP or XML message.\n+ * void soap_set_mime(struct_soap_*soap,_const_char_*boundary,_const_char\n+ *start) This function enables sending MIME attachments. This function is\n+ generally not required when the context is initialized with\n+ #SOAP_ENC_MIME, because MIME attachments are automatically detected as\n+ xsd__base64Binary and _xop__Include structures in the data to serialize\n+ as an XML message with the attachments automatically added or MIME\n+ attachments can be explicitly added with soap_set_mime_attachment.\n+ Parameter boundary specifies a MIME boundary string or NULL to have the\n+ engine generate a MIME boundary string. Parameter start specifies the\n+ start content ID for the first MIME body containing the SOAP or XML\n+ message. When NULL, the start ID of the SOAP message is .\n+ * int soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size,\n+ enum soap_mime_encoding encoding, const char *type, const char *id, const\n+ char *location, const char *description) This function adds a MIME\n+ attachment to a SOAP/XML message to send. The specified ptr points to the\n+ data to send of length specified by size. The encoding parameter is a\n+ soap_mime_encoding value that is recommended to be specified as\n+ #SOAP_MIME_NONE to specify that the MIME data content is not encoded in\n+ any way (the MIME attachment function simply copies the raw data to the\n+ MIME block without encoding). The type parameter is required and\n+ indicates the MIME type of the data, such as \"image/jpg\". The id\n+ parameter uniquely identifies the attachment in the message, which can be\n+ omitted by specifying NULL. The location parameter specifies a location\n+ string or NULL. The description parameter is a string that describes the\n+ data or NULL. Returns #SOAP_OK or a soap_status error code.\n+ * void soap_clr_mime(struct_soap_*soap) This function disables MIME\n+ attachments such as after sending a multipart-related message with\n+ attachments to switch back to non-multipart-related messaging, unless the\n+ data to serialize as a message contains attachments such as\n+ xsd__base64Binary for MIME attachments and _xop__Include for MTOM\n+ attachments.\n+When providing a MIME boundary with soap_set_mime, you have to make sure the\n+boundary cannot match any parts of the message and attachments that you are\n+sending, because the boundary delineates the attachments.\n+The internal list of attachments specified with soap_set_mime_attachment is\n+destroyed with soap_end or when a message is received. Therefore, call\n+soap_set_mime_attachment to set attachments before sending a message.\n+The following example shows how a multipart/related HTTP message with three\n+MIME attachments is set up and transmitted to a server. In this example we let\n+the message body refer to the attachments using XML href attributes. The struct\n+claim__form data type includes a definition of a href attribute for this\n+purpose.\n+struct claim__form form1, form2;\n+form1.href = \"cid:claim061400a.tiff@claiming-it.com\";\n+form2.href = \"cid:claim061400a.jpeg@claiming-it.com\";\n+/* initialize and enable MIME */\n+soap_set_mime(soap, NULL, \"\");\n+/* add a base64 encoded tiff image (tiffImage points to base64 data) */\n+soap_set_mime_attachment(soap, tiffImage, tiffLen, SOAP_MIME_BASE64, \"image/\n+tiff\", \"\", NULL, NULL);\n+/* add a raw binary jpeg image (jpegImage points to raw data) */\n+soap_set_mime_attachment(soap, jpegImage, jpegLen, SOAP_MIME_BINARY, \"image/\n+jpeg\", \"\", NULL, NULL);\n+/* send the forms as MIME attachments with this invocation */\n+if (soap_call_claim__insurance_claim_auto(soap, form1, form2, ...))\n+... // an error occurred\n+else\n+... // process the response\n+soap_clr_mime(soap);\n+soap_set_mime_attachment\n+int soap_set_mime_attachment(struct soap *soap, const char *ptr, size_t size,\n+enum soap_mime_encoding encoding, const char *type, const char *id, const char\n+*location, const char *description)\n+Add a MIME attachment to the SOAP/XML message.\n+soap_clr_mime\n+void soap_clr_mime(struct soap *soap)\n+Disable MIME attachments.\n+soap_set_mime\n+int soap_set_mime(struct soap *soap, const char *boundary, const char *start)\n+Enable MIME attachments.\n+SOAP_MIME_BASE64\n+@ SOAP_MIME_BASE64\n+data is formatted in base64\n+Definition: stdsoap2.h:10229\n+SOAP_MIME_BINARY\n+@ SOAP_MIME_BINARY\n+binary raw data content\n+Definition: stdsoap2.h:10227\n+The claim__form struct is declared in the interface header file as:\n+struct claim__form\n+{\n+@ char *href;\n+};\n+The claim forms in the message consist of hrefs to the claim forms attached.\n+The use of href or other attributes for referring to the MIME attachments is\n+optional according to the SwA standard. MTOM on the other hand mandates the use\n+of href with XOP elements.\n+To associate MIME attachments with the request and response of a service\n+operation in the generated WSDL, please see Section Generating_MultipartRelated\n+MIME_attachment_bindings_in_WSDL .\n+The server-side code to transmit MIME attachments back to a client:\n+int claim__insurance_claim_auto(struct soap *soap, ...)\n+{\n+const char *htmlDoc = ...; // an HTML message to send as an attachment\n+soap_set_mime(soap, NULL, NULL); // enable MIME\n+// add a HTML document (htmlDoc points to data, where the HTML doc is stored in\n+compliance with 7bit encoding RFC2045)\n+if (soap_set_mime_attachment(soap, htmlDoc, strlen(htmlDoc), SOAP_MIME_7BIT,\n+\"text/html\", \"\", NULL, NULL))\n+{\n+soap_clr_mime(soap); // don't want fault with attachments\n+return soap->error;\n+}\n+return SOAP_OK;\n+}\n+SOAP_MIME_7BIT\n+@ SOAP_MIME_7BIT\n+7 bit data content\n+Definition: stdsoap2.h:10225\n+\ud83d\udd1d Back_to_table_of_contents\n+ Retrieving a collection of MIME/MTOM attachments (SwA)\n+MIME attachments are automatically parsed and stored in memory managed by the\n+soap context. After receiving a set of MIME/MTOM attachments, either at the\n+client-side or the server-side, the list of MIME/MTOM attachments can be\n+traversed to extract meta data and the attachment content. The first attachment\n+in the collection of MIME/MTOM attachments always contains meta data about the\n+SOAP message itself (because the SOAP message was processed the attachment does\n+not contain any useful data).\n+To traverse the list of MIME attachments in C, you use a loop similar to:\n+int n = 0;\n+struct soap_multipart *attachment;\n+for (attachment = soap->mime.list; attachment; attachment = attachment->next)\n+{\n+++n;\n+printf(\"Part %d:\\n\", n);\n+printf(\"ptr =%p\\n\", attachment->ptr);\n+printf(\"size =%ul\\n\", attachment->size);\n+printf(\"id =%s\\n\", attachment->id ? attachment->id : \"\");\n+printf(\"type =%s\\n\", attachment->type ? attachment->type : \"\");\n+printf(\"location =%s\\n\", attachment->location ? attachment->location : \"\");\n+printf(\"description=%s\\n\", attachment->description ? attachment->description :\n+\"\");\n+}\n+soap_mime::list\n+struct soap_multipart * list\n+list of MIME attachments received\n+Definition: stdsoap2.h:10420\n+soap_multipart\n+DIME/MIME/MTOM attachment data received by the engine.\n+Definition: stdsoap2.h:10430\n+soap_multipart::type\n+const char * type\n+DIME/MIME/MTOM type (MIME type format)\n+Definition: stdsoap2.h:10435\n+soap_multipart::next\n+struct soap_multipart * next\n+next attachment in the linked list\n+Definition: stdsoap2.h:10431\n+soap_multipart::ptr\n+const char * ptr\n+points to raw data content\n+Definition: stdsoap2.h:10432\n+soap_multipart::description\n+const char * description\n+MIME Content-Description (optional)\n+Definition: stdsoap2.h:10439\n+soap_multipart::id\n+const char * id\n+DIME/MIME/MTOM content ID or form data name.\n+Definition: stdsoap2.h:10434\n+soap_multipart::location\n+const char * location\n+MIME Content-Location (optional)\n+Definition: stdsoap2.h:10438\n+soap_multipart::size\n+size_t size\n+size of data content\n+Definition: stdsoap2.h:10433\n+soap::mime\n+struct soap_mime mime\n+MIME attachments received.\n+Definition: stdsoap2.h:4189\n+C++ programmers can use an iterator instead:\n+int n = 0;\n+for (soap_multipart::iterator i = soap->mime.begin(); i != soap->mime.end();\n+++i)\n+{\n+++n;\n+printf(\"Part %d:\\n\", n);\n+printf(\"ptr =%p\\n\", i->ptr);\n+... // etc\n+}\n+soap_mime::begin\n+soap_multipart::iterator begin()\n+C++ only: an iterator over soap_multipart attachments.\n+soap_mime::end\n+soap_multipart::iterator end()\n+C++ only: an iterator over soap_multipart attachments.\n+soap_multipart::iterator\n+soap_multipart_iterator iterator\n+C++ only: an iterator over soap_multipart attachments.\n+Definition: stdsoap2.h:10441\n+Note: keep in mind that the first attachment is associated with the SOAP\n+message and you may want to ignore it.\n+A call to soap_end removes all of the received MIME data. To preserve an\n+attachment in memory, use soap_unlink on the ptr member of the soap_multipart\n+struct. The soap_unlink function can be used to prevent deallocation of\n+deserialized data.\n+\ud83d\udd1d Back_to_table_of_contents\n+ DIME attachments\n+Applications developed with the gSOAP tools can transmit binary DIME\n+attachments stored in memory or in streaming mode by fetching data from a\n+resource or sending data to a resource using callback functions. The maximum\n+DIME attachment size is limited to 8 MB by default as set with\n+#SOAP_MAXDIMESIZE. This limit can be changed as needed. With streaming DIME\n+using callback functions, data handlers are used to pass the data to and from a\n+resource from which to fetch the data to send or data to store, such as a file\n+or device. See Section Streaming_DIME .\n+For details on DIME attachments, see http://msdn.microsoft.com/library/en-us/\n+dnglobspec/html/draft-nielsen-dime-02.txt\n+See also API documentation Module DIME_attachment_functions.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Sending a collection of DIME attachments\n+The following functions can be used to explicitly set up a collection of DIME\n+attachments for transmission with a message. These attachments can be streamed,\n+as described in Section Streaming_DIME . Without streaming, each attachment\n+must refer to a block of data in memory.\n+ * void soap_set_dime(struct_soap_*soap) This function enables sending DIME\n+ attachments. This function is generally not required because DIME\n+ attachments are automatically detected as xsd__base64Binary and\n+ _xop__Include structures in the data to serialize as an XML message with\n+ the attachments automatically added or DIME attachments can be explicitly\n+ added with soap_set_dime_attachment.\n+ * int soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size,\n+ const char *type, const char *id, unsigned short optype, const char\n+ *option) This function adds a DIME attachment to the XML message to send.\n+ The specified ptr points to the data to send of length specified by size.\n+ The type parameter indicates the MIME type of the data or can be NULL.\n+ The id parameter uniquely identifies the attachment in the message, which\n+ can be omitted by specifying NULL. The option parameter is an option such\n+ as a description of the data and optype is a user-defined option type (as\n+ per DIME option specification format). The ptr parameter must be\n+ persistent. The ptr parameter passed to this function must be persistent\n+ in memory until the attachment was sent. Returns #SOAP_OK or a\n+ soap_status error code.\n+ * void soap_clr_dime(struct_soap_*soap) This function disables DIME\n+ attachments, unless the data to serialize as an XML message contains\n+ attachments defined by xsd__base64Binary and _xop__Include structures.\n+These functions allow DIME attachments to be added to SOAP messages without\n+requiring message body references. This is also referred to as the open DIME\n+attachment style. The closed attachment style requires all DIME attachments to\n+be referenced from the SOAP message body with href (or similar) references. For\n+the closed style, gSOAP supports an automatic binary data serialization method,\n+see Section Serializing_binary_data_with_DIME_attachments .\n+\ud83d\udd1d Back_to_table_of_contents\n+ Retrieving a collection of DIME attachments\n+DIME attachments are automatically parsed and stored in memory (or passed to\n+the streaming handlers via the DIME callback functions when defined). After\n+receiving a set of DIME attachments, either at the client-side or the server-\n+side, the list of DIME attachments can be traversed to extract meta data and\n+the attachment content.\n+To traverse the list of DIME attachments in C, you use a loop similar to:\n+int n = 0;\n+struct soap_multipart *attachment;\n+for (attachment = soap->dime.list; attachment; attachment = attachment->next)\n+{\n+++n;\n+printf(\"Part %d:\\n\", n);\n+printf(\"ptr =%p\\n\", attachment->ptr);\n+printf(\"size =%ul\\n\", attachment->size);\n+printf(\"id =%s\\n\", attachment->id ? attachment->id : \"\");\n+printf(\"type =%s\\n\", attachment->type ? attachment->type : \"\");\n+}\n+soap_dime::list\n+struct soap_multipart * list\n+list of DIME attachments received\n+Definition: stdsoap2.h:9971\n+soap::dime\n+struct soap_dime dime\n+DIME attachments received.\n+Definition: stdsoap2.h:4184\n+C++ programmers can use an iterator instead:\n+int n = 0;\n+for (soap_multipart::iterator i = soap->dime.begin(); i != soap->dime.end();\n+++i)\n+{\n+++n;\n+printf(\"Part %d:\\n\", n);\n+printf(\"ptr =%p\\n\", i->ptr);\n+... // etc\n+}\n+soap_dime::begin\n+soap_multipart::iterator begin()\n+C++ only: an iterator over soap_multipart attachments.\n+soap_dime::end\n+soap_multipart::iterator end()\n+C++ only: an iterator over soap_multipart attachments.\n+The options member is available as well, but not shown in the code above. The\n+options content is formatted according to the DIME specification: the first two\n+bytes are reserved for the option type, the next two bytes store the size of\n+the option data, followed by the (binary) option data.\n+A call to soap_end removes all of the received DIME data. To preserve an\n+attachment in memory, use soap_unlink on the ptr member of the soap_multipart\n+struct. The soap_unlink function can be used to prevent deallocation of\n+deserialized data.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Serializing binary data with DIME attachments\n+Binary data stored in extended xsd__base64Binary and xsd__hexBinary types can\n+be serialized and deserialized as DIME attachments when one or more of the\n+extra members id, type, and options are non-NULL. These attachments will be\n+automatically transmitted prior to the sequence of secondary DIME attachments\n+defined by the user with soap_set_dime_attachment as explained in the previous\n+section. The serialization process is automated for SOAP encoded messages and\n+DIME attachments will be send even when soap_set_dime or\n+soap_set_dime_attachment are not used. For non-SOAP-encoded messages such as\n+document/literal messages you must still call soap_set_dime to enable sending\n+messages with attachments.\n+To enable serialization of the data as DIME attachments instead of inline\n+base64, we extend the xsd__base64Binary type with three additional members:\n+struct xsd__base64Binary\n+{\n+unsigned char *__ptr;\n+int __size;\n+char *id;\n+char *type;\n+char *options;\n+};\n+xsd__base64Binary::options\n+char * options\n+extra member: DIME options or a description of the MIME attachment or NULL\n+Definition: stdsoap2.h:9842\n+xsd__base64Binary::id\n+char * id\n+extra member: NULL to generate an id or assign this member variable a unique\n+UUID\n+Definition: stdsoap2.h:9840\n+xsd__base64Binary::type\n+char * type\n+extra member: MIME type of the data\n+Definition: stdsoap2.h:9841\n+The id member is for attachment referencing, typically a content id (CID) or a\n+UUID which can be obtained with soap_rand_uuid, a type member is used to\n+specify the MIME type of the data, the options member is used to piggy-back\n+additional information with a DIME attachment. The order of the declaration of\n+the members is significant. In addition, no other members or methods may be\n+declared before any of these members in the struct/class, but additional\n+members and methods may appear after the member declarations. The extended\n+xsd__hexBinary type is similar.\n+The id and type members contain text. The set the DIME-specific options member,\n+you can use the soap_dime_option function char *soap_dime_option(struct soap\n+*soap, unsigned short type, const char *option).\n+This function returns a string with this encoding. For example\n+struct xsd__base64Binary image;\n+image.__ptr = ...;\n+image.__size = ...;\n+image.id = \"uuid:09233523-345b-4351-b623-5dsf35sgs5d6\";\n+image.type = \"image/jpeg\";\n+image.options = soap_dime_option(soap, 0, \"My wedding picture\");\n+soap_dime_option\n+char * soap_dime_option(struct soap *soap, unsigned short optype, const char\n+*option)\n+Creates a DIME option.\n+When either the id or type member values are non-NULL at run time, the data\n+will be serialized as a DIME attachment.\n+The SOAP/XML message refers to the attachments using href attributes. This\n+generally works will with SOAP RPC encoded messaging, because href attributes\n+are permitted. However, with document/literal style the referencing mechanism\n+must be explicitly defined in the schema of the binary type. Therefore, MTOM is\n+the preferred attachment mechanism for document/literal style messaging.\n+The declaration of an extended binary type in the interface header file for\n+soapcpp2 is:\n+struct ns__myBinaryDataType\n+{\n+unsigned char *__ptr;\n+int __size;\n+char *id;\n+char *type;\n+char *options;\n+};\n+C++ programmers can use inheritance instead of textual extension required in C:\n+class xsd__base64Binary\n+{ public:\n+unsigned char *__ptr;\n+int __size;\n+};\n+class ns__myBinaryDataType : public xsd__base64Binary\n+{ public:\n+char *id;\n+char *type;\n+char *options;\n+};\n+This defines an extension of xsd:base64Binary, such that the data can be\n+serialized as DIME attachments using href attributes for referencing. When a\n+different attribute is to be used, this must be explicitly defined:\n+//gsoap WSref schema import: http://schemas.xmlsoap.org/ws/2002/04/reference/\n+struct ns__myBinaryDataType\n+{\n+unsigned char *__ptr;\n+int __size;\n+char *id;\n+char *type;\n+char *options;\n+@ char *WSref__location;\n+};\n+The example above uses the location attribute defined in the content reference\n+schema, as defined in one of the vendor's specific WSDL extensions for DIME\n+http://www.gotdotnet.com/team/xml_wsspecs/dime/WSDL-Extension-for-DIME.htm.\n+When receiving DIME attachments, the DIME meta data and binary content are\n+stored in the specified xsd__base64Binary and xsd__hexBinary binary data types\n+only when the XML parts of the message uses href attributes to refer to these\n+attachments. If so, the binary data type __ptr and __size members are set to\n+the location in memory of the attachment data and length, respectively.\n+Messages may contain binary data that references external resources not\n+provided as attachments. In that case, the __ptr member is NULL and the id\n+member refers to the external data source.\n+The dime_id_format attribute of the current context can be set to the default\n+format of DIME id members. The format string must contain a d format specifier\n+(or any other int-based format specifier). The value of this specifier is a\n+non-negative integer, with zero being the value of the DIME attachment id for\n+the SOAP message. For example,\n+struct soap *soap = soap_new();\n+soap->dime_id_format = \"id-%x\";\n+soap::dime_id_format\n+const char * dime_id_format\n+User-definable format string to generate DIME content IDs.\n+Definition: stdsoap2.h:4172\n+As a result, all attachments with a NULL id member will use a auto-generated id\n+value based on the format string.\n+ Warning\n+ Care must be taken not to introduce duplicate content id values, when\n+ assigning content id values to the id members of DIME extended binary\n+ data types. Content ids must be unique.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Streaming DIME\n+Streaming DIME is achieved with callback functions to fetch and store data\n+during transmission. Three function callbacks for streaming DIME output and\n+three callbacks for streaming DIME input are available.\n+ * void *(*soap.fdimereadopen)(struct soap *soap, void *handle, const char\n+ *id, const char *type, const char *options) This callback is called by\n+ the engine to start sending a streaming DIME attachment. This callback\n+ opens a stream to start reading the attachment data to send. The actual\n+ data stream will be read in chunks using the soap::fdimeread callback\n+ until no more data is available and the soap::fdimereadclose callback is\n+ called to close the stream. The handle parameter contains the value of\n+ the __ptr member variable of the attachment struct/class with data (e.g.\n+ xsd__base64Binary or _xop__Include with __ptr, __size, id, type and\n+ options members), which should be a pointer to specific information such\n+ as a file descriptor or a pointer to a some application-specific data to\n+ be passed to this callback. Both the __ptr and __size members of the\n+ attachment struct/class should have been set by the application prior to\n+ the serialization of the message with attachments. If the __size is zero\n+ and HTTP chunking is enabled (with #SOAP_IO_CHUNK), then chunked DIME\n+ attachments are sent, see soap::fdimeread. The id, type and options\n+ parameters are the id (optional ID), type (a MIME type) and options (DIME\n+ options are set with soap_dime_option) of the attachment struct/class,\n+ respectively, of which at least one member should be non-NULL. The\n+ callback should return the handle parameter value or another pointer\n+ value, which is passed as the new handle parameter to soap::fdimeread and\n+ soap::fdimereadclose callbacks. When an error occurred in this callback,\n+ the callback should return NULL and set soap::error to an error code,\n+ e.g. using soap_receiver_fault. The callback may return NULL and set\n+ soap::error to #SOAP_OK when this specific DIME attachment should not to\n+ be streamed and the engine will simply skip it.\n+ * size_t (*soap.fdimeread)(struct soap *soap, void *handle, char *buf,\n+ size_t len) This callback is called by the engine to read a chunk of\n+ attachment data to transmit. The handle parameter contains the handle\n+ returned by the soap::fdimereadopen callback. The buf parameter is the\n+ buffer of length len into which a chunk of data should be written by the\n+ callback. The actual amount of data written into the buffer may be less\n+ than len and this actual amount should be returned by the callback. A\n+ return value of zero indicates an error and soap::error should be set.\n+ The __size member variable of the attachment struct/class with data (e.g.\n+ xsd__base64Binary or _xop__Include with __ptr, __size, id, type and\n+ options members) should be set by the application prior to the\n+ serialization of the message with attachments. The value of __size\n+ indicates the total size of the attachment data to be transmitted. If the\n+ __size member variable is zero and HTTP chunking is enabled (with\n+ #SOAP_IO_CHUNK), then DIME chunked transfers are activated by the engine,\n+ which is more flexible since the attachment data size does not need to be\n+ determined in advance. To use DIME chunked transfers, enable HTTP\n+ chunking with #SOAP_IO_CHUNK (also #SOAP_IO_STORE can be used, but this\n+ buffers the entire message in memory before transmission) and set the\n+ __size member variable of the attachment struct/class to zero. When DIME\n+ attachment chunking is enabled, this callback should completely fill the\n+ buf buffer with len bytes unless the last data chunk is reached and fewer\n+ bytes are returned.\n+ * void (*soap.fdimereadclose)(struct soap *soap, void *handle) This\n+ callback is called by the engine to close the DIME attachment stream\n+ after reading. The handle parameter contains the handle returned by the\n+ soap::fdimereadopen callback.\n+ * void *(*soap.fdimewriteopen)(struct soap *soap, const char *id, const\n+ char *type, const char *options) Called by the to start receiving a\n+ streaming DIME attachment. This callback opens a stream to start writing\n+ the attachment data received. The actual data stream will be written in\n+ chunks using the soap::fdimewrite callback until no more data is\n+ available and the soap::fdimewriteclose callback is called to close the\n+ stream. The id, type and options parameters are the id, type and options\n+ of the attachment struct/class (e.g. xsd__base64Binary or _xop__Include\n+ with __ptr, __size, id, type and options members), respectively. The\n+ callback should return a handle, which is passed to the soap::fdimewrite\n+ and soap::fdimewriteclose callbacks. The __ptr member variable of the\n+ attachment struct/class is set by the engine to the value of this handle.\n+ The __size member variable is set to the size of the attachment received.\n+ The maximum DIME attachment size received is limited by\n+ #SOAP_MAXDIMESIZE.\n+ * int (*soap.fdimewrite)(struct soap *soap, void *handle, const char *buf,\n+ size_t len) This callback is called by the engine to write a chunk of\n+ attachment data received. The handle parameter contains the handle\n+ returned by the soap::fdimewriteopen callback. The buf parameter contains\n+ the data of length len. Returns #SOAP_OK or a soap_status (int) error\n+ code.\n+ * void (*soap.fdimewriteclose)(struct soap *soap, void *handle) This\n+ callback is called by the engine to close the DIME attachment stream\n+ after writing. The handle parameter contains the handle returned by the\n+ soap::fdimewriteopen callback.\n+In addition, a void* soap::user member is available to pass user-defined data\n+to the callbacks. This way, you can set void* soap::user to point to\n+application data that the callbacks need such as a file name for example.\n+The following example illustrates the client-side initialization of an image\n+attachment struct to stream a file into a DIME attachment:\n+int main()\n+{\n+struct soap soap;\n+struct xsd__base64Binary image;\n+FILE *fd;\n+struct stat sb;\n+soap_init(&soap);\n+if (!fstat(fileno(fd), &sb) && sb.st_size > 0)\n+{\n+// because we can get the length of the file, we can stream it\n+soap.fdimereadopen = dime_read_open;\n+soap.fdimereadclose = dime_read_close;\n+soap.fdimeread = dime_read;\n+image.__ptr = (unsigned char*)fd; // must set to non-NULL (this is our fd\n+handle which we need in the callbacks)\n+image.__size = sb.st_size; // must set size\n+}\n+else\n+{\n+// don't know the size, so buffer it\n+size_t i;\n+int c;\n+image.__ptr = (unsigned char*)soap_malloc(&soap, MAX_FILE_SIZE);\n+for (i = 0; i < MAX_FILE_SIZE; i++)\n+{\n+if ((c = fgetc(fd)) == EOF)\n+break;\n+image.__ptr[i] = c;\n+}\n+fclose(fd);\n+image.__size = i;\n+}\n+image.type = \"image/jpeg\";\n+image.options = soap_dime_option(&soap, 0, \"My picture\");\n+if (soap_call_ns__webmethod(&soap, ...))\n+... // error\n+else\n+... // success\n+}\n+void *dime_read_open(struct soap *soap, void *handle, const char *id, const\n+char *type, const char *options)\n+{\n+return handle;\n+}\n+void dime_read_close(struct soap *soap, void *handle)\n+{\n+fclose((FILE*)handle);\n+}\n+size_t dime_read(struct soap *soap, void *handle, char *buf, size_t len)\n+{\n+return fread(buf, 1, len, (FILE*)handle);\n+}\n+soap::fdimereadopen\n+void *(* fdimereadopen)(struct soap *soap, void *handle, const char *id, const\n+char *type, const char *options)\n+Callback to open a streaming DIME attachment for reading.\n+Definition: stdsoap2.h:4694\n+soap::fdimereadclose\n+void(* fdimereadclose)(struct soap *soap, void *handle)\n+Callback to close a DIME attachment stream after reading.\n+Definition: stdsoap2.h:4739\n+soap::fdimeread\n+size_t(* fdimeread)(struct soap *soap, void *handle, char *buf, size_t len)\n+Callback to read data in a DIME attachment stream.\n+Definition: stdsoap2.h:4724\n+soap_malloc\n+void * soap_malloc(struct soap *soap, size_t len)\n+Allocate a block of heap memory managed by the specified soap context.\n+The following example illustrates the streaming of a DIME attachment into a\n+file by a client:\n+int main()\n+{\n+struct soap soap;\n+soap_init(&soap);\n+soap.fdimewriteopen = dime_write_open;\n+soap.fdimewriteclose = dime_write_close;\n+soap.fdimewrite = dime_write;\n+if (soap_call_ns__webmethod(&soap, ...))\n+... // error\n+else\n+... // success\n+}\n+void *dime_write_open(struct soap *soap, const char *id, const char *type,\n+const char *options)\n+{\n+FILE *handle = fopen(\"somefile\", \"wb\");\n+if (!handle)\n+{\n+soap->error = SOAP_EOF;\n+soap->errnum = errno; // get reason\n+}\n+return (void*)handle;\n+}\n+void dime_write_close(struct soap *soap, void *handle)\n+{\n+fclose((FILE*)handle);\n+}\n+int dime_write(struct soap *soap, void *handle, const char *buf, size_t len)\n+{\n+size_t nwritten;\n+while (len)\n+{\n+nwritten = fwrite(buf, 1, len, (FILE*)handle);\n+if (!nwritten)\n+{\n+soap->errnum = errno; // get reason\n+return SOAP_EOF;\n+}\n+len -= nwritten;\n+buf += nwritten;\n+}\n+return SOAP_OK;\n+}\n+soap::fdimewrite\n+int(* fdimewrite)(struct soap *soap, void *, const char *, size_t)\n+Callback to write data in a DIME attachment stream.\n+Definition: stdsoap2.h:4822\n+soap::fdimewriteclose\n+void(* fdimewriteclose)(struct soap *soap, void *handle)\n+Callback to close a DIME attachment stream after writing.\n+Definition: stdsoap2.h:4833\n+soap::fdimewriteopen\n+void *(* fdimewriteopen)(struct soap *soap, const char *id, const char *type,\n+const char *options)\n+Callback to open a streaming DIME attachment for writing.\n+Definition: stdsoap2.h:4810\n+soap::fopen\n+SOAP_SOCKET(* fopen)(struct soap *soap, const char *endpoint, const char *host,\n+int port)\n+Callback that opens a socket connection to a server endpoint.\n+Definition: stdsoap2.h:4495\n+soap::fclose\n+int(* fclose)(struct soap *soap)\n+Callback that closes the current socket connection.\n+Definition: stdsoap2.h:4520\n+SOAP_EOF\n+#define SOAP_EOF\n+A soap_status error code: unexpected end of file, no input, transmission\n+interrupted or timed out (sa...\n+Definition: stdsoap2.h:2365\n+Message compression with #SOAP_ENC_ZLIB can be used with DIME to compress the\n+entire message. However, compression requires buffering to determine the HTTP\n+content length header, which cancels the benefits of streaming DIME. To avoid\n+this, you should use chunked HTTP (with the output-mode #SOAP_IO_CHUNK flag)\n+with compression and streaming DIME. At the server side, when you set\n+#SOAP_IO_CHUNK before calling soap_serve, the engine will automatically revert\n+to buffering (#SOAP_IO_STORE flag is set). You can check this flag with (soap-\n+>omode & SOAP_IO) == SOAP_IO_CHUNK to see if the client accepts chunking. More\n+information about streaming chunked DIME can be found in Section Streaming\n+chunked_DIME .\n+ Warning\n+ The options member is a DIME-specific data structure, consisting of a 4\n+ byte header containing the option type info (hi byte, lo byte), option\n+ string length (hi byte, lo byte), followed by a non-'\\0' terminated\n+ string. The DIME handler recognizes one option at most.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Streaming chunked DIME\n+To send DIME attachments, the attachment sizes must be determined in advance to\n+calculate HTTP message length required to stream DIME over HTTP. However,\n+chunked DIME together with chunked HTTP can be used to omit this step. First\n+set the #SOAP_IO_CHUNK flag. Then, to stream chunked DIME, set the __size\n+member of an attachment to zero and enable DIME chunking. The DIME soap::\n+fdimeread callback then fetches data in chunks and it is important to fill the\n+entire buffer unless the end of the data has been reached and the last chunk is\n+to be send. That is, soap::fdimeread should return the value of the last len\n+parameter and fill the entire buffer buf for all chunks except the last. For\n+the last it returns 0.\n+You can also use the #SOAP_IO_STORE flag, but that cancels the benefits of\n+streaming DIME.\n+\ud83d\udd1d Back_to_table_of_contents\n+ WSDL bindings for DIME attachments\n+The wsdl2h tool recognizes DIME attachments and produces an annotated header\n+file. Both open and closed layouts are supported for transmitting DIME\n+attachments. For closed formats, all DIME attachments must be referenced from\n+the SOAP message, e.g. using hrefs with SOAP encoding and using the\n+application-specific reference attribute included in the xsd__base64Binary\n+struct or class for document/literal messaging.\n+The soapcpp2 tool does not produce a WSDL with DIME extensions. DIME is an\n+older binary format that has no WSDL protocol support, unlike MIME and MTOM.\n+\ud83d\udd1d Back_to_table_of_contents\n+ MTOM attachments\n+MTOM (Message Transmission Optimization Mechanism) is a relatively new format\n+for transmitting attachments with SOAP messages (see http://www.w3.org/TR/\n+soap12-mtom). MTOM attachments are essentially MIME attachments with\n+standardized mechanisms for cross referencing attachments from the SOAP body,\n+which is absent in (plain) MIME attachments and optional with DIME attachments.\n+Unlike the name suggests, the speed by which attached data is transmitted is\n+not increased compared to MIME, DIME, or even XML encoded base64 data, because\n+the performance differences when using gSOAP will be small. The advantage of\n+the format is the standardized attachment reference mechanism, which should\n+improve interoperability.\n+The MTOM specification mandates SOAP 1.2 and the use of the XOP namespace. The\n+XOP Include element xop:Include is defined in the interface header file as a\n+_xop__Include struct or class, that is used to reference attachment(s) from the\n+SOAP message body.\n+Because references from within the SOAP message body to attachments are\n+mandatory with MTOM, the implementation of the serialization and\n+deserialization of MTOM MIME attachments uses the extended binary type\n+comparable to DIME support. This binary type is predefined in the import/xop.h\n+file:\n+//gsoap xop schema import: http://www.w3.org/2004/08/xop/include\n+struct _xop__Include\n+{\n+unsigned char *__ptr;\n+int __size;\n+char *id;\n+char *type;\n+char *options;\n+};\n+typedef struct _xop__Include _xop__Include;\n+_xop__Include\n+XOP include structure with attachment data.\n+Definition: stdsoap2.h:9883\n+_xop__Include::type\n+char * type\n+MIME type of the data.\n+Definition: stdsoap2.h:9887\n+_xop__Include::id\n+char * id\n+NULL to generate an id or assign this member variable a unique UUID.\n+Definition: stdsoap2.h:9886\n+_xop__Include::options\n+char * options\n+description of the MIME/MTOM attachment or NULL\n+Definition: stdsoap2.h:9888\n+_xop__Include::__size\n+int __size\n+size of the binary data\n+Definition: stdsoap2.h:9885\n+_xop__Include::__ptr\n+unsigned char * __ptr\n+pointer to binary data\n+Definition: stdsoap2.h:9884\n+The additional id, type, and option members enable MTOM attachments for the\n+data pointed to by __ptr of size __size. The process for sending and receiving\n+MTOM XOP attachments is fully automated. The id member references the\n+attachment, typically a content id CID or UUID which can be obtained with\n+soap_rand_uuid. When set to NULL, a unique CID is automatically used. The type\n+field specifies the required MIME type of the binary data, and the optional\n+options member can be used to piggy-back descriptive text with an attachment.\n+The order of the declaration of the members is significant.\n+You can import xop.h in your interface header file to use the MTOM attachments,\n+for example:\n+#import \"import/xop.h\"\n+#import \"import/xmime5.h\"\n+#import \"import/soap12.h\"\n+/* alternatively, without the import above, use:\n+//gsoap SOAP-ENV schema namespace: http://www.w3.org/2003/05/soap-envelope\n+//gsoap SOAP-ENC schema namespace: http://www.w3.org/2003/05/soap-encoding\n+*/\n+//gsoap x schema namespace: http://my.first.mtom.net\n+struct x__myData\n+{\n+_xop__Include xop__Include; // attachment\n+@ char *xmime5__contentType; // and its contentType\n+};\n+int x__myMTOMtest(struct x__myData *in, struct x__myData *out);\n+When an instance of x__myDataType is serialized and either or both the id and\n+type members are non-NULL, the data is transmitted as MTOM MIME attachment if\n+the #SOAP_ENC_MTOM flag is set in the gSOAP's soap struct context:\n+struct soap *soap = soap_new1(SOAP_ENC_MTOM);\n+SOAP_ENC_MTOM\n+#define SOAP_ENC_MTOM\n+soap_mode ENC output flag value to enable MTOM XOP attachments in messages to\n+be sent,...\n+Definition: stdsoap2.h:1776\n+Without this flag, the attachments will be transmitted in DIME format, which is\n+not what we want. If your current clients and services are based on non-\n+streaming DIME attachments using the SOAP body reference mechanism (thus,\n+without using the soap_set_dime_attachment function) or plain base64 binary XML\n+data elements, it is very easy to adopt MTOM by renaming the binary types to\n+xop__Include and using the #SOAP_ENC_MTOM flag with the SOAP 1.2 namespace.\n+See also API documentation Module MIME_attachment_functions.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Generating MultipartRelated MIME attachment bindings in WSDL\n+To generate multipartRelated bindings in the WSDL file indicating the use of\n+MIME attachments, use:\n+//gsoap service method-mime-type: ...\n+This directive directive can be repeated for each attachment you want to\n+associate with a method's request and response message. see also Section\n+Directives .\n+For example:\n+#import \"import/xop.h\"\n+#import \"import/xmime5.h\"\n+#import \"import/soap12.h\"\n+//gsoap x schema namespace: http://my.first.mtom.net\n+struct x__myData\n+{\n+_xop__Include xop__Include; // attachment\n+@ char *xmime5__contentType; // and its contentType\n+};\n+//gsoap x service method-mime-type: myMTOMtest text/xml\n+int x__myMTOMtest(struct x__myData *in, struct x__myData *out);\n+The //gsoap x service method-mime-type: directive indicates that this operation\n+accepts text/xml MIME attachments. See the SOAP-with-Attachment specification\n+for the MIME types to use (for example, */* is a wildcard). If the operation\n+has more than one attachment, just repeat this directive for each attachment\n+you want to bind to the operation.\n+To bind attachments only to the request message of an operation, use\n+//gsoap service method-input-mime-type: ...\n+Similarly, to bind attachments only to the response message of an operation,\n+use:\n+//gsoap service method-output-mime-type: ...\n+The wsdl2h tool recognizes MIME attachments and produces an annotated header\n+file.\n+You can repeat these directives for all multipartRelated MIME attachments you\n+want to associate with the service operation input and output.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Sending and receiving MTOM attachments\n+A receiver must be informed to recognize MTOM attachments by setting the\n+#SOAP_ENC_MTOM flag of the soap context. Otherwise, the regular MIME attachment\n+mechanism (SwA) will be used to store attachments.\n+When using wsdl2h to build clients and/or services, you should use the\n+typemap.dat file included in the gSOAP source code package. The typemap.dat\n+file defines the XOP namespace and XML MIME namespaces as imported namespaces:\n+xop = \n+xmime5 = \n+xmime4 = \n+The wsdl2h tool uses the typemap.dat file to convert WSDL into an interface\n+header file. In this case we don't want the wsdl2h tool to read the XOP schema\n+and translate it, since we have a pre-defined _xop__Include element to handle\n+XOP for MTOM. This _xop__Include element is defined in xop.h. Therefore, the\n+bindings shown above will not translate the XOP and XML MIME schemas to code,\n+but generates #import statements instead in the generated interface header\n+file:\n+#import \"xop.h\"\n+#import \"xmime5.h\"\n+The #import statements are only added for those namespaces that are actually\n+used.\n+Let's take a look at an example. The wsdl2h importer generates a header file\n+with #import \"xop.h\" from a WSDL that references XOP, for example:\n+#import \"xop.h\"\n+#import \"xmime5.h\"\n+struct ns__Data\n+{\n+_xop__Include xop__Include;\n+@ char *xmime5__contentType;\n+};\n+Suppose the WSDL defines an operation:\n+int ns__echoData(struct ns__Data *in, struct ns__Data *out);\n+After generating the stub functions with the soapcpp2 tool, we can invoke the\n+stub at the client side with:\n+struct soap *soap = soap_new1(SOAP_ENC_MTOM);\n+struct ns__Data data;\n+data.xop__Include.__ptr = (unsigned char*)\"Hello world!\";\n+data.xop__Include.__size = 20;\n+data.xop__Include.id = NULL; // CID automatically generated by engine\n+data.xop__Include.type = \"text/html\"; // MIME type\n+data.xop__Include.options = NULL; // no descriptive info added\n+data.xmime5__contentType = \"text/html\"; // MIME type\n+if (soap_call_ns__echoData(soap, endpoint, action, &data, &data))\n+soap_print_fault(soap, stderr);\n+else\n+printf(\"Got data\\n\");\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+Note that the xop__Include.type member must be set to transmit MTOM\n+attachments, otherwise inline base64 XML will be sent.\n+At the server side, we show an example of an operation handler that just copies\n+the input data to output:\n+int ns__echoData(struct soap *soap, struct ns__Data *in, struct ns__data *out)\n+{\n+*out = *in;\n+return SOAP_OK;\n+}\n+The server must use the #SOAP_ENC_MTOM flag to initialize the soap context to\n+receive and send MTOM attachments.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Streaming MIME/MTOM\n+Streaming MIME/MTOM is achieved with callback functions to fetch and store data\n+during transmission. Three function callbacks for streaming MIME/MTOM output\n+and three callbacks for streaming MIME/MTOM input are available.\n+ * void *(*soap.fmimereadopen)(struct soap *soap, void *handle, const char\n+ *id, const char *type, const char *description) This callback is called\n+ by the engine to start sending a streaming MIME/MTOM attachment. This\n+ callback opens a stream to start reading the attachment data to send. The\n+ actual data stream will be read in chunks using the soap::fmimeread\n+ callback until no more data is available and the soap::fmimereadclose\n+ callback is called to close the stream. The handle parameter contains the\n+ value of the __ptr member variable of the attachment struct/class with\n+ data (e.g. xsd__base64Binary or _xop__Include with __ptr, __size, id,\n+ type and options members), which should be a pointer to specific\n+ information such as a file descriptor or a pointer to a some application-\n+ specific data to be passed to this callback. Both the __ptr and __size\n+ members of the attachment struct/class should have been set by the\n+ application prior to the serialization of the message with attachments.\n+ If the __size is zero and HTTP chunking is enabled (with #SOAP_IO_CHUNK),\n+ then chunked MIME/MTOM attachments are sent, see soap::fmimeread. The id,\n+ type and options parameters are the id (an optional ID), type (a MIME\n+ type) and options (a descriptive string) of the attachment struct/class,\n+ respectively, of which at least one member should be non-NULL. The\n+ callback should return the handle parameter value or another pointer\n+ value, which is passed as the new handle parameter to soap::fmimeread and\n+ soap::fmimereadclose callbacks. When an error occurred in this callback,\n+ the callback should return NULL and set soap::error to an error code,\n+ e.g. using soap_receiver_fault. The callback may return NULL and set\n+ soap::error to #SOAP_OK when this specific MIME/MTOM attachment should\n+ not to be streamed and the engine will simply skip it.\n+ * size_t (*soap.fmimeread)(struct soap *soap, void *handle, char *buf,\n+ size_t len) This callback is called by the engine to read a chunk of\n+ attachment data to transmit. The handle parameter contains the handle\n+ returned by the soap::fmimereadopen callback. The buf parameter is the\n+ buffer of length len into which a chunk of data should be written by the\n+ callback. The actual amount of data written into the buffer may be less\n+ than len and this actual amount should be returned by the callback. A\n+ return value of zero indicates an error and soap::error should be set.\n+ The __size member variable of the attachment struct/class with data (e.g.\n+ xsd__base64Binary or _xop__Include with __ptr, __size, id, type and\n+ options members) should be set by the application prior to the\n+ serialization of the message with attachments. The value of __size\n+ indicates the total size of the attachment data to be transmitted. If the\n+ __size member variable is zero and HTTP chunking is enabled (with\n+ #SOAP_IO_CHUNK), then MIME/MTOM chunked transfers are activated by the\n+ engine, which is more flexible since the attachment data size does not\n+ need to be determined in advance. To use MIME/MTOM chunked transfers,\n+ enable HTTP chunking with #SOAP_IO_CHUNK (also #SOAP_IO_STORE can be\n+ used, but this buffers the entire message in memory before transmission)\n+ and set the __size member variable of the attachment struct/class to\n+ zero. When MIME/MTOM attachment chunking is enabled, this callback should\n+ completely fill the buf buffer with len bytes unless the last data chunk\n+ is reached and fewer bytes are returned.\n+ * void (*soap.fmimereadclose)(struct soap *soap, void *handle) This\n+ callback is called by the engine to close the MIME/MTOM attachment stream\n+ after reading. The handle parameter contains the handle returned by the\n+ soap::fmimereadopen callback.\n+ * void *(*soap.fmimewriteopen)(struct soap *soap, void *handle, const char\n+ *id, const char *type, const char *description, enum soap_mime_encoding\n+ encoding) Called by the to start receiving a streaming MIME/MTOM\n+ attachment. This callback opens a stream to start writing the attachment\n+ data received. The actual data stream will be written in chunks using the\n+ soap::fmimewrite callback until no more data is available and the soap::\n+ fmimewriteclose callback is called to close the stream. The id, type and\n+ options parameters are the id, type and options of the attachment struct/\n+ class (e.g. xsd__base64Binary or _xop__Include with __ptr, __size, id,\n+ type and options members), respectively. The callback should return a\n+ handle, which is passed to the soap::fmimewrite and soap::fmimewriteclose\n+ callbacks. The __ptr member variable of the attachment struct/class is\n+ set by the engine to the value of this handle. The __size member variable\n+ is set to the size of the attachment received.\n+ * int (*soap.fmimewrite)(struct soap *soap, void *handle, const char *buf,\n+ size_t len) This callback is called by the engine to write a chunk of\n+ attachment data received. The handle parameter contains the handle\n+ returned by the soap::fmimewriteopen callback. The buf parameter contains\n+ the data of length len. Returns #SOAP_OK or a soap_status (int) error\n+ code.\n+ * void (*soap.fmimewriteclose)(struct soap *soap, void *handle) This\n+ callback is called by the engine to close the MIME/MTOM attachment stream\n+ after writing. The handle parameter contains the handle returned by the\n+ soap::fmimewriteopen callback.\n+In addition, a void* soap::user member is available to pass user-defined data\n+to the callbacks. This way, you can set void* soap::user to point to\n+application data that the callbacks need such as a file name for example.\n+The following example illustrates the client-side initialization of an image\n+attachment struct to stream a file into a MTOM attachment without HTTP chunking\n+(HTTP streaming chunked MTOM transfer is presented in Section Streaming_chunked\n+MIME/MTOM ):\n+int main()\n+{\n+struct soap soap;\n+struct xsd__base64Binary image;\n+FILE *fd;\n+struct stat sb;\n+soap_init1(&soap, SOAP_ENC_MTOM); // mandatory to enable MTOM\n+if (!fstat(fileno(fd), &sb) && sb.st_size > 0)\n+{\n+// because we can get the length of the file, we can stream it without chunking\n+soap.fmimereadopen = mime_read_open;\n+soap.fmimereadclose = mime_read_close;\n+soap.fmimeread = mime_read;\n+image.__ptr = (unsigned char*)fd; // must set to non-NULL (this is our fd\n+handle which we need in the callbacks)\n+image.__size = sb.st_size; // must set size\n+}\n+else\n+{\n+// don't know the size, so buffer it\n+size_t i;\n+int c;\n+image.__ptr = (unsigned char*)soap_malloc(&soap, MAX_FILE_SIZE);\n+for (i = 0; i < MAX_FILE_SIZE; i++)\n+{\n+if ((c = fgetc(fd)) == EOF)\n+break;\n+image.__ptr[i] = c;\n+}\n+fclose(fd);\n+image.__size = i;\n+}\n+image.type = \"image/jpeg\"; // MIME type\n+image.options = \"This is my picture\"; // description of object\n+if (soap_call_ns__webmethod(&soap, ...))\n+... // error\n+else\n+... // success\n+}\n+void *mime_read_open(struct soap *soap, void *handle, const char *id, const\n+char *type, const char *description)\n+{\n+return handle;\n+}\n+void mime_read_close(struct soap *soap, void *handle)\n+{\n+fclose((FILE*)handle);\n+}\n+size_t mime_read(struct soap *soap, void *handle, char *buf, size_t len)\n+{\n+return fread(buf, 1, len, (FILE*)handle);\n+}\n+soap::fmimereadopen\n+void *(* fmimereadopen)(struct soap *soap, void *, const char *, const char *,\n+const char *)\n+Callback to open a streaming MIME/MTOM attachment for reading.\n+Definition: stdsoap2.h:4896\n+soap::fmimereadclose\n+void(* fmimereadclose)(struct soap *soap, void *handle)\n+Callback to close a MIME/MTOM attachment stream after reading.\n+Definition: stdsoap2.h:4929\n+soap::fmimeread\n+size_t(* fmimeread)(struct soap *soap, void *handle, char *buf, size_t len)\n+Callback to read data in a MIME/MTOM attachment stream.\n+Definition: stdsoap2.h:4914\n+The following example illustrates the streaming of a MIME/MTOM attachment into\n+a file by a client:\n+int main()\n+{\n+struct soap soap;\n+soap_init(&soap);\n+soap.fmimewriteopen = mime_write_open;\n+soap.fmimewriteclose = mime_write_close;\n+soap.fmimewrite = mime_write;\n+if (soap_call_ns__webmethod(&soap, ...))\n+... // error\n+else\n+... // success\n+}\n+void *mime_write_open(struct soap *soap, const char *id, const char *type,\n+const char *description, enum soap_mime_encoding encoding)\n+{\n+FILE *handle = fopen(\"somefile\", \"wb\");\n+// We ignore the MIME content transfer encoding here, but should check\n+if (!handle)\n+{\n+soap->error = SOAP_EOF;\n+soap->errnum = errno; // get reason\n+}\n+return (void*)handle;\n+}\n+void mime_write_close(struct soap *soap, void *handle)\n+{\n+fclose((FILE*)handle);\n+}\n+int mime_write(struct soap *soap, void *handle, const char *buf, size_t len)\n+{\n+size_t nwritten;\n+while (len)\n+{\n+nwritten = fwrite(buf, 1, len, (FILE*)handle);\n+if (!nwritten)\n+{\n+soap->errnum = errno; // get reason\n+return SOAP_EOF;\n+}\n+len -= nwritten;\n+buf += nwritten;\n+}\n+return SOAP_OK;\n+}\n+soap::fmimewriteclose\n+void(* fmimewriteclose)(struct soap *soap, void *handle)\n+Callback to close a MIME/MTOM attachment stream after writing.\n+Definition: stdsoap2.h:5020\n+soap::fmimewrite\n+int(* fmimewrite)(struct soap *soap, void *handle, const char *buf, size_t len)\n+Callback to write data in a MIME attachment stream.\n+Definition: stdsoap2.h:5009\n+soap::fmimewriteopen\n+void *(* fmimewriteopen)(struct soap *soap, void *handle, const char *id, const\n+char *type, const char *description, enum soap_mime_encoding encoding)\n+Callback to open a streaming MIME/MTOM attachment for writing.\n+Definition: stdsoap2.h:4998\n+soap_mime_encoding\n+soap_mime_encoding\n+RFC2045 MIME content transfer encodings.\n+Definition: stdsoap2.h:10223\n+Message compression with #SOAP_ENC_ZLIB can be used with MIME to compress the\n+entire message. However, compression requires buffering to determine the HTTP\n+content length header, which cancels the benefits of streaming MIME. To avoid\n+this, you should use chunked HTTP (with the output-mode #SOAP_IO_CHUNK flag)\n+with compression and streaming MIME. At the server side, when you set\n+#SOAP_IO_CHUNK before calling soap_serve, the engine will automatically revert\n+to buffering (#SOAP_IO_STORE flag is set). You can check this flag with (soap-\n+>omode & SOAP_IO) == SOAP_IO_CHUNK to see if the client accepts chunking. More\n+information about streaming chunked MIME can be found in Section Streaming\n+chunked_MIME/MTOM ..\n+Note that the example above for mime_read uses a handle that points to the open\n+file FILE*. The simple example above is not recommended when the platform\n+imposes a limit on the number of open file descriptors. You can use the handle\n+to pass along more information than just the file descriptor. So for example,\n+when the number of open file descriptors is limited on your platform, you\n+should let the handle point to a structure with file-related information. The\n+C++ example below illustrates this:\n+file.xop__Include = soap_new__xop__Include(soap);\n+file.xop__Include->id = NULL;\n+file.xop__Include->type = type;\n+file.xop__Include->options = NULL;\n+file.xmime5__contentType = type;\n+file.filename = filename;\n+// The object holding all information to read data\n+FileStreamIn *ins = new FileStreamIn(errorhandler);\n+ins->setFilePath(path);\n+ins->setFileName(filename);\n+file.xop__Include->__size = size;\n+file.xop__Include->__ptr = (unsigned char*)ins;\n+soap::path\n+char path[SOAP_TAGLEN]\n+The client request path as received on the server side.\n+Definition: stdsoap2.h:4032\n+To read the MTOM data for transmission:\n+void *mime_read_open(struct soap *soap, void *handle, const char *id, const\n+char *type, const char *description)\n+{\n+if (!handle)\n+return NULL;\n+FileStreamIn *ins = (FileStreamIn*)handle;\n+if (!ins->open())\n+{\n+soap->error = SOAP_ERR;\n+return NULL;\n+}\n+return handle;\n+}\n+void mime_read_close(struct soap *soap, void *handle)\n+{\n+if (!handle)\n+return;\n+FileStreamIn *ins = (FileStreamIn*)handle;\n+delete ins;\n+}\n+size_t mime_read(struct soap *soap, void *handle, char *buf, size_t len)\n+{\n+if (!handle)\n+return 0;\n+FileStreamIn *ins = (FileStreamIn*)handle;\n+size_t nread = ins->read(buf, len);\n+if (ins->streamError())\n+{\n+soap->error = ins->streamError();\n+return 0;\n+}\n+return nread;\n+}\n+SOAP_ERR\n+#define SOAP_ERR\n+A soap_status error code: an unspecified error occurred.\n+Definition: stdsoap2.h:2374\n+\ud83d\udd1d Back_to_table_of_contents\n+ Redirecting inbound MIME/MTOM streams based on SOAP body content\n+When it is preferable or required to redirect inbound MIME/MTOM attachment\n+streams based on SOAP message body content, where for example the names of the\n+resources are listed in the SOAP message body, an alternative mechanism must be\n+used to handle the attachments. This mechanism can be used at the client and\n+server side.\n+Because the routing of the streams is accomplished with explicit function\n+calls, this method should only be used when required and should not be\n+considered optional. That is, when you enable this method, you must check for\n+pending MIME/MTOM attachments and handle them appropriately. This is true even\n+when you don't expect MIME/MTOM attachments in the payload, because the peer\n+may trick you by sending attachments anyway and you should be prepared to\n+accept or reject them.\n+The explicit MIME/MTOM streaming mechanism consists of three API functions:\n+ * void soap_post_check_mime_attachments(struct_soap_*soap) This function\n+ enables post-processing of MIME/MTOM attachments received. This means\n+ that the presence of MIME/MTOM attachments must be explicitly checked by\n+ calling soap_check_mime_attachments after the message was received. When\n+ this function returns nonzero (true), then the attachments can be\n+ retrieved by calling soap_recv_mime_attachment repeatedly to retrieve\n+ each attachment until this function returns NULL. This function returns a\n+ pointer to a struct soap_multipart attachment.\n+ * int soap_check_mime_attachments(struct_soap_*soap) This function checks\n+ the presence of a MIME/MTOM attachment after calling a service operation\n+ by returning nonzero when attachments are present. Returns nonzero if\n+ attachments are present. Requires soap_post_check_mime_attachments.\n+ * struct soap_multipart *soap_recv_mime_attachment(struct soap *soap, void\n+ *handle) This function parses an attachment and invokes the MIME\n+ callbacks when set. The handle parameter is passed to fmimewriteopen. The\n+ handle may contain any data that is extracted from the SOAP message body\n+ to guide the redirection of the stream in the callbacks. Returns a struct\n+ with a char *ptr member that contains the handle value returned by the\n+ fmimewriteopen callback, and char *id, char *type, and char *description\n+ member variables with the MIME id, type, and description info when\n+ present in the attachment.\n+Example client in C:\n+struct soap *soap = soap_new1(SOAP_ENC_MTOM);\n+soap_post_check_mime_attachments(soap);\n+if (soap_call_ns__myMethod(soap, ...))\n+{\n+soap_print_fault(soap, stderr); // an error occurred\n+}\n+else\n+{\n+if (soap_check_mime_attachments(soap))\n+{\n+// attachments are present, channel is still open\n+do\n+{\n+... // get data 'handle' from SOAP response and pass to callbacks\n+... // set the fmime callbacks, if needed\n+struct soap_multipart *content = soap_recv_mime_attachment(soap,\n+(void*)handle);\n+printf(\"Received attachment with id=%s and type=%s\\n\", content->id?content->id:\n+\"\", content->type?content->type:\"\");\n+} while (content);\n+if (soap->error)\n+soap_print_fault(soap, stderr);\n+}\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+soap_recv_mime_attachment\n+struct soap_multipart * soap_recv_mime_attachment(struct soap *soap, void\n+*handle)\n+Get a MIME/MTOM attachment.\n+soap_post_check_mime_attachments\n+int soap_post_check_mime_attachments(struct soap *soap)\n+Enable post-processing of MIME/MTOM attachments.\n+soap_check_mime_attachments\n+int soap_check_mime_attachments(struct soap *soap)\n+Check for a MIME/MTOM attachment.\n+The server-side service operations are implemented as usual, but with\n+additional checks for MIME/MTOM attachments:\n+int main()\n+{\n+struct soap *soap = soap_new1(SOAP_ENC_MTOM);\n+soap_post_check_mime_attachments(soap);\n+soap_serve(soap);\n+}\n+int ns__myMethod(struct soap *soap, ...)\n+{\n+... // server-side processing logic\n+if (soap_check_mime_attachments(soap))\n+{\n+// attachments are present, channel is still open\n+do\n+{\n+... // get data 'handle' from SOAP request and pass to callbacks\n+... // set the fmime callbacks, if needed\n+struct soap_multipart *content = soap_recv_mime_attachment(soap,\n+(void*)handle);\n+printf(\"Received attachment with id=%s and type=%s\\n\", content->id?content->id:\n+\"\", content->type?content->type:\"\");\n+} while (content);\n+if (soap->error)\n+return soap->error;\n+}\n+... // server-side processing logic\n+return SOAP_OK;\n+}\n+\ud83d\udd1d Back_to_table_of_contents\n+ Streaming chunked MIME/MTOM\n+To send MIME/MTOM attachments, the attachment sizes must be determined in\n+advance to calculate HTTP message length required to stream MIME/MTOM over\n+HTTP. However, chunked MIME/MTOM together with chunked HTTP can be used to omit\n+this step. First set the #SOAP_IO_CHUNK flag. Then, to stream chunked MIME/\n+MTOM, set the __size member of an attachment to zero and enable MIME/MTOM\n+chunking. The MIME/MTOM soap::fmimeread callback then fetches data in chunks\n+and it is important to fill the entire buffer unless the end of the data has\n+been reached and the last chunk is to be send. That is, soap::fmimeread should\n+return the value of the last len parameter and fill the entire buffer buf for\n+all chunks except the last. For the last it returns 0.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP/XML over UDP\n+UDP is a simple, unreliable datagram protocol: UDP sockets are connectionless.\n+UDP address formats are identical to those used by TCP. In particular UDP\n+provides a port identifier in addition to the normal Internet address format.\n+The UDP port space is separate from the TCP port space (i.e. a UDP port may not\n+be \"connected\" to a TCP port). In addition broadcast packets may be sent\n+(assuming the underlying network supports this) by using a reserved \"broadcast\n+address\"; this address is network interface dependent.\n+Client-side messages with SOAP-over-UDP endpoint URLs (soap.udp://...) are\n+automatically transmitted as datagrams. Server-side applications should set the\n+#SOAP_IO_UDP mode flag to accept UDP requests, e.g. using soap_new1,\n+soap_init1, or soap_set_mode.\n+The maximum message length for datagram packets is restricted by the buffer\n+size #SOAP_BUFLEN, which is 65536 by default, unless compiled with #WITH_LEAN\n+to support small-scale embedded systems. For UDP transport #SOAP_BUFLEN must\n+not exceed the maximum UDP packet size 65536 (the size of datagram messages is\n+constrained by the UDP packet size 2^16=65536 as per UDP standard). You can use\n+compression with #SOAP_ENC_ZLIB to reduce the message size, but note that\n+compressed SOAP-over-UDP is a gSOAP-specific feature because it is not part of\n+the SOAP-over-UDP specification.\n+The SOAP-over-UDP specification relies on WS-Addressing. The wsa.h file in the\n+import directory defines the WS-Addressing elements for client and server\n+applications.\n+The gSOAP implementation conforms to the SOAP-over-UDP requirements:\n+ * SOAP-over-UDP server endpoint URL format: soap.udp://host:port/path\n+ * Support one-way message-exchange pattern (MEP) where a SOAP envelope is\n+ carried in a user datagram.\n+ * Support request-response message-exchange pattern (MEP) where SOAP\n+ envelopes are carried in user datagrams.\n+ * Support multicast transmission of SOAP envelopes carried in user\n+ datagrams.\n+ * Support both SOAP 1.1 and SOAP 1.2 envelopes.\n+The following additional features are also available, but are not supported by\n+the SOAP-over-UDP specification:\n+ * Zlib/gzip message compression (use compile-time flag #WITH_GZIP).\n+ * SOAP with DIME attachments over UDP.\n+ * SOAP with MIME/MTOM attachments over UDP.\n+ * Support for IPv6 (use compile-time flag #WITH_IPV6)\n+\ud83d\udd1d Back_to_table_of_contents\n+ Using WS-Addressing with SOAP-over-UDP\n+A SOAP-over-UDP application may use WS-Addressing to control message delivery\n+as per SOAP-over-UDP specification.\n+The wsa.h file in the import directory defines the WS-Addressing elements. To\n+include the WS-Addressing elements in the SOAP Header for messaging, a WS-\n+Addressing capable SOAP_ENV__Header struct should be defined in your header\n+file by importing gsoap/import/wsa.h or gsoap/import/wsa5.h:\n+#import \"wsa.h\"\n+We also included a //gsoap wsa schema import: directive in the wsa.h file to\n+enable the generation of WSDL specifications that import (instead of includes)\n+the WS-Addressing elements. Note that the //gsoapopt w directive (which adds\n+option -w to run soapcpp2 -w) must not be present in your header file to enable\n+WSDL generation.\n+One-way SOAP-over-UDP messages (see Section Asynchronous_one-way_message\n+passing ) should be declared to include the wsa:MessageID, wsa:To, and wsa:\n+Action elements in the SOAP Header of the request message as follows:\n+//gsoap ns service method-header-part: sendString wsa__MessageID\n+//gsoap ns service method-header-part: sendString wsa__To\n+//gsoap ns service method-header-part: sendString wsa__Action\n+int ns__sendString(char *str, void);\n+Request-response SOAP-over-UDP messages should be declared to include the wsa:\n+MessageID, wsa:To, wsa:Action, and wsa:ReplyTo elements in the SOAP Header of\n+the request message, and the the wsa:MessageID, wsa:To, wsa:Action, and wsa:\n+RelatesTo elements in the SOAP Header of the response message:\n+//gsoap ns service method-header-part: echoString wsa__MessageID\n+//gsoap ns service method-header-part: echoString wsa__To\n+//gsoap ns service method-header-part: echoString wsa__Action\n+//gsoap ns service method-input-header-part: echoString wsa__ReplyTo\n+//gsoap ns service method-output-header-part: echoString wsa__RelatesTo\n+int ns__echoString(char *str, char **res);\n+For the content requirements of these elements, please consult the SOAP-over-\n+UDP specification and/or read the next sections explaining SOAP-over-UDP\n+unicast, multicast, one-way, and request-response client and server\n+applications.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Client-side one-way UDP unicast\n+This example assumes that the interface header file includes the SOAP Header\n+with WS-Addressing elements, see The_WS-Addressing_plugin, and the\n+ns__sendString function discussed in Section Using_WS-Addressing_with_SOAP-\n+over-UDP.\n+#include \"plugin/wsaapi.h\"\n+struct soap soap;\n+soap_init(&soap);\n+soap_register_plugin(&soap, soap_wsa);\n+soap.send_timeout = 5; // 5 seconds max socket delay\n+// set up WS-Addressing header\n+soap_wsa_request(&soap, \"message ID\", \"endpoint\", \"SOAP action\");\n+// Send the message over UDP:\n+if (soap_send_ns__echoString(&soap, \"soap.udp://endpoint\", \"SOAP action\",\n+\"hello world!\"))\n+soap_print_fault(&soap, stderr); // error\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+soap_register_plugin\n+int soap_register_plugin(struct soap *soap, int(*fcreate)(struct soap *, struct\n+soap_plugin *, void *))\n+Register a plugin.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Client-side one-way UDP multicast\n+This example is similar to the one-way unicast example discussed above, but\n+uses a broadcast address and the SO_BROADCAST socket option:\n+#include \"plugin/wsaapi.h\"\n+struct soap soap;\n+in_addr_t addr = inet_addr(\"1.2.3.4\"); // optional\n+soap_init(&soap);\n+soap_register_plugin(&soap, soap_wsa);\n+soap.send_timeout = 5; // 5 seconds max socket delay\n+soap.connect_flags = SO_BROADCAST; // required for broadcast\n+soap.ipv4_multicast_if = &addr; // optional for IPv4: see setsockopt IPPROTO_IP\n+IP_MULTICAST_IF\n+soap.ipv6_multicast_if = addr; // optional for IPv6: multicast sin6_scope_id\n+soap.ipv4_multicast_ttl = 1; // optional, see setsockopt IPPROTO_IP,\n+IP_MULTICAST_TTL\n+// set up WS-Addressing header\n+soap_wsa_request(&soap, \"message ID\", \"endpoint\", \"SOAP action\");\n+// Send the message over UDP to a broadcast address:\n+if (soap_send_ns__echoString(&soap, \"soap.udp://endpoint\", \"SOAP action\",\n+\"hello world!\"))\n+soap_print_fault(&soap, stderr); // report error\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+soap::ipv6_multicast_if\n+unsigned int ipv6_multicast_if\n+User-definable value to set sockaddr_in6::sin6_scope_id when nonzero.\n+Definition: stdsoap2.h:3592\n+soap::connect_flags\n+int connect_flags\n+User-definable setsockopt level SOL_SOCKET flags when connecting soap::socket\n+to a server (the value ...\n+Definition: stdsoap2.h:3377\n+soap::ipv4_multicast_ttl\n+unsigned char ipv4_multicast_ttl\n+User-definable value to set setsockopt level IPPROTO_IP to IP_MULTICAST_TTL\n+when nonzero.\n+Definition: stdsoap2.h:3620\n+soap::ipv4_multicast_if\n+char * ipv4_multicast_if\n+User-definable value to set setsockopt level IPPROTO_IP to IP_MULTICAST_IF when\n+non-NULL.\n+Definition: stdsoap2.h:3599\n+Please refer to the socket options for IPPROTO_IP IP_MULTICAST_IF to specify\n+the default interface for multicast datagrams to be sent from. This is a struct\n+in_addr (in_addr_t for sin6_scope_id) interface value. Otherwise, the default\n+interface set by the system administrator will be used (if any).\n+Please refer to the socket options for IPPROTO_IP IP_MULTICAST_TTL to limit the\n+lifetime of the packet. Multicast datagrams are sent with a default value of 1,\n+to prevent them to be forwarded beyond the local network. This parameter can be\n+set between 1 to 255.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Client-side request-response UDP unicast\n+This example assumes that the interface header file for soapcpp2 includes the\n+SOAP Header with WS-Addressing elements imported with #import \"wsa.h\" and the\n+ns__echoString function discussed in Section Using_WS-Addressing_with_SOAP-\n+over-UDP .\n+#include \"plugin/wsaapi.h\"\n+struct soap soap;\n+struct wsa__EndpointReferenceType replyTo; // (anonymous) reply address\n+char *res; // server response\n+soap_init(&soap);\n+soap_register_plugin(&soap, soap_wsa);\n+soap.send_timeout = 5; // 5 seconds max socket delay\n+soap.recv_timeout = 5; // 5 seconds max socket delay\n+// set up WS-Addressing header\n+soap_wsa_request(&soap, \"message ID\", \"endpoint\", \"SOAP action\");\n+soap_wsa_add_ReplyTo(&soap, NULL); // anonymous ReplyTo address\n+// Send and receive messages over UDP:\n+if (soap_call_ns__echoString(&soap, \"soap.udp://endpoint \"SOAP action\", \"hello\n+world!\", &res))\n+{\n+if (soap.error == SOAP_EOF && soap.errnum == 0)\n+... // Timeout: no response from server (message already delivered?)\n+else\n+soap_print_fault(&soap, stderr);\n+}\n+else\n+... // UDP server response is stored in 'res'\n+// check SOAP header received, if applicable\n+check_header(&soap.header);\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+\ud83d\udd1d Back_to_table_of_contents\n+ Client-side request-response multicast\n+This example is similar to the request-response unicast example discussed\n+above, but uses a broadcast address and the SO_BROADCAST socket option. Because\n+we expect to receive multiple responses, we also need to use separate request-\n+response messages to send one request and consume multiple responses. In this\n+example we defined a bcastString request and a bcastStringResponse response\n+message, which are essentially declared as one-way messages in the header file:\n+//gsoap ns service method-header-part: bcastString wsa__MessageID\n+//gsoap ns service method-header-part: bcastString wsa__To\n+//gsoap ns service method-header-part: bcastString wsa__Action\n+//gsoap ns service method-header-part: bcastString wsa__ReplyTo\n+int ns__bcastString(char *str, void);\n+//gsoap ns service method-header-part: bcastStringResponse wsa__MessageID\n+//gsoap ns service method-header-part: bcastStringResponse wsa__To\n+//gsoap ns service method-header-part: bcastStringResponse wsa__Action\n+//gsoap ns service method-header-part: bcastStringResponse wsa__RelatesTo\n+int ns__bcastStringResponse(char *res, void);\n+To obtain response one-way operations, use wsdl2h_-b_option_-b.\n+The client code includes a loop to receive response messages until a timeout\n+occurs:\n+#include \"plugin/wsaapi.h\"\n+struct soap soap;\n+struct SOAP_ENV__Header header;\n+struct wsa__EndpointReferenceType replyTo;\n+char *res;\n+soap_init(&soap);\n+soap_register_plugin(&soap, soap_wsa);\n+soap.connect_flags = SO_BROADCAST;\n+soap.send_timeout = 5; // 5 seconds max socket delay\n+soap.recv_timeout = 5; // 5 seconds max socket delay\n+// set up WS-Addressing header\n+soap_wsa_request(&soap, \"message ID\", \"endpoint\", \"SOAP action\");\n+soap_wsa_add_ReplyTo(&soap, NULL); // anonymous ReplyTo address\n+if (soap_send_ns__bcastString(&soap, \"soap.udp://endpoint\", \"SOAP action\",\n+\"hello world!\"))\n+{\n+soap_print_fault(&soap, stderr);\n+}\n+else\n+{\n+while (1)\n+{\n+if (soap_recv_ns__bcastStringResponse(&soap, &res))\n+break;\n+... // Got response 'res' from a server\n+}\n+if (soap.error == SOAP_EOF && soap.errnum == 0)\n+... // Timeout: no more messages received\n+else\n+soap_print_fault(&soap, stderr);\n+}\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+Note that a server for the bcastString does not need to use two-one way\n+messages. Thus, multicast request-response message pattern can be declared and\n+implemented as request-response operations at the server side.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP-over-UDP server\n+The following example code illustrates a SOAP-over-UDP server for one-way\n+sendString and request-response echoString messages. This example assumes that\n+the interface header file includes the SOAP Header with WS-Addressing elements\n+imported with #import \"wsa.h\" and the ns__echoString function discussed in\n+Section Using_WS-Addressing_with_SOAP-over-UDP .\n+#include \"plugin/wsaapi.h\"\n+int main()\n+{\n+struct soap soap;\n+soap_init1(&soap, SOAP_IO_UDP); // must set UDP flag\n+soap_register_plugin(&soap, soap_wsa);\n+// bind to host (NULL = current host) and port:\n+if (!soap_valid_socket(soap_bind(&soap, host, port, BACKLOG)))\n+{\n+soap_print_fault(&soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+while (1)\n+{\n+if (soap_serve(&soap))\n+soap_print_fault(&soap, stderr); // report the problem\n+soap_destroy(&soap);\n+soap_end(&soap);\n+}\n+soap_done(&soap); // close connection\n+}\n+int ns__echoString(struct soap *soap, char *str, char **res)\n+{\n+// check if WS-Addressing headers are present and correct\n+if (soap_wsa_check(soap))\n+return soap->error;\n+// should check for duplicate messages (something that WS-ReliableMessaging\n+does too)\n+if (check_received(soap->header->wsa__MessageID))\n+{\n+// Request message already received\n+return SOAP_STOP; // don't return response\n+}\n+*res = str;\n+// return OK with WS-Addressing reply headers, message ID is id_count+1\n+return soap_wsa_reply(soap, soap_int2s(soap, id_count++), \"http://genivia.com/\n+udp/echoStringResponse\");\n+}\n+int ns__sendString(struct soap *soap, char *str)\n+{\n+if (soap_wsa_check(soap))\n+return soap->error;\n+// should check for duplicate messages\n+if (check_received(soap->header->wsa__MessageID))\n+{\n+// Request message already received\n+return SOAP_STOP;\n+}\n+return SOAP_OK;\n+}\n+int ns__sendStringResponse(struct soap *soap, char *res)\n+{\n+return SOAP_NO_METHOD; // we don't serve this operation\n+}\n+SOAP_IO_UDP\n+#define SOAP_IO_UDP\n+soap_mode IO input/output flag value to use UDP datagrams, message size is\n+limited to UDP packet size\n+Definition: stdsoap2.h:1596\n+soap_int2s\n+const char * soap_int2s(struct soap *soap, int value)\n+Convert a signed 32 bit integer to a decimal string.\n+The server binds to a host and port and accepts messages in a loop. Because UDP\n+does not have the equivalent of an accept, the messages cannot be dispatched to\n+threads. Instead the soap_serve waits for a message and immediately accepts it.\n+You can use a receive timeout value for soap::recv_timeout to make soap_serve\n+non-blocking.\n+To obtain response one-way operations from a WSDL, use wsdl2h_-b_option_-b.\n+This produces additional one-way operations to support asynchronous handling of\n+response messages in the same way requests are handled.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SOAP-over-UDP multicast receiving server\n+For UDP multicast support, follow the suggestions in Section SOAP-over-UDP\n+server and change the initialization parts of the code to enable UDP multicast\n+port binding by to telling the kernel which multicast groups you are interested\n+in:\n+#include \"plugin/wsaapi.h\"\n+int main()\n+{\n+struct soap soap;\n+struct ip_mreq mcast;\n+soap_init1(&soap, SOAP_IO_UDP);\n+soap_register_plugin(&soap, soap_wsa);\n+if (!soap_valid_socket(soap_bind(&soap, host, port, BACKLOG)))\n+{\n+soap_print_fault(&soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+mcast.imr_multiaddr.s_addr = inet_addr(put IP multicast address of group here);\n+mcast.imr_interface.s_addr = htonl(INADDR_ANY);\n+if (setsockopt(soap.master, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mcast, sizeof\n+(mcast))<0)\n+... // error\n+... //\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+soap::master\n+SOAP_SOCKET master\n+The socket set by soap_bind (or the C++ service class bind method) to serve as\n+the master socket boun...\n+Definition: stdsoap2.h:3023\n+\ud83d\udd1d Back_to_table_of_contents\n+ Compile-time flags\n+The following macros are defined in the API documentation Module WITH_MACRO\n+compile-time_flags. These macros are used to enable or disable features as\n+specified below, by compiling source code files with compiler option -D to set\n+the macro:\n+define result\n+#SOAPDEFS_H the header file to include, if different from\n+ soapdefs.h\n+#WITH_SOAPDEFS_H includes the soapdefs.h file for custom settings,\n+ see Section Using_the_soapdefs.h_header_file\n+#WITH_COMPAT removes dependency on C++ stream libraries and C++\n+ exceptions\n+#WITH_LEAN creates a small-footprint executable, see Section\n+ How_to_minimize_application_memory_footprint\n+#WITH_LEANER creates an even smaller footprint executable, see\n+ Section How_to_minimize_application_memory_footprint\n+#WITH_FAST use faster memory allocation when used with\n+ #WITH_LEAN or #WITH_LEANER\n+#WITH_COOKIES enables HTTP cookies, see Sections Client-side\n+ cookie_support and Server-side_cookie_support\n+#WITH_INSECURE_COOKIES enables HTTP cookies and allows cookies with their\n+ Secure flag set to be sent over insecure channels\n+#WITH_IPV6 enables IPv6 support\n+#WITH_IPV6_V6ONLY enables IPv6 support with IPv6-only server option\n+#WITH_OPENSSL enables OpenSSL, see Sections Secure_clients_with\n+ HTTPS and Secure_Web_services_with_HTTPS\n+#WITH_GNUTLS enables GNUTLS, see Sections Secure_clients_with\n+ HTTPS and Secure_Web_services_with_HTTPS\n+#WITH_GZIP enables gzip and deflate compression, see Section\n+ Zlib_compression\n+#WITH_ZLIB enables deflate compression only, see Section Zlib\n+ compression\n+#WITH_NTLM enables NTLM support\n+#WITH_C_LOCALE force the use locale functions when available to\n+ ensure locale-independent number conversions\n+#WITH_NO_C_LOCALE remove the use of locale functions to improve\n+ portability\n+#WITH_INCLUDE_XLOCALE_H force the inclusion of to define\n+ locale_t and _l functions, to improve portability\n+#WITH_DOM enable DOM parsing in the engine, required by the\n+ WS-Security plugin\n+#WITH_REPLACE_ILLEGAL_UTF8 enable strict UTF-8, replaces UTF-8 content that is\n+ outside the allowed range with U+FFFD\n+#WITH_FASTCGI enables FastCGI, see Section FastCGI\n+ removes IO operations, to eliminate the use of BSD\n+#WITH_NOIO sockets, see Section How_to_remove_the_BSD_socket\n+ library_requirement\n+ removes id and href/ref multi-reference data, more\n+#WITH_NOIDREF aggressive than using the #SOAP_XML_TREE runtime\n+ flag\n+#WITH_NOHTTP removes the HTTP stack to reduce code size\n+#WITH_NOZONE disables and ignores the timezone in xsd:dateTime\n+ values\n+#WITH_NOEMPTYNAMESPACES disables xmlns=\"\" default empty namespaces from XML\n+ messages\n+#WITH_NOEMPTYSTRUCT inserts a dummy member in empty structs to allow\n+ compilation\n+ omit SOAP Header and Fault serialization code,\n+#WITH_NOGLOBAL prevents duplicate definitions with generated\n+ soapXYZLib code\n+ disables dependence on global namespaces table, a\n+#WITH_NONAMESPACES table must be set explicitly with\n+ soap_set_namespaces see also Section XML_namespaces\n+ and_the_namespace_mapping_table\n+#WITH_CDATA retains the parsed CDATA sections in literal XML\n+ strings\n+#WITH_PURE_VIRTUAL enables C++ abstract service classes with pure\n+ virtual methods, requires soapcpp2 option -i or -j\n+ enables C++ base service classes with default\n+#WITH_DEFAULT_VIRTUAL virtual methods returning fault #SOAP_NO_METHOD,\n+ requires soapcpp2 option -i or -j\n+#WITH_CASEINSENSITIVETAGS enables case insensitive XML parsing\n+ prevents a server port from staying in listening\n+#WITH_SOCKET_CLOSE_ON_EXIT mode after exit by internally setting fcntl(sock,\n+ F_SETFD, FD_CLOEXEC)\n+#WITH_TCPFIN enables TCP FIN after sends when socket is ready to\n+ close\n+ enables a \"self pipe\" to enable the\n+#WITH_SELF_PIPE soap_close_connection function (gSOAP 2.8.71 or\n+ greater)\n+The following subset of macros are defined in the API documentation Module\n+SOAP_MACRO_compile-time_values. These macros are used to enable or disable\n+features as specified below, by compiling source code files with compiler\n+option -D to set the macro:\n+define result\n+ expands to (std::nothrow) to prevent memory\n+#SOAP_NOTHROW allocation exceptions (#SOAP_EOM is used instead),\n+ this macro can be changed\n+#SOAP_BUFLEN the length of the internal message buffer, impacts\n+ communications performance\n+#SOAP_HDRLEN the maximum length of HTTP headers\n+#SOAP_TAGLEN the maximum length of XML tags and URLs\n+#SOAP_TMPLEN the maximum length of temporary string values, short\n+ strings and brief error messages\n+#SOAP_MAXALLOCSIZE the maximum size of a block of memory that malloc\n+ can allocate\n+#SOAP_MAXARRAYSIZE the maximum allocation threshold to pre-allocate\n+ SOAP arrays in memory\n+#SOAP_MAXDIMESIZE the maximum DIME attachment size allowed to receive\n+#SOAP_MAXEINTR maximum number of EINTR interrupts to ignore while\n+ polling a socket for pending activity\n+#SOAP_MAXINFLATESIZE trusted inflated content size (1 MB by default)\n+#SOAP_MAXKEEPALIVE maximum iterations in the soap_serve loop on HTTP\n+ keep-alive connections\n+ maximum string content length for strings not\n+#SOAP_MAXLENGTH already constrained by XML schema validation\n+ constraints\n+#SOAP_MAXLEVEL maximum XML nesting depth level permitted by the XML\n+ parser\n+ maximum number of array or container elements for\n+#SOAP_MAXOCCURS containers that are not already constrained by XML\n+ schema validation constraints\n+#SOAP_MINDEFLATERATIO trusted deflation ratio after #SOAP_MAXINFLATESIZE\n+ is reached\n+#SOAP_PURE_VIRTUAL set to = 0 when #WITH_PURE_VIRTUAL is defined\n+#SOAP_SSL_RSA_BITS length of the RSA key (2048 by default)\n+ an 8 bit integer that represents a character that\n+#SOAP_UNKNOWN_CHAR could not be converted to an ASCII char, i.e. when\n+ converting an XML Unicode character\n+#SOAP_UNKNOWN_UNICODE_CHAR integer Unicode value representing a character that\n+ replaces an invalid Unicode code point\n+#SOAP_LONG_FORMAT macro that represents the #LONG64 printf %-format\n+#SOAP_ULONG_FORMAT macro that represents the #ULONG64 printf %-format\n+#SOAP_INVALID_SOCKET portable invalid socket value, can also use\n+ #soap_valid_socket(sock) to check if sock is valid\n+ Warning\n+ It is important that any of these macros when defined should be\n+ consistently defined when compiling source code files, such as gsoap/\n+ stdsoap2.cpp, soapC.cpp, soapClient.cpp, soapServer.cpp, and all\n+ application source code files that include gsoap/stdsoap2.h or soapH.h.\n+ If the macros are not consistently defined at compile time then the\n+ application will likely crash due to a mismatches in the declaration and\n+ use of the soap context that is customized by these flags.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Using the soapdefs.h header file\n+The soapdefs.h header file is included in gsoap/stdsoap2.h when compiling with\n+compile-time flag #WITH_SOAPDEFS_H:\n+ c++ -D WITH_SOAPDEFS_H -c stdsoap2.cpp\n+The soapdefs.h file allows users to include definitions and add includes\n+without requiring changes to gsoap/stdsoap2.h. You can also specify the header\n+file name to include as a macro SOAPDEFS_H to override the name soapdefs.h:\n+ c++ -D SOAPDEFS_H=mydefs.h -c stdsoap2.cpp\n+For example,\n+// Contents of file \"soapdefs.h\"\n+#include \n+The following header file for soapcpp2 refers to std::ostream without soapcpp2\n+throwing errors, by using extern to declare class std::ostream:\n+// std::ostream can't be serialized, but need to be declared to make it visible\n+to gSOAP\n+extern class std::ostream;\n+class ns__myClass\n+{ public:\n+virtual void print(std::ostream &s) const; // we need std::ostream here\n+... //\n+};\n+See also Section Transient_data_types , non-serializable data types.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Run-time flags\n+The gSOAP engine state is stored in the soap context that is initialized and\n+controlled by various optional runtime flags. Most flags are applicable to\n+either processing input or to processing output, but some are applicable to\n+both input and output message and document processing.\n+Furthermore, these flags are divided into four categories: transport (IO),\n+content encoding (ENC), XML parsing and generation (XML), and C/C++ usage (C).\n+The input-mode and output-mode flags for inbound (in) and outbound (out)\n+message processing are:\n+mode flag in/out result\n+#SOAP_IO_FLUSH out flush output immediately\n+#SOAP_IO_BUFFER out enable output buffering, the default mode for socket\n+ connections\n+#SOAP_IO_STORE out store the entire outbound message to calculate HTTP\n+ content length\n+#SOAP_IO_CHUNK out enable HTTP chunking\n+#SOAP_IO_LENGTH out used with two-phase serialization, first phase with\n+ this flag to calculate HTTP content length\n+#SOAP_IO_KEEPALIVE in+out keep socket connections alive, when supported by the\n+ HTTP peer\n+#SOAP_IO_UDP in+out use UDP (datagram) transport, maximum message length\n+ is #SOAP_BUFLEN\n+#SOAP_ENC_PLAIN in+out use plain messages without parsing or emitting HTTP\n+ headers\n+#SOAP_ENC_XML alias for #SOAP_ENC_PLAIN\n+#SOAP_ENC_DIME out use DIME encoding, automatic when DIME attachments\n+ are used\n+#SOAP_ENC_MIME out use MIME encoding instead of DIME, activated using\n+ soap_set_mime\n+#SOAP_ENC_MTOM out use MTOM XOP attachments instead of DIME and MIME\n+#SOAP_ENC_ZLIB out compress output with Zlib, using deflate or gzip\n+ format\n+#SOAP_ENC_SSL in+out use SSL/TLS, automatic when connecting \"https:\n+ \" endpoints\n+#SOAP_XML_INDENT out output indented XML and JSON\n+#SOAP_XML_CANONICAL out output canonical XML\n+#SOAP_XML_DEFAULTNS out output XML with default namespace bindings\n+ xmlns=\"...\"\n+#SOAP_XML_IGNORENS in ignores XML namespaces in XML input\n+#SOAP_XML_STRICT in apply strict validation of XML input\n+ out: serialize data as XML trees (no multi-ref,\n+#SOAP_XML_TREE in+out duplicate data when necessary); in: ignore id\n+ attributes (do not resolve id-ref)\n+#SOAP_XML_GRAPH out serialize application data as an XML graph with\n+ multi-ref id/ref attributes\n+#SOAP_XML_NIL out serialize NULL data as xsi:nil attributed elements\n+#SOAP_XML_NOTYPE out disable xsi:type attributes\n+#SOAP_C_NOIOB in do not fault with #SOAP_IOB\n+#SOAP_C_UTFSTRING in+out serialize 8-bit character strings \"as is\", meaning\n+ 8-bit strings have UTF-8 content\n+ enable multibyte character support for 8-bit\n+#SOAP_C_MBSTRING in+out character strings with wctomb and mbtowc using the\n+ current locale\n+#SOAP_C_NILSTRING out serialize empty strings as xsi:nil attributed\n+ elements\n+All flags are independent and can be combined using a bitwise or (|), except\n+for #SOAP_IO_FLUSH, #SOAP_IO_BUFFER, #SOAP_IO_STORE, and #SOAP_IO_CHUNK which\n+are enumerations and only one of these I/O flags can be used. Also the XML\n+serialization flags #SOAP_XML_TREE and #SOAP_XML_GRAPH should not be mixed.\n+To allocate and initialize a soap context with input and output mode flags:\n+struct soap * soap_new1(soap_mode iomode);\n+struct soap * soap_new2(soap_mode imode, soap_mode omode);\n+soap_new2\n+struct soap * soap_new2(soap_mode input_mode, soap_mode output_mode)\n+Allocate and initialize a new soap context with separate input and output\n+soap_mode flags.\n+To initialize a stack-allocated soap context with input and output mode flags:\n+void soap_init1(struct soap *soap, soap_mode iomode);\n+void soap_init2(struct soap *soap, soap_mode imode, soap_mode omode);\n+soap_init2\n+void soap_init2(struct soap *soap, soap_mode input_mode, soap_mode output_mode)\n+Initialize a stack-allocated soap context with input and output soap_mode\n+flags.\n+To set and clear mode flags use:\n+void soap_set_mode(struct soap *soap, soap_mode iomode); // set input and\n+output mode flags\n+void soap_set_imode(struct soap *soap, soap_mode imode); // set input mode\n+flags\n+void soap_set_omode(struct soap *soap, soap_mode omode); // set output mode\n+flags\n+void soap_clr_mode(struct soap *soap, soap_mode iomode); // clear input and\n+output mode flags\n+void soap_clr_imode(struct soap *soap, soap_mode imode); // clear input mode\n+flags\n+void soap_clr_omode(struct soap *soap, soap_mode omode); // clear output mode\n+flags\n+soap_clr_mode\n+void soap_clr_mode(struct soap *soap, soap_mode input_and_output_mode)\n+Clear input and output soap_mode flags of the given soap context.\n+soap_clr_imode\n+void soap_clr_imode(struct soap *soap, soap_mode input_mode)\n+Clear input soap_mode flags of the given soap context.\n+soap_clr_omode\n+void soap_clr_omode(struct soap *soap, soap_mode output_mode)\n+Clear output soap_mode flags of the given soap context.\n+soap_set_imode\n+void soap_set_imode(struct soap *soap, soap_mode input_mode)\n+Set input soap_mode flags of the given soap context.\n+soap_set_omode\n+void soap_set_omode(struct soap *soap, soap_mode output_mode)\n+Set output soap_mode flags of the given soap context.\n+ Note\n+ The #SOAP_XML_TREE mode flag can be used to improve interoperability with\n+ SOAP implementations that are not fully SOAP 1.1/1.2 RPC encoding\n+ compliant with respect to processing id-href/ref attributes. However,\n+ tree serialization will duplicate data when this data is co-referenced.\n+ Cycles are detected and broken to avoid infinite serialization.\n+In addition to the context mode flags, the following context flags can be used\n+to set setsockopt level SOL_SOCKET options when sockets are created, though\n+some options may not be applicable to your operating system:\n+context flag with setsockopt option result\n+soap::connect_flags = SO_NOSIGPIPE disables SIGPIPE\n+soap::connect_flags = SO_DEBUG turns on recording of debugging information\n+ in the underlying protocol modules\n+soap::connect_flags = SO_BROADCAST permits sending of broadcast messages, for\n+ example with UDP, when permitted\n+soap::connect_flags = SO_LINGER sets client-side linger time to the value\n+ of soap::linger_time\n+soap::connect_flags = SO_DONTROUTE enables routing bypass for outgoing\n+ messages\n+soap::accept_flags = SO_NOSIGPIPE disables SIGPIPE (check your OS, this is\n+ not portable)\n+soap::accept_flags = SO_DEBUG turns on recording of debugging information\n+ in the underlying protocol modules\n+soap::accept_flags = SO_LINGER sets server-side linger time to the value\n+ of soap::linger_time\n+soap::accept_flags = SO_DONTROUTE enables routing bypass for outgoing\n+ messages\n+soap::bind_flags = SO_REUSEADDR enables local address reuse immediately,\n+ use with caution\n+soap::bind_flags = SO_REUSEPORT enables duplicate address and port bindings\n+For example, when soap::accept_flags is set to (SO_NOSIGPIPE | SO_LINGER) this\n+disables SIGPIPE signals and set linger time value given by soap::linger_time,\n+which is zero by default.\n+The soap::socket_flags context flag can be used to pass options to the send, sendto, recv, and recvfrom calls made by the engine, though\n+some options may not be applicable to your operating system:\n+context flag with sent/recv flags result\n+soap::socket_flags = MSG_NOSIGNAL disables SIGPIPE\n+soap::socket_flags = MSG_DONTROUTE enables routing bypass for outgoing messages\n+Furthermore, the setsockopt level SOL_SOCKET options SO_SNDBUF and SO_RCVBUF\n+are set the engine when soap::sndbuf and soap::rcvbuf are set to a nonzero\n+value. The default value is #SOAP_BUFLEN, which is the same size used by the\n+internal buffer soap::buf to send and receive messages. A zero value omits the\n+internal setsockopt call to set these options. Setting these values to zero\n+activates auto-tuning with Linux 2.4 and greater.\n+The setsockopt level SOL_SOCKET option SO_KEEPALIVE is set when keep-alive is\n+enabled with context flag #SOAP_IO_KEEPALIVE or when soap::tcp_keep_alive is\n+nonzero. With soap::tcp_keep_alive additional options can be specified with\n+soap::tcp_keep_idle, soap::tcp_keep_intvl, and soap::tcp_keep_cnt. For example:\n+struct soap *soap = soap_new();\n+soap->tcp_keep_alive = 1; // setsockopt SO_KEEPALIVE\n+soap->tcp_keep_idle = 30; // time in seconds the connection needs to remain\n+idle before TCP starts sending keepalive probes\n+soap->tcp_keep_intvl = 120; // time in seconds between individual keepalive\n+probes\n+soap->tcp_keep_cnt = 5; // maximum number of keepalive probes TCP should send\n+before dropping the connection\n+soap::tcp_keep_cnt\n+unsigned int tcp_keep_cnt\n+User-definable value to set TCP_KEEPCNT setsockopt (the value is 0 by default)\n+Definition: stdsoap2.h:3584\n+soap::tcp_keep_intvl\n+unsigned int tcp_keep_intvl\n+User-definable value to set TCP_KEEPINTVL setsockopt (the value is 0 by\n+default)\n+Definition: stdsoap2.h:3559\n+soap::tcp_keep_idle\n+unsigned int tcp_keep_idle\n+User-definable value to set TCP_KEEPIDLE setsockopt (the value is 0 by default)\n+Definition: stdsoap2.h:3534\n+soap::tcp_keep_alive\n+int tcp_keep_alive\n+User-definable value to set SO_KEEPALIVE setsockopt (0 by default unless the\n+#SOAP_IO_KEEPALIVE mode ...\n+Definition: stdsoap2.h:3509\n+For UDP messaging, use #SOAP_IO_UDP. See also Section SOAP/XML_over_UDP. The\n+context flags that can be set at the client side for UDP messaging are soap::\n+ipv4_multicast_if, soap::ipv4_multicast_ttl, and soap::ipv6_multicast_if:\n+context flag result\n+soap::ipv4_multicast_if set setsockopt level IPPROTO_IP to IP_MULTICAST_IF\n+ with value soap::ipv4_multicast_if when non-NULL\n+soap::ipv4_multicast_ttl set setsockopt level IPPROTO_IP to IP_MULTICAST_TTL\n+ with value soap::ipv4_multicast_ttl when nonzero\n+soap::ipv6_multicast_if set sockaddr_in6::sin6_scope_id to soap::\n+ ipv6_multicast_if when nonzero\n+\ud83d\udd1d Back_to_table_of_contents\n+ Run-time error codes\n+Status error codes are integer values, which are returned by the gSOAP API\n+functions. The full list of soap_status error codes is listed below:\n+Error code Description\n+#SOAP_OK No error (zero)\n+#SOAP_CLI_FAULT The service returned a SOAP 1.1 client fault / SOAP\n+ 1.2 sender fault to the client\n+#SOAP_DATAENCODINGUNKNOWN SOAP 1.2 DataEncodingUnknown fault\n+ An HTTP DELETE request was received by the service\n+#SOAP_DEL_METHOD but the DELETE request callback soap::fdel is not\n+ implemented, see Section Function_callbacks_for\n+ customized_I/O_and_HTTP_handling\n+#SOAP_DIME_END End of DIME attachments protocol error\n+#SOAP_DIME_ERROR DIME formatting error or DIME attachment size exceeds\n+ #SOAP_MAXDIMESIZE\n+#SOAP_DIME_HREF DIME attachment has no href from SOAP body and no\n+ DIME callbacks were defined to save the attachment\n+#SOAP_DIME_MISMATCH DIME version error\n+ XML element has duplicate id attribute value\n+#SOAP_DUPLICATE_ID (applicable to SOAP multi-ref encoding and\n+ #SOAP_XML_GRAPH serialization)\n+#SOAP_EMPTY XML element or attribute is empty when a value is\n+ required\n+#SOAP_EOF Unexpected end of file, no input, transmission\n+ interrupted or timed out, same as EOF\n+#SOAP_EOM Out of memory\n+#SOAP_ERR Same as EOF, but indicates an unspecified error\n+ The fault code to be returned by a service operation\n+ when calling soap_sender_fault (client is at fault)\n+#SOAP_FAULT or soap_receiver_fault (server is at fault), clients\n+ receive the fault as #SOAP_CLI_FAULT or\n+ #SOAP_SVR_FAULT respectively\n+#SOAP_FD_EXCEEDED Too many open sockets\n+#SOAP_FIXED XML element or attribute value is fixed and the\n+ parsed value does not match the fixed value\n+ An HTTP GET request was received by the service but\n+ the GET request callback soap::fget is not\n+#SOAP_GET_METHOD implemented, see Sections How_to_implement_HTTP_GET,\n+ PUT,_and_PATCH_services and Function_callbacks_for\n+ customized_I/O_and_HTTP_handling\n+ Reference to object in XML identified by its id\n+#SOAP_HREF attribute is incompatible with the object referred to\n+ by the ref or href attribute (applicable to SOAP\n+ multi-ref encoding and #SOAP_XML_GRAPH serialization)\n+#SOAP_HTTP_ERROR An unspecified HTTP error occurred\n+#SOAP_HTTP_METHOD An HTTP request was received by the service that\n+ cannot be handled\n+#SOAP_IOB SOAP array index out of bounds\n+#SOAP_LENGTH XML element or attribute length validation error or\n+ #SOAP_MAXLENGTH exceeded\n+#SOAP_LEVEL XML nesting depth level exceeds #SOAP_MAXLEVEL\n+#SOAP_MIME_END End of MIME attachments protocol error\n+#SOAP_MIME_ERROR MIME attachment parsing error\n+#SOAP_MIME_HREF MIME attachment has no href from SOAP body and no\n+ MIME callbacks were defined to save the attachment\n+ An XML element with id attribute is missing that\n+#SOAP_MISSING_ID should match the element with href/ref attribute\n+ (applicable to SOAP multi-ref encoding and\n+ #SOAP_XML_GRAPH serialization)\n+#SOAP_MOE Memory overflow or memory corruption error\n+ (applicable in #DEBUG mode only)\n+ An XML element is present with a mustUnderstand\n+#SOAP_MUSTUNDERSTAND attribute which must be understood but is not\n+ deserialized\n+#SOAP_NAMESPACE XML namespace name mismatch validation error\n+#SOAP_NO_DATA No data in the HTTP body of the message received\n+#SOAP_NO_METHOD The service request dispatcher did not find a\n+ matching service operation for a service request\n+#SOAP_NO_TAG No XML element tag was found when one was expected\n+#SOAP_NTLM_ERROR An NTLM authentication handshake error occurred\n+#SOAP_NULL XML element has an xsi:nil attribute when the element\n+ is not nillable, causing a validation error\n+#SOAP_OCCURS XML element minOccurs or maxOccurs validation error\n+ or #SOAP_MAXOCCURS exceeded\n+ An HTTP PATCH request was received by the service but\n+#SOAP_PATCH_METHOD the PATCH request callback soap::fpatch is not\n+ implemented, see Section Function_callbacks_for\n+ customized_I/O_and_HTTP_handling\n+#SOAP_PATTERN XML element or attribute value pattern mismatch\n+#SOAP_PLUGIN_ERROR Failed to register plugin\n+#SOAP_PROHIBITED XML attribute is prohibited but present\n+ An HTTP PUT request was received by the service but\n+#SOAP_PUT_METHOD the PUT request callback soap::fput is not\n+ implemented, see Section Function_callbacks_for\n+ customized_I/O_and_HTTP_handling\n+#SOAP_REQUIRED XML attribute is required but not present\n+#SOAP_SSL_ERROR An SSL error occurred\n+#SOAP_SVR_FAULT The service returned a SOAP 1.1 server fault or SOAP\n+ 1.2 receiver fault to the client\n+#SOAP_SYNTAX_ERROR An XML syntax error occurred while parsing the input\n+#SOAP_TAG_MISMATCH XML element tag parsed does not match anything that\n+ is expected\n+#SOAP_TCP_ERROR A TCP/IP connection error occurred\n+#SOAP_TYPE XML element or attribute has a mismatching type or\n+ value that is causing a validation error\n+#SOAP_UDP_ERROR A UDP/IP connection error occurred or the message too\n+ large to store in a UDP packet\n+#SOAP_USER_ERROR soap::user not set to non-NULL\n+#SOAP_UTF_ERROR An UTF-8 decoding error occurred\n+#SOAP_VERSIONMISMATCH SOAP version mismatch or no SOAP message is received\n+#SOAP_ZLIB_ERROR A zlib error occurred\n+A status code of #SOAP_OK (zero) is returned by a gSOAP API function when the\n+function call was successful, otherwise a non-zero error code is returned. The\n+status error code is also stored in the current soap context as soap::error.\n+For IO and socket-related errors, also the soap::errnum variable is set to the\n+errno value of the system error for example when a #SOAP_EOF error occurred.\n+To display the error, use soap_print_fault(struct_soap_*soap,_FILE_*fd) where\n+the current value of soap::error is used by the function to print the error to\n+the specified fd file. Alternatively, in C++ you can use soap_stream_fault\n+(struct_soap_*soap,_std::ostream&_os) to print the error on the specified os\n+output stream.\n+To display the location of an XML parsing and validation error, use\n+soap_print_fault_location(struct_soap_*soap,_FILE_*fd) or\n+soap_stream_fault_location(struct_soap_*soap,_std::ostream&_os) to print part\n+of the XML with the error location marked in the XML output.\n+To save the error in a string buffer buf[0...len-1], use soap_sprint_fault\n+(struct_soap*,_char_*buf,_size_t_len), where buf is populated with the fault\n+message terminating with a \\0.\n+To determine the type of error that occurred, use:\n+ * #soap_xml_error_check(soap_status_e) checks for XML parsing and\n+ validation errors, returns true if the specified error code is an XML\n+ error.\n+ * #soap_soap_error_check(soap_status_e) checks for SOAP protocol faults and\n+ errors, returns true if the specified error code is a SOAP protocol\n+ error.\n+ * #soap_http_error_check(soap_status_e) checks for HTTP protocol errors,\n+ returns true if the specified error code is an HTTP protocol error or a\n+ HTTP status code between 100 and 599 returned by an HTTP server.\n+ * #soap_tcp_error_check(soap_status_e) checks for TCP protocol errors,\n+ returns true if the specified error code is a TCP error, when true use\n+ soap::errnum to retrieve the errno value to determine the cause.\n+ * #soap_udp_error_check(soap_status_e) checks for UDP protocol errors,\n+ returns true if the specified error code is a UDP error, when true use\n+ soap::errnum to retrieve the errno value to determine the cause.\n+ * #soap_ssl_error_check(soap_status_e) checks for SSL/TLS protocol errors,\n+ returns true if the specified error code is a SSL/TLS error, when true\n+ use soap::errnum to retrieve the errno value to determine the cause.\n+ * #soap_zlib_error_check(soap_status_e) checks for zlib library errors,\n+ returns true if the specified error code is a zlib error.\n+An HTTP status code is returned when the client fails to connect to an HTTP\n+server and the HTTP server response with an error. The list of HTTP status\n+codes is given below:\n+Code Description\n+200 OK (no error)\n+201 Created\n+202 Accepted\n+203 Non-Authoritative Information\n+204 No Content\n+205 Reset Content\n+206 Partial Content\n+300 Multiple Choices\n+301 Moved Permanently\n+302 Found\n+303 See Other\n+304 Not Modified\n+305 Use Proxy\n+307 Temporary Redirect\n+400 Bad Request\n+401 Unauthorized\n+402 Payment Required\n+403 Forbidden\n+404 Not Found\n+405 Method Not Allowed\n+406 Not Acceptable\n+407 Proxy Authentication Required\n+408 Request Time-out\n+409 Conflict\n+410 Gone\n+411 Length Required\n+412 Precondition Failed\n+413 Request Entity Too Large\n+414 Request-URI Too Large\n+415 Unsupported Media Type\n+416 Requested range not satisfiable\n+417 Expectation Failed\n+500 Internal Server Error\n+501 Not Implemented\n+502 Bad Gateway\n+503 Service Unavailable\n+504 Gateway Time-out\n+505 HTTP Version not supported\n+HTTP status code 200 is not flagged as an error by the engine. Status codes 201\n+and 202 are informative and should not be considered errors by the application\n+logic.\n+Server-side implementations of service operations should return #SOAP_OK when\n+the operation was successful, which returns a \"200 OK\" HTTP header with the XML\n+response message. Server-side implementations of service operations in gSOAP\n+may directly return an HTTP status code when an HTTP-related error should be\n+returned. For example, return 404 returns \"404 Not Found\" to the client and the\n+soap::error variable is set to 404 at the client side.\n+To return a SOAP Fault from a server-side implementation of a service\n+operation, use one of the following functions to populate the SOAP Fault\n+message:\n+ * int soap_sender_fault(struct_soap_*soap,_const_char_*faultstring,_const\n+ char_*faultdetail) returns #SOAP_FAULT and populates a SOAP Fault message\n+ indicating a SOAP 1.1 client fault / SOAP 1.2 sender fault that is\n+ populated with the text faultstring and an XML fragment faultdetail or\n+ NULL when omitted.\n+ * int soap_sender_fault_subcode(struct_soap_*soap,_const_char\n+ *faultsubcode,_const_char_*faultstring,_const_char_*faultdetail) same as\n+ soap_sender_fault with the addition of a QName-formatted string\n+ faultsubcode.\n+ * int soap_receiver_fault(struct_soap_*soap,_const_char_*faultstring,_const\n+ char_*faultdetail) returns #SOAP_FAULT and populates a SOAP Fault message\n+ indicating a SOAP 1.1 server fault / SOAP 1.2 receiver fault that is\n+ populated with the text faultstring and an XML fragment faultdetail or\n+ NULL when omitted.\n+ * int soap_receiver_fault_subcode(struct_soap_*soap,_const_char\n+ *faultsubcode,_const_char_*faultstring,_const_char_*faultdetail) same as\n+ soap_receiver_fault with the addition of a QName-formatted string\n+ faultsubcode.\n+A receiver error indicates that the service could not handle the client\n+request, but it can possibly recover from the error later, for example when\n+resources are temporarily unavailable. A sender error indicates that the client\n+request is faulty and s rejected by the service.\n+See Section SOAP_Fault_processing for more details on how to use these\n+functions.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Memory management\n+Memory management with gSOAP is automatic. The engine context manages all\n+memory allocated to serialize data and for temporary storage. Deserialized data\n+is allocated in managed memory and data structures can be allocated in managed\n+memory by the user when desired using soap_new_T functions generated by\n+soapcpp2 for each serializable type T. All memory managed by a context is\n+deallocated with soap_destroy to destroy managed C++ objects and soap_end to\n+delete all other managed data. When a context is finalized or freed with\n+soap_done(struct_soap*) and soap_free(struct_soap*) then managed memory is not\n+released, so it is important to call the deallocation functions first. This was\n+done to allow managed data to outlive the context, such as deserialized\n+objects, but this is rarely if ever used because deleting the outlived data\n+explicitly is prone to mistakes.\n+If you want to let deserialized data outlive a soap context that you are about\n+to free, then you can delegate management of the data to another soap context\n+with soap_delegate_deletion(struct_soap_*soap_from,_struct_soap_*soap_to). This\n+moves all deserialized and temporary data to the other soap context soap_to,\n+which will delete its data and all the delegated data it is responsible for\n+when you call soap_destroy and soap_end. This can be particularly useful for\n+making client calls inside a server operation, i.e. a mixed server and client.\n+The client call inside the server operation requires a new soap context, e.g.\n+copied from the server's with soap_copy. Before destroying the client context\n+with soap_free, the data can be delegated to the server's context with\n+soap_delegate_deletion. See for example gsoap/samples/mashup/mashupserver.c in\n+the gSOAP source code package.\n+The functions related to memory management by the context are:\n+ * void * soap_malloc(struct_soap_*soap,_size_t_n) return pointer to n bytes\n+ of managed memory.\n+ * char * soap_strdup(struct_soap_*soap,_const_char_*s) return pointer to\n+ duplicate of string s in managed memory.\n+ * char * soap_wstrdup(struct_soap_*soap,_const_wchar_t_*s) return pointer\n+ to duplicate of string s in managed memory.\n+ * T * soap_new_T(struct soap *soap) allocates and default-initializes data\n+ of type T, C++ only.\n+ * T * soap_new_T(struct soap *soap, int n) allocates and default-\n+ initializes and array of type T, where n = -1 allocates a single non-\n+ array value.\n+ * T * soap_new_set_T(struct soap *soap, m1, ..., mn) allocates a struct or\n+ class T and initializes its members with the values m1 to mn.\n+ * T * soap_new_req_T(struct soap *soap, m1, ..., mn) allocates a struct or\n+ class T and initializes its required members with the values m1 to mn,\n+ required means non-optional member as required by XML validation when\n+ this data is serialized in XML.\n+ * void soap_destroy(struct_soap_*soap) deletes all context-managed C++\n+ objects and must be called before soap_end.\n+ * void soap_end(struct_soap_*soap) deletes temporary data and all\n+ deserialized data except C++ objects, see above.\n+ * void soap_free_temp(struct_soap_*soap) deletes temporary data but leaves\n+ deserialized context-managed data intact.\n+ * void soap_dealloc(struct_soap_*soap,_void_*p) deallocates context-managed\n+ objects or data at location p in memory.\n+ * int soap_unlink(struct_soap_*soap,_const_void_*p) unlink object or data\n+ at location p from management by the context, this object or data must be\n+ deallocated by the user.\n+ * void soap_done(struct_soap_*soap) finalizes the context but does not\n+ delete any managed objects or data.\n+ * void soap_free(struct_soap_*soap) finalizes and frees the context\n+ (contexts allocated with soap_new or soap_copy) but does not delete any\n+ managed objects or data.\n+ * void soap_delegate_deletion(struct_soap_*soap_from,_struct_soap_*soap_to)\n+ moves all C++ objects, data, and temporary data managed by the soap_from\n+ context to another context soap_to, which manages the data until deleted\n+ with soap_destroy and soap_end.\n+To help understand the differences between managed objects, managed data, and\n+managed temporary data: temporary data is created by the engine to keep track\n+of things, such as hash tables to keep pointer reference information for\n+serialization and hash tables to keep XML id/href information for multi-\n+reference object deserialization. Deserialized data is allocated by the context\n+in managed memory when constructing data structures by deserializing XML and\n+JSON messages. Data is stored in memory managed by the context using calls to\n+soap_malloc to allocate heap space with malloc. A tiny bit more space is\n+allocated to keep track of the allocations and to add a \"canary\" word to detect\n+heap memory overflows. Heap memory overflows are detected when context-managed\n+data is deallocated with soap_end. C++ objects are allocated with new instead\n+of malloc and are tracked as well. These objects are deallocated with\n+soap_destroy.\n+When the gSOAP application is compiled with -DDEBUG using the compile-time flag\n+#DEBUG, the engine reports memory leaks which are detected by soap_done and\n+soap_free. To improve the accuracy of detection, no memory is actually freed\n+until soap_done or soap_free are called to detect memory issues, so any calls\n+to soap_destroy and soap_end are actually deferred to be executed when the\n+context finalizes.\n+While memory management in gSOAP is automatic, it does not enforce its own\n+memory management policy on the user. To move managed objects and data into\n+unmanaged heap space, the soap_dup_T deep copy functions generated by soapcpp2\n+-Ec option -Ec can be used. To delete deep copies, the soap_del_T deep deletion\n+functions generated by soapcpp2 -Ed option -Ed can be used. After copying the\n+usual soap_destroy and soap_end functions remove the managed originals. See\n+also Section Generating_deep_copy_and_deletion_functions.\n+Furthermore, the memory allocation functions malloc and new used by the engine\n+internally can be replaced with other allocators by defining SOAP_MALLOC and\n+SOAP_FREE to replace malloc and free, and define SOAP_NEW, SOAP_NEW_ARRAY,\n+SOAP_PLACEMENT_NEW, and SOAP_DELETE, SOAP_DELETE_ARRAY to replace new and\n+delete used by the engine to allocate managed memory. One can for example use a\n+garbage collector with gSOAP by defining suitable replacements.\n+More information on memory management can be found in the C_and_C++_XML_Data\n+Bindings documentation that has separate sections on memory management in C and\n+in C++.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Intra-class memory management\n+When a class T has a struct soap * T::soap member declared in an interface\n+header file for soapcpp2, then this member will be set to point to the current\n+context by the deserializers and by the soap_default method of the class and by\n+the soap_default_T and soap_new_T functions for this class named T. This\n+simplifies memory management by class methods that allocate data associated\n+with the class instance that must be managed by the context.\n+Consider for example the following class declaration:\n+class Class\n+{ public:\n+Class();\n+~Class();\n+struct soap *soap;\n+char *name;\n+void setName(const char *s);\n+char *getName();\n+};\n+Since the name member is a character pointer to a string, where should we\n+allocate this string? In most cases we will add a constructor that initially\n+sets name to NULL and a destructor that deletes name when non-NULL, like so:\n+Class::Class()\n+{\n+soap = NULL;\n+name = NULL;\n+}\n+Class::~Class()\n+{\n+if (name)\n+free(name);\n+}\n+However, when instances of Class are deserialized we have a problem with this\n+approach because free(name) deletes a managed string, which is managed by the\n+context. Because the deserializer also sets the soap member of this class,\n+there is an easy solution to this problem:\n+Class::~Class()\n+{\n+if (!soap && name)\n+free(name);\n+}\n+This only frees name if the soap context pointer member is NULL, meaning that a\n+managed string name will be deleted as usual with the deserialized class using\n+soap_destroy and soap_end.\n+The other methods are also made cognizant of the presence of a context:\n+void Class::setName(const char *s)\n+{\n+if (soap)\n+name = soap_strdup(soap, s);\n+else\n+name = strdup(s);\n+}\n+const char *getName()\n+{\n+return name;\n+}\n+Another approach is to use soap_unlink to unlink data managed by the context\n+and make all allocations explicitly:\n+Class::~Class()\n+{\n+if (name)\n+{\n+soap_unlink(soap, name); // unlinks the name if soap is non-NULL\n+free(name);\n+}\n+}\n+void Class::setName(const char *s)\n+{\n+name = strdup(s);\n+}\n+const char *getName()\n+{\n+return name;\n+}\n+soap_unlink\n+int soap_unlink(struct soap *soap, const void *ptr)\n+Unlink a block of heap memory managed by the specified soap context, to release\n+the memory explicitly...\n+The soap_unlink call unlinks data and objects from managed memory. In this way\n+soap_destroy and soap_end can be called later even when this class was\n+deserialized.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Debugging\n+To activate debugging and message logging compile the source code with compile-\n+time flag #DEBUG. Or when using -lgsoap or -lgsoap++ then reinstall gSOAP with\n+./configure --enable-debug and make.\n+When your gSOAP client or server applications run, they will log their activity\n+in three separate files:\n+ * SENT.log a concatenation of all messages sent\n+ * RECV.log a concatenation of all messages received\n+ * TEST.log a log of the engine's operations\n+ Warning\n+ The gSOAP client and server applications will run slow due to debugging\n+ and message logging.\n+You can set macro #DEBUG_STAMP instead of #DEBUG to add time stamps to\n+TEST.log. This works on all operating systems supporting the gettimeofday\n+function.\n+When installing a CGI service application compiled with debugging enabled, the\n+log files may sometimes not be created due to file access permission\n+restrictions imposed on CGI applications. To get around this, create empty log\n+files with universal write permissions. Be careful about the security\n+implication of this.\n+You can actually test a CGI service application without deploying it on the\n+Web. To do this, create the CGI service application and send it a request\n+message using redirection as follows:\n+./service.cgi < ns.add.req.xml\n+this should display the service response on the terminal, where ns.add.req.xml\n+was generated by soapcpp2 or a modified version of this file. You can also use\n+a SENT.log file produced by a client application to redirect to the CGI service\n+application. You can also use the gSOAP Test_Messenger application to generate\n+randomized messages to test your servers.\n+The file names of the log files and the logging activity can be controlled at\n+the application level. This allows the creation of separate log files by\n+separate services, clients, and threads. For example, the following service\n+logs all messages (but no debug messages) in separate directories:\n+struct soap *soap = soap_new();\n+soap_set_recv_logfile(soap, \"logs/recv/service12.log\"); // append all messages\n+received in /logs/recv/service12.log\n+soap_set_sent_logfile(soap, \"logs/sent/service12.log\"); // append all messages\n+sent in /logs/sent/service12.log\n+soap_set_test_logfile(soap, NULL); // no file name: do not save debug messages\n+... //\n+soap_serve(soap);\n+... //\n+soap_free(soap);\n+soap_set_recv_logfile\n+void soap_set_recv_logfile(struct soap *soap, const char *logfile)\n+Specify a file name to save messages received.\n+soap_set_test_logfile\n+void soap_set_test_logfile(struct soap *soap, const char *logfile)\n+Specify a file name to save debugging info.\n+soap_set_sent_logfile\n+void soap_set_sent_logfile(struct soap *soap, const char *logfile)\n+Specify a file name to save messages sent.\n+Likewise, messages can be logged for individual client-side service operation\n+calls in a client application.\n+To log messages more efficiently, use the logging plugin.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Limitations\n+From the perspective of the C/C++ language, a few C/C++ language features are\n+not supported by gSOAP and these features cannot be used in an interface header\n+file for soapcpp2.\n+ * STL: the soapcpp2 tool supports the serialization of C++ strings std::\n+ string and std::wstring and the containers std::deque, std::list, std::\n+ vector, and std::set, (see Section STL_containers ). Also std::\n+ shared_ptr, std::unique_ptr, and std::auto_ptr are supported. Other STL\n+ types are not serializable.\n+ * Templates: the soapcpp2 tool assumes that templates classes have only one\n+ template parameter type and these templates are containers of values of\n+ this template parameter type. This template class should define begin(),\n+ end(), size(), clear(), and insert() methods.\n+ * Inheritance: single class inheritance is supported.\n+ * Abstract methods: a class must be instantiable to support serialization\n+ of that class. An abstract class when used should be declared transient,\n+ see Section Transient_data_types.\n+ * Directives: directives and pragmas such as #include and #define are moved\n+ to the generated soapStub.h source code by soapcpp2. These directives are\n+ all placed at the top of that file, see The_#include_and_#define\n+ directives. Use the #import directive to import interface header files\n+ into other interface header files, see Section The_#import_directive .\n+ * C and C++ code statements: no code statements are allows in interface\n+ header files. Class methods should be declared without code in { and }.\n+ Also constructor initializers are not allowed. Class method\n+ implementations should be defined in a separate C++ source file.\n+ * C++ references: these cannot be serialized, use pointers instead.\n+The following C/C++ data types require some attention to ensure they can be\n+serialized:\n+ * Union types: a union data type can not be serialized unless run-time\n+ information is associated with a union for the serializer to determine\n+ which union member is valid. To serialize a union, place the union in a\n+ struct or class as a member and precede this member with an integer\n+ member that serves as a selector. See Section Union_serialization for\n+ details.\n+ * void* types: the void* data type cannot be serialized unless run-time\n+ type information is associated with the pointer using a int __type member\n+ in the struct or class that contains the void* member. See Section Void\n+ pointer_serialization for details.\n+ * Pointers to arrays: any pointer, except for C strings which are pointers\n+ to an array of characters, are treated by the soapcpp2 tool as if the\n+ pointer points to only one value. Consequently, the serialization\n+ functions for pointers only serialize the first value pointed to, when\n+ the pointer is non-NULL. To declare pointers to arrays as struct and\n+ class members, a size member is included in the struct or class, see\n+ Section Dynamic_array_serialization for details.\n+ * Constant values: const constant values such as const members of a struct\n+ or class cannot be serialized except for const char* and const wchar_t*\n+ strings.\n+ * Uninitialized pointers: Obviously, all pointers that are part of a data\n+ structure to serialize must be valid or NULL. Otherwise the serializer\n+ will crash.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Advanced features\n+\ud83d\udd1d Back_to_table_of_contents\n+ Internationalization\n+Regular 8-bit strings cannot hold wide characters outside of the character\n+range [1,255]. Of course you can use wide strings instead of 8-bit strings in\n+the interface header file for soapcpp2. Alternatively, set the\n+#SOAP_C_UTFSTRING mode flag to encode wide characters in 8-bit strings in UTF-\n+8 format.\n+For example, the xsd:string string schema type can be declared as a wide-\n+character string and used subsequently:\n+typedef wchar_t *xsd__string;\n+int ns__myMethod(xsd__string input, xsd__string *output);\n+To do so automatically with wsdl2h, edit typemap.dat and add the line:\n+xsd__string = | wchar_t* | wchar_t*\n+or for C++:\n+xsd__string = | std::wstring | std::wstring*\n+Alternatively, 8-bit strings can hold UTF-8 formatted wide characters when the\n+#SOAP_C_UTFSTRING flag is enabled, see Section Run-time_flags . The application\n+is responsible for filling regular strings with UTF-8 content.\n+Also the #SOAP_C_MBSTRING flag can be used to activate multibyte character\n+support using the current locale. Multibyte support depends on the locale\n+settings for dealing with extended natural language encodings.\n+Both 8-bit strings and wide-character strings can be used together within an\n+application. For example, the following header file declaration introduces two\n+string schema types:\n+typedef wchar_t *xsd__string;\n+typedef char *xsd__string_; // trailing '_' avoids name clash\n+int ns__myMethod(xsd__string input, xsd__string_ *output);\n+Please consult the UTF-8 specification for details on the UTF-8 format when\n+processing 8-bit strings with UTF-8 content. Note that the ASCII character set\n+[1-127] is a subset of UTF-8. Therefore, with the #SOAP_C_UTFSTRING flag set,\n+strings may hold ASCII character data and UTF-8 extensions.\n+See also C_and_C++_XML_data_bindings documentation for more details on using\n+typemap.dat for wsdl2h.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Directives\n+An interface header file for soapcpp2 may include //gsoap directives to\n+configure messaging protocols such as SOAP or REST, to associate SOAP Headers\n+and Faults with messages, and to set properties of the Web service defined in\n+the soapcpp2-generated WSDL and XSD files. Directives for soapcpp2 are\n+specified as //gsoap-comments that are processed by soapcpp2.\n+ Service directives\n+A service directive must start at a new line and is of the form:\n+//gsoap service : \n+where is the XML namespace prefix of a service binding. The \n+and fields are one of the following:\n+property value\n+name name of the service, optionally followed by text describing the\n+ service\n+namespace URI of the WSDL targetNamespace\n+documentation text describing the service (see also the name property),\n+ multiple permitted\n+doc an alias for the documentation property\n+style document (default) SOAP messaging style or rpc for SOAP RPC\n+encoding literal (default), encoded for SOAP encoding, or a custom URI\n+protocol specifies SOAP or REST, see below\n+port URL of the service endpoint, usually an http or https address, to\n+ use in the WSDL definitions/service/port/address/@location\n+location an alias for the port property\n+endpoint an alias for the port property\n+transport URI declaration of the transport, usually http://\n+ schemas.xmlsoap.org/soap/http\n+definitions name of the WSDL definitions/@name\n+type name of the WSDL definitions/portType/@name (WSDL2.0 interface/\n+ @name)\n+portType an alias for the type property (portType follows SOAP 1.1 naming\n+ conventions)\n+interface an alias for the type property (interface follows SOAP 1.2 naming\n+ conventions)\n+binding name of the WSDL definitions/binding/@name\n+portName name of the WSDL definitions/service/port/@name\n+executable name of the \"executable\" to use in the WSDL definitions/service/\n+ port/address/@location\n+The service name and namespace properties are required in order to generate a\n+valid WSDL with soapcpp2. The other properties are optional.\n+The style and encoding property defaults are changed with soapcpp2 -e option -\n+e to rpc and encoded.\n+You can override the port endpoint URL at runtime in the auto-generated\n+soap_call_prefix__func service call (C/C++ client side) and in the C++ proxy\n+class service call.\n+Protocol property values are:\n+protocol value description\n+SOAP SOAP transport, supporting both SOAP 1.1 and 1.2\n+SOAP1.1 SOAP 1.1 transport (same as soapcpp2 -1)\n+SOAP1.2 SOAP 1.2 transport (same as soapcpp2 -2)\n+SOAP-GET one-way SOAP 1.1 or 1.2 with HTTP GET\n+SOAP1.1-GET one-way SOAP 1.1 with HTTP GET\n+SOAP1.2-GET one-way SOAP 1.2 with HTTP GET\n+HTTP an alias for POST (same as soapcpp2 -0)\n+POST non-SOAP REST protocol with HTTP POST\n+GET non-SOAP REST protocol with HTTP GET\n+PUT non-SOAP REST protocol with HTTP PUT\n+DELETE non-SOAP REST protocol with HTTP DELETE\n+The protocol property is SOAP by default. The default is changed with soapcpp2\n+-1 option -1 to SOAP 1.1, soapcpp2 -2 option -2 to SOAP 1.2, and non-SOAP REST\n+with soapcpp2 -0 option -0\n+The GET protocols for SOAP and REST require that the service operations only\n+use primitive types with their input parameters, because these parameters are\n+encoded with the URL as URL query values.\n+To let directives take effect with service operations, you should bind the\n+service operations to the WSDL namespace of a service by using the namespace\n+prefix as part of the identifier name of the function that defines the service\n+operation:\n+int prefix__func(arg1, arg2, ..., argn, result);\n+where prefix can now be used to let directives take effect on this service\n+operation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Service method directives\n+Service properties are applicable to a service and to all of its operations.\n+Service method directives are specifically applicable to a service operation.\n+A service method directive is of the form:\n+//gsoap service method-: \n+where is the XML namespace prefix of a service binding and is\n+the unqualified name of a service operation. The and fields\n+are one of the following:\n+method property value\n+method-documentation text describing the service operation\n+method same as above, shorthand form\n+method-action \"\" or URI SOAPAction HTTP header, or URL query string\n+ for REST protocols\n+method-input-action \"\" or URI SOAPAction HTTP header of service request\n+ messages\n+method-output-action \"\" or URI SOAPAction HTTP header of service response\n+ messages\n+method-fault-action \"\" or URI SOAPAction HTTP header of service fault\n+ messages\n+method-header-part member name of the SOAP_ENV__Header struct used in\n+ SOAP Header\n+method-input-header-part member name of the SOAP_ENV__Header struct used in\n+ SOAP Headers of requests\n+method-output-header-part member name of the SOAP_ENV__Header struct used in\n+ SOAP Headers of responses\n+method-fault type name of a struct or class member used in\n+ SOAP_ENV__Details struct\n+method-mime-type REST content type or SOAP MIME attachment content\n+ type(s)\n+method-input-mime-type REST content type or SOAP MIME attachment content\n+ type(s) of request message\n+method-output-mime-type REST content type or SOAP MIME attachment content\n+ type(s) of response message\n+method-style document or rpc\n+method-encoding literal, encoded, or a custom URI for encodingStyle\n+ of messages\n+method-response-encoding literal, encoded, or a custom URI for encodingStyle\n+ of response messages\n+method-protocol SOAP or REST, see Service_directives\n+The method-header-part properties can be repeated for a service operation to\n+declare multiple SOAP Header parts that the service operation requires. You can\n+use method-input-header-part and method-output-header-part to differentiate\n+between request and response messages.\n+The method-fault property can be repeated for a service operation to declare\n+multiple faults that the service operation may return.\n+The method-action property serves two purposes:\n+ 1. To set the SOAPAction header for SOAP protocols, i.e. sets the\n+ definitions/binding/operation/SOAP:operation/@soapAction.\n+ 2. To set the URL query string for endpoints with REST protocols, i.e. sets\n+ the definitions/binding/operation/HTTP:operation/@location, which\n+ specifies a URL query string (starts with a ?) to complete the service\n+ endpoint URL or extends the endpoint URL with a local path (starts with a\n+ /).\n+Use method-input-action and method-output-action to differentiate the\n+SOAPAction between SOAP request and response messages.\n+You can always override the port endpoint URL and action values at runtime in\n+the auto-generated soap_call_prefix__func service call (C/C++ client side) and\n+in the auto-generated C++ proxy class service calls. A runtime NULL endpoint\n+URL and/or action uses the defaults set by these directives.\n+The method-mime-type property serves two purposes:\n+ 1. To set the type of MIME/MTOM attachments used with SOAP protocols.\n+ Multiple attachment types can be declared for a SOAP service operation,\n+ i.e. adds definitions/binding/operation/input/MIME:multipartRelated/MIME:\n+ part/MIME:content/@type for each type specified.\n+ 2. To set the MIME type of a REST operation. This replaces XML declared in\n+ WSDL by definitions/binding/operation/(input|output)/MIME:mimeXml with\n+ MIME:content/@type. Use application/x-www-form-urlencoded with REST POST\n+ and PUT protocols to send encoded form data automatically instead of XML.\n+ Only primitive type values can be transmitted with form data, such as\n+ numbers and strings, i.e. only types that are legal to use as attributes\n+ members.\n+Use method-input-mime-type and method-output-mime-type to differentiate the\n+attachment types between request and response messages.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Schema directives\n+A schema directive is of the form:\n+//gsoap schema : \n+where is the XML namespace prefix of a schema. The and\n+ fields are one of the following:\n+property value\n+namespace URI of the XSD targetNamespace\n+namespace2 alternate URI pattern for the XSD namespace (i.e. URI is also\n+ accepted by the XML parser)\n+import URI of an imported namespace, as an alternative or in addition to\n+ namespace, adds xsd:import to the generated WSDL and XSD files\n+form unqualified (default) or qualified local element and attribute\n+ form defaults\n+elementForm unqualified (default) or qualified local element form default\n+attributeForm unqualified (default) or qualified local attribute form default\n+typed no (default) or yes for serializers to add xsi:type attributes to\n+ XML\n+The namespace2 URI is a pattern with * matching any sequence of characters and\n+- matching any character. This pattern instructs the XML parser and validator\n+to also accept the URI pattern as a valid namespace for the specified .\n+The typed property is no by default and can be changed to yes with soapcpp2 -\n+t option -t.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Schema type directives\n+A schema type directive is of the form:\n+//gsoap schema type-: \n+//gsoap schema type-: :: \n+where is the XML namespace prefix of a schema and is an\n+unqualified name of a C/C++ type, and the optional is a class/struct\n+members or enum constant.\n+You can describe a type with one of the following:\n+type property value\n+type-documentation text describing the schema type\n+type an alias for the type-documentation property\n+For example, you can add a description to an enumeration:\n+//gsoap ns schema type: Vowels The letters A, E, I, O, U, and sometimes Y\n+//gsoap ns schema type: Vowels::Y A vowel, sometimes\n+enum class ns__Vowels : char { A = 'A', E = 'E', I = 'I', O = 'O', U = 'U', Y =\n+'Y' };\n+This documented enumeration maps to a simpleType restriction of xsd:string in\n+the soapcpp2-generated schema:\n+\n+\n+The letters A, E, I, O, U, and sometimes Y\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+A vowel, sometimes\n+\n+\n+\n+\n+\ud83d\udd1d Back_to_table_of_contents\n+ Example\n+The use of directives is best illustrated with an example. The example uses a\n+hypothetical stock quote service and exchange rate service, actual services\n+such as these are available for free on the web.\n+//gsoap ns1 service namespace: urn:GetQuote\n+int ns1__getQuote(char *symbol, float &result);\n+//gsoap ns2 service namespace: urn:CurrencyExchange\n+int ns2__getRate(char *country1, char *country2, float &result);\n+//gsoap ns3 service name: quotex\n+//gsoap ns3 service style: rpc\n+//gsoap ns3 service encoding: encoded\n+//gsoap ns3 service port: http://www.mydomain.com/quotex.cgi\n+//gsoap ns3 service namespace: urn:quotex\n+int ns3__getQuote(char *symbol, char *country, float &result);\n+The quotex.h example is a new Web Service created by combining two existing Web\n+Services: a Stock Quote service and a Currency Exchange service.\n+The namespace prefix ns3 is used for the new quotex Web Service with namespace\n+URI urn:quotex, service name quotex, and endpoint port http://www.mydomain.com/\n+quotex.cgi.\n+Since the new Web Service invokes the ns1__getQuote and ns2__getRate service\n+operations, the service namespaces and other details such as style and encoding\n+of these methods are given by directives. After invoking the soapcpp2 tool on\n+the quotex.h header file:\n+ soapcpp2 quotex.h\n+the WSDL of the new quotex Web Service is saved as quotex.wsdl. Since the\n+service name, endpoint port, and namespace URI were provided in the header\n+file, the generated WSDL file can be published together with the compiled Web\n+Service installed as a CGI application.\n+The namespace mapping table for the quotex.cpp Web Service implementation is\n+saved as quotex.nsmap. This file can be directly included in quotex.cpp instead\n+of specified by hand in the source of quotex.cpp.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Transient data types\n+There are situations when certain types have to be used in an interface header\n+file, but the types are not serializable and therefore have to be \"invisible\"\n+to the soapcpp2 tool. These types are called transient.\n+This feature is useful when a library type is used in the interface header file\n+as part of a struct or class, for example the FILE type or std::ostream that\n+are clearly not serializable. If these types are introduced in an interface\n+header file then these types must be declared transient. Otherwise, soapcpp2\n+will throw an error.\n+To declare a transient type use extern. For example:\n+extern class FILE;\n+Even though FILE is not a class, this declaration merely introduces the FILE\n+type name without specifying its details.\n+In C we can still use the class keyword, because no code is generated by\n+soapcpp2 for this transient type.\n+We can then use this type elsewhere, for example:\n+struct ns__record\n+{\n+FILE *fd;\n+const char *name;\n+};\n+Only the name member is serialized of ns__record.\n+Another example:\n+extern class std::ostream; // std::ostream can't be serialized, but need to be\n+declared\n+class ns__myClass\n+{ public:\n+virtual void print(std::ostream &s) const; // need ostream here\n+... //\n+};\n+In other cases we do want to declare a type that soapcpp2 should copy into\n+soapStub.h for the application source code, but which should not be\n+serializable. We can use extern for this or put the declaration in [ and ]\n+brackets:\n+[\n+class ns__myBase // base class need not be serializable\n+{\n+... // members\n+};\n+]\n+class ns__myDerived : ns__myBase\n+{\n+... // members\n+};\n+We can use [ and ] brackets for parts of the code, for example to make several\n+class members transient:\n+[ typedef int transientInt; ]\n+class ns__myClass\n+{\n+int a; // will be serialized\n+[\n+int b; // transient member\n+char s[256]; // transient member\n+]\n+extern float d; // transient type float and member\n+char *t; // will be serialized\n+transientInt *n; // transient type int and member\n+[\n+virtual void method(char buf[1024]); // does not create a char[1024] serializer\n+]\n+};\n+In this example, ns__myClass has three transient members: b, s, and n which\n+will not be serialized. Member n is transient because the type is declared\n+within a transient block. Pointers, references, and arrays of transient types\n+are transient. The single class method is encapsulated within [ and ] to\n+prevent soapcpp2 from creating serializers for the char[1024] type.\n+We also use [ and ] brackets to introduce a transient integer type transientInt\n+using a typedef. We cannot use extern with typedef because this construct is\n+reserved for custom serializers.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Serialization \"as is\" of volatile data types\n+Types declared volatile in an interface header file are serializable but not\n+copied by soapcpp2 to soapStub.h. These types are typically library types that\n+are included in the source code and should not be redefined in the application\n+source code. We want to serialize these library types \"as is\" without\n+redefining them.\n+Consider for example struct tm, declared in time.h. The structure may actually\n+vary between platforms, but the tm structure includes at least the following\n+members as declared in the following interface header file for soapcpp2:\n+#include \n+volatile struct tm\n+{\n+int tm_sec; /* seconds (0 - 60) */\n+int tm_min; /* minutes (0 - 59) */\n+int tm_hour; /* hours (0 - 23) */\n+int tm_mday; /* day of month (1 - 31) */\n+int tm_mon; /* month of year (0 - 11) */\n+int tm_year; /* year - 1900 */\n+int tm_wday; /* day of week (Sunday = 0) */\n+int tm_yday; /* day of year (0 - 365) */\n+int tm_isdst; /* is summer time in effect? */\n+char *tm_zone; /* abbreviation of timezone name */\n+long tm_gmtoff; /* offset from UTC in seconds */\n+};\n+By declaring struct tm volatile, soapcpp2 does not redefine it in the output\n+source code. The #include is copied to the source code output. We can\n+now serialize the tm structure. The following example serializes the local time\n+stored in a tm structure to stdout:\n+struct soap *soap = soap_new();\n+time_t T = time(NULL);\n+struct tm *t = localtime(&T);\n+soap_write_tm(soap, t);\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+It is also possible to serialize the tm members as XML attributes by declaring\n+the members as attributes with the @ qualifier, see Section How_to_declare_XML\n+attributes .\n+If you want to produce a schema file, say time.xsd, that defines an XML schema\n+and namespace for the tm struct, you can add a typedef declaration to the\n+header file:\n+#include \n+volatile struct tm\n+{\n+... // see above\n+};\n+typedef struct tm time__struct_tm;\n+or simply use colon notation since we keep the tm name:\n+#include \n+volatile struct time:tm\n+{\n+int tm_sec; /* seconds (0 - 60) */\n+int tm_min; /* minutes (0 - 59) */\n+int tm_hour; /* hours (0 - 23) */\n+int tm_mday; /* day of month (1 - 31) */\n+int tm_mon; /* month of year (0 - 11) */\n+int tm_year; /* year - 1900 */\n+int tm_wday; /* day of week (Sunday = 0) */\n+int tm_yday; /* day of year (0 - 365) */\n+int tm_isdst; /* is summer time in effect? */\n+char *tm_zone; /* abbreviation of timezone name */\n+long tm_gmtoff; /* offset from UTC in seconds */\n+};\n+We used the typedef name time__struct_tm rather than time__tm, because a schema\n+name clash will occur for the first example above that has tm already declared\n+as serializable type in the schema of the generated WSDL. The second example\n+with the colon notation avoids this altogether.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to declare custom serializers and deserializers\n+You can implement your own custom serializers for data types. A custom\n+serializer is declared in an interface header file for soapcpp2 using the pair\n+of keywords extern typedef. For example:\n+extern typedef char *MyData;\n+struct Sample\n+{\n+MyData s; // use custom serializer for this member\n+char *t; // use auto-generated serializer\n+};\n+Then provide the following functions for each extern typedef declares type T:\n+int soap_serialize_T(struct soap *soap, const T *a);\n+void soap_default_T(struct soap *soap, T *a);\n+int soap_out_T(struct soap *soap, const char *tag, int id, const T *a, const\n+char *type);\n+T *soap_in_T(struct soap *soap, const char *tag, T *a, const char *type);\n+The function prototypes of these functions can be found in the soapcpp2-\n+generated soapH.h file.\n+For example, the serialization of MyData can be done with the following code:\n+int soap_serialize_MyData(struct soap *soap, MyData const*a)\n+{\n+// no need to mark this node (for multi-ref and cycle detection)\n+return SOAP_OK;\n+}\n+void soap_default_MyData(struct soap *soap, MyData *a)\n+{\n+*a = NULL;\n+}\n+int soap_out_MyData(struct soap *soap, const char *tag, int id, MyData const*a,\n+const char *type)\n+{\n+if (soap_element_begin_out(soap, tag, id, type) // print XML beginning tag\n+|| soap_send(soap, *a) // just print the string (no XML conversion)\n+|| soap_element_end_out(soap, tag)) // print XML ending tag\n+return soap->error;\n+return SOAP_OK;\n+}\n+MyData **soap_in_MyData(struct soap *soap, const char *tag, MyData *a, const\n+char *type)\n+{\n+if (soap_element_begin_in(soap, tag))\n+return NULL;\n+if (!a)\n+a = (MyData*)soap_malloc(soap, sizeof(MyData));\n+if (soap->null)\n+*a = NULL; // xsi:nil element\n+if (*soap->type && soap_match_tag(soap, soap->type, type))\n+{\n+soap->error = SOAP_TYPE;\n+return NULL; // type mismatch\n+}\n+if (*soap->href)\n+a = (MyData**)soap_id_forward(soap, soap->href, a, 0, SOAP_TYPE_MyData, 0,\n+sizeof(MyData), 0, NULL, NULL)\n+else if (soap->body)\n+{\n+char *s = soap_value(soap); // fill buffer\n+*a = (char*)soap_malloc(soap, strlen(s)+1);\n+strcpy(*a, s);\n+}\n+if (soap->body && soap_element_end_in(soap, tag))\n+return NULL;\n+return a;\n+}\n+SOAP_TYPE\n+#define SOAP_TYPE\n+A soap_status error code: XML element or attribute has a mismatching type or\n+value that is causing a ...\n+Definition: stdsoap2.h:2607\n+soap_send\n+int soap_send(struct soap *soap, const char *s)\n+Send a string.\n+soap_match_tag\n+int soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)\n+Match an XML tag name.\n+soap::body\n+short body\n+The soap::body flag is set when an element has element content during XML\n+parsing or when a HTTP mess...\n+Definition: stdsoap2.h:2965\n+soap::null\n+short null\n+The soap::null flag is set when an element carries a xsi:nil attribute that is\n+true.\n+Definition: stdsoap2.h:2963\n+More information on custom serialization is available in the gSOAP source code\n+package in the gsoap/custom directory, where you can also find several custom\n+serializers to use with your projects.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Function callbacks for customized I/O and HTTP handling\n+The following list of functions can be used for customized HTTP handling and I/\n+O.\n+See also API documentation Module Callback_functions.\n+To reset the callback functions to the internal functions of the engine, use\n+soap_done followed by soap_init. This re-initializes the soap context, removes\n+all plugins, and resets function callbacks.\n+ fpost\n+int (soap::fpost)(struct soap *soap, const char *endpoint, const char *host,\n+int port, const char *path, const char *action, ULONG64 count)\n+This callback is called at the server side by the engine to send the HTTP\n+headers to the connected client. The parameter status should be an HTTP status\n+error code or #SOAP_OK (200 OK) or #SOAP_HTML or #SOAP_FILE. Using #SOAP_HTML\n+sets the content-type header to text/html; charset=utf-8. Using #SOAP_FILE sets\n+the content-type header to the value of soap::http_content. Extra HTTP headers\n+are added when soap::http_extra_header is set to one or more header lines\n+separated by CRLF. When redefining this callback, use function soap_send to\n+write the header contents. Returns #SOAP_OK or a soap_status error code. The\n+built-in function assigned to soap::fresponse is http_response.\n+ fresponse\n+int (soap::fresponse)(struct soap *soap, int soap_error_code, ULONG64 count)\n+This callback is called at the server side by the engine to send the HTTP\n+headers to the connected client. The parameter status should be an HTTP status\n+error code or #SOAP_OK (200 OK) or #SOAP_HTML or #SOAP_FILE. Using #SOAP_HTML\n+sets the content-type header to text/html; charset=utf-8. Using #SOAP_FILE sets\n+the content-type header to the value of soap::http_content. Extra HTTP headers\n+are added when soap::http_extra_header is set to one or more header lines\n+separated by CRLF. When redefining this callback, use function soap_send to\n+write the header contents. Returns #SOAP_OK or a soap_status error code. The\n+built-in function assigned to soap::fresponse is http_response.\n+ fposthdr\n+int (soap::fposthdr)(struct soap *soap, const char *key, const char *val)\n+This callback is called by soap::fpost and soap::fresponse to send an HTTP\n+header with a key and an optional value. Returns #SOAP_OK or a soap_status\n+(int) error code. The built-in function assigned to soap::fposthdr is\n+http_post_header.\n+ fparse\n+int (soap::fparse)(struct soap *soap)\n+This callback is called by the engine (as a client or server) to read and parse\n+HTTP headers or MIME headers. When redefined, this function should at read or\n+skip the entire HTTP header to reach the message body. Function soap_getline is\n+used by this callback to read each header line into an internal buffer soap::\n+msgbuf with soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)). Returns\n+#SOAP_OK, or a gSOAP error code. The built-in function assigned to soap::fparse\n+is http_parse.\n+ fparsehdr\n+int (soap::fparsehdr)(struct soap *soap, const char *key, const char *val)\n+This callback is called by soap::fparse, consumes an HTTP header that is split\n+in a key-value pair and updates the soap context state accordingly. The context\n+is updated with the HTTP header information received, but HTTP headers are not\n+literally retained by the engine. Returns #SOAP_OK or #SOAP_STOP to prevent\n+further reading of the HTTP body, or a soap_status (int) error code. The built-\n+in function assigned to soap::fparsehdr is http_parse_header.\n+ fget\n+int (soap::fget)(struct soap *soap)\n+This callback is called by the service dispatcher when an HTTP GET request is\n+pending. Redefine this callback to respond to HTTP GET requests with content,\n+see the http_get HTTP GET plugin for more details. Returns #SOAP_OK or a\n+soap_status (int) error code. The built-in function assigned to soap::fget is\n+the internal static function http_get that returns the #SOAP_GET_METHOD error.\n+ fput\n+int (soap::fput)(struct soap *soap)\n+This callback is called by the service dispatcher when an HTTP PUT request is\n+pending. Redefine this callback to respond to HTTP PUT requests, see the\n+http_post HTTP POST plugin for more details. Returns #SOAP_OK or a soap_status\n+error code. The built-in function assigned to soap::fput is the internal static\n+function http_put that returns the #SOAP_PUT_METHOD error.\n+ fpatch\n+int (soap::fpatch)(struct soap *soap)\n+This callback is called by the service dispatcher when an HTTP PATCH request is\n+pending. Redefine this callback to respond to HTTP PATCH requests, see the\n+http_post HTTP POST plugin for more details. Returns #SOAP_OK or a soap_status\n+error code. The built-in function assigned to soap::fpatch is the internal\n+static function http_patch that returns the #SOAP_PATCH_METHOD error.\n+ fdel\n+int (soap::fdel)(struct soap *soap)\n+This callback is called by the service dispatcher when an HTTP DELETE request\n+is pending. Redefine this callback to respond to HTTP DELETE requests, see the\n+http_post HTTP POST plugin for more details. Returns #SOAP_OK or a soap_status\n+(int) error code. The built-in function assigned to soap::fdel is the internal\n+static function http_del that returns the #SOAP_DEL_METHOD error.\n+ fopt\n+int (soap::fopt)(struct soap *soap)\n+Called by the service dispatcher when an HTTP OPTION request is pending.\n+Redefine this callback to respond to HTTP OPTION requests, see the http_post\n+HTTP POST plugin for more details. Returns #SOAP_OK or a soap_status (int)\n+error code. The built-in function assigned to soap::fopt is the internal static\n+function http_200 that returns HTTP 200 OK.\n+ fhead\n+int (soap::fhead)(struct soap *soap)\n+This callback is called by the service dispatcher when an HTTP HEAD request is\n+pending. Redefine this callback to respond to HTTP HEAD requests more\n+specifically. Returns #SOAP_OK or a soap_status (int) error code. The built-in\n+function assigned to soap::fhead is the internal static function http_200 that\n+returns HTTP 200 OK.\n+ fform\n+int (soap::fform)(struct soap *soap)\n+This callback is called by the HTTP FORM handler plugin to parse HTML forms\n+received with HTTP POST and PUT requests, see the ;:http_form HTTP FORM plugin\n+for more details. The HTTP body with the form data should be parsed by this\n+callback, otherwise HTTP keep-alive messages will end up out of sync as a\n+result of the current position not being advanced to the end of the HTTP body.\n+Returns #SOAP_OK or a soap_status (int) error code. No built-in function is\n+assigned to soap::fform.\n+ fheader\n+int (soap::fheader)(struct soap *soap)\n+This callback is called immediately after parsing a SOAP Header into the soap::\n+header structure. The SOAP Header structure soap::header can be inspected by\n+this function and verified or rejected before the rest of the message with the\n+SOAP Body is consumed. Returns #SOAP_OK or a soap_status (int) error code. No\n+built-in function is assigned to soap::fheader.\n+ fignore\n+int (soap::fignore)(struct soap *soap, const char *tag)\n+This callback is called when an unrecognized XML element was encountered on the\n+input that could be ignored depending on some specified logic. The tag\n+parameter is the offending XML element tag name string. The callback should\n+return #SOAP_OK to ignore the element or return an soap_status error code such\n+as #SOAP_TAG_MISMATCH to trigger a validation error. This callback also\n+overrides mustUnderstand attributes on unrecognized SOAP Header elements that\n+normally raise faults. It is strongly recommended that the callback returns\n+#SOAP_MUSTUNDERSTAND when soap::mustUnderstand != 0. Returns #SOAP_OK or a\n+soap_status (int) error code. No built-in function is assigned to soap::\n+fignore.\n+ fsvalidate\n+int (soap::fsvalidate)(struct soap *soap, const char *pattern, const char\n+*string)\n+This callback is called to validate a string against an XML regex pattern.\n+Patterns use XML schema regex syntax. This callback allows user-defined pattern\n+validation that is normally disabled. Returns #SOAP_OK when the string matches\n+the pattern or #SOAP_TYPE when the string does not match. No built-in function\n+is assigned to soap::fsvalidate.\n+ fwvalidate\n+int (soap::fwvalidate)(struct soap *soap, const char *pattern, const wchar_t\n+*string) This callback is called to validate a wide string against an XML regex\n+pattern. Patterns use XML schema regex syntax. This callback allows user-\n+defined pattern validation that is normally disabled. Returns #SOAP_OK when the\n+string matches the pattern or #SOAP_TYPE when the string does not match. No\n+built-in function is assigned to soap::fwvalidate.\n+ fseterror\n+void (soap::fseterror)(struct soap *soap, const char **code, const char\n+**string)\n+This callback is called by the engine when an error is raised to allow\n+inspection or overriding of the fault code or fault string messages before the\n+error is reported or transmitted. No built-in function is assigned to soap::\n+fseterror.\n+ fopen\n+SOAP_SOCKET (soap::fopen)(struct soap *soap, const char *endpoint, const char\n+*host, int port)\n+This callback is called by the engine at the client-side by soap_connect or\n+soap_connect_command to open a TCP or UDP connection to a server specified at\n+an endpoint. Parameters host and port are micro-parsed from endpoint before\n+being passed to soap::fopen. Returns a valid socket or #SOAP_INVALID_SOCKET\n+with a soap::error set to a soap_status (int) error code and soap::errnum set\n+to errno of the connection failure. The built-in function assigned to soap::\n+fopen is tcp_connect.\n+ faccept\n+SOAP_SOCKET (soap::faccept)(struct soap *soap, SOAP_SOCKET s, struct sockaddr\n+*a, int *n)\n+This callback is called by soap_accept (or the C++ service class accept method)\n+to wait for and accept a socket connection requested by a client. Returns a\n+valid socket or #SOAP_INVALID_SOCKET when an error occurred and sets soap::\n+error to a soap_status value. The built-in function assigned to soap::faccept\n+is tcp_accept.\n+ fclose\n+int (soap::fclose)(struct soap *soap)\n+This callback is called by the engine at the client-side to close the current\n+socket connection before a new socket connection is established. This callback\n+may be called multiple times (e.g. by the engine and by plugins) to close the\n+same socket soap::socket. Checks internally if soap::socket ==\n+#SOAP_INVALID_SOCKET before closing, which means that the socket was already\n+closed. Returns #SOAP_OK or a soap_status (int) error code. The built-in\n+function assigned to soap::fclose is tcp_disconnect.\n+ fresolve\n+int (soap::fresolve)(struct soap *soap, const char *addr, struct in_addr\n+*inaddr)\n+This callback is called by soap_bind (or the C++ service class bind method) at\n+the server-side and by soap_connect or soap_connect_command at the client-side\n+with a host name parameter to resolve to address inaddr by address translation.\n+When successful sets parameter inaddr and returns #SOAP_OK or a soap_status\n+(int) error code. The built-in function assigned to soap::fresolve is\n+tcp_gethost.\n+ fconnect\n+int (soap::fconnect)(struct soap *soap, const char *endpoint, const char *host,\n+int port)\n+This callback is called by the engine to optionally override client-side\n+connecting. The parameters host and port were micro-parsed from the endpoint\n+prior to passing them to this callback. Returns #SOAP_OK or a soap_status (int)\n+error code. No built-in function is assigned to soap::fconnect.\n+ fdisconnect\n+int (soap::fdisconnect)(struct soap *soap)\n+This callback is called by the engine soap_closesock before the soap::fclose\n+callback is called to shutdown/disconnect. Returns #SOAP_OK or a soap_status\n+(int) error code. No built-in function is assigned to soap::fdisconnect.\n+ fclosesocket\n+int (soap::fclosesocket)(struct soap *soap, SOAP_SOCKET sock)\n+This callback is called to close a socket by the engine. Returns #SOAP_OK or a\n+soap_status (int) error code. The built-in function assigned to soap::\n+fclosesocket is tcp_closesocket.\n+ fshutdownsocket\n+int (soap::fshutdownsocket)(struct soap *soap, SOAP_SOCKET sock, int how)\n+This callback is called to shut down a socket by the engine. Returns #SOAP_OK\n+or a soap_status (int) error code. The built-in function assigned to soap::\n+fshutdownsocket is tcp_shutdownsocket.\n+ fpoll\n+int (soap::fpoll)(struct soap *soap)\n+This callback is called by the engine to wait for activity on the soap::socket\n+or soap::master socket using poll or select. Times out when soap::send_timeout\n+or soap::recv_timeout are nonzero. Returns #SOAP_OK or a soap_status (int)\n+error code. The built-in function assigned to soap::fpoll is soap_poll.\n+ frecv\n+size_t (soap::frecv)(struct soap *soap, char *buf, size_t len)\n+This callback is called by the engine to receive (or read) data into a\n+specified buffer buf and len. The source for the data to read by this callback\n+is soap::is when non-NULL, soap::socket when valid, or soap::recvfd. Returns\n+#SOAP_OK or a soap_status (int) error code. The built-in function assigned to\n+soap::frecv is frecv.\n+ fsend\n+int (soap::fsend)(struct soap *soap, const char *buf, size_t len)\n+This callback is called by the engine to send (or write) data specified by data\n+bytes of length len. The sink for the data to be sent to is typically soap::\n+socket, soap::sendfd or soap::os. Returns #SOAP_OK or a soap_status (int) error\n+code. The built-in function assigned to soap::fsend is fsend.\n+ fserverloop\n+int (soap::fserveloop)(struct soap *soap)\n+This callback is called after each successful completion of a server operation\n+in the server loop. Executes immediately after sending the response to a client\n+and before the next keep-alive server loop iteration when enabled with\n+#SOAP_IO_KEEPALIVE. This callback can be used to reclaim resources in the keep-\n+alive server loop, for example managed memory can be reclaimed by calling\n+soap_destroy and soap_end in that order and all deserialized and other\n+dynamically-allocated data managed by the context will be deallocated. Returns\n+#SOAP_OK or a soap_status (int) error code. No built-in function is assigned to\n+soap::fserveloop.\n+ fmalloc\n+void (soap::fmalloc)(struct soap *soap, size_t size)\n+This callback can be used to override memory allocation and management done by\n+soap_malloc in C. Memory allocated via this callback will not be managed and\n+not be automatically released by the engine. Instead, the application using\n+this callback should release allocated memory. All allocations done by\n+soap_malloc are replaced with a call to soap::fmalloc. However, no other\n+allocations, such as soap_new and soap_new_T for C++ classes T are affected,\n+because objects are allocated differently. This callback is therefore not\n+useful for C++ applications. Returns a pointer to dynamically allocated memory\n+or NULL on failure to allocate. No built-in function is assigned to soap::\n+fmalloc.\n+ Warning\n+ Deprecated since 2.8.72. Define #SOAP_MALLOC and #SOAP_FREE instead.\n+ user variable\n+A void* soap::user variable is available to pass user-defined data to the\n+callbacks.\n+ Examples\n+The following example uses I/O callbacks for customized serialization of data\n+into a fixed-size buffer and deserialization back into a data structure:\n+char buf[10000]; // XML buffer\n+int len1 = 0; // #chars written\n+int len2 = 0; // #chars read\n+// mysend: put XML in buf[]\n+int mysend(struct soap *soap, const char *s, size_t n)\n+{\n+if (len1 + n > sizeof(buf))\n+return SOAP_EOF;\n+strcpy(buf + len1, s);\n+len1 += n;\n+return SOAP_OK;\n+}\n+// myrecv: get XML from buf[]\n+size_t myrecv(struct soap *soap, char *s, size_t n)\n+{\n+if (len2 + n > len1)\n+n = len1 - len2;\n+strncpy(s, buf + len2, n);\n+len2 += n;\n+return n;\n+}\n+int main()\n+{\n+struct soap soap;\n+struct ns__person p;\n+soap_init1(&soap, SOAP_XML_TREE);\n+len1 = len2 = 0; // reset buffer pointers\n+p.name = \"John Doe\";\n+p.age = 25;\n+soap.fsend = mysend; // assign callback\n+soap.frecv = myrecv; // assign callback\n+if (soap_write_ns__person(&soap, &p))\n+{\n+soap_print_fault(&soap, stdout);\n+exit(EXIT_FAILURE);\n+}\n+if (soap_read_ns__Person(&soap, &p))\n+{\n+soap_print_fault(&soap, stdout);\n+exit(EXIT_FAILURE);\n+}\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+soap::frecv\n+size_t(* frecv)(struct soap *soap, char *buf, size_t len)\n+Callback that receives bytes of data into the given buffer.\n+Definition: stdsoap2.h:4607\n+soap::fsend\n+int(* fsend)(struct soap *soap, const char *data, size_t len)\n+Callback that sends the given bytes of data.\n+Definition: stdsoap2.h:4620\n+A fixed-size buffer to store the outbound message sent is not flexible to\n+handle large content. To store the message in an expanding buffer:\n+struct buffer\n+{\n+size_t len;\n+size_t max;\n+char *buf;\n+};\n+int main()\n+{\n+struct soap soap;\n+struct ns__person p;\n+struct buffer *h = malloc(sizeof(struct buffer));\n+h->len = 0;\n+h->max = 0;\n+h->buf = NULL;\n+soap_init1(&soap, SOAP_XML_TREE);\n+soap.user = (void*)h; // pass buffer as a handle to the callback\n+soap.fsend = mysend; // assign callback\n+if (soap_write_ns__person(&soap, &p))\n+{\n+soap_print_fault(&soap, stdout);\n+exit(EXIT_FAILURE);\n+}\n+if (h->len)\n+{\n+... // use h->buf[0..h->len-1] content\n+// then cleanup:\n+h->len = 0;\n+h->max = 0;\n+free(h->buf);\n+h->buf = NULL;\n+}\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+int mysend(struct soap *soap, const char *s, size_t n)\n+{\n+struct buffer *h = (struct buffer*)soap->user; // get buffer through handle\n+int m = h->max, k = h->len + n;\n+// need to increase space?\n+if (m == 0)\n+m = 1024;\n+else\n+while (k >= m)\n+m *= 2;\n+if (m != h->max)\n+{\n+char *buf = malloc(m);\n+memcpy(buf, h->buf, h->len);\n+h->max = m;\n+if (h->buf)\n+free(h->buf);\n+h->buf = buf;\n+}\n+memcpy(h->buf + h->len, s, n);\n+h->len += n;\n+return SOAP_OK;\n+}\n+The following example illustrates customized I/O and HTTP header handling. The\n+XML message is saved to a file to demonstrate I/O and HTTP callbacks. The\n+client proxy then reads the file contents as the service response. To perform\n+this trick, the service response has exactly the same structure as the request.\n+This is declared by the struct ns__test output parameter part of the service\n+operation declaration. This struct resembles the service request (see the\n+generated soapStub.h file generated by soapcpp2 from the interface header file\n+input).\n+The interface header file for soapcpp2 is:\n+//gsoap ns service name: callback\n+//gsoap ns service namespace: urn:callback\n+struct ns__person\n+{\n+char *name;\n+int age;\n+};\n+int ns__test(struct ns__person in, struct ns__test &out);\n+The client program is:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+SOAP_SOCKET myopen(struct soap *soap, const char *endpoint, const char *host,\n+int port)\n+{\n+if (strncmp(endpoint, \"file:\", 5))\n+{\n+printf(\"File name expected\\n\");\n+return SOAP_INVALID_SOCKET;\n+}\n+if ((soap->sendfd = soap->recvfd = open(host, O_RDWR|O_CREAT, S_IWUSR|S_IRUSR))\n+< 0)\n+return SOAP_INVALID_SOCKET;\n+return soap->sendfd;\n+}\n+void myclose(struct soap *soap)\n+{\n+if (soap->sendfd > 2) // still open?\n+close(soap->sendfd); // then close it\n+soap->recvfd = 0; // set back to stdin\n+soap->sendfd = 1; // set back to stdout\n+}\n+int mypost(struct soap *soap, const char *endpoint, const char *host, const\n+char *path, const char *action, ULONG64 count)\n+{\n+return soap_send(soap, \"Custom-generated file\\n\"); // writes to soap->sendfd\n+}\n+int myparse(struct soap *soap)\n+{\n+char buf[256];\n+if (lseek(soap->recvfd, 0, SEEK_SET) < 0 || soap_getline(soap, buf, 256)) // go\n+to begin and skip custom header\n+return SOAP_EOF;\n+return SOAP_OK;\n+}\n+int main()\n+{\n+struct soap soap;\n+struct ns__test r;\n+struct ns__person p;\n+soap_init(&soap);\n+p.name = \"John Doe\";\n+p.age = 99;\n+soap.fopen = myopen; // use custom open\n+soap.fpost = mypost; // use custom post\n+soap.fparse = myparse; // use custom response parser\n+soap.fclose = myclose; // use custom close\n+soap_call_ns__test(&soap, \"file://test.xml\", \"\", p, r);\n+if (soap.error)\n+{\n+soap_print_fault(&soap, stdout);\n+exit(EXIT_FAILURE);\n+}\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+soap::fpost\n+int(* fpost)(struct soap *soap, const char *endpoint, const char *host, int\n+port, const char *path, const char *action, ULONG64 count)\n+Callback that populates and then sends HTTP headers from the client-side to a\n+connected HTTP server.\n+Definition: stdsoap2.h:4220\n+soap::fparse\n+int(* fparse)(struct soap *soap)\n+Callback that reads and parses HTTP and MIME headers.\n+Definition: stdsoap2.h:4250\n+soap_getline\n+int soap_getline(struct soap *soap, char *buf, int len)\n+Get a header line.\n+SOAP 1.1/1.2 RPC encoding specifies that SOAP/XML elements may be ignored when\n+present in a SOAP payload on the receiving side. However, document/literal\n+style messaging validates XML messages and extra elements cannot just be\n+ignored as such. With SOAP document/literal style it is recommended to enable\n+the #SOAP_XML_STRICT mode flag. With SOAP RPC encoding, the engine ignores XML\n+elements that are unknown by default, unless the XML attribute\n+mustUnderstand=\"true\" is present in the XML element. It may be undesirable for\n+elements to be ignored when the outcome of the omission is uncertain. The\n+soap::fignore callback can be set to a function that returns #SOAP_OK in case\n+the element can be safely ignored, or #SOAP_MUSTUNDERSTAND to throw an\n+exception, or to perform some application-specific action. For example, to\n+throw an exception as soon as an unknown element is encountered on the input,\n+use:\n+int main()\n+{\n+struct soap *soap = soap_new();\n+soap->fignore = myignore;\n+... // soap_call_ns__webmethod(soap, ...) or soap_serve(soap)\n+}\n+int myignore(struct soap *soap, const char *tag)\n+{\n+return SOAP_MUSTUNDERSTAND; // never skip elements (secure)\n+}\n+soap::fignore\n+int(* fignore)(struct soap *soap, const char *tag)\n+Callback to catch unrecognized XML elements and overrides #SOAP_XML_STRICT\n+validation errors for thes...\n+Definition: stdsoap2.h:4443\n+SOAP_MUSTUNDERSTAND\n+#define SOAP_MUSTUNDERSTAND\n+A soap_status error code: an XML element is present with a mustUnderstand\n+attribute which must be und...\n+Definition: stdsoap2.h:2490\n+To selectively throw an exception when mustUnderstand=\"true\" SOAP Header\n+element is encountered or when an unknown element is encountered except for\n+element ns:xyz, use:\n+int main()\n+{\n+struct soap *soap = soap_new();\n+soap->fignore = ignore;\n+... // soap_call_ns__webmethod(soap, ...) or soap_serve(soap)\n+}\n+int ignore(struct soap *soap, const char *tag)\n+{\n+// do not ignore mustUnderstand=\"true\"\n+if (!soap->mustUnderstand)\n+{\n+// tags can be safely ignored\n+if (soap_match_tag(soap, tag, \"ns:someElement\") == SOAP_OK)\n+return SOAP_OK;\n+}\n+return SOAP_MUSTUNDERSTAND;\n+}\n+struct Namespace namespaces[] =\n+{\n+{ \"SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" },\n+{ \"SOAP-ENC\", \"http://schemas.xmlsoap.org/soap/encoding/\" },\n+{ \"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\" },\n+{ \"xsd\", \"http://www.w3.org/2001/XMLSchema\" },\n+{ \"ns\", \"some-URI\"}, // binds \"ns\" namespace prefix to schema URI\n+{ NULL, NULL}\n+];\n+soap::mustUnderstand\n+short mustUnderstand\n+The soap::mustUnderstand flag is set when a SOAP Header element carries a SOAP-\n+ENV:mustUnderstand att...\n+Definition: stdsoap2.h:2961\n+Function soap_match_tag compares two tags. The third parameter may be a pattern\n+where * is a wildcard and - is a single character wildcard. So for example\n+soap_match_tag(soap, tag, \"ns:*\") will match any element in namespace ns or\n+when no namespace prefix is present in the XML message.\n+The callback can also be used to keep track of unknown elements in an internal\n+data structure such as a list:\n+struct Unknown\n+{\n+char *tag;\n+struct Unknown *next;\n+};\n+int myignore(struct soap *soap, const char *tag)\n+{\n+char *s = (char*)soap_malloc(soap, strlen(tag)+1);\n+struct Unknown *u = (struct Unknown*)soap_malloc(soap, sizeof(struct Unknown));\n+if (s && u)\n+{\n+strcpy(s, tag);\n+u->tag = s;\n+u->next = ulist;\n+ulist = u;\n+}\n+}\n+int main()\n+{\n+struct soap *soap;\n+struct Unknown *ulist = NULL;\n+soap_init(&soap);\n+soap.fignore = myignore;\n+... // soap_call_ns__webmethod(soap, ...) or soap_serve(soap)\n+... // print the list of unknown elements stored in ulist\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to handle HTTP 307 temporary redirect\n+The client-side handling of HTTP 307 code \"Temporary Redirect\" and any of the\n+redirect codes 301, 302, and 303 are not automated. Client application\n+developers may want to consider adding a few lines of code to support\n+redirects. It was decided not to automatically support redirects for the\n+following reasons:\n+ * Redirecting a secure HTTPS address to a non-secure HTTP address via 307\n+ creates a security vulnerability.\n+ * Cyclic redirects must be detected (e.g. allowing only a limited number of\n+ redirect levels).\n+ * Redirecting HTTP POST will result in re-serialization and re-post of the\n+ entire SOAP request. The SOAP request message must be re-posted in its\n+ entirety when re-issuing the SOAP operation to a new address.\n+To implement client-side 307 redirect, add the following lines of code:\n+const char *endpoint = NULL; // use default endpoint given in WSDL or specify\n+one here\n+int redirects = 10; // max redirect count\n+while (redirects--)\n+{\n+if (soap_call_ns1__myMethod(soap, endpoint, ...))\n+{\n+if ((soap->error >= 301 && soap->error <= 303) || soap->error == 307)\n+{\n+endpoint = soap_strdup(soap, soap->endpoint); // endpoint from HTTP 301, 302,\n+303, 307 Location header\n+}\n+else\n+{\n+... // handle error\n+break;\n+}\n+}\n+else\n+{\n+break; // all OK now\n+}\n+}\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to implement HTTP GET, PUT, and PATCH services\n+To implement HTTP GET request responses, define the soap::fget callback\n+function. The callback is required to produce a response to the request in\n+textual form, such as a Web page or an XML or JSON response.\n+You can also use the http_get plugin which essentially sets the soap::fget\n+callback and also keeps track of the number of HTTP GET and POST requests made\n+at the server side.\n+The following example produces a Web page upon a HTTP GET request (e.g. from a\n+browser):\n+int main()\n+{\n+struct soap *soap = soap_new();\n+soap->fget = http_get;\n+... //\n+soap_serve(soap);\n+... //\n+}\n+int http_get(struct soap *soap)\n+{\n+if (soap_response(soap, SOAP_HTML) // HTTP response header with text/html\n+|| soap_send(soap, \"My Web server is operational.\")\n+|| soap_end_send(soap))\n+return soap_closesock(soap);\n+return soap_closesock(soap);\n+}\n+soap::fget\n+int(* fget)(struct soap *soap)\n+Callback to implement logic at the server-side to serve responses to HTTP GET\n+requests from clients.\n+Definition: stdsoap2.h:4330\n+soap_response\n+int soap_response(struct soap *soap, int status)\n+Initialize the context for server-side sending and send a HTTP response header.\n+soap_closesock\n+int soap_closesock(struct soap *soap)\n+Close the socket connection.\n+http_get\n+int http_get(struct soap *, struct soap_plugin *, void *)\n+The HTTP GET plugin registration function.\n+SOAP_HTML\n+#define SOAP_HTML\n+A special soap_status error code to signal that a custom HTTP response is\n+present and no HTTP respons...\n+Definition: stdsoap2.h:2712\n+soap_end_send\n+int soap_end_send(struct soap *soap)\n+Finalize the context after sending.\n+The example below produces a WSDL file upon a HTTP GET with path ?wsdl:\n+int http_get(struct soap *soap)\n+{\n+FILE *fd = NULL;\n+char *s = strchr(soap->path, '?');\n+if (!s || strcmp(s, \"?wsdl\"))\n+return SOAP_GET_METHOD;\n+fd = fopen(\"myservice.wsdl\", \"rb\"); // open WSDL file to copy\n+if (!fd)\n+return 404; // return HTTP not found error\n+soap->http_content = \"text/xml\"; // HTTP header with text/xml content\n+if (soap_response(soap, SOAP_FILE) == SOAP_OK)\n+{\n+while (1)\n+{\n+size_t r = fread(soap->tmpbuf, 1, sizeof(soap->tmpbuf), fd);\n+if (!r || soap_send_raw(soap, soap->tmpbuf, r))\n+break;\n+}\n+}\n+fclose(fd);\n+soap_end_send(soap);\n+return soap_closesock(soap);\n+}\n+SOAP_GET_METHOD\n+#define SOAP_GET_METHOD\n+A soap_status error code: an HTTP GET request was received by the service but\n+the GET request callbac...\n+Definition: stdsoap2.h:2397\n+SOAP_FILE\n+#define SOAP_FILE\n+A special soap_status error code to signal that a custom file-based HTTP\n+response is present and no H...\n+Definition: stdsoap2.h:2719\n+soap_send_raw\n+int soap_send_raw(struct soap *soap, const char *s, size_t n)\n+Send raw bytes.\n+soap::tmpbuf\n+char tmpbuf[SOAP_TMPLEN]\n+Internal buffer to hold temporary strings such as string representations of\n+primitive values,...\n+Definition: stdsoap2.h:4199\n+soap::http_content\n+const char * http_content\n+String with HTTP content type header value received, can also be assigned to\n+specify a content type h...\n+Definition: stdsoap2.h:2980\n+This example shows how one predetermined file is served. The gsoap/samples/\n+webserver demonstrates how files should be served in general, by adding the\n+necessary logic to add media types to HTTP headers and to restrict the\n+selection of files that should be served.\n+ Warning\n+ When serving files as responses to requests, we need to be vary careful,\n+ because we don't want requests to snoop around in directories and serve\n+ files that should be protected from public view. Therefore, when adding\n+ logic to serve files, we must reject request that have soap::path values\n+ with a / or a \\ (soap::path is a string with the path part of the URL,\n+ starting with a /). If these are allowed, then we must at least check for\n+ .. in the path to avoid request from snooping around in higher\n+ directories all the way up to the root.\n+For a one-way SOAP/XML message, you can also return a SOAP/XML response:\n+int http_get(struct soap *soap)\n+{\n+soap_response(soap, SOAP_OK);\n+return soap_send_ns1__mySendMethodResponse(soap, \"\", NULL, ... params ...);\n+}\n+where ns1__mySendMethodResponse is a one-way message declared in a interface\n+header file as:\n+int ns1__mySendMethodResponse(... params ..., void);\n+The generated soapClient.cpp includes the sending-side stub function.\n+The examples above are for HTTP GET. To implement HTTP PUT and PATCH set the\n+soap::fput and soap::fpatch callback functions or use the http_post plugin\n+which is more capable.\n+\ud83d\udd1d Back_to_table_of_contents\n+ TCP and HTTP keep-alive\n+To activate HTTP keep-alive, set the #SOAP_IO_KEEPALIVE flag for both input and\n+output modes, see Section Run-time_flags . For example\n+struct soap soap;\n+soap_init1(&soap, SOAP_IO_KEEPALIVE);\n+When a client or a service communicates with another client or service that\n+supports keep alive, the soap::keep_alive variable will be set to 1, otherwise\n+it is reset to 0 indicating that the other party wants to close the connection.\n+The connection maybe terminated on either end before the communication\n+completed, for example when the server keep-alive connection has timed out.\n+This may generate a \"Broken Pipe\" signal on Unix/Linux platforms. This signal\n+can be caught with a signal handler:\n+signal(SIGPIPE, sigpipe_handle);\n+where, for example:\n+void sigpipe_handle(int x) { }\n+Alternatively, broken pipes can be kept silent by setting:\n+soap.socket_flags = MSG_NOSIGNAL;\n+soap::socket_flags\n+int socket_flags\n+User-definable socket send and recv flags, for example assign MSG_NOSIGNAL to\n+disable sigpipe (the va...\n+Definition: stdsoap2.h:3359\n+This setting will not generate a SIGPIPE but read/write operations return\n+#SOAP_EOF instead. Note that Windows does not support signals and lack the\n+MSG_NOSIGNAL flag.\n+If the client does not close the connection, the server will wait forever when\n+no soap::recv_timeout is specified, so be careful to set timeouts, See Section\n+Timeout_management_for_non-blocking_operations. In addition, other clients will\n+be denied service as long as a client keeps the connection to the server open.\n+To prevent this from happening, the service should be multi-threaded such that\n+each thread handles the client connection:\n+int main(int argc, char **argv)\n+{\n+struct soap soap, *tsoap;\n+THREAD_TYPE tid;\n+int m, s;\n+soap_init2(&soap, SOAP_IO_KEEPALIVE, SOAP_IO_KEEPALIVE);\n+soap.max_keep_alive = 100; // at most 100 calls per keep-alive session\n+soap.accept_timeout = 600; // optional: let server time out after ten minutes\n+of inactivity\n+m = soap_bind(&soap, NULL, 18000, BACKLOG); // use port 18000 on the current\n+machine\n+if (!soap_valid_socket(m))\n+{\n+soap_print_fault(&soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+fprintf(stderr, \"Socket connection successful %d\\n\", m);\n+for (count = 0; count >= 0; count++)\n+{\n+soap.socket_flags = MSG_NOSIGNAL; // use this\n+soap.accept_flags = SO_NOSIGPIPE; // or this to prevent SIGPIPE\n+s = soap_accept(&soap);\n+if (soap_valid_socket(s))\n+{\n+fprintf(stderr, \"Accept socket %d connection from IP %d.%d.%d.%d\\n\", s, (int)\n+(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF,\n+(int)soap.ip&0xFF);\n+tsoap = soap_copy(&soap);\n+if (!tsoap)\n+soap_force_closesock(&soap);\n+else\n+while (THREAD_CREATE(&tid, (void*(*)(void*))process_request, (void*)tsoap))\n+sleep(1); // failed, try again\n+}\n+else if (soap.errnum) // accept failed, try again after 1 second\n+{\n+soap_print_fault(&soap, stderr);\n+sleep(1);\n+}\n+else\n+{\n+fprintf(stderr, \"Server timed out\\n\");\n+break;\n+}\n+}\n+return 0;\n+}\n+void *process_request(void *tsoap)\n+{\n+struct *soap = (struct soap*)tsoap;\n+THREAD_DETACH(THREAD_ID);\n+((struct soap*)soap)->recv_timeout = 60; // Timeout after 1 minute stall on\n+recv\n+((struct soap*)soap)->send_timeout = 10; // Timeout after 10 second stall on\n+send\n+soap_serve(soap);\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+return NULL;\n+}\n+soap::count\n+ULONG64 count\n+Message length counter value of the message received and counter value of the\n+HTTP content length hea...\n+Definition: stdsoap2.h:4204\n+soap::accept_flags\n+int accept_flags\n+User-definable setsockopt level SOL_SOCKET flags (0 by default), when nonzero\n+sets the soap::socket f...\n+Definition: stdsoap2.h:3453\n+A client call will automatically attempt to re-establish a connection to a\n+server when the server has terminated the connection for any reason. This way,\n+a sequence of calls can be made to the server while keeping the connection\n+open. Client stub functions poll the server to check if the connection is still\n+open. When the connection was terminated by the server, the client will\n+automatically reconnect.\n+A client may clear the #SOAP_IO_KEEPALIVE flag just before the last call to a\n+server to let the server know it wants to close the connection after this last\n+call. This will close the socket after the call and also informs the server to\n+gracefully close the connection.\n+The client-side can also set the TCP keep-alive socket properties, using the\n+soap::tcp_keep_alive flag (set to 1 to enable), soap::tcp_keep_idle to set the\n+TCP_KEEPIDLE value, soap::tcp_keep_intvl to set the TCP_KEEPINTVL value, and\n+soap::tcp_keep_cnt to set the TCP_KEEPCNT value.\n+If a client is in the middle of soap call that might take a long time and the\n+server goes away/down the caller does not get any feedback until the soap::\n+recv_timeout is reached. Enabling TCP keep alive on systems that support it\n+allows for a faster connection teardown detection for applications that need\n+it.\n+\ud83d\udd1d Back_to_table_of_contents\n+ HTTP chunked transfer encoding\n+Outbound HTTP messages are not chunked unless the #SOAP_IO_CHUNK flag is\n+enabled. Chunking may improve the speed of message sending with HTTP, because\n+the message length does not need to be determined in advance for the HTTP\n+content length header.\n+\ud83d\udd1d Back_to_table_of_contents\n+ HTTP buffered sends\n+The entire outbound message can be stored in a buffer to determine the HTTP\n+content length rather than the two-phase encoding used by gSOAP client-side\n+stub functions and server-side skeleton functions generated by soapcpp2, which\n+perform a separate pass over the data to determine the length of the outbound\n+message. Setting the flag #SOAP_IO_STORE for the output mode will buffer the\n+entire message. This may or may not speed up the transmission of messages,\n+depending on the content, but may require significant storage space to hold\n+large messages temporarily.\n+\ud83d\udd1d Back_to_table_of_contents\n+ HTTP authentication\n+The following sections explain how to authenticate with HTTP bearer, basic,\n+digest, and NTLM. Proxy authentication is also covered.\n+You could also use the WinInet plugin available in the gsoap/mod_gsoap\n+directory of the gSOAP source code package to simplify Internet access for\n+gSOAP client applications and deal with encryption, proxies, and\n+authentication, see the gSOAP WinInet_plugin documentation.\n+The gSOAP CURL plugin can also be used to develop gSOAP client applications and\n+CURL implements various HTTP authentication methods, see the gSOAP CURL_plugin\n+documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ HTTP bearer authentication\n+HTTP bearer authentication is enabled at the client-side by setting the soap::\n+bearer string to the bearer token:\n+struct soap *soap = soap_new();\n+soap->bearer = \"...\";\n+if (soap_call_ns__webmethod(soap, ...))\n+... // error\n+else\n+... // OK\n+soap::bearer\n+const char * bearer\n+User-definable HTTP authorization bearer token value to be sent by the client,\n+server side receives t...\n+Definition: stdsoap2.h:3752\n+\ud83d\udd1d Back_to_table_of_contents\n+ HTTP basic authentication\n+HTTP basic authentication is enabled at the client-side by setting the const\n+char* soap::userid and const char* soap::passwd strings to a username and\n+password, respectively. A server may request user authentication and denies\n+access (HTTP 401 error) when the client tries to connect without HTTP\n+authentication (or with the wrong authentication information).\n+Basic authentication should only be used over HTTPS, because the credentials\n+are sent in the clear with HTTP. See Section The_HTTP_digest_authentication\n+plugin to use the HTTP digest plugin that is safe for authentication over HTTP.\n+Here is an example client code fragment to set the HTTP authentication username\n+and password:\n+struct soap *soap = soap_new();\n+soap->userid = \"guest\";\n+soap->passwd = \"visit\";\n+if (soap_call_ns__webmethod(soap, ...))\n+... // error\n+else\n+... // success\n+soap::passwd\n+const char * passwd\n+User-definable HTTP and NTLM authorization password string required for HTTP\n+basic and NTLM authentic...\n+Definition: stdsoap2.h:3827\n+soap::userid\n+const char * userid\n+User-definable HTTP and NTLM authorization user id string for HTTP basic and\n+NTLM authentication by t...\n+Definition: stdsoap2.h:3822\n+A client SOAP request will have the following HTTP header:\n+POST /XXX HTTP/1.1\n+Host: YYY\n+User-Agent: gSOAP/2.8\n+Content-Type: text/xml; charset=utf-8\n+Content-Length: ZZZ\n+Authorization: Basic Z3Vlc3Q6Z3Vlc3Q=\n+A client must set the const char* soap::userid and const char* soap::passwd\n+strings for each call that requires client authentication. The strings are\n+reset after each successful or unsuccessful call.\n+When present, the WWW-Authenticate HTTP header returned by the server with the\n+authentication realm is stored in the the soap::authrealm string. This is\n+useful for clients to use this domain information to respond to authentication\n+requests.\n+A stand-alone gSOAP Web Service application can enforce HTTP authentication on\n+clients by checking the const char* soap::userid and const char* soap::passwd\n+strings. These strings are set when a client request contains HTTP\n+authentication headers. The strings should be checked in each service method\n+(that requires authentication to execute).\n+Here is an example service method implementation that enforced client\n+authentication:\n+int ns__webmethod(struct soap *soap, ...)\n+{\n+if (!soap->userid\n+|| !soap->passwd\n+|| strcmp(soap->userid, \"guest\")\n+|| strcmp(soap->passwd, \"visit\"))\n+{\n+soap->authrealm = \"...\"; // domain realm accessed (optional, NULL to omit)\n+return 401;\n+}\n+... // webmethod logic\n+return SOAP_OK;\n+}\n+soap::authrealm\n+const char * authrealm\n+The HTTP and NTLM authorization realm/domain string received by the client with\n+the WWW-Authenticate ...\n+Definition: stdsoap2.h:3832\n+When the authentication fails, the service response with a SOAP Fault message\n+and a HTTP error code \"401 Unauthorized\". The HTTP error codes are described in\n+Section Run-time_error_codes .\n+To return a non-SOAP error, use:\n+return soap_send_empty_response(soap, 401);\n+\ud83d\udd1d Back_to_table_of_contents\n+ HTTP NTLM authentication\n+HTTP NTLM authentication is enabled at the client-side by installing libntlm\n+from http://www.nongnu.org/libntlm and compiling all project source codes with\n+the compile-time flag #WITH_NTLM.\n+In your application code set the const char* soap::userid and const char*\n+soap::passwd strings to a username and password. A server may request NTLM\n+authentication and denies access (HTTP 401 authentication required or HTTP 407\n+HTTP proxy authentication required) when the client tries to connect without\n+HTTP authentication (or with the wrong authentication information).\n+Here is an example client code fragment to set the NTLM authentication username\n+and password:\n+struct soap *soap = soap_new1(SOAP_IO_KEEPALIVE);\n+if (soap_call_ns__webmethod(soap, ...))\n+{\n+if (soap->error == 401)\n+{\n+soap->userid = \"Zaphod\";\n+soap->passwd = \"Beeblebrox\";\n+if (soap_call_ns__webmethod(soap, ...))\n+... // error\n+else\n+... // success\n+}\n+}\n+The following NTLM handshake between the client C and server S is performed:\n+1: C --> S & POST ...\n+ & Content-Type: text/xml; charset=utf-8\n+\n+2: C <-- S & 401 Unauthorized\n+ & WWW-Authenticate: NTLM\n+\n+3: C --> S & GET ...\n+ & Authorization: NTLM \n+\n+4: C <-- S & 401 Unauthorized\n+ & WWW-Authenticate: NTLM \n+\n+5: C --> S & POST ...\n+ & Content-Type: text/xml; charset=utf-8\n+ & Authorization: NTLM \n+\n+6: C <-- S & 200 OK\n+where stages 1 and 2 indicates a client attempting to connect without\n+authorization information, which is the first method call in the code above.\n+Stage 3 to 6 happen with the proper client authentication set with const char*\n+soap::userid and const char* soap::passwd. Optionally, the const char* soap::\n+authrealm string should be set as well to indicate the domain accessed (this\n+string is normally set when the server responds with HTTP 401 so the client\n+receives this server domain information). NTLM authenticates connections, not\n+requests. When the connection is kept alive, subsequent messages can be\n+exchanged without re-authentication.\n+To avoid the overhead of the first rejected call, use:\n+struct soap *soap = soap_new1(SOAP_IO_KEEPALIVE);\n+soap->ntlm_challenge = \"\";\n+soap->userid = \"Zaphod\";\n+soap->passwd = \"Beeblebrox\";\n+soap->authrealm = \"Ursa-Minor\";\n+if (soap_call_ns__webmethod(soap, ...))\n+... // error\n+else\n+... // success\n+soap::ntlm_challenge\n+const char * ntlm_challenge\n+User-definable NTLM authentication challenge key string.\n+Definition: stdsoap2.h:3878\n+When the authentication fails (stage 1 and 2), the service response with HTTP\n+error code \"401 Unauthorized\" and soap::error is set to HTTP code 401.\n+\ud83d\udd1d Back_to_table_of_contents\n+ HTTP proxy NTLM authentication\n+For HTTP 407 Proxy Authentication Required set the soap::proxy_userid and\n+soap::proxy_passwd:\n+struct soap *soap = soap_new1(SOAP_IO_KEEPALIVE);\n+soap->proxy_host = \"...\";\n+soap->proxy_port = ...;\n+if (soap_call_ns__webmethod(soap, ...))\n+{\n+if (soap->error == 407)\n+{\n+soap->proxy_userid = \"Zaphod\";\n+soap->proxy_passwd = \"Beeblebrox\";\n+soap->authrealm = \"Ursa-Minor\";\n+if (soap_call_ns__webmethod(soap, ...))\n+... // error\n+else\n+... // success\n+soap::proxy_port\n+int proxy_port\n+User-definable proxy port which should be set to connect through an HTTP proxy\n+(the value is 8080 by ...\n+Definition: stdsoap2.h:3906\n+soap::proxy_userid\n+const char * proxy_userid\n+User-definable proxy authorization user id string to authenticate and connect\n+to an HTTP proxy.\n+Definition: stdsoap2.h:3911\n+soap::proxy_host\n+const char * proxy_host\n+User-definable proxy host name string which should be set to connect through an\n+HTTP proxy.\n+Definition: stdsoap2.h:3901\n+soap::proxy_passwd\n+const char * proxy_passwd\n+User-definable proxy authorization password string to authenticate and connect\n+to an HTTP proxy.\n+Definition: stdsoap2.h:3916\n+To avoid the overhead of the first rejected call, use:\n+struct soap *soap = soap_new1(SOAP_IO_KEEPALIVE);\n+soap->proxy_host = \"...\";\n+soap->proxy_port = ...;\n+soap->proxy_userid = \"Zaphod\";\n+soap->proxy_passwd = \"Beeblebrox\";\n+soap->authrealm = \"Ursa-Minor\";\n+soap->ntlm_challenge = \"\";\n+if (soap_call_ns__webmethod(soap, ...))\n+... // error\n+else\n+... // success\n+\ud83d\udd1d Back_to_table_of_contents\n+ HTTP proxy basic authentication\n+HTTP proxy authentication (basic) is enabled at the client-side by setting the\n+soap::proxy_userid and soap::proxy_passwd strings to a username and password,\n+respectively. For example, a proxy server may request user authentication.\n+Otherwise, access is denied by the proxy (HTTP 407 error). Example client code\n+fragment to set proxy server, username, and password:\n+struct soap *soap = soap_new();\n+soap->proxy_host = \"xx.xx.xx.xx\"; // IP or domain\n+soap->proxy_port = 8080;\n+soap->proxy_userid = \"guest\";\n+soap->proxy_passwd = \"guest\";\n+A client SOAP request will have the following HTTP header:\n+POST /XXX HTTP/1.1\n+Host: YYY\n+User-Agent: gSOAP/2.8\n+Content-Type: text/xml; charset=utf-8\n+Content-Length: ZZZ\n+Proxy-Authorization: Basic Z3Vlc3Q6Z3Vlc3Q=\n+When X-Forwarded-For headers are returned by the proxy, the header can be\n+accessed in the soap::proxy_from string.\n+The CONNECT method is used for HTTP proxy authentication:\n+CONNECT server.example.com:80 HTTP/1.1\n+In some cases, you will notice that the Host HTTP header uses the CONNECT\n+protocol:\n+CONNECT server.example.com:80 HTTP/1.1\n+Host: server.example.com:80\n+\ud83d\udd1d Back_to_table_of_contents\n+ Performance improvement tips\n+Here are some tips you can use to speed up gSOAP. The default settings are\n+chosen to maximize portability and compatibility. The settings can be tweaked\n+to optimize the performance as follows:\n+ * Increase the buffer size #SOAP_BUFLEN by changing the #SOAP_BUFLEN macro\n+ in gsoap/stdsoap2.h. Use buffer size 2^18=262144 for example.\n+ * Use HTTP keep-alive at the client-side, see Section TCP_and_HTTP_keep-\n+ alive , when the client needs to make a series of calls to the same\n+ server. Server-side keep-alive support can greatly improve performance of\n+ both client and server. But be aware that clients and services under\n+ Unix/Linux require signal handlers to catch dropped connections.\n+ * Use HTTP chunked transfers, see Section HTTP_chunked_transfer_encoding .\n+ * Do not use gzip compression, since the overhead of compression is\n+ typically higher than the bandwidth gains.\n+ * Set the #SOAP_XML_TREE flag to disable id-ref multi-ref object\n+ serialization. This boosts performance significantly and works with SOAP\n+ document/literal style (i.e. no id-ref graph serialization as required\n+ with SOAP encoding style). Do not use this for SOAP RPC encoded\n+ messaging.\n+ * Compile gsoap/stdsoap2.c and gsoap/stdsoap2.cpp and all other source\n+ codes with the compile time flag #WITH_NOIDREF to improve performance\n+ even better by permanently disabling id-ref multi-ref object\n+ serialization. Do not use this for SOAP RPC encoded messaging.\n+ * Do not use DEBUG mode, since the overhead of logging is significant.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Safety guards\n+The following settings are important to ensure that XML messaging is safe by\n+defining reasonable XML message restrictions. Also messaging timeouts should be\n+set as explained in Section Timeout_management_for_non-blocking_operations.\n+The XML parser is configured to restrict the XML nesting depth level to\n+#SOAP_MAXLEVEL and restricts the repeated occurrence of elements that are\n+deserialized into arrays and containers by #SOAP_MAXOCCURS. These macros can be\n+changed, but you can also change the following context attributes at run-time,\n+e.g. to enhance the safety for specific service and/or client operations:\n+ * soap::maxlevel restricts the XML nesting depth level, where the default\n+ value is #SOAP_MAXLEVEL = 10000.\n+ * soap::maxoccurs restricts the number of repeated occurrences of elements\n+ that are deserialized into arrays and structs, where the default value is\n+ #SOAP_MAXOCCURS = 100000.\n+ * soap::maxlength restricts the length of strings deserialized from XML. A\n+ zero or negative value is unrestricted length. When restricted, the XML\n+ schema validation maxLength takes precedence over this length\n+ restriction. So setting a smaller value will not interfere with the XML\n+ validation rules. The default value is #SOAP_MAXLENGTH = 0. Note that\n+ string length is expressed in number of characters, not bytes. So UTF-\n+ 8 encodings are not truncated.\n+ * soap::recv_maxlength the maximum length of messages received, 2GB by\n+ default.\n+XML schema validation constraints are enforced with the #SOAP_XML_STRICT\n+context flag. The schema maxLength validation constraint overrules the soap::\n+maxlength guard. The schema maxOccurs validation constraint does not overrule\n+the soap::maxoccurs guard, so arrays and containers are always restricted in\n+length by this guard.\n+Other compile-time configuration settings are:\n+ * #SOAP_MAXALLOCSIZE the maximum size of a block of memory that malloc can\n+ allocate.\n+ * #SOAP_MAXARRAYSIZE the maximum allocation threshold to pre-allocate SOAP\n+ arrays in memory.\n+ * #SOAP_MAXDIMESIZE the maximum DIME attachment size allowed to receive.\n+ * #SOAP_MAXEINTR maximum number of EINTR interrupts to ignore while polling\n+ a socket for pending activity.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Timeout management for non-blocking operations\n+Socket connect, accept, send, and receive timeout values can be set to manage\n+socket communication timeouts. The soap::connect_timeout, soap::accept_timeout,\n+soap::send_timeout, soap::recv_timeout and soap::transfer_timeout context\n+attributes of the current context soap can be set to the appropriate user-\n+defined socket send, receive, and accept timeout values. A positive value\n+measures the timeout in seconds. A negative timeout value measures the timeout\n+in microseconds (10^-6 sec).\n+The soap::connect_timeout specifies the timeout for soap_call_ns__webmethod\n+stub function calls and for C++ proxy class calls.\n+The soap::accept_timeout specifies the timeout for soap_accept calls.\n+The soap::send_timeout and soap::recv_timeout specify the timeout for non-\n+blocking socket I/O operations. This is the maximum delay on the socket\n+operation permitted.\n+The soap::transfer_timeout is new since 2.8.48 and limits the time a message\n+send and a message receive operation can take. This value should be used in\n+combination with soap::send_timeout and soap::recv_timeout for accurate timeout\n+control. The soap::recv_maxlength value when non-zero limits the length of\n+messages that can be received in bytes in total in decompressed form (message\n+length includes HTTP headers and HTTP chunk size fields). The value of soap::\n+recv_maxlength is 2GB by default.\n+Example:\n+struct soap *soap = soap_new();\n+soap->send_timeout = 10;\n+soap->recv_timeout = 10;\n+soap->recv_timeout = 60;\n+This will result in a timeout if no data can be send in 10 seconds and no data\n+is received within 10 seconds after initiating a send or receive operation over\n+the socket. A value of zero disables timeout, for example:\n+struct soap *soap = soap_new();\n+soap->send_timeout = 0;\n+soap->recv_timeout = 0;\n+soap->recv_timeout = 0;\n+When a timeout occurs in the send or receive operations, a #SOAP_EOF exception\n+will be raised (\"end of file or no input\"). Negative timeout values measure\n+timeouts in microseconds, for example:\n+#define uSec *-1\n+#define mSec *-1000\n+struct soap *soap = soap_new();\n+soap->accept_timeout = 10 uSec;\n+soap->send_timeout = 20 mSec;\n+soap->recv_timeout = 20 mSec;\n+soap->recv_timeout = 10;\n+ Warning\n+ Many Linux versions do not support non-blocking connect(). Therefore,\n+ setting soap::connect_timeout for non-blocking soap_call_ns__webmethod\n+ calls may not work under Linux.\n+ Interrupts (EINTR) can affect the blocking time in I/O operations. The\n+ maximum number of EINTR that will not trigger an error is set by\n+ #SOAP_MAXEINTR in gsoap/stdsoap2.h, which is 10 by default. Each EINTR\n+ may increase the blocking time by up to one second, up to #SOAP_MAXEINTR\n+ seconds total.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Closing connections by force\n+To close a socket connection by force, you can use soap_force_closesock(soap),\n+which closes the connection regardless if keep-alive is active. By contrast,\n+soap_closesock(soap) only closes the connection when keep-alive is not active.\n+To force-close a connection from another thread, compile stdsoap2.c or\n+stdsoap2.cpp and your project source code with #WITH_SELF_PIPE to enable this\n+feature. Use soap_close_connection(soap) on the soap context that must close.\n+You can make this call from another thread and pass the soap context to this\n+function of the thread that must close connections.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Socket options and flags\n+Socket communications can be controlled with socket options and flags. The soap\n+context flags are:\n+ * soap::socket_flags to set flags for the socket send and recv calls.\n+ * soap::connect_flags to set client-side setsockopt SOL_SOCKET socket\n+ options when connecting.\n+ * soap::bind_flags to set server-side setsockopt SOL_SOCKET socket options\n+ when executing soap_bind.\n+ * soap::bind_v6only set to 1 to set setsockopt IPPROTO_IPV6 IPV6_V6ONLY.\n+ * soap::accept_flags to set flags to the setsockopt socket options when\n+ executing soap_accept.\n+See the operating system manual pages of send and recv for soap::socket_flags\n+values and see the operating system manual pages of setsockopt for soap::\n+connect_flags, soap::bind_flags, and soap::accept_flags (level SOL_SOCKET)\n+values. These SO_ socket option flags (see setsockopt manual pages) can be bit-\n+wise or-ed to set multiple socket options at once.\n+The client-side flag soap::connect_flags = SO_LINGER is supported with values\n+l_onoff = 1 and l_linger = soap::linger_time. The soap::linger_time determines\n+the wait time (the time resolution is system dependent, though according to\n+some experts only zero and nonzero values matter). The linger option can be\n+used to manage the number of connections that remain in TIME_WAIT state at the\n+server side.\n+For example, to disable SIGPIPE signals on Unix/Linux platforms use: soap::\n+socket_flags = MSG_NOSIGNAL and/or soap::connect_flags = SO_NOSIGPIPE (i.e.\n+client-side connect) depending on your platform.\n+Use soap::bind_flags = SO_REUSEADDR to enable server-side port reuse and local\n+port sharing (but be aware of the possible security implications such as port\n+hijacking).\n+Note that you have access to the soap->master socket value returned by\n+soap_bind so you can set multiple socket options by calling setsockopt as\n+follows:\n+int sock = soap_bind(soap, host, port, backlog);\n+if (soap_valid_socket(sock))\n+{\n+setsockopt(sock, ..., ..., ..., ...);\n+setsockopt(sock, ..., ..., ..., ...);\n+\ud83d\udd1d Back_to_table_of_contents\n+ Overriding the host and port to connect\n+To override the host and port of the client connecting to a server, set soap::\n+override_host and soap::override_port:\n+soap->override_host = \"example.com\"; // host name or IP address\n+soap->override_port = 80; // port number to use when overriding the address\n+soap::override_host\n+const char * override_host\n+User-definable string to override the host name or IP address in the HTTP\n+header when connecting at t...\n+Definition: stdsoap2.h:4054\n+soap::override_port\n+int override_port\n+User-definable port number to override the port address in the HTTP header when\n+connecting at the cli...\n+Definition: stdsoap2.h:4059\n+\ud83d\udd1d Back_to_table_of_contents\n+ Secure Web services with HTTPS\n+To enable SSL for stand-alone gSOAP Web servers, first install OpenSSL and use\n+option the compile-time flag #WITH_OPENSSL to compile the sources with your C\n+or C++ compiler (or use the compile-time flag #WITH_GNUTLS if you prefer\n+GNUTLS), for example:\n+ c++ -DWITH_OPENSSL -o myprog myprog.cpp stdsoap2.cpp soapC.cpp soapServer.cpp\n+-lssl -lcrypto\n+With GNUTLS:\n+ c++ -DWITH_GNUTLS -o myprog myprog.cpp stdsoap2.cpp soapC.cpp soapServer.cpp -\n+lgnutls -lgcrypt -lgpg-error\n+SSL support for stand-alone gSOAP Web services is enabled by calling\n+soap_ssl_accept to perform the SSL/TLS handshake after soap_accept. In\n+addition, a key file, a CA file (or path to certificates), DH file (if RSA is\n+not used), and password need to be supplied. Instructions on how to do this can\n+be found in the OpenSSL documentation http://www.openssl.org. See also Section\n+SSL_certificates_and_key_files .\n+Let's take a look at an example SSL secure multi-threaded stand-alone SOAP Web\n+Service:\n+int main()\n+{\n+SOAP_SOCKET m, s;\n+THREAD_TYPE tid;\n+struct soap *soap, *tsoap;\n+soap_ssl_init(); /* init OpenSSL (skipping this or calling multiple times is\n+OK, since the engine will init SSL automatically) */\n+/* soap_ssl_noinit(); */ /* do not init OpenSSL (if SSL is already initialized\n+elsewhere in this application) */\n+if (CRYPTO_thread_setup()) /* OpenSSL thread mutex setup */\n+{\n+fprintf(stderr, \"Cannot setup thread mutex\\n\");\n+exit(EXIT_FAILURE);\n+}\n+soap = soap_new();\n+if (soap_ssl_server_context(soap,\n+SOAP_SSL_DEFAULT,\n+\"server.pem\", /* keyfile: required when server must authenticate to clients\n+(see SSL docs on how to obtain this file) */\n+\"password\", /* password to read the key file (not used with GNUTLS) */\n+\"cacert.pem\", /* optional cacert file to store trusted certificates */\n+NULL, /* optional capath to directory with trusted certificates */\n+\"dh512.pem\", /* DH file name or DH key len bits (minimum is 512, e.g. \"512\") to\n+generate DH param, if NULL use RSA */\n+NULL, /* if randfile!=NULL: use a file with random data to seed randomness */\n+NULL /* optional server identification to enable SSL session caching to speed\n+up TLS (must be a unique name) */\n+))\n+{\n+soap_print_fault(soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+m = soap_bind(soap, NULL, 18000, BACKLOG); /* use port 18000 */\n+if (!soap_valid_socket(m))\n+{\n+soap_print_fault(soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+fprintf(stderr, \"Socket connection successful: master socket = %d\\n\", m);\n+while (1)\n+{\n+s = soap_accept(soap);\n+fprintf(stderr, \"Socket connection successful: slave socket = %d\\n\", s);\n+if (!soap_valid_socket(s))\n+{\n+if (soap->errnum) /* accept failed, try again after 1 second */\n+{\n+soap_print_fault(soap, stderr);\n+sleep(1);\n+continue; /* retry */\n+}\n+fprintf(stderr, \"Server timed out\\n\");\n+break;\n+}\n+tsoap = soap_copy(soap);\n+if (!tsoap)\n+soap_force_closesock(soap);\n+else\n+while (THREAD_CREATE(&tid, (void*(*)(void*))&process_request, (void*)tsoap))\n+sleep(1); /* failed, try again */\n+}\n+soap_free(soap); /* deallocates SSL context */\n+CRYPTO_thread_cleanup(); /* OpenSSL thread mutex cleanup */\n+return 0;\n+}\n+void *process_request(void *tsoap)\n+{\n+struct soap *soap = (struct soap*)tsoap;\n+THREAD_DETACH(THREAD_ID);\n+if (soap_ssl_accept(soap))\n+soap_print_fault(soap, stderr);\n+else\n+soap_serve(soap);\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+return NULL;\n+}\n+soap_ssl_server_context\n+int soap_ssl_server_context(struct soap *soap, soap_ssl_flags flags, const char\n+*keyfile, const char *password, const char *cafile, const char *capath, const\n+char *dhfile, const char *randfile, const char *sid)\n+Initialize the server-side SSL/TLS context.\n+soap_ssl_init\n+void soap_ssl_init(void)\n+Initialize the SSL/TLS library.\n+SOAP_SSL_DEFAULT\n+#define SOAP_SSL_DEFAULT\n+soap_ssl_flags flag with #SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION and\n+#SOAP_TLSv1 enabled by default\n+Definition: stdsoap2.h:5826\n+CRYPTO_thread_cleanup\n+int CRYPTO_thread_cleanup()\n+Cleanup function for OpenSSL versions prior to 1.1.1.\n+soap_ssl_accept\n+int soap_ssl_accept(struct soap *soap)\n+Accept SSL/TLS connection.\n+CRYPTO_thread_setup\n+int CRYPTO_thread_setup()\n+Setup function for OpenSSL versions prior to 1.1.1 to set locks for multi-\n+threaded SSL/TLS applicatio...\n+The soap_ssl_server_context function initializes the server-side SSL context.\n+The server.pem key file is the server's private key concatenated with its\n+certificate. The cacert.pem is used to authenticate clients and contains the\n+client certificates. Alternatively a directory name can be specified. This\n+directory is assumed to contain the certificates. The dh512.pem file specifies\n+that DH will be used for key agreement instead of RSA. A numeric value greater\n+than 512 can be provided instead as a string constant (e.g. \"512\") to allow the\n+engine to generate the DH parameters on the fly (this can take a while) rather\n+than retrieving them from a file. The randfile entry can be used to seed the\n+PRNG. The last entry enable server-side session caching to speed up TLS. A\n+unique server name is required.\n+You can specify a cipher list to use with TLSv1.2 and below with\n+SSL_CTX_set_cipher_list(soap->ctx, \"...\") where soap->ctx is the SSL context\n+created by soap_ssl_server_context(). Likewise, use SSL_CTX_set_ciphersuites\n+(soap->ctx, \"...\") to configure the available TLSv1.3 ciphersuites.\n+We refer to the OpenSSL documentation and manual pages of\n+SSL_CTX_set_cipher_list and SSL_CTX_set_ciphersuites for details on the latest\n+cipher lists and suites available to use.\n+The GNUTLS mutex lock setup is automatically performed in the engine, but only\n+when POSIX threads are detected and available.\n+All OpenSSL versions prior to 1.1.0 require mutex locks to be explicitly set up\n+in your code for multi-threaded applications by calling CRYPTO_thread_setup()\n+and CRYPTO_thread_cleanup() as was shown in the code above. OpenSSL 1.1.0 and\n+greater does not require these locks to be set up. If you are not sure which\n+version of OpenSSL you may be using with your multi-threaded application, then\n+set up the locks.\n+For Unix and Linux, make sure you have signal handlers set in your service and/\n+or client applications to catch broken connections (SIGPIPE):\n+signal(SIGPIPE, sigpipe_handle);\n+where, for example:\n+void sigpipe_handle(int x) { }\n+By default, clients are not required to authenticate. To require client\n+authentication use the following:\n+if (soap_ssl_server_context(&soap,\n+SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION,\n+\"server.pem\",\n+\"password\",\n+\"cacert.pem\",\n+NULL,\n+\"dh512.pem\",\n+NULL,\n+NULL))\n+{\n+soap_print_fault(&soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION\n+#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION\n+soap_ssl_flags flag for servers to require clients to authenticate to servers\n+during the HTTPS handsh...\n+Definition: stdsoap2.h:5854\n+This requires each client to authenticate with its certificate, in addition for\n+the server to authenticate to the client.\n+Since release version 2.8.20, SSL v3 is disabled. To enable SSL v3 together\n+with TLS 1.0 and higher, use #SOAP_SSLv3_TLSv1 with soap_ssl_server_context. To\n+use TLS 1.1 and 1.2 use SOAP_TLSv1_1 | SOAP_TLSv1_2. To use TLS 1.2 only use\n+#SOAP_TLSv1_2. To use SSL v3 only use #SOAP_SSLv3.\n+The cacert file and capath are optional. Either one can be specified when\n+clients must run on non-trusted systems (capath is not used with GNUTLS). We\n+want to avoid storing trusted certificates in the default location on the file\n+system when that is not secure. Therefore, a flat cacert.pem file or directory\n+can be specified to store trusted certificates.\n+The gSOAP package includes a cacerts.pem file with the certificates of all\n+certificate authorities. You can use this file to verify the authentication of\n+servers that provide certificates issued by these CAs.\n+The cacert.pem, client.pem, and server.pem files in the gSOAP package are\n+examples of self-signed certificates. The client.pem and server.pem contain the\n+client/server private key concatenated with the certificate. The keyfiles\n+(client.pem and server.pem) are created by concatenating the private key PEM\n+with the certificate PEM. The keyfile should not be shared with any party. With\n+OpenSSL, you can encrypt the keyfiles with a password to offer some protection\n+and the password is used in the client/server code to read the keyfile. GNUTLS\n+does not support this feature and cannot encrypt or decrypt a keyfile.\n+ Warning\n+ It is important that the #WITH_OPENSSL macro must be consistently defined\n+ to compile the sources, such as gsoap/stdsoap2.cpp, soapC.cpp,\n+ soapClient.cpp, soapServer.cpp, and all application sources that include\n+ gsoap/stdsoap2.h or soapH.h. If the macros are not consistently used, the\n+ application will crash due to a mismatches in the declaration and access\n+ of the soap context.\n+See also API documentation Module SSL/TLS_context_and_functions for more\n+details on the SSL/TLS functions.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Secure clients with HTTPS\n+To utilize HTTPS/SSL, you need to install the OpenSSL library on your platform\n+or GNUTLS for a light-weight SSL/TLS library. After installation, compile all\n+the sources of your application with compile-time flag #WITH_OPENSSL (or\n+#WITH_GNUTLS when using GNUTLS). For example on Linux:\n+ c++ -DWITH_OPENSSL myclient.cpp stdsoap.cpp soapC.cpp soapClient.cpp -lssl -\n+lcrypto\n+or Unix:\n+ c++ -DWITH_OPENSSL myclient.cpp stdsoap.cpp soapC.cpp soapClient.cpp -lxnet -\n+lsocket -lnsl -lssl -lcrypto\n+or you can add the following line to soapdefs.h:\n+#define WITH_OPENSSL\n+and compile with compile-time flag #WITH_SOAPDEFS_H to include soapdefs.h in\n+your project. Alternatively, compile with GNUTLS:\n+ c++ -DWITH_GNUTLS myclient.cpp stdsoap.cpp soapC.cpp soapClient.cpp -lgnutls -\n+lgcrypt -lgpg-error\n+A client program simply uses the prefix https: instead of http: in the endpoint\n+URL of a service operation call to a Web Service to use encrypted transfers (if\n+the service supports HTTPS). You need to specify the client-side key file and\n+password of the keyfile:\n+struct soap soap;\n+soap_ssl_init(); /* init OpenSSL (skipping this or calling multiple times is\n+OK, since the engine will init SSL automatically) */\n+/* soap_ssl_noinit(); */ /* do not init OpenSSL (if SSL is already initialized\n+elsewhere in this application) */\n+soap_init(&soap);\n+if (soap_ssl_client_context(&soap,\n+SOAP_SSL_DEFAULT,\n+\"client.pem\", /* keyfile: required only when client must authenticate to server\n+(see SSL docs on how to obtain this file) */\n+\"password\", /* password to read the key file (not used with GNUTLS) */\n+\"cacerts.pem\", /* cacert file to store trusted certificates (needed to verify\n+server) */\n+NULL, /* capath to directory with trusted certificates */\n+NULL /* if randfile!=NULL: use a file with random data to seed randomness */\n+))\n+{\n+soap_print_fault(&soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+soap_call_ns__mymethod(&soap, \"https://domain/path/secure.cgi\", \"\", ...);\n+soap_ssl_client_context\n+int soap_ssl_client_context(struct soap *soap, soap_ssl_flags flags, const char\n+*keyfile, const char *password, const char *cafile, const char *capath, const\n+char *randfile)\n+Initialize the client-side SSL/TLS context.\n+By default, server authentication is enabled and the cacerts.pem or capath (not\n+used with GNUTLS) must be set so that the CA certificates of the server(s) are\n+accessible at run time. The cacerts.pem file included in the gSOAP source code\n+package contains the certificates of common CAs. This file must be supplied\n+with the client, if server authentication is required. Alternatively, you can\n+use the gsoap/plugin/cacerts.h and gsoap/plugin/cacerts.c code to embed CA\n+certificates in your client code.\n+You can specify a cipher list to use with TLSv1.2 and below with\n+SSL_CTX_set_cipher_list(soap->ctx, \"...\") where soap->ctx is the SSL context\n+created by soap_ssl_client_context(). Likewise, use SSL_CTX_set_ciphersuites\n+(soap->ctx, \"...\") to configure the available TLSv1.3 ciphersuites.\n+We refer to the OpenSSL documentation and manual pages of\n+SSL_CTX_set_cipher_list and SSL_CTX_set_ciphersuites for details on the latest\n+cipher lists and suites available to use.\n+Other client-side SSL options are #SOAP_SSL_SKIP_HOST_CHECK to skip the host\n+name verification check and #SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE to allow\n+connecting to a host with an expired certificate. For example,\n+struct soap soap;\n+soap_ssl_init(); /* init OpenSSL (skipping this or calling multiple times is\n+OK, since the engine will init SSL automatically) */\n+/* soap_ssl_noinit(); */ /* do not init OpenSSL (if SSL is already initialized\n+elsewhere in this application) */\n+soap_init(&soap);\n+if (soap_ssl_client_context(&soap,\n+SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION\n+| SOAP_SSL_SKIP_HOST_CHECK,\n+| SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE,\n+\"client.pem\", /* keyfile: required only when client must authenticate to server\n+(see SSL docs on how to obtain this file) */\n+\"password\", /* password to read the key file (not used with GNUTLS) */\n+\"cacerts.pem\", /* cacert file to store trusted certificates (needed to verify\n+server) */\n+NULL, /* capath to directory with trusted certificates */\n+NULL /* if randfile!=NULL: use a file with random data to seed randomness */\n+))\n+{\n+soap_print_fault(&soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+soap_call_ns__mymethod(&soap, \"https://domain/path/secure.cgi\", \"\", ...);\n+SOAP_SSL_SKIP_HOST_CHECK\n+#define SOAP_SSL_SKIP_HOST_CHECK\n+soap_ssl_flags flag for clients to allow clients to skip common name checks\n+against the host name of ...\n+Definition: stdsoap2.h:5868\n+SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION\n+#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION\n+soap_ssl_flags flag for clients to require servers to authenticate to clients\n+during the HTTPS handsh...\n+Definition: stdsoap2.h:5862\n+SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE\n+#define SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE\n+soap_ssl_flags flag value to allow self-signed and expired certificates and\n+those without CRL to be u...\n+Definition: stdsoap2.h:5832\n+For systems based on Microsoft windows, the WinInet module can be used instead,\n+see mod_gsoap/gsoap_win/wininet.\n+Since release version 2.8.20 SSL v3 is disabled. To enable SSL v3 together with\n+TLS 1.0 and higher, use #SOAP_SSLv3_TLSv1 with soap_ssl_server_context. To use\n+TLS 1.1 and 1.2 use SOAP_TLSv1_1 | SOAP_TLSv1_2. To use TLS 1.2 only use\n+#SOAP_TLSv1_2. To use SSL v3 only use #SOAP_SSLv3.\n+To disable server authentication for testing purposes, use the following:\n+if (soap_ssl_client_context(&soap,\n+SOAP_SSL_NO_AUTHENTICATION,\n+NULL,\n+NULL,\n+NULL,\n+NULL,\n+NULL\n+))\n+{\n+soap_print_fault(&soap, stderr);\n+exit(EXIT_FAILURE);\n+}\n+SOAP_SSL_NO_AUTHENTICATION\n+#define SOAP_SSL_NO_AUTHENTICATION\n+soap_ssl_flags flag value to disable authentication of the peer\n+Definition: stdsoap2.h:5840\n+This also assumes that the server does not require clients to authenticate (the\n+keyfile is absent).\n+Make sure you have signal handlers set in your application to catch broken\n+connections (SIGPIPE):\n+signal(SIGPIPE, sigpipe_handle);\n+where, for example:\n+void sigpipe_handle(int x) { }\n+ Warning\n+ It is important that the #WITH_OPENSSL macro is consistently defined to\n+ compile the sources, such as gsoap/stdsoap2.cpp, soapC.cpp,\n+ soapClient.cpp, soapServer.cpp, and all application sources that include\n+ gsoap/stdsoap2.h or soapH.h. If the macros are not consistently used, the\n+ application will crash due to a mismatches in the declaration and access\n+ of the soap context. Alternatively, use library -lgsoapssl or -\n+ lgsoapssl++ and compile everything else with #WITH_OPENSSL.\n+ Concurrent client calls with threads should use separate soap contexts In\n+ addition, the thread initialization code discussed in Section Secure_Web\n+ services_with_HTTPS must be used to properly setup OpenSSL in a multi-\n+ threaded client application.\n+See also API documentation Module SSL/TLS_context_and_functions for more\n+details on the SSL/TLS functions.\n+You can also use the WinInet interface to establish secure HTTPS connections on\n+Windows machines, available in the gsoap/mod_gsoap directory of the gSOAP\n+source code package, see also Section The_WinInet_plugin. Or you can use the\n+CURL plugin to use CURL to establish secure HTTPS connections, see Section The\n+CURL_plugin.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SSL authentication callbacks\n+The fsslauth callback function controls OpenSSL/GNUTLS authentication\n+initialization:\n+ * int (soap::fsslauth)(struct soap *soap) This callback is called to\n+ initialize the OpenSSL or GNUTLS context for HTTPS connections configured\n+ with the parameters passed to soap_ssl_client_context and\n+ soap_ssl_server_context. Returns #SOAP_OK or a soap_status (int) error\n+ code. The built-in function assigned to soap::fsslauth is ssl_auth_init.\n+The fsslverify callback function controls OpenSSL peer certificate\n+verification, via internally invoking SSL_CTX_set_verify:\n+ * int (soap::fssverify)(int ok, X509_STORE_CTX *store This callback is\n+ called by the engine to manage the verification of the certificate\n+ provided by a peer, such as the certificate provided by a server\n+ connected over HTTPS or to verify the certificate included with a WS-\n+ Security message. To require certificate verification of a server\n+ connected via HTTPS, use soap_ssl_client_context with\n+ #SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION. To require certificate\n+ verification of a client connected to a server, use\n+ soap_ssl_server_context with #SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION. The\n+ ok parameter of this callback indicates whether the verification of the\n+ certificate in question passed (ok == 1) or failed (ok == 0) as\n+ determined by the OpenSSL library based on the soap_ssl_client_context or\n+ soap_ssl_server_context configuration. If the callback returns 1 then the\n+ handshake is continued and the connection maybe established. To return 1\n+ when ok == 0 requires resetting the error state with\n+ X509_STORE_CTX_set_error(store, X509_V_OK). If the callback returns 0\n+ then the handshake is immediately terminated with \"verification failed\"\n+ and a verification failure alert is sent to the peer. The built-in\n+ function assigned to soap::fsslverify is ssl_verify_callback or when\n+ #SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE is used\n+ ssl_verify_callback_allow_expired_certificate.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SSL certificates and key files\n+The gSOAP package includes a cacerts.pem file with the certificates of all\n+certificate authorities. You can use this file to verify the authentication of\n+servers that provide certificates issued by these CAs. Just set the cafile\n+parameter to the location of this file on your file system. Therefore, when you\n+obtain a certificate signed by a trusted CA you can simply use the cacerts.pem\n+file to develop client applications that can verify the authenticity of your\n+server.\n+Alternatively, you can use the gsoap/plugin/cacerts.h and gsoap/plugin/\n+cacerts.c code to embed CA certificates in your client code.\n+For systems based on Microsoft windows, the WinInet module can be used instead,\n+see the README.txt located in the gSOAP source code package under mod_gsoap/\n+gsoap_win/wininet, see the gSOAP WinInet_plugin documentation.\n+The other .pem files in the gSOAP package are examples of self-signed\n+certificates for testing purposes (cacert.pem, client.pem, server.pem). The\n+client.pem and server.pem contain the private key and certificate of the client\n+or server, respectively. The keyfiles (client.pem and server.pem) are created\n+by concatenating the private key PEM with the certificate PEM. The keyfile\n+should not be shared with any party. With OpenSSL, you can encrypt the keyfiles\n+with a password to offer some protection and the password is used in the\n+client/server code to read the keyfile. GNUTLS does not support this feature\n+and cannot encrypt or decrypt a keyfile.\n+You can also create your own self-signed certificates. There is more than one\n+way to generate the necessary files for clients and servers. See http://\n+www.openssl.org for information on OpenSSL and http://sial.org/howto/openssl/\n+ca/ on how to setup and manage a local CA and http://sial.org/howto/openssl/\n+self-signed on how to setup self-signed test certificates.\n+It is possible to convert IIS-generated certificates to PEM format with the\n+openssl library and openssl command-line tool:\n+openssl x509 -in mycert.cer -inform DER -out mycert.pem -outform PEM\n+This converts the CRT-formatted mycert.cer to PEM-formatted mycert.pem.\n+Here is the simplest way to setup self-signed certificates. First you need to\n+create a private Certificate Authority (CA). The CA is used in SSL to verify\n+the authenticity of a given certificate. The CA acts as a trusted third party\n+who has authenticated the user of the signed certificate as being who they say.\n+The certificate is signed by the CA, and if the client trusts the CA, it will\n+trust your certificate. For use within your organization, a private CA will\n+probably serve your needs. However, if you intend use your certificates for a\n+public service, you should probably obtain a certificate from a known CA. In\n+addition to identification, your certificate is also used for encryption.\n+Creating certificates should be done through a CA to obtain signed\n+certificates. But you can create your own certificates for testing purposes as\n+follows.\n+ * Go to the OpenSSL bin directory (/usr/local/ssl by default and /System/\n+ Library/OpenSSL on Mac OS X)\n+ * There should be a file called openssl.cnf\n+ * Create a new directory in your home account, e.g. $HOME/CA, and copy the\n+ openssl.cnf file to this directory\n+ * Modify openssl.cnf by changing the 'dir' value to HOME/CA\n+ * Copy the README.txt, root.sh, and cert.sh scripts from the gSOAP source\n+ code package located in the gsoap/samples/ssl directory to HOME/CA\n+ * Follow the README.txt instructions\n+You now have a self-signed CA root certificate cacert.pem and a server.pem (or\n+client.pem) certificate in PEM format. The cacert.pem certificate is used in\n+the cafile parameter of the soap_ssl_client_context (or\n+soap_ssl_server_context) at the client (or server) side to verify the\n+authenticity of the peer. You can also provide a capath parameter to these\n+trusted certificates. The server.pem (or client.pem) must be provided with the\n+soap_ssl_server_context at the server side (or soap_ssl_client_context at the\n+client side) together with the password you entered when generating the\n+certificate using cert.sh to access the file. These certificates must be\n+present to grant authentication requests by peers. In addition, the server.pem\n+(and client.pem) include the host name of the machine on which the application\n+runs (e.g. localhost), so you need to generate new certificates when migrating\n+a server (or client).\n+Finally, you need to generate Diffie-Helmann (DH) parameters for the server if\n+you wish to use DH instead of RSA. There are two options:\n+ * Set the dhfile parameter to the numeric DH prime length in bits required\n+ (for example \"1024\") to let the engine generate DH parameters at\n+ initialization. This can be time consuming.\n+ * Provide a file name for the dhfile parameter of soap_ssl_server_context.\n+ The file should be generated beforehand. To do so with the OpenSSL\n+ command line tool, use:\n+ openssl dhparam -outform PEM -out dh.pem 512\n+ File dh512.pem is the output file and 512 is the number of bits used.\n+\ud83d\udd1d Back_to_table_of_contents\n+ SSL hardware acceleration\n+You can specify a hardware engine to enable hardware support for cryptographic\n+acceleration. This can be done once in a server or client with the following\n+statements:\n+static const char *engine = \"cswift\"; /* engine name */\n+int main()\n+{\n+ENGINE *e;\n+if (!(e = ENGINE_by_id(engine)))\n+fprintf(stderr, \"Error finding engine %s\\n\", engine);\n+else if (!ENGINE_set_default(e, ENGINE_METHOD_ALL))\n+fprintf(stderr, \"Error using engine %s\\n\", engine);\n+... //\n+}\n+The following table lists the names of the hardware and software engines:\n+engine result\n+openssl The default software engine for cryptographic operations\n+openbsd_dev_crypto OpenBSD supports kernel level cryptography\n+cswift CryptoSwift acceleration hardware\n+chil nCipher CHIL acceleration hardware\n+atalla Compaq Atalla acceleration hardware\n+nuron Nuron acceleration hardware\n+ubsec Broadcom uBSec acceleration hardware\n+aep Aep acceleration hardware\n+sureware SureWare acceleration hardware\n+\ud83d\udd1d Back_to_table_of_contents\n+ SSL on Windows\n+Set the full path to libssl.lib and libcrypto.lib under the MSVC++ \"Projects\"\n+menu, then choose \"Link\": \"Object/Modules\". Please make sure libssl32.dll and\n+libeay32.dll can be loaded by your applications, thus they must be installed\n+properly on the target machine.\n+If you're using compilation settings such as /MTd then link to the correct\n+libeay32MTd.lib and ssleay32MTd.lib libraries.\n+Alternatively, you can use the WinInet interface for secure connections,\n+available in the gsoap/mod_gsoap directory of the gSOAP package, see also\n+Section The_WinInet_plugin. Or you can use the CURL plugin to use CURL for\n+secure connections, see Section The_CURL_plugin.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Zlib compression\n+To enable deflate and gzip compression with Zlib, install Zlib from http://\n+www.zlib.org if not already installed on your system. Compile gsoap/\n+stdsoap2.cpp (or gsoap/stdsoap2.c) and all your sources that include gsoap/\n+stdsoap2.h or soapH.h with compile-time flag #WITH_GZIP and link your code with\n+the Zlib library, e.g. -lz on Unix/Linux platforms.\n+The gzip compression is orthogonal to all transport encodings such as HTTP,\n+SSL, DIME, and can be used with other transport layers. You can even save and\n+load compressed XML data to/from files.\n+Two compression formats are supported by the engine: deflate and gzip. The gzip\n+format is used by default. The gzip format has several benefits over deflate.\n+Firstly, the engine automatically detects gzip compressed inbound messages,\n+even without HTTP headers, by checking for the presence of a gzip header in the\n+message content. Secondly, gzip includes a CRC32 checksum to ensure messages\n+have been correctly received. Thirdly, gzip compressed content can be\n+decompressed with other compression software, so you can decompress XML data\n+saved by a gSOAP application in gzip format.\n+Gzip compression is enabled by compiling the sources with compile-time flag\n+#WITH_GZIP. To transmit gzip compressed SOAP/XML data, set the output mode\n+flags to #SOAP_ENC_ZLIB. For example:\n+soap_init(&soap);\n+soap_set_omode(&soap, SOAP_ENC_ZLIB); // enable Zlib's gzip\n+if (soap_call_ns__myMethod(&soap, ...))\n+... // error\n+else\n+... // success\n+soap_clr_omode(&soap, SOAP_ENC_ZLIB); // disable Zlib's gzip\n+SOAP_ENC_ZLIB\n+#define SOAP_ENC_ZLIB\n+soap_mode ENC output flag value to compress messages sent, requires zlib\n+enabled with compile-time fl...\n+Definition: stdsoap2.h:1788\n+This will send a compressed SOAP/XML request to a service, provided that Zlib\n+is installed and linked with the application and the compile-time flag\n+#WITH_GZIP option was used to compile the sources. Receiving compressed SOAP/\n+XML over HTTP either in gzip or deflate formats is automatic. The\n+#SOAP_ENC_ZLIB flag does not have to be set at the server side to accept\n+compressed messages. Reading and receiving gzip compressed SOAP/XML without\n+HTTP headers (e.g. with other transport protocols) is also automatic.\n+To control the level of compression for outbound messages, you can set the\n+soap::z_level to a value between 1 and 9, where 1 is the best speed and 9 is\n+the best compression (default is 6). For example\n+soap_init(&soap);\n+soap_set_omode(&soap, SOAP_ENC_ZLIB);\n+soap.z_level = 9; // best compression\n+soap::z_level\n+unsigned short z_level\n+User-definable compression level for gzip compression (0=none, 1=fast to\n+9=best) default level is 6.\n+Definition: stdsoap2.h:3704\n+To verify and monitor compression rates, you can use the values soap::\n+z_ratio_in and soap::z_ratio_out. These two float values lie between 0.0 and\n+1.0 and express the ratio of the compressed message length over uncompressed\n+message length.\n+if (soap_call_ns__myMethod(&soap, ...))\n+{\n+... // error\n+}\n+else\n+{\n+printf(\"Compression ratio: %f%% (in) %f%% (out)\\n\", 100*soap.z_ratio_out,\n+100*soap.z_ratio_in);\n+... // success\n+}\n+soap::z_ratio_in\n+float z_ratio_in\n+The compression ratio = compressed.size/uncompressed.size of the compressed\n+message received.\n+Definition: stdsoap2.h:3709\n+soap::z_ratio_out\n+float z_ratio_out\n+The compression ratio = compressed.size/uncompressed.size of the compressed\n+message sent.\n+Definition: stdsoap2.h:3714\n+Note: lower ratios mean higher compression rates.\n+Compressed transfers require buffering the entire output message to determine\n+HTTP message length. This means that the #SOAP_IO_STORE flag is automatically\n+set when the #SOAP_ENC_ZLIB flag is set to send compressed messages. The use of\n+HTTP chunking significantly reduces memory usage and may speed up the\n+transmission of compressed SOAP/XML messages. This is accomplished by setting\n+the #SOAP_IO_CHUNK flag with #SOAP_ENC_ZLIB for the output mode. However, some\n+Web servers do not accept HTTP chunked request messages (even when they return\n+HTTP chunked messages!). Stand-alone gSOAP services always accept chunked\n+request messages.\n+To restrict the compression to the deflate format only, compile the sources\n+with the compile-time flag #WITH_ZLIB. This limits compression and\n+decompression to the deflate format. Only plain and deflated messages can be\n+exchanged, gzip is not supported with this option. Receiving gzip compressed\n+content is automatic, even in the absence of HTTP headers. Receiving deflate\n+compressed content is not automatic in the absence of HTTP headers and requires\n+the flag #SOAP_ENC_ZLIB to be set for the input mode to decompress deflated\n+data.\n+ Warning\n+ It is important that the #WITH_GZIP and #WITH_ZLIB macros must be\n+ consistently defined to compile the sources, such as gsoap/stdsoap2.cpp,\n+ soapC.cpp, soapClient.cpp, soapServer.cpp, and all application sources\n+ that include gsoap/stdsoap2.h or soapH.h. If the macros are not\n+ consistently used, the application will crash due to a mismatches in the\n+ declaration and access of the soap context.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Client-side cookie support\n+Client-side cookie support is optional. To enable cookie support, compile all\n+sources with the compile-time flag #WITH_COOKIES, for example:\n+ c++ -DWITH_COOKIES -o myclient stdsoap2.cpp soapC.cpp soapClient.cpp\n+or add the following line to stdsoap.h:\n+#define WITH_COOKIES\n+Client-side cookie support is fully automatic. So just compile gsoap/\n+stdsoap2.cpp with the compile-time flag #WITH_COOKIES to enable cookie-based\n+session control in your client.\n+A cookie store with cookies is kept and returned to the appropriate servers\n+when the client connects to these servers. Cookies are not automatically saved\n+to a file by a client. An example cookie file manager is included as an extras\n+in the gSOAP package. You can remove all cookies from a soap context by calling\n+soap_free_cookies(soap), which also happens when you call soap_done(soap).\n+To avoid \"cookie storms\" caused by malicious servers that return an\n+unreasonable amount of cookies, gSOAP clients/servers are limited to a cookie\n+store size of soap::cookie_max that the user can change, for example:\n+struct soap *soap = soap_new();\n+soap->cookie_max = 10;\n+soap::cookie_max\n+int cookie_max\n+User-definable maximum number of active cookies allowed to be set with\n+soap_set_cookie before cookie ...\n+Definition: stdsoap2.h:2973\n+The cookie store is a linked list of soap_cookie structures pointed to by\n+soap::cookies.\n+Since the cookie store is linked to the current soap context, and each thread\n+must use its own context, each thread also has its own cookie store.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Server-side cookie support\n+This feature is not recommended to implement state in stand-alone servers.\n+Cookies may require a fair amount of processing overhead and are not in fact\n+needed to implement stateful services, which is typically performed with\n+session IDs in XML/JSON messages or by passing the session IDs via the URL.\n+Server-side cookie support is optional. To enable cookie support, compile all\n+sources with compile-time flag #WITH_COOKIES:\n+ c++ -DWITH_COOKIES -o myserver ...\n+See API documentation Module HTTP_cookie_functions for the cookie API\n+functions. See the HTTP_sessions_plugin for HTTP session management with\n+cookies that is required for server-side session control. The #WITH_COOKIES\n+flag is useless without server-side session management and control.\n+Here is an overview of the cookie API functions:\n+ * struct soap_cookie *soap_set_cookie(struct soap *soap, const char *name,\n+ const char *value, const char *domain, const char *path); This function\n+ adds a cookie to the cookie store at the server side, if not already\n+ there, with the specified name and value. The domain and path parameters\n+ can be specified or can be NULL to use the current domain and path given\n+ by soap::cookie_domain and soap::cookie_path. Returns pointer to the\n+ cookie structure in the database or NULL when an error occurred.\n+ * int soap_set_cookie_expire(struct_soap_*soap,_const_char_*name,_long\n+ expire,_const_char_*domain,_const_char_*path); This function sets the\n+ expiration of the specified cookie name in seconds and updates the cookie\n+ store at the server side. The domain and path parameters can be specified\n+ or can be NULL to use the current domain and path given by soap::\n+ cookie_domain and soap::cookie_path. Returns #SOAP_OK or a soap_status\n+ error code.\n+ * int soap_set_cookie_secure(struct_soap_*soap,_const_char_*name,_const\n+ char_*domain,_const_char_*path); This function sets the \"secure\" property\n+ of the specified cookie name and updates the cookie store at the server\n+ side. The \"secure\" property means that this cookie should be sent by the\n+ client to the server only when a secure HTTPS connection can be\n+ established. When HTTPS is enabled all cookies are sent by the server to\n+ the client with the \"secure\" property set, which means that this function\n+ is generally not needed unless the server is not HTTPS-enabled but\n+ cookies must be secure. The domain and path parameters can be specified\n+ or can be NULL to use the current domain and path given by soap::\n+ cookie_domain and soap::cookie_path. Returns #SOAP_OK or a soap_status\n+ error code.\n+ * int soap_set_cookie_session(struct_soap_*soap,_const_char_*name,_const\n+ char_*domain,_const_char_*path); This function makes the specified cookie\n+ name a \"session cookie\" and updates the cookie store at the server side\n+ by marking the cookie as a session cookie. This means that the cookie\n+ will be sent to clients that connect to the server. This function is not\n+ needed when a cookie is modified with soap_set_cookie_expire, for\n+ example, because modified cookies are always sent back to the client. The\n+ domain and path parameters can be specified or can be NULL to use the\n+ current domain and path given by soap::cookie_domain and soap::\n+ cookie_path. Returns #SOAP_OK or a soap_status error code.\n+ * void soap_clr_cookie(struct_soap_*soap,_const_char_*name,_const_char\n+ *domain,_const_char_*path); This function deletes the specified cookie\n+ name from the cookie store at the server side. The domain and path\n+ parameters can be specified or can be NULL to use the current domain and\n+ path given by soap::cookie_domain and soap::cookie_path.\n+ * int soap_clr_cookie_session(struct_soap_*soap,_const_char_*name,_const\n+ char_*domain,_const_char_*path); This function clears the session\n+ property of the specified cookie name and updates the cookie store at the\n+ server side. The domain and path parameters can be specified or can be\n+ NULL to use the current domain and path given by soap::cookie_domain and\n+ soap::cookie_path. Returns #SOAP_OK or a soap_status error code.\n+ * struct soap_cookie *soap_cookie(struct soap *soap, const char *name,\n+ const char *domain, const char *path); This function returns the cookie\n+ structure of the specified cookie name or NULL when not found by\n+ searching the cookie store at the server side. The domain and path\n+ parameters can be specified or can be NULL to use the current domain and\n+ path given by soap::cookie_domain and soap::cookie_path.\n+ * const char *soap_cookie_value(struct soap *soap, const char *name, const\n+ char *domain, const char *path); This function returns the cookie value\n+ of the specified cookie name or NULL when not found by searching the\n+ cookie store at the server side. The domain and path parameters can be\n+ specified or can be NULL to use the current domain and path given by\n+ soap::cookie_domain and soap::cookie_path.\n+ * time_t soap_cookie_expire(struct_soap_*soap,_const_char_*name,_const_char\n+ *domain,_const_char_*path); This function returns the cookie expiration\n+ time time_t of the specified cookie name or -1 when not found by\n+ searching the cookie store at the server side. The domain and path\n+ parameters can be specified or can be NULL to use the current domain and\n+ path given by soap::cookie_domain and soap::cookie_path.\n+ * int soap_getenv_cookies(struct_soap_*soap); This function initializes the\n+ cookie store at the server side by reading the HTTP_COOKIE environment\n+ variable. This provides a means for a CGI application to read cookies\n+ sent by a client. Returns #SOAP_OK or a soap_status error code when the\n+ HTTP_COOKIE variable was not found.\n+ * void soap_free_cookies(struct_soap_*soap); This function frees the cookie\n+ store and deletes all cookies.\n+The following variables of the soap context are used to define the current\n+domain and path:\n+ * const char * soap::cookie_domain should be set to the domain (host) of\n+ the service\n+ * const char * soap::cookie_path may be set to the default path to the\n+ service\n+ * int soap::cookie_max maximum cookie database size (default=32)\n+The soap::cookie_path value is used to filter cookies intended for this service\n+according to the path prefix rules outlined in RFC2109.\n+The following example server adopts cookies for session control:\n+int main()\n+{\n+struct soap soap;\n+int m, s;\n+soap_init(&soap);\n+soap.cookie_domain = \"...\";\n+soap.cookie_path = \"/\"; // the path which is used to filter/set cookies with\n+this destination\n+if (argc < 2)\n+{\n+soap_getenv_cookies(&soap); // CGI app: grab cookies from 'HTTP_COOKIE' env var\n+soap_serve(&soap);\n+}\n+else\n+{\n+m = soap_bind(&soap, NULL, atoi(argv[1]), 10); // small BACKLOG for iterative\n+servers\n+if (!soap_valid_socket(m))\n+exit(EXIT_FAILURE);\n+for (int i = 1; ; i++)\n+{\n+s = soap_accept(&soap);\n+if (!soap_valid_socket(s))\n+exit(EXIT_FAILURE);\n+soap_serve(&soap);\n+soap_end(&soap);\n+soap_free_cookies(&soap); // remove all old cookies from database so no\n+interference occurs with the arrival of new cookies\n+}\n+}\n+return 0;\n+}\n+int ns__webmethod(struct soap *soap, ...)\n+{\n+const char *cookie_value = soap_cookie_value(soap, \"cookie_name\", NULL, NULL);\n+if (!cookie_value) // cookie returned by client?\n+cookie_value = \"initial_value\"; // no: set initial cookie value\n+else\n+... // yes: modify the cookie value to reflect the new state\n+soap_set_cookie(soap, \"cookie_name\", cookie_value, NULL, NULL);\n+soap_set_cookie_expire(soap, \"cookie_name\", 60, NULL, NULL); // cookie expires\n+in 60 seconds\n+return SOAP_OK;\n+}\n+soap_cookie_value\n+const char * soap_cookie_value(struct soap *soap, const char *name, const char\n+*domain, const char *path)\n+Get cookie value.\n+soap_set_cookie\n+struct soap_cookie * soap_set_cookie(struct soap *soap, const char *name, const\n+char *value, const char *domain, const char *path)\n+Add a cookie.\n+soap_getenv_cookies\n+int soap_getenv_cookies(struct soap *soap)\n+Get cookies from the HTTP_COOKIE environment variable.\n+soap_free_cookies\n+void soap_free_cookies(struct soap *soap)\n+Free cookies.\n+soap_set_cookie_expire\n+int soap_set_cookie_expire(struct soap *soap, const char *name, long maxage,\n+const char *domain, const char *path)\n+Set cookie expiration.\n+soap::cookie_domain\n+const char * cookie_domain\n+User-definable string that specifies the HTTP cookie domain of the running\n+server.\n+Definition: stdsoap2.h:2969\n+soap::cookie_path\n+const char * cookie_path\n+User-definable string that specifies the HTTP cookie path of the running\n+server.\n+Definition: stdsoap2.h:2971\n+\ud83d\udd1d Back_to_table_of_contents\n+ Connecting clients through proxy servers\n+When a client needs to connect to a Web Service through a proxy server, set the\n+soap::proxy_host string and soap::proxy_port integer attributes of the current\n+soap context to the proxy's host name and port, respectively. For example:\n+struct soap soap;\n+soap_init(&soap);\n+soap.proxy_host = \"proxyhostname\";\n+soap.proxy_port = 8080;\n+if (soap_call_ns__webmethod(&soap, \"http://host:port/path\", \"action\", ...))\n+soap_print_fault(&soap, stderr);\n+else\n+... // success\n+The context attributes soap::proxy_host and soap::proxy_port keep their values\n+through a sequence of service operation calls, so they only need to be set\n+once.\n+When X-Forwarded-For headers are returned by the proxy, the header can be\n+accessed in the soap::proxy_from string.\n+See also Sections HTTP_proxy_basic_authentication and HTTP_proxy_NTLM\n+authentication.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Bind before connect and setting the client interface address\n+To bind the client to a port before connect, set the soap::client_port to a\n+non-negative port number:\n+struct soap *soap = soap_new();\n+soap->client_port = ...; // non-negative port number\n+if (soap_call_ns__webmethod(soap, \"http://host:port/path\", \"action\", ...))\n+... // error\n+else\n+... // success\n+soap::client_port\n+int client_port\n+User-definable client port to bind to before connecting to a server, when non-\n+negative.\n+Definition: stdsoap2.h:3690\n+This port number is used only once and reset to -1 (disabled). Set it again for\n+the next call.\n+To set a client interface address for the connection that is an IP address of\n+the client:\n+struct soap *soap = soap_new();\n+soap->client_interface = \"...\"; // IP address\n+if (soap_call_ns__webmethod(soap, \"http://host:port/path\", \"action\", ...))\n+... // error\n+else\n+... // success\n+soap::client_interface\n+const char * client_interface\n+User-definable client interface address to override when connecting to a\n+server, when non-NULL (Windo...\n+Definition: stdsoap2.h:3699\n+This client interface address string is used only once and reset to NULL\n+(disabled). Set it again for the next call. This feature is not available when\n+compiling the code on windows.\n+\ud83d\udd1d Back_to_table_of_contents\n+ FastCGI\n+To enable FastCGI support, install FastCGI and compile all soapcpp2-generated\n+source code files and your application sources with the compile-time flag\n+#WITH_FASTCGI or add:\n+#define WITH_FASTCGI\n+to gsoap/stdsoap2.h and recompile the project code.\n+ Warning\n+ Do not link against the gsoap/libgsoap* libraries as these are not\n+ suitable for FastCGI. Compile gsoap/stdsoap2.c (or gsoap/stdsoap2.cpp)\n+ instead.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to minimize application memory footprint\n+To compile gSOAP applications intended for small memory devices, you may want\n+to remove all non-essential features that consume precious code and data space.\n+To do this, compile the source code files with the compile-time flag #WITH_LEAN\n+(i.e. #define WITH_LEAN) to remove many non-essential features. The features\n+that will be disabled are:\n+ * No UDP support\n+ * No HTTP keep alive support\n+ * No HTTP bearer, basic, and digest authentication\n+ * No HTTP chunked output with #SOAP_IO_CHUNK, but chunked HTTP input is\n+ accepted\n+ * No HTTP compressed output with #SOAP_ENC_ZLIB, but compressed input is\n+ accepted\n+ * No canonical XML output with #SOAP_XML_CANONICAL\n+ * No soap::connect_timeout, soap::send_timeout, soap::recv_timeout and\n+ soap::transfer_timeout timeouts\n+ * No support for socket flags, no soap::socket_flags, soap::connect_flags,\n+ soap::bind_flags, soap::accept_flags\n+ * No support for time_t serialization with the xsd__dateTime type, use a\n+ string to store the date and time instead.\n+Use the compile-time flag #WITH_LEANER to make the executable even smaller by\n+removing DIME and MIME attachment handling, #LONG64 (64 bit) serialization,\n+wchar_t* serialization, and support for XML DOM operations. Note that DIME/MIME\n+attachments are not essential to achieve SOAP/XML interoperability. DIME\n+attachments are a convenient way to exchange non-text-based (i.e. binary)\n+content, but are not required for basic SOAP/XML interoperability. Attachment\n+requirements are predictable. That is, applications won't suddenly decide to\n+use DIME or MIME instead of XML to exchange content.\n+It is safe to try to compile your application with the compile-time flag\n+#WITH_LEAN, provided that your application does not rely on I/O timeouts. When\n+no linkage error occurs in the compilation process, it is safe to assume that\n+your application will run just fine.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to remove the BSD socket library requirement\n+The gsoap/stdsoap2.c and gsoap/stdsoap2.cpp libraries should be linked with a\n+BSD socket library in the project build. To remove the need to link a socket\n+library, you can compile gsoap/stdsoap2.c (for C) and gsoap/stdsoap2.cpp (for\n+C++) with the the compile-time flag #WITH_NOIO macro set (i.e. #define\n+WITH_NOIO). This removes the dependency on the BSD socket API, IO streams, FILE\n+type, and errno.\n+You should define callbacks to replace the missing socket stack. To do so, add\n+to your code the following definitions:\n+struct soap soap;\n+soap_init(&soap);\n+/* fsend is used to transmit data in blocks */\n+soap.fsend = my_send;\n+/* frecv is used to receive data in blocks */\n+soap.frecv = my_recv;\n+/* fopen is used to connect */\n+soap.fopen = my_tcp_connect;\n+/* fclose is used to disconnect */\n+soap.fclose = my_tcp_disconnect;\n+/* fclosesocket is used only to close the master socket in a server upon\n+soap_done() */\n+soap.fclosesocket = my_tcp_closesocket;\n+/* fshutdownsocket is used after completing a send operation to send TCP FIN */\n+soap.fshutdownsocket = my_tcp_shutdownsocket;\n+/* setting fpoll is optional, leave it NULL to omit polling the server */\n+soap.fpoll = my_poll;\n+/* faccept is used only by a server application */\n+soap.faccept = my_accept;\n+soap::fpoll\n+int(* fpoll)(struct soap *soap)\n+Callback that blocks until activity is detected on the soap::socket or soap::\n+master socket,...\n+Definition: stdsoap2.h:4594\n+soap::fclosesocket\n+int(* fclosesocket)(struct soap *soap, SOAP_SOCKET sock)\n+Callback that closes a given socket.\n+Definition: stdsoap2.h:4570\n+soap::fshutdownsocket\n+int(* fshutdownsocket)(struct soap *soap, SOAP_SOCKET sock, int how)\n+Callback that shuts down a given socket.\n+Definition: stdsoap2.h:4583\n+soap::faccept\n+SOAP_SOCKET(* faccept)(struct soap *soap, SOAP_SOCKET sock, struct sockaddr\n+*addr, int *len)\n+Callback that waits for and accepts a socket connection requested by a client.\n+Definition: stdsoap2.h:4509\n+These functions should provide a minimal input/output stack (soap::frecv and\n+soap::fsend) to read/write XML and socket-like stack (the other functions) when\n+developing client and server applications.\n+See Section Function_callbacks_for_customized_I/O_and_HTTP_handling for more\n+details on the use of these callbacks. All callback function pointers should be\n+non-NULL, except soap::fpoll.\n+You cannot use soap_print_fault and soap_print_fault_location to print error\n+diagnostics. Instead, the value of soap::error, which contains the gSOAP error\n+code, can be used to determine the cause of a fault.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to combine multiple client and server implementations into one executable\n+The wsdl2h tool can be used to import multiple WSDLs and schemas at once. The\n+service definitions are combined in one header file to be parsed by soapcpp2.\n+It is important to assign namespace prefixes to namespace URIs using the\n+typemap.dat file. Otherwise, wsdl2h will assign namespace prefixes ns1, ns2,\n+and so on to the service operations and schema types. Thus, any change to a\n+WSDL or schema may result in a new prefix assignment. For more details, please\n+see Section Customizing_XML_data_bindings_with_the_typemap.dat_file .\n+Another approach to combine multiple client and service applications into one\n+executable is by using C++ namespaces to structurally separate the definitions.\n+This is automated with wsdl2h_-q_name_option_-q_name. Or by creating libraries\n+in C for the client/server objects as explained in subsequent sections\n+Both approaches are demonstrated by examples in the gSOAP source code package,\n+the gsoap/samples/link (C only) and gsoap/samples/link++ (C++ with C++\n+namespaces) examples.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to build a client or server in a C++ code namespace\n+You can use a C++ code namespace of your choice in your interface header file\n+to build a client or server in that C++ namespace. In this way, you can create\n+multiple clients and servers that can be combined and linked together without\n+conflicts, which is explained in more detail in the next section (which also\n+shows an example combining two client libraries defined in two C++ code\n+namespaces).\n+Use wsdl2h_-q_name_option_-q_name to generate definitions in the C++ name\n+namespace. This option can also be used in combination with C++ proxy and\n+server object generation, using soapcpp2 -j option -j or option -i).\n+At most one namespace can be defined for the entire interface header file for\n+soapcpp2. The C++ namespace must completely encapsulate the entire contents of\n+the header file:\n+namespace NamespaceName {\n+... interface header file contents ...\n+}\n+When compiling this interface header file with the soapcpp2 tool, all type\n+definitions, the serializers for these types, and the stub and skeleton\n+functions will be placed in this namespace. The XML namespace mapping table\n+(saved in a .nsmap file) will not be placed in the code namespace to allow it\n+to be linked as a global object. You can use soapcpp2 -n option -n to create\n+local XML namespace tables, see Section soapcpp2_options (but remember that you\n+explicitly need to initialize the namespaces to point to a table at run time\n+using soap_set_namespaces). The generated files are prefixed with the code\n+namespace name instead of the usual soap file name prefix to enable multiple\n+client/server codes to be build in the same project directory.\n+Because the SOAP Header and Fault serializers will also be placed in the\n+namespace, they cannot be called from the gsoap/stdsoap2.cpp run time library\n+code and are therefore rendered unusable. Therefore, these serializers are not\n+compiled at all (enforced with #define WITH_NOGLOBAL). To add SOAP Header and\n+Fault serializers, you must compile them separately as follows. First, create a\n+new header file env.h with the SOAP Header SOAP_ENV__Header and SOAP Fault\n+SOAP_ENV__Fault structures, including SOAP_ENV__Detail if this structure\n+contains members that are serialized as fault details. You can leave this\n+header file empty if you want to use the default SOAP Header and Fault.\n+However, if SOAP Headers are required then you cannot leave the\n+SOAP_ENV__Header structure empty. For example, the WS-Addressing and WS-\n+Security plugins require SOAP Headers which can be imported by adding #import\n+\"wsa5.h\" and #import \"wsse.h\", respectively to env.h. Then compile this header\n+file with:\n+ soapcpp2 -penv env.h\n+The generated envC.cpp file holds the SOAP Header and Fault serializers and you\n+can link this file with your client and server applications.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to create client/server libraries\n+The soapcpp2 tool produces soapClientLib.cpp and soapServerLib.cpp source code\n+files that are specifically intended for building static or dynamic client and\n+server libraries in C or C++. These files export the stub and skeleton\n+functions, but keep all serialization code static, thus hidden to avoid link\n+symbol conflicts when combining multiple clients and services into one\n+executable. Note that it is far simpler to use the wsdl2h tool on multiple WSDL\n+files to generate a header file that combines all service definitions. However,\n+the approach presented in this section is useful when creating (dynamic)\n+libraries for client and server objects, such as DLLs as described in Section\n+How_to_create_DLLs .\n+ Note\n+ One major disadvantage of the approach presented here is that the\n+ serializer functions are no longer accessible in the user's source code,\n+ because serializers will be converted to static functions (to be used by\n+ the generated stub and skeleton functions only). For example, functions\n+ such as soap_new_T, soap_default_T, soap_write_T, soap_read_T,\n+ soap_put_T, and soap_get_T cannot be used any longer.\n+Using C++ namespaces is a better alternative when building applications in C++\n+that combine multiple clients and services. To build multiple libraries, you\n+can define a C++ namespace in your header file with soapcpp2 -qname option -\n+qname, see Section How_to_build_a_client_or_server_in_a_C++_code_namespace for\n+details.\n+For C, you can use soapcpp2 -c -p name option -p name to rename the generated\n+soapClientLib.c and soapServerLib.c (and associated) files. The -p name option\n+specifies the file name prefix to replace the soap file name prefix.\n+The engine does not define SOAP Header and Fault serializers that the engine\n+needs. We therefore add SOAP Header and Fault serializers, which are compiled\n+separately as follows. First, create a new header file env.h with the SOAP\n+Header SOAP_ENV__Header and SOAP Fault SOAP_ENV__Fault structures, including\n+SOAP_ENV__Detail if this structure contains members that are serialized as\n+fault details. You can leave this header file empty if you want to use the\n+default SOAP Header and Fault. However, if SOAP Headers are required then you\n+cannot leave the SOAP_ENV__Header structure empty. For example, the WS-\n+Addressing and WS-Security plugins require SOAP Headers which can be imported\n+by adding #import \"wsa5.h\" and #import \"wsse.h\", respectively to env.h. Then\n+compile this header file with:\n+ soapcpp2 -penv env.h\n+The generated envC.cpp file holds the SOAP Header and Fault serializers and you\n+can create a (dynamic) library for it to link it with your client and server\n+applications.\n+You should then compile the gsoap/stdsoap2.cpp library with the compile-time\n+#WITH_NONAMESPACES flag:\n+ c++ -DWITH_NONAMESPACES -c stdsoap2.cpp\n+This omits the reference to the global namespaces table, which is nowhere to be\n+defined since we will use XML namespaces for each client/service separately.\n+Therefore, you must explicitly set the namespaces value of the soap context in\n+your code every time after initialization of the soap context with the\n+soap_set_namespaces(struct_soap*,_const_struct_Namespace*) function.\n+For example, suppose we have two clients defined in header files client1.h and\n+client2.h. We first generate the envH.h file for the SOAP Header and Fault\n+definitions:\n+ soapcpp2 -c -penv env.h\n+Then we generate the code for client1 and client2:\n+ soapcpp2 -c -n -pmyClient1 client1.h\n+ soapcpp2 -c -n -pmyClient2 client2.h\n+This generates myClient1ClientLib.c and myClient2ClientLib.c (among several\n+other files). These two files should be compiled and linked with your\n+application. The source code of your application should include the generated\n+envH.h, myClient1H.h, myClient2.h files and myClient1.nsmap, myClient2.nsmap\n+files:\n+#include \"myClient1H.h\" // include client 1 stubs\n+#include \"myClient2H.h\" // include client 2 stubs\n+#include \"envH.h\"\n+... //\n+#include \"myClient1H.nsmap\" // include client 1 nsmap\n+#include \"myClient2H.nsmap\" // include client 2 nsmap\n+struct soap *soap = soap_new();\n+soap_set_namespaces(soap, myClient1_namespaces);\n+... // make Client 1 invocations\n+... //\n+soap_set_namespaces(soap, myClient2_namespaces);\n+... // make Client 2 invocations\n+It is important to use soapcpp2 -n option -n, see Section soapcpp2_options, to\n+rename the namespace tables so we can include them all without running into\n+redefinitions.\n+ Note\n+ Link conflicts may still occur in the unlikely situation that identical\n+ service operation names are defined in two or more stub or skeleton\n+ functions when these methods share the same XML namespace prefix.\n+\ud83d\udd1d Back_to_table_of_contents\n+ C++ examples\n+As an example we will build a Delayed Stock Quote client library and a Currency\n+Exchange Rate client library.\n+First, we create an empty header file env.h, which may be empty or should\n+contain SOAP Header and Fault definitions as explained in Section How_to_create\n+client/server_libraries, and compile it as follows:\n+ soapcpp2 -penv env.h\n+ c++ -c envC.cpp\n+We also compile gsoap/stdsoap2.cpp without namespaces:\n+ c++ -c -DWITH_NONAMESPACES stdsoap2.cpp\n+If you do not use #WITH_NONAMESPACES then you will get an unresolved link error\n+for the global namespaces table. You can define a dummy table to avoid having\n+to recompile gsoap/stdsoap2.cpp.\n+Second, we create the Delayed Stock Quote header file specification, which may\n+be obtained using the WSDL importer. If you want to use C++ namespaces then you\n+need to manually add the namespace declaration to the generated header file:\n+namespace quote {\n+//gsoap ns service name: Service\n+//gsoap ns service style: rpc\n+//gsoap ns service encoding: encoded\n+//gsoap ns service location: http://services.xmethods.net/soap\n+//gsoap ns schema namespace: urn:xmethods-delayed-quotes\n+//gsoap ns service method-action: getQuote \"\"\n+int ns__getQuote(char *symbol, float &Result);\n+} // namespace quote\n+We then compile it as a library and we use option -n to prefix the generated\n+files and to rename the namespace table to avoid link conflicts later:\n+ soapcpp2 -n quote.h\n+ c++ -c quoteClientLib.cpp\n+If you don't want to use a C++ code namespace, you should compile quote.h \"as\n+is\" with option -pquote:\n+ soapcpp2 -n -pquote quote.h\n+ c++ -c quoteClientLib.cpp\n+Third, we create the Currency Exchange Rate header file specification:\n+namespace rate {\n+//gsoap ns service name: Service\n+//gsoap ns service style: rpc\n+//gsoap ns service encoding: encoded\n+//gsoap ns service location: http://services.xmethods.net/soap\n+//gsoap ns schema namespace: urn:xmethods-CurrencyExchange\n+//gsoap ns service method-action: getRate \"\"\n+int ns__getRate(char *country1, char *country2, float &Result);\n+} // namespace rate\n+Similar to the Quote example above, we generate source code using option -n to\n+prefix the generated files and to rename the namespace table to avoid link\n+conflicts:\n+ soapcpp2 -n rate.h\n+Fourth, we use the generated source code libraries with the main program.\n+#include \"quoteH.h.h\"\n+#include \"rateH.h.h\"\n+#include \"quote.nsmap\"\n+#include \"rate.nsmap\"\n+int main(int argc, char *argv[])\n+{\n+if (argc <= 1)\n+{\n+std::cerr << \"Usage: main ticker [currency]\" << std::endl\n+exit(EXIT_FAILURE);\n+}\n+struct soap *soap = soap_new();\n+float q;\n+soap_set_namespaces(soap, quote_namespaces);\n+if (soap_call_ns__getQuote(soap, NULL, NULL, argv[1], q)) // get quote\n+{\n+soap_print_fault(soap, stderr);\n+}\n+else\n+{\n+if (argc > 2)\n+{\n+float r;\n+soap_set_namespaces(soap, rate_namespaces);\n+if (soap_call_ns__getRate(soap, NULL, NULL, \"us\", argv[2], r)) // get rate in\n+US dollars\n+soap_print_fault(soap, stderr);\n+else\n+q *= r; // convert the quote\n+}\n+std::cout << argv[1] << \": \" << q << std::endl;\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+return 0;\n+}\n+Compile and link this application with stdsoap2.o, envC.o, quoteServerProxy.o,\n+and rateServerProxy.o.\n+Instead of the generated soap_call_webmethod stub functions you can also use\n+soapcpp2 -j option -j or option -i to generate C++ proxy classes.\n+To compile server is very similar. For example, assume that we need to\n+implement a calculator service and we want to create a library for it.\n+namespace calc {\n+//gsoap ns service name: Calc\n+//gsoap ns service style: rpc\n+//gsoap ns service encoding: encoded\n+//gsoap ns service location: http://www.cs.fsu.edu/~engelen/calc.cgi\n+//gsoap ns schema namespace: urn:calc\n+int ns__add(double a, double b, double &result);\n+int ns__sub(double a, double b, double &result);\n+int ns__mul(double a, double b, double &result);\n+int ns__div(double a, double b, double &result);\n+} // namespace calc\n+We generate code:\n+ soapcpp2 -j -n calc.h\n+Here we used option -j to generate a C++ service class calcCalcService.h and\n+calcCalcService.cpp. The effect of the -n option is that it creates local\n+namespace tables and uses calc to prefix the generated files.\n+#include \"calcCalcService.h\"\n+#include \"calc.nsmap\"\n+int main()\n+{\n+calc::Calc calc;\n+... //\n+calc.serve(); // calls request dispatcher to invoke one of the functions below\n+... //\n+}\n+int calc::Calc::add(double a, double b, double &result)\n+{\n+result = a + b;\n+return SOAP_OK;\n+}\n+int calc::Calc::sub(double a, double b, double &result)\n+{\n+result = a - b;\n+return SOAP_OK;\n+}\n+int calc::Calc::mul(double a, double b, double &result)\n+{\n+result = a * b;\n+return SOAP_OK;\n+}\n+int calc::Calc::div(double a, double b, double &result)\n+{\n+result = a / b;\n+return SOAP_OK;\n+}\n+The example above serves requests over stdin/out. Use the bind and accept calls\n+to create a stand-alone server to service inbound requests over sockets, see\n+Section How_to_create_a_stand-alone_server .\n+\ud83d\udd1d Back_to_table_of_contents\n+ C examples\n+This is the same example as above, but the clients are build in C.\n+We create a env.h that contains the joint SOAP Header and SOAP Fault\n+definitions. You may have to copy-paste these from the other header files.\n+Then, compile it as follows:\n+ soapcpp2 -c -penv env.h\n+ cc -c envC.c\n+We also compile gsoap/stdsoap2.c without namespaces:\n+ cc -c -DWITH_NONAMESPACES stdsoap2.c\n+Second, we create the Delayed Stock Quote header file specification, which may\n+be obtained using the WSDL importer.\n+//gsoap ns service name: Service\n+//gsoap ns service style: rpc\n+//gsoap ns service encoding: encoded\n+//gsoap ns service location: http://services.xmethods.net/soap\n+//gsoap ns schema namespace: urn:xmethods-delayed-quotes\n+//gsoap ns service method-action: getQuote \"\"\n+int ns__getQuote(char *symbol, float *Result);\n+We compile it as a library and we use options -n and -pquote to prefix the\n+generated files and to rename the namespace table to avoid link conflicts:\n+ soapcpp2 -c -n -pquote quote.h\n+ cc -c quoteClientLib.c\n+Third, we create the Currency Exchange Rate header file specification:\n+//gsoap ns service name: Service\n+//gsoap ns service style: rpc\n+//gsoap ns service encoding: encoded\n+//gsoap ns service location: http://services.xmethods.net/soap\n+//gsoap ns schema namespace: urn:xmethods-CurrencyExchange\n+//gsoap ns service method-action: getRate \"\"\n+int ns__getRate(char *country1, char *country2, float *Result);\n+We compile it as a library and we use options -n and -prate to prefix the\n+generated files and to rename the namespace table to avoid link conflicts:\n+ soapcpp2 -c -n -prate rate.h\n+ cc -c rateClientLib.c\n+The main program is:\n+#include \"quoteH.h\"\n+#include \"rateH.h\"\n+#include \"quote.nsmap\"\n+#include \"rate.nsmap\"\n+int main(int argc, char *argv[])\n+{\n+if (argc <= 1)\n+{\n+fprintf(stderr, \"Usage: main ticker [currency]\\n\");\n+exit(EXIT_FAILURE);\n+}\n+struct soap *soap = soap_new();\n+float q;\n+soap_set_namespaces(soap, quote_namespaces);\n+if (soap_call_ns__getQuote(soap, NULL, NULL, argv[1], &q)) // get quote\n+soap_print_fault(soap, stderr);\n+else\n+{\n+if (argc > 2)\n+{\n+soap_set_namespaces(soap, rate_namespaces);\n+float r;\n+if (soap_call_ns__getRate(soap, NULL, NULL, \"us\", argv[2], &r)) // get rate in\n+US dollars\n+soap_print_fault(soap, stderr);\n+else\n+q *= r; // convert the quote\n+}\n+printf(\"%s: %f \\n\", argv[1], q);\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+return 0;\n+}\n+Compile and link this application with stdsoap2.o, envC.o, quoteClientLib.o,\n+and rateClientLib.o.\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to chain C services to accept messages on the same port\n+When combining multiple services into one application, you can run wsdl2h on\n+multiple WSDLs to generate the single all-inclusive service definitions\n+interface header file for soapcpp2. This header file is then processed with\n+soapcpp2 to generate skeleton functions in C.\n+What if we generate multiple services, each from a WSDL separately, and want to\n+deploy them on the same port? This requires listening to the same port and then\n+chaining the service dispatches so that each service can serve a request.\n+First we create a env.h that contains the joint SOAP Header and SOAP Fault\n+definitions, for example by copy-pasting these from the other header files\n+generated by wsdl2h. Or this file is empty if no specialized SOAP Headers and\n+Faults are used. We compile it as follows:\n+ soapcpp2 -c -penv env.h\n+ cc -c envC.c\n+We also compile gsoap/stdsoap2.c without namespaces:\n+ cc -c -DWITH_NONAMESPACES stdsoap2.c\n+Say for example that we have a service definition in quote.h. We compile it as\n+a library and we use options -n and -pquote to prefix the generated files and\n+to rename the namespace table to avoid link conflicts:\n+ soapcpp2 -c -n -pquote quote.h\n+ cc -c quoteClientLib.c\n+We do the same for a service definition in rate.h:\n+ soapcpp2 -c -n -prate rate.h\n+ cc -c rateClientLib.c\n+To serve both the quote and rate services on the same port, we chain the\n+service dispatchers as follows:\n+#include \"quoteH.h\"\n+#include \"rateH.h\"\n+#include \"quote.nsmap\"\n+#include \"rate.nsmap\"\n+struct soap *soap = soap_new();\n+if (soap_valid_socket(soap_bind(soap, NULL, 8080, 10))) // small BACKLOG for\n+iterative servers\n+{\n+while (1)\n+{\n+if (soap_valid_socket(soap_accept(soap)))\n+{\n+if (soap_begin_serve(soap))\n+{\n+soap_print_fault(soap, stderr);\n+continue;\n+}\n+soap_set_namespaces(soap, quote_namespaces);\n+if (quote_serve_request(soap) == SOAP_NO_METHOD)\n+{\n+soap_set_namespaces(soap, rate_namespaces);\n+if (rate_serve_request(soap))\n+soap_send_fault(soap); // send fault to client\n+}\n+else if (soap->error)\n+{\n+soap_send_fault(soap); // send fault to client\n+}\n+}\n+else if (soap->errnum) // accept failed, try again after 1 second\n+{\n+soap_print_fault(soap, stderr);\n+sleep(1);\n+}\n+else\n+{\n+fprintf(stderr, \"server timed out\\n\");\n+break;\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+}\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+This chaining can be arbitrarily deep. When the previous request fails with a\n+#SOAP_NO_METHOD then next request dispatcher can be tried.\n+The server should also define the service operations:\n+int ns__getQuote(struct soap *soap, char *symbol, float *Result);\n+{\n+*Result = ... ;\n+return SOAP_OK;\n+}\n+int ns__getRate(struct soap *soap, char *country1, char *country2, float\n+*Result);\n+{\n+*Result = ... ;\n+return SOAP_OK;\n+}\n+However, the while loop iterates for each new connection that is established\n+with soap_accept and does not allow for HTTP keep-alive connections to persist.\n+For our final improvement we want to support HTTP keep-alive connections that\n+require looping over the service dispatches until the connection closes on\n+either end, after which we resume the outer loop. The resulting code is very\n+close to the soapcpp2-generated soap_serve code and the serve service class\n+methods, with the addition of the chain of service dispatches in the loop body:\n+#include \"quoteH.h\"\n+#include \"rateH.h\"\n+#include \"quote.nsmap\"\n+#include \"rate.nsmap\"\n+struct soap *soap = soap_new();\n+if (soap_valid_socket(soap_bind(soap, NULL, 8080, 10))) // small BACKLOG for\n+iterative servers\n+{\n+while (1)\n+{\n+if (soap_valid_socket(soap_accept(soap)))\n+{\n+soap->keep_alive = soap->max_keep_alive + 1; // max keep-alive iterations\n+do\n+{\n+if ((soap->keep_alive > 0) && (soap->max_keep_alive > 0))\n+soap->keep_alive--;\n+if (soap_begin_serve(soap))\n+{\n+if (soap->error >= SOAP_STOP) // if a plugin has served the request\n+continue; // then continue with the next request\n+break; // an error occurred\n+}\n+soap_set_namespaces(soap, quote_namespaces);\n+if (quote_serve_request(soap) == SOAP_NO_METHOD)\n+{\n+soap_set_namespaces(soap, rate_namespaces);\n+if (rate_serve_request(soap))\n+soap_send_fault(soap); // send fault to client\n+}\n+else if (soap->error)\n+{\n+soap_send_fault(soap); // send fault to client\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+} while (soap->keep_alive);\n+}\n+else if (soap->errnum) // accept failed, try again after 1 second\n+{\n+soap_print_fault(soap, stderr);\n+sleep(1);\n+}\n+else\n+{\n+fprintf(stderr, \"server timed out\\n\");\n+break;\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+}\n+}\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to create DLLs\n+\ud83d\udd1d Back_to_table_of_contents\n+ Creating the base stdsoap2.dll\n+The engine does not define SOAP Header and Fault serializers that the engine\n+needs when installed as a library. We therefore add SOAP Header and Fault\n+serializers, which are compiled separately as follows. First, create a new\n+header file env.h with the SOAP Header SOAP_ENV__Header and SOAP Fault\n+SOAP_ENV__Fault structures, including SOAP_ENV__Detail if this structure\n+contains members that are serialized as fault details. You can leave this\n+header file empty if you want to use the default SOAP Header and Fault.\n+However, if SOAP Headers are required then you cannot leave the\n+SOAP_ENV__Header structure empty. For example, the WS-Addressing and WS-\n+Security plugins require SOAP Headers which can be imported by adding #import\n+\"wsa5.h\" and #import \"wsse.h\", respectively to env.h. Then compile this header\n+file with:\n+ soapcpp2 -penv env.h\n+The generated envC.cpp file holds the SOAP Header and Fault serializers. We can\n+either create a separate envC.dll DLL for this that all clients and service\n+applications will use, or combine envC.cpp with the stdsoap2.dll we create,\n+which we will explain further.\n+The next step is to create stdsoap2.dll which consists of the file gsoap/\n+stdsoap2.cpp and envC.cpp and optionally the plugins you want to use such as\n+wsseapi.cpp (we need to rename all .c files to .cpp files to avoid issues with\n+MSVC++). This DLL contains all common functions needed for all other clients\n+and servers based on gSOAP. Compile envC.cpp and gsoap/stdsoap2.cpp into\n+stdsoap2.dll using the compiler option /D #WITH_NONAMESPACES and the MSVC Pre-\n+Processor definitions SOAP_FMAC1=__declspec(dllexport), SOAP_FMAC3=__declspec\n+(dllexport), and the #SOAP_STD_EXPORTS macro set as shown below from the MSVC\n+command prompt:\n+C:> cl /c /I. /EHsc /DWITH_NONAMESPACES /DSOAP_FMAC1=__declspec(dllexport) /\n+DSOAP_FMAC3=__declspec(dllexport) /DSOAP_STD_EXPORTS envC.cpp stdsoap2.cpp\n+C:> link /LIBPATH ws2_32.lib /OUT:mygsoap.dll /DLL envC.obj stdsoap2.obj\n+Note: as of gSOAP 2.8.30 and later, the DLL export macros shown here are all\n+set with one pre-processor definition #SOAP_STD_EXPORTS.\n+Alternatively, you can compile with /D #WITH_SOAPDEFS_H and put the macro\n+definitions in soapdefs.h. This exports all functions which are preceded by the\n+macro #SOAP_FMAC1 in the soapcpp2.cpp source file and macro #SOAP_FMAC3 in the\n+envC.cpp source file.\n+Finally, note that the gSOAP source code package contains a lot of .c source\n+code files. Mixing C with C++ files is not recommended with Visual Studio and\n+will lead to run-time errors when building DLLs. Therefore, always rename .c\n+source code files to .cpp source code files when creating DLLs.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Creating client and server DLLs\n+Compile the soapClientLib.cpp and soapServerLib.cpp sources as DLLs by using\n+the MSVC Pre-Processor definitions SOAP_FMAC5=__declspec(dllexport) and\n+SOAP_CMAC=__declspec(dllexport), and by using the C++ compiler option /\n+D #WITH_NONAMESPACES. All of these macros are set as a shorthand with one pre-\n+processor definition #SOAP_STD_EXPORTS (requires gSOAP 2.8.30 or later).\n+This DLL links to stdsoap2.dll we created in Section Creating_the_base\n+stdsoap2.dll.\n+To create multiple DLLs in the same project directory, you should use soapcpp2\n+-p name option -p name to rename the generated soapClientLib.cpp and\n+soapServerLib.cpp (and associated) files. The -p name option specifies a name\n+prefix to replace the soap file name prefix. Another way is to use C++\n+namespaces with soapcpp2 -q name option -q name, if the interface header file\n+input to soapcpp2 does not already declare a C++ namespace. A clean separation\n+of libraries can also be achieved with C++ namespaces, see Section How_to_build\n+a_client_or_server_in_a_C++_code_namespace .\n+Unless you use the client proxy and server object classes (soapXYZProxy.h and\n+soapXYZService.h), all client and server applications must explicitly set the\n+namespaces value of the soap context with:\n+soap_set_namespaces(soap, namespaces);\n+where the namespaces[] table should be defined in the client/server source.\n+These tables are generated in the .nsmap files. The tables are renamed for\n+convenience using soapcpp2 -n option -n, see Section soapcpp2_options .\n+\ud83d\udd1d Back_to_table_of_contents\n+ How to build modules and libraries with the #module directive\n+The #module directive is used to build modules with soapcpp2. A library can be\n+built from a module and linked with multiple Web services applications. The\n+directive should appear at the top of the interface header file for soapcpp2\n+and has the following formats:\n+#module \"name\"\n+and\n+#module \"name\" \"fullname\"\n+where the name must be a unique short name for the module. The name is case\n+insensitive and must not exceed 4 characters in length. The fullname, when\n+present, represents the full name of the module and is used to prefix the\n+function names of the generated serializers replacing the usual soap prefix. If\n+absent, the short name is used to prefix the function names of the serializers.\n+The rest of the content of the interface header file includes type declarations\n+and optionally the declarations of service operations and SOAP Headers and\n+Faults that are universally used by SOAP services, when applicable. When the\n+soapcpp2 tool processes the header file module, it will generate the source\n+codes for a library. The Web services application that uses the library should\n+use a header file that imports the module with the #import directive, for\n+example:\n+/* Contents of file \"module.h\" */\n+#module \"test\"\n+// types and typedefs become module-specific\n+typedef LONG64 xsd__long;\n+char*;\n+// a module-specific struct\n+struct ns__S\n+{\n+... // members\n+};\n+The module.h data binding interface header file for soapcpp2 declares module-\n+specific serializable types LONG64, xsd__long, char*, and a struct ns__S. The\n+module name is \"test\", so the soapcpp2 tool produces a testC.cpp file with the\n+XML serializers for these types. The testC.cpp data binding implementation\n+source code can be separately compiled and linked with an application. If\n+service operations are declared in the interface header file as function\n+prototypes, we also get testClient.cpp client stub functions and testServer.cpp\n+server skeleton functions.\n+There are some limitations for module imports:\n+ * A module must be imported into another interface header to use the\n+ module's type definitions.\n+ * When multiple modules are imported, the types that they declare must be\n+ declared in one module only to avoid name clashes and link errors. You\n+ cannot create two modules that declare or use the same type and import\n+ these modules separately into another header file. When using modules,\n+ consider creating a module hierarchy such that types are declared only\n+ once and by only one module when these modules must be linked.\n+With modules, the source code serializers for the types defined in the modules\n+are generated with soapcpp2 separately. For example, assume that we have a\n+module module.h:\n+/* Contents of file \"module.h\" */\n+#module \"test\"\n+struct ns__S\n+{\n+char *name;\n+int amount;\n+};\n+and a header file example.h that uses it:\n+/* Contents of file \"example.h\" */\n+#import \"module.h\"\n+int ns__webmethod(const char *code, struct ns__S *record, int *result);\n+The module is compiled as follows:\n+soapcpp2 module1.h\n+This generates the files testStub.h, testH.h, and testC.cpp with serializers\n+for struct ns__S but also for char* and int.\n+Running soapcpp2 on example.h imports the module definitions, but does not\n+generate serializers for struct ns__S, char* and int since these are defined by\n+module.h:\n+soapcpp2 -CL example.h\n+An example client application that calls the client stub function:\n+#include \"soapH.h\"\n+#include \"ns.nsmap\"\n+int main()\n+{\n+struct soap *soap = soap_new();\n+struct ns__S s;\n+soap_default_ns__S(soap, &s);\n+s.name = soap_strdup(soap, \"name\");\n+s.amount = 124;\n+int n;\n+if (soap_call_ns__webmethod(soap, endpoint, NULL, \"code\", &s, &n))\n+soap_print_fault(soap, stderr);\n+else\n+printf(\"OK n = %d\\n\", n);\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+}\n+We compile this example as follows:\n+c++ -o example example.cpp testC.cpp soapC.cpp soapClient.cpp stdsoap2.cpp\n+Modules may help to define a modular hierarchy of libraries with reusable\n+serializable types.\n+\ud83d\udd1d Back_to_table_of_contents\n+ Plugins, modules, and extensions\n+Plugins offer a convenient extension mechanism for the gSOAP toolkit by\n+extending the capabilities of its engine. When the plugin registers with the\n+gSOAP engine, it has full access to the run-time settings and the engine's\n+function callbacks. Upon registry, the plugin's local data is associated with\n+the soap context. By overriding the callbacks with the plugin's callbacks, the\n+plugin extends or modifies the engine's capabilities. The local plugin data can\n+be accessed through a lookup function, usually invoked within a callback\n+function to access the plugin data. The registry and lookup functions are:\n+int soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap\n+*soap, struct soap_plugin *p, void *arg), void *arg)\n+soap_register_plugin_arg\n+int soap_register_plugin_arg(struct soap *soap, int(*fcreate)(struct soap *,\n+struct soap_plugin *, void *), void *arg)\n+Register a plugin with an argument.\n+void* soap_lookup_plugin(struct soap*, const char*);\n+The soap_copy function returns a new dynamically allocated soap context that is\n+a copy of another, such that no data is shared between the copy and the\n+original context. The soap_copy function invokes the copy functions of the\n+registered plugins to copy the plugins' local data. The soap_done and soap_free\n+functions de-registers all plugin.\n+The follow example overrides the send and receive callbacks to copy all\n+messages that are sent and received to the terminal (stderr).\n+First, we write a header file plugin.h to define the local plugin data\n+structure(s) and we define a global name to identify the plugin:\n+#include \"stdsoap2.h\"\n+#define PLUGIN_ID \"PLUGIN-1.0\" // some name to identify plugin\n+struct plugin_data // local plugin data\n+{\n+int (*fsend)(struct soap*, const char*, size_t); // to save and use send\n+callback\n+size_t (*frecv)(struct soap*, char*, size_t); // to save and use recv callback\n+};\n+int plugin(struct soap *soap, struct soap_plugin *plugin, void *arg);\n+stdsoap2.h\n+This file defines the common macros, types and functions of the gSOAP API\n+grouped by modules\n+Then, we write the plugin registry function and the callbacks:\n+#include \"plugin.h\"\n+static const char plugin_id[] = PLUGIN_ID; // the plugin id\n+static int plugin_init(struct soap *soap, struct plugin_data *data);\n+static int plugin_copy(struct soap *soap, struct soap_plugin *dst, struct\n+soap_plugin *src);\n+static void plugin_delete(struct soap *soap, struct soap_plugin *p);\n+static int plugin_send(struct soap *soap, const char *buf, size_t len);\n+static size_t plugin_recv(struct soap *soap, char *buf, size_t len);\n+// the registry function:\n+int plugin(struct soap *soap, struct soap_plugin *p, void *arg)\n+{\n+p->id = plugin_id;\n+p->data = (void*)malloc(sizeof(struct plugin_data));\n+p->fcopy = plugin_copy; /* optional: when set the plugin must copy its local\n+data */\n+p->fdelete = plugin_delete;\n+if (p->data)\n+{\n+if (plugin_init(soap, (struct plugin_data*)p->data))\n+{\n+free(p->data); // error: could not init\n+return SOAP_EOM; // return error\n+}\n+}\n+return SOAP_OK;\n+}\n+static int plugin_init(struct soap *soap, struct plugin_data *data)\n+{\n+data->fsend = soap->fsend; // save old recv callback\n+data->frecv = soap->frecv; // save old send callback\n+soap->fsend = plugin_send; // replace send callback with new\n+soap->frecv = plugin_recv; // replace recv callback with new\n+return SOAP_OK;\n+}\n+// copy plugin data, called by soap_copy()\n+// This is important: we need a deep copy to avoid data sharing by two contexts\n+static int plugin_copy(struct soap *soap, struct soap_plugin *dst, struct\n+soap_plugin *src)\n+{\n+if (!(dst->data = (struct plugin_data*)malloc(sizeof(struct plugin_data))))\n+return SOAP_EOM;\n+*dst->data = *src->data;\n+return SOAP_OK;\n+}\n+// plugin deletion, called by soap_done()\n+static void plugin_delete(struct soap *soap, struct soap_plugin *p)\n+{\n+free(p->data); // free allocated plugin data\n+}\n+// the new send callback\n+static int plugin_send(struct soap *soap, const char *buf, size_t len)\n+{\n+struct plugin_data *data = (struct plugin_data*)soap_lookup_plugin(soap,\n+plugin_id); // fetch plugin's local data\n+fwrite(buf, len, 1, stderr); // write message to stderr\n+return data->fsend(soap, buf, len); // pass data on to old send callback\n+}\n+// the new receive callback\n+static size_t plugin_recv(struct soap *soap, char *buf, size_t len)\n+{\n+struct plugin_data *data = (struct plugin_data*)soap_lookup_plugin(soap,\n+plugin_id); // fetch plugin's local data\n+size_t res = data->frecv(soap, buf, len); // get data from old recv callback\n+fwrite(buf, res, 1, stderr);\n+return res;\n+}\n+SOAP_EOM\n+#define SOAP_EOM\n+A soap_status error code: out of memory.\n+Definition: stdsoap2.h:2371\n+It is the responsibility of the plugin to handle registry (init), copy, and\n+deletion of the plugin data and reset callbacks.\n+The fdelete callback of struct soap_plugin must be set to de-register the\n+plugin and let it delete its resources.\n+A plugin is copied along with its corresponding soap context with the soap_copy\n+call. This function copies a soap context and the chain of plugins. It is up to\n+the plugin implementation to share the plugin data or not as follows:\n+ * if the fcopy() callback is set by the plugin initialization, this\n+ callback will be called to allow the plugin to copy its local data upon a\n+ soap_copy call. When soap_done or soap_free is called on this soap\n+ context copy, the fdelete() callback is called for deallocation and\n+ cleanup of the local data.\n+ * if the fcopy() callback is not set, then the plugin data will be shared\n+ (i.e. the data pointer points to the same address). The fdelete()\n+ callback will not be called upon a soap_done on a copy of the soap\n+ context . The fdelete() callback will be called for the original soap\n+ context with which the plugin was registered.\n+The example plugin should be used as follows:\n+struct soap *soap = soap_new();\n+soap_register_plugin(soap, plugin);\n+To pass a void* argument to the plugin's registry function use:\n+struct soap *soap = soap_new();\n+soap_register_plugin_arg(soap, plugin, arg);\n+Additional documentation for the growing number of gSOAP plugins can be found\n+at https://www.genivia.com/doc. A number of example plugins are included in the\n+gSOAP source code package's gsoap/plugin directory. Some of these plugins are\n+discussed in the next sections.\n+See also API documentation Module Plugins_and_plugin_registry_functions .\n+\ud83d\udd1d Back_to_table_of_contents\n+ DOM API overview\n+The DOM API is not a plugin, but an extension that provides a DOM API as a\n+separate source code file to compile and link with gSOAP applications to\n+enabled the gSOAP DOM. XML DOM processing is optional, and enabled with wsdl2h\n+-d_option_-d to generate DOM structures for xsd:anyType, xsd:any, and xsd:\n+anyAttribute schema components, which are enabled with #import \"dom.h\" in an\n+interface header file for soapcpp2. This imports gsoap/import/dom.h. Then\n+compile gsoap/dom.c for C or gsoap/dom.cpp for C++ with your application.\n+To use the DOM API with Web services, add #import \"dom.h\" to the interface\n+header file or use wsdl2h_-d_option_-d:\n+#import \"dom.h\"\n+This declares xsd__anyType and xsd__anyAttribute types.\n+A DOM element node is serialized with the xsd__anyType serializable type. The\n+underlying implementation type of xsd__anyType is soap_dom_element. One or more\n+DOM attribute nodes are serialized with the xsd__anyAttribute serializable\n+type. The underlying implementation type of xsd__anyAttribute is\n+soap_dom_attribute, which is a linked list.\n+#import \"dom.h\" // imports xsd__anyType as a DOM node\n+class ns__data : public xsd__anyType\n+{ public:\n+xsd__anyType* foo; // Store element in DOM soap_dom_element\n+xsd__anyType __any; // Store any element content in DOM soap_dom_element\n+@ xsd__anyAttribute __anyAttribute; // Store anyAttribute content in DOM\n+soap_dom_attribute linked node structure\n+};\n+To manipulate the DOM elements and attributes we use the DOM API functions\n+documented in the gSOAP XML_DOM_API_documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The message logging plugin\n+The message logging plugin can be used to selectively log inbound and outbound\n+messages to a file or stream. It also keeps access statistics to log the total\n+number of bytes sent and received.\n+To use the plugin, compile and link your application with logging.c located in\n+the gsoap/plugin directory of the gSOAP package. To enable the plugin in your\n+code, register the plugin and set the streams as follows:\n+#include \"logging.h\"\n+struct soap *soap = soap_new();\n+size_t bytes_in;\n+size_t bytes_out;\n+if (soap_register_plugin(soap, logging))\n+... // failed to register\n+... //\n+soap_set_logging_inbound(soap, stdout);\n+soap_set_logging_outbound(soap, stdout);\n+... // process messages\n+soap_set_logging_inbound(soap, NULL); // disable logging\n+soap_set_logging_outbound(soap, NULL); // disable logging\n+soap_logging_stats(soap, &bytes_out, &bytes_in);\n+... //\n+soap_reset_logging_stats(soap);\n+soap_set_logging_outbound\n+void soap_set_logging_outbound(struct soap *soap, FILE *fd)\n+Specify outbound message logging with the logging plugin.\n+soap_reset_logging_stats\n+void soap_reset_logging_stats(struct soap *soap)\n+Reset messaging statistics with the logging plugin.\n+soap_logging_stats\n+void soap_logging_stats(struct soap *soap, size_t *sent, size_t *recv)\n+Collect messaging statistics with the logging plugin.\n+soap_set_logging_inbound\n+void soap_set_logging_inbound(struct soap *soap, FILE *fd)\n+Specify inbound message logging with the logging plugin.\n+logging\n+int logging(struct soap *, struct soap_plugin *, void *)\n+The logging plugin registration function.\n+If you use soap_copy to copy the soap context with the plugin, the plugin's\n+state will be shared by the copy. The plugin is thread-safe, but does not use a\n+lock to protect the internal statistics counters to ensure the speed of\n+messaging is not compromised, meaning that you should not fully rely on the\n+statistics to be 100% accurate for multi-threaded services.\n+See also logging.\n+\ud83d\udd1d Back_to_table_of_contents\n+ RESTful server-side API with the HTTP GET plugin\n+Server-side use of RESTful HTTP GET operations is supported with the http_get\n+HTTP GET plugin gsoap/plugin/httpget.c.\n+The HTTP GET plugin allows your server to handle RESTful HTTP GET requests and\n+at the same time still serve SOAP-based POST requests. The plugin provides\n+support to client applications to issue HTTP GET operations to a server.\n+Note that HTTP GET requests can also be handled at the server side with the\n+soap::fget callback, see Section Function_callbacks_for_customized_I/O_and_HTTP\n+handling . However, the HTTP GET plugin also keeps statistics on the number of\n+successful POST and GET exchanges and failed operations (HTTP faults, SOAP\n+Faults, etc.). It also keeps hit histograms accumulated for up to a year of\n+running time.\n+To use the http_get plugin, compile and link your application with httpget.c\n+located in the gsoap/plugin directory of the gSOAP package. To enable the\n+plugin in your code, register the plugin with your HTTP GET handler function as\n+follows:\n+#include \"httpget.h\"\n+int main()\n+{\n+struct soap *soap = soap_new();\n+if (soap_register_plugin_arg(soap, http_get, (void*)my_http_get_handler))\n+soap_print_fault(soap, stderr); // failed to register\n+... //\n+struct http_get_data *httpgetdata;\n+httpgetdata = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);\n+if (!httpgetdata)\n+... // if the plugin registered OK, there is certainly data but can't hurt to\n+check\n+... // process messages\n+size_t get_ok = httpgetdata->stat_get;\n+size_t post_ok = httpgetdata->stat_post;\n+size_t errors = httpgetdata->stat_fail;\n+time_t now = time(NULL);\n+struct tm *T;\n+T = localtime(&now);\n+size_t hitsthisminute = httpgetdata->hist_min[T->tm_min];\n+size_t hitsthishour = httpgetdata->hist_hour[T->tm_hour];\n+size_t hitstoday = httpgetdata->hist_day[T->tm_yday];\n+}\n+An HTTP GET handler can simply produce some HTML content, or any other type of\n+content by sending data using soap_response:\n+int my_http_get_handler(struct soap *soap)\n+{\n+soap->http_content = \"text/html\";\n+if (soap_response(soap, SOAP_FILE)\n+|| soap_send(soap, \"Hello\")\n+|| soap_end_send(soap)\n+return soap_closesock(soap);\n+return SOAP_OK; // return SOAP_OK or HTTP error code, e.g. 404\n+}\n+If you use soap_copy to copy the soap context with the plugin, the plugin's\n+data will be shared by the copy. Therefore, the statistics are not 100%\n+guaranteed to be accurate for multi-threaded services since race conditions on\n+the counters may occur. Mutex is not used to update the counters to avoid\n+introducing expensive synchronization points. If 100% server-side accuracy is\n+required, add mutex at the points indicated in the httpget.c code.\n+The client-side use of HTTP GET is provided by the soap_GET operation. To\n+receive a SOAP/XML (response) message ns:methodResponse, use:\n+int main()\n+{\n+struct soap *soap = soap_new();\n+if (soap_GET(soap, endpoint, NULL))\n+... // error\n+else if (soap_recv_ns__webmethodResponse(soap, ...))\n+... // error\n+else\n+... // success\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_done(soap);\n+soap_GET\n+int soap_GET(struct soap *soap, const char *endpoint, const char *action)\n+HTTP GET content from server.\n+To receive any HTTP Body data into a buffer, use:\n+int main()\n+{\n+struct soap *soap = soap_new();\n+char *response = NULL;\n+size_t response_len;\n+if (soap_GET(soap, endpoint, NULL)\n+|| (response = soap_http_get_body(soap, &response_len)) == NULL\n+|| soap_end_recv(&soap))\n+... // error\n+else\n+... // use the response string (NULL indicates no body or error)\n+soap_destroy(&soap);\n+soap_end(&soap);\n+soap_done(&soap);\n+}\n+soap_end_recv\n+int soap_end_recv(struct soap *soap)\n+Finalize the context after receiving.\n+soap_http_get_body\n+char * soap_http_get_body(struct soap *soap, size_t *len)\n+Get the HTTP body message as a string.\n+See also http_get.\n+\ud83d\udd1d Back_to_table_of_contents\n+ RESTful server-side API with the HTTP POST plugin\n+Server-side use of RESTful HTTP POST, PUT, PATCH, and DELETE operations are\n+supported with the http_post HTTP POST plugin gsoap/plugin/httppost.c.\n+The http_post HTTP POST plugin allows your server to handle RESTful HTTP POST\n+requests and at the same time still serve SOAP-based POST requests. The plugin\n+also provides support for client applications to issue HTTP POST operations to\n+a server.\n+To simplify the server-side handling of POST requests, handlers can be\n+associated with media types:\n+struct http_post_handlers my_handlers[] =\n+{\n+{ \"image/jpg\", jpeg_handler },\n+{ \"image/*\", image_handler },\n+{ \"text/html\", html_handler },\n+{ \"text/*\", text_handler },\n+{ \"POST\", generic_POST_handler },\n+{ \"PUT\", generic_PUT_handler },\n+{ \"PATCH\", generic_PATCH_handler },\n+{ \"DELETE\", generic_DELETE_handler },\n+{ NULL }\n+};\n+Note that * and - can be used as wildcards to match any text and any character,\n+respectively. Media types may have optional parameters after ; such as charset\n+and boundary. These parameters can be matched by the media type patterns in the\n+table. Patterns that are more specific must precede patterns that are less\n+specific in the table. For example, \"text/xml;*charset=utf-8*\" must precede\n+\"text/xml\" which must precede \"text/*\". Note that \"text/xml\" also matches any\n+parameters of the media type of the message reveived, such as \"text/xml;\n+charset=utf-8\" (only since gSOAP version 2.8.75).\n+The handlers are functions that will be invoked when a POSTed request message\n+matching media type is sent to the server.\n+An example image handler that checks the specific image type:\n+int image_handler(struct soap *soap)\n+{\n+const char *buf;\n+size_t len;\n+// if necessary, check type in soap->http_content\n+if (soap->http_content && !soap_tag_cmp(soap->http_content, \"image/gif\")\n+return 404; // HTTP error 404\n+if ((buf = soap_http_get_body(soap, &len)) == NULL)\n+return soap->error;\n+// ... now process image in buf\n+// reply with empty HTTP 200 OK response:\n+return soap_send_empty_response(soap, 200);\n+}\n+soap_tag_cmp\n+int soap_tag_cmp(const char *string, const char *pattern)\n+Compare string to a pattern.\n+The above example returns HTTP OK. If content is supposed to be returned, then\n+use:\n+struct soap *soap = soap_new();\n+... //\n+soap->http_content = \"image/jpeg\"; // a jpeg image to return back\n+if (soap_response(soap, SOAP_FILE)) // SOAP_FILE sets custom http content\n+|| soap_send_raw(soap, buf, len) // send image\n+|| soap_end_send(soap)\n+return soap_closesock(soap);\n+return SOAP_OK;\n+For client applications to use HTTP POST, use the soap_POST operation:\n+struct soap *soap = soap_new();\n+... //\n+char *buf; // holds the HTTP request/response body data\n+size_t len; // length of data\n+... // populate buf and len with message to send\n+if (soap_POST(soap, \"URL\", \"SOAP action or NULL\", \"media type\")\n+|| soap_send_raw(soap, buf, len);\n+|| soap_end_send(soap))\n+... // error\n+if (soap_begin_recv(&soap)\n+|| (buf = soap_http_get_body(soap, &len)) == NULL\n+|| soap_end_recv(&soap))\n+... // error\n+// ... use buf[0..len-1]\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+soap_begin_recv\n+int soap_begin_recv(struct soap *soap)\n+Initialize the context for receiving.\n+soap_POST\n+int soap_POST(struct soap *soap, const char *endpoint, const char *action,\n+const char *type)\n+HTTP POST content to server.\n+Similarly, soap_PUT, soap_PATCH, and soap_DELETE commands are provided for PUT,\n+PATCH, and DELETE handling.\n+To support HTTP pipelining we use the http_pipe plugin, which can be used at\n+the server side to enable HTTP pipelining automatically, when registered. The\n+plugin can also be used at the client side, though this is only necessary in\n+scenarios that require the client to receive multiple messages without\n+intermittend sends, i.e. multiple sends followed by multiple receives by the\n+same thread using the same soap context. However, clients should use multiple\n+threads when HTTP pipelining is used to prevent blocking. See the gsoap/\n+samples/async folder in the gSOAP package for explanation and examples.\n+See also http_post and http_pipe.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The HTTP digest authentication plugin\n+The HTTP digest authentication plugin enables a more secure authentication\n+scheme compared to basic authentication. HTTP basic authentication sends\n+unencrypted userids and passwords over the net, while digest authentication\n+does not exchange passwords but exchanges checksums of passwords (and other\n+data such as nonces to avoid replay attacks). For more details, please see RFC\n+2617.\n+The HTTP digest authentication can be used next to the built-in basic\n+authentication, or basic authentication can be rejected to tighten security.\n+The server must have a database with userid's and passwords (in plain text\n+form). The client, when challenged by the server, checks the authentication\n+realm provided by the server and sets the userid and passwords for digest\n+authentication. The client application can temporarily store the userid and\n+password for a sequence of message exchanges with the server, which is faster\n+than repeated authorization challenges and authentication responses.\n+At the client side, the plugin is registered and service invocations are\n+checked for authorization challenges (HTTP error code 401). When the server\n+challenges the client, the client should set the userid and password and retry\n+the invocation. The client can determine the userid and password based on the\n+authentication realm part of the server's challenge. The authentication\n+information can be temporarily saved for multiple invocations.\n+Client-side example:\n+#include \"httpda.h\"\n+int main()\n+{\n+struct soap *soap = soap_new();\n+if soap_register_plugin(soap, http_da))\n+exit(EXIT_FAILURE); // failed to register\n+if (soap_call_ns__webmethod(soap, ...))\n+{\n+if (soap->error == 401) // challenge: HTTP authentication required\n+{\n+if (!strcmp(soap->authrealm, authrealm)) // optionally determine authentication\n+realm\n+{\n+struct http_da_info info; // to store userid and passwd\n+http_da_save(soap, &info, authrealm, userid, passwd); // set userid and passwd\n+for this realm\n+if (soap_call_ns__webmethod(soap, ...)) // retry\n+{\n+... //\n+soap_end(soap); // userid and passwd were deallocated\n+http_da_restore(soap, &info); // restore userid and passwd\n+if (!soap_call_ns__webmethod(soap, ...)) // another call\n+... //\n+}\n+}\n+}\n+}\n+http_da_release(soap, &info); // to remove all userid and passwd\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+}\n+This code supports both basic and digest authentication.\n+The server can challenge a client using HTTP code 401. With the plugin, HTTP\n+digest authentication challenges are send. Without the plugin, basic\n+authentication challenges are send.\n+Each server method can implement authentication as desired and may enforce\n+digest authentication or may also accept basic authentication responses. To\n+verify digest authentication responses, the server should compute and compare\n+the checksums using the plugin's http_da_verify_post function for HTTP POST\n+requests (and http_da_verify_get for HTTP GET requests with the HTTP GET\n+plugin) as follows:\n+#include \"httpda.h\"\n+int main()\n+{\n+struct soap *soap = soap_new();\n+if (soap_register_plugin(soap, http_da))\n+exit(EXIT_FAILURE); // failed to register\n+... // use soap_bind and soap_accept in a (multi-threaded) service loop\n+if (soap_serve(soap))\n+soap_print_fault(soap, stderr);\n+... //\n+soap_destroy(soap);\n+soap_end(soap);\n+soap_free(soap);\n+}\n+int ns__webmethod(struct soap *soap, ...)\n+{\n+if (soap->userid && soap->passwd) // client used basic authentication\n+{\n+// may decide not to handle, but if ok then go ahead and compare info:\n+if (!strcmp(soap->userid, userid) && !strcmp(soap->passwd, passwd))\n+{\n+... // handle request\n+return SOAP_OK;\n+}\n+}\n+else if (soap->authrealm && soap->userid) // Digest authentication\n+{\n+passwd = ...; // database lookup on userid and authrealm to find passwd\n+if (!strcmp(soap->authrealm, authrealm) && !strcmp(soap->userid, userid))\n+{\n+if (!http_da_verify_post(soap, passwd))\n+{\n+... // handle request\n+return SOAP_OK;\n+}\n+}\n+}\n+soap->authrealm = authrealm; // set realm for challenge\n+return 401; // Not authorized, challenge digest authentication\n+}\n+For more details, including how to configure HTTP Digest authentication for\n+proxies, see the HTTP_digest_authentication_plugin documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The HTTP sessions plugin\n+The plugin code is located in the gsoap/plugin directory containing sessions.h\n+and sessions.c.\n+For more details, see the HTTP_sessions_plugin documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The Apache module plugin\n+The plugin code is located in the gsoap/mod_gsoap/mod_gsoap-0.9/apache_20\n+directory.\n+For more details, see the Apache_module documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The ISAPI extension plugin\n+The plugin code is located in the gsoap/mod_gsoap/gsoap_win/isapi directory.\n+For more details, see the ISAPI_extension documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The CURL plugin\n+The plugin code is located in the gsoap/plugin directory containing curlapi.h\n+and curlapi.c.\n+For more details, see the CURL_plugin documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The WinInet plugin\n+The plugin code is located in the gsoap/mod_gsoap/gsoap_win/wininet directory.\n+For more details, see the WinInet_plugin documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The WS-Addressing plugin\n+The plugin code is located in the gsoap/plugin directory containing wsaapi.h\n+and wsaapi.c (to be used in C and C++).\n+To enable WS-Addressing 2005 (and support for 8/2004), the service definitions\n+header file for soapcpp2 should include the following imports:\n+#import \"import/wsa5.h\"\n+This imports the SOAP header elements required by WS-Addressing.\n+For more details, see the WS-Addressing_plugin documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The WS-ReliableMessaging plugin\n+The plugin code is located in the gsoap/plugin directory containing wsrmapi.h\n+and wsrmapi.c (to be used in C and C++).\n+Also needed are threads.h and threads.c for multi-threading and locking\n+support.\n+To enable WS-ReliableMessaging, the service definitions header file for\n+soapcpp2 should include the following imports:\n+#import \"import/wsrm.h\"\n+#import \"import/wsa5.h\"\n+This imports the SOAP header elements required by WS-ReliableMessaging.\n+For more details, see the WS-ReliableMessaging_plugin documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The WS-Security plugin\n+The plugin code is located in the gsoap/plugin directory containing wsseapi.h\n+and wsseapi.c (to be used in C and C++).\n+Also needed are: smdevp.h and smdevp.c for streaming XML signature and message\n+digest engine, mecevp.h and mecevp.c for the streaming XML encryption engine,\n+threads.h and threads.c for multi-threading and locking support.\n+To enable WS-Security, the service definitions header file for soapcpp2 should\n+include the following imports:\n+#import \"import/wsse.h\"\n+This imports the SOAP header elements required by WS-Security.\n+For more details, see the WS-Security_plugin documentation.\n+\ud83d\udd1d Back_to_table_of_contents\n+ The WS-Discovery plugin\n+Basically, to add WS-Discovery support the following event handlers must be\n+defined and linked:\n+void wsdd_event_Hello(struct soap *soap,\n+unsigned int InstanceId,\n+const char *SequenceId,\n+unsigned int MessageNumber,\n+const char *MessageID,\n+const char *RelatesTo,\n+const char *EndpointReference,\n+const char *Types,\n+const char *Scopes,\n+const char *MatchBy,\n+const char *XAddrs,\n+unsigned int MetadataVersion)\n+void wsdd_event_Bye(struct soap *soap,\n+unsigned int InstanceId,\n+const char *SequenceId,\n+unsigned int MessageNumber,\n+const char *MessageID,\n+const char *RelatesTo,\n+const char *EndpointReference,\n+const char *Types,\n+const char *Scopes,\n+const char *MatchBy,\n+const char *XAddrs,\n+unsigned int MetadataVersion)\n+soap_wsdd_mode wsdd_event_Probe(struct soap *soap,\n+const char *MessageID,\n+const char *ReplyTo,\n+const char *Types,\n+const char *Scopes,\n+const char *MatchBy,\n+struct wsdd__ProbeMatchesType *ProbeMatches)\n+void wsdd_event_ProbeMatches(struct soap *soap,\n+unsigned int InstanceId,\n+const char *SequenceId,\n+unsigned int MessageNumber,\n+const char *MessageID,\n+const char *RelatesTo,\n+struct wsdd__ProbeMatchesType *ProbeMatches)\n+soap_wsdd_mode wsdd_event_Resolve(struct soap *soap,\n+const char *MessageID,\n+const char *ReplyTo,\n+const char *EndpointReference,\n+struct wsdd__ResolveMatchesType *ResolveMatches)\n+void wsdd_event_ResolveMatches(struct soap *soap,\n+unsigned int InstanceId,\n+const char *SequenceId,\n+unsigned int MessageNumber,\n+const char *MessageID,\n+const char *RelatesTo,\n+const char *EndpointReference,\n+const char *Types,\n+const char *Scopes,\n+const char *MatchBy,\n+const char *XAddrs,\n+unsigned int MetadataVersion)\n+These event handlers will be invoked when inbound WS-Discovery messages arrive\n+using:\n+if (!soap_valid_socket(soap_bind(soap, NULL, port, BACKLOG)))\n+... // error\n+if (soap_wsdd_listen(soap, timeout))\n+... // error\n+which will listen for timeout seconds to inbound WS-Discovery messages on a\n+port and dispatches them to the event handlers. A negative timeout value\n+specifies the timeout in microseconds.\n+For more details, see the WS-Discovery_plugin documentation.\n+ Copyright\n+Copyright (c) 2000-2020, Robert A. van Engelen, Genivia Inc.\n+All rights reserved.\n+===============================================================================\n+ Copyright (C) 2021, Robert van Engelen, Genivia Inc., All Rights\n+ Reserved.\n+ Converted on Mon Mar 8 2021 13:06:23 by Doxygen 1.9.1\n+\n"}]}]}]}]}]}

    engine \n-0018e5a0: 203c 2f74 683e 3c74 6820 636c 6173 733d result \n-0018e5d0: 2020 3c2f 7468 3e3c 2f74 723e 0a3c 7472
    Th\n-0018e660: 6520 6465 6661 756c 7420 736f 6674 7761 e default softwa\n-0018e670: 7265 2065 6e67 696e 6520 666f 7220 6372 re engine for cr\n-0018e680: 7970 746f 6772 6170 6869 6320 6f70 6572 yptographic oper\n-0018e690: 6174 696f 6e73 2020 2020 3c2f 7464 3e3c ations
    o\n-0018e6f0: 7065 6e62 7364 5f64 6576 5f63 7279 7074 penbsd_dev_crypt\n-0018e700: 6f3c 2f63 6f64 653e 2020 203c 2f74 643e o OpenBSD suppor\n-0018e740: 7473 206b 6572 6e65 6c20 6c65 7665 6c20 ts kernel level \n-0018e750: 6372 7970 746f 6772 6170 6879 2020 2020 cryptography \n-0018e760: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    cswift Crypt\n-0018e7f0: 6f53 7769 6674 2061 6363 656c 6572 6174 oSwift accelerat\n-0018e800: 696f 6e20 6861 7264 7761 7265 2020 2020 ion hardware \n-0018e810: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    nCiphe\n-0018e8a0: 7220 4348 494c 2061 6363 656c 6572 6174 r CHIL accelerat\n-0018e8b0: 696f 6e20 6861 7264 7761 7265 2020 2020 ion hardware \n-0018e8c0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    atalla Compa\n-0018e950: 7120 4174 616c 6c61 2061 6363 656c 6572 q Atalla acceler\n-0018e960: 6174 696f 6e20 6861 7264 7761 7265 2020 ation hardware \n-0018e970: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    Nur\n-0018ea00: 6f6e 2061 6363 656c 6572 6174 696f 6e20 on acceleration \n-0018ea10: 6861 7264 7761 7265 2020 2020 3c2f 7464 hardware
    \n-0018ea70: 7562 7365 633c 2f63 6f64 653e 2020 203c ubsec <\n-0018ea80: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Broadcom u\n-0018eab0: 4253 6563 2061 6363 656c 6572 6174 696f BSec acceleratio\n-0018eac0: 6e20 6861 7264 7761 7265 2020 2020 3c2f n hardware
    aep \n-0018eb30: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Aep accel\n-0018eb60: 6572 6174 696f 6e20 6861 7264 7761 7265 eration hardware\n-0018eb70: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    sureware\n-0018ebd0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c